azure-native.containerservice.Snapshot
Explore with Pulumi AI
A node pool snapshot resource. API Version: 2021-08-01.
Example Usage
Create/Update Snapshot
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var snapshot = new AzureNative.ContainerService.Snapshot("snapshot", new()
    {
        CreationData = new AzureNative.ContainerService.Inputs.CreationDataArgs
        {
            SourceResourceId = "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0",
        },
        Location = "westus",
        ResourceGroupName = "rg1",
        ResourceName = "snapshot1",
        Tags = 
        {
            { "key1", "val1" },
            { "key2", "val2" },
        },
    });
});
package main
import (
	containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := containerservice.NewSnapshot(ctx, "snapshot", &containerservice.SnapshotArgs{
			CreationData: &containerservice.CreationDataArgs{
				SourceResourceId: pulumi.String("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"),
			},
			Location:          pulumi.String("westus"),
			ResourceGroupName: pulumi.String("rg1"),
			ResourceName:      pulumi.String("snapshot1"),
			Tags: pulumi.StringMap{
				"key1": pulumi.String("val1"),
				"key2": pulumi.String("val2"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.Snapshot;
import com.pulumi.azurenative.containerservice.SnapshotArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var snapshot = new Snapshot("snapshot", SnapshotArgs.builder()        
            .creationData(Map.of("sourceResourceId", "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"))
            .location("westus")
            .resourceGroupName("rg1")
            .resourceName("snapshot1")
            .tags(Map.ofEntries(
                Map.entry("key1", "val1"),
                Map.entry("key2", "val2")
            ))
            .build());
    }
}
import pulumi
import pulumi_azure_native as azure_native
snapshot = azure_native.containerservice.Snapshot("snapshot",
    creation_data=azure_native.containerservice.CreationDataArgs(
        source_resource_id="/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0",
    ),
    location="westus",
    resource_group_name="rg1",
    resource_name_="snapshot1",
    tags={
        "key1": "val1",
        "key2": "val2",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const snapshot = new azure_native.containerservice.Snapshot("snapshot", {
    creationData: {
        sourceResourceId: "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0",
    },
    location: "westus",
    resourceGroupName: "rg1",
    resourceName: "snapshot1",
    tags: {
        key1: "val1",
        key2: "val2",
    },
});
resources:
  snapshot:
    type: azure-native:containerservice:Snapshot
    properties:
      creationData:
        sourceResourceId: /subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0
      location: westus
      resourceGroupName: rg1
      resourceName: snapshot1
      tags:
        key1: val1
        key2: val2
Create Snapshot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Snapshot(name: string, args: SnapshotArgs, opts?: CustomResourceOptions);@overload
def Snapshot(resource_name: str,
             args: SnapshotArgs,
             opts: Optional[ResourceOptions] = None)
@overload
def Snapshot(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             resource_group_name: Optional[str] = None,
             creation_data: Optional[CreationDataArgs] = None,
             location: Optional[str] = None,
             resource_name_: Optional[str] = None,
             snapshot_type: Optional[Union[str, SnapshotType]] = None,
             tags: Optional[Mapping[str, str]] = None)func NewSnapshot(ctx *Context, name string, args SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)public Snapshot(string name, SnapshotArgs args, CustomResourceOptions? opts = null)
public Snapshot(String name, SnapshotArgs args)
public Snapshot(String name, SnapshotArgs args, CustomResourceOptions options)
type: azure-native:containerservice:Snapshot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SnapshotArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnapshotArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var azure_nativeSnapshotResource = new AzureNative.Containerservice.Snapshot("azure-nativeSnapshotResource", new()
{
    ResourceGroupName = "string",
    CreationData = 
    {
        { "sourceResourceId", "string" },
    },
    Location = "string",
    ResourceName = "string",
    SnapshotType = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := containerservice.NewSnapshot(ctx, "azure-nativeSnapshotResource", &containerservice.SnapshotArgs{
	ResourceGroupName: "string",
	CreationData: map[string]interface{}{
		"sourceResourceId": "string",
	},
	Location:     "string",
	ResourceName: "string",
	SnapshotType: "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
})
var azure_nativeSnapshotResource = new Snapshot("azure-nativeSnapshotResource", SnapshotArgs.builder()
    .resourceGroupName("string")
    .creationData(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .location("string")
    .resourceName("string")
    .snapshotType("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
azure_native_snapshot_resource = azure_native.containerservice.Snapshot("azure-nativeSnapshotResource",
    resource_group_name=string,
    creation_data={
        sourceResourceId: string,
    },
    location=string,
    resource_name_=string,
    snapshot_type=string,
    tags={
        string: string,
    })
const azure_nativeSnapshotResource = new azure_native.containerservice.Snapshot("azure-nativeSnapshotResource", {
    resourceGroupName: "string",
    creationData: {
        sourceResourceId: "string",
    },
    location: "string",
    resourceName: "string",
    snapshotType: "string",
    tags: {
        string: "string",
    },
});
type: azure-native:containerservice:Snapshot
properties:
    creationData:
        sourceResourceId: string
    location: string
    resourceGroupName: string
    resourceName: string
    snapshotType: string
    tags:
        string: string
Snapshot Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Snapshot resource accepts the following input properties:
- ResourceGroup stringName 
- The name of the resource group.
- CreationData Pulumi.Azure Native. Container Service. Inputs. Creation Data 
- CreationData to be used to specify the source agent pool resource ID to create this snapshot.
- Location string
- Resource location
- ResourceName string
- The name of the managed cluster resource.
- SnapshotType string | Pulumi.Azure Native. Container Service. Snapshot Type 
- The type of a snapshot. The default is NodePool.
- Dictionary<string, string>
- Resource tags
- ResourceGroup stringName 
- The name of the resource group.
- CreationData CreationData Args 
- CreationData to be used to specify the source agent pool resource ID to create this snapshot.
- Location string
- Resource location
- ResourceName string
- The name of the managed cluster resource.
- SnapshotType string | SnapshotType 
- The type of a snapshot. The default is NodePool.
- map[string]string
- Resource tags
- resourceGroup StringName 
- The name of the resource group.
- creationData CreationData 
- CreationData to be used to specify the source agent pool resource ID to create this snapshot.
- location String
- Resource location
- resourceName String
- The name of the managed cluster resource.
- snapshotType String | SnapshotType 
- The type of a snapshot. The default is NodePool.
- Map<String,String>
- Resource tags
- resourceGroup stringName 
- The name of the resource group.
- creationData CreationData 
- CreationData to be used to specify the source agent pool resource ID to create this snapshot.
- location string
- Resource location
- resourceName string
- The name of the managed cluster resource.
- snapshotType string | SnapshotType 
- The type of a snapshot. The default is NodePool.
- {[key: string]: string}
- Resource tags
- resource_group_ strname 
- The name of the resource group.
- creation_data CreationData Args 
- CreationData to be used to specify the source agent pool resource ID to create this snapshot.
- location str
- Resource location
- resource_name str
- The name of the managed cluster resource.
- snapshot_type str | SnapshotType 
- The type of a snapshot. The default is NodePool.
- Mapping[str, str]
- Resource tags
- resourceGroup StringName 
- The name of the resource group.
- creationData Property Map
- CreationData to be used to specify the source agent pool resource ID to create this snapshot.
- location String
- Resource location
- resourceName String
- The name of the managed cluster resource.
- snapshotType String | "NodePool" 
- The type of a snapshot. The default is NodePool.
- Map<String>
- Resource tags
Outputs
All input properties are implicitly available as output properties. Additionally, the Snapshot resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name
- SystemData Pulumi.Azure Native. Container Service. Outputs. System Data Response 
- The system metadata relating to this snapshot.
- Type string
- Resource type
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name
- SystemData SystemData Response 
- The system metadata relating to this snapshot.
- Type string
- Resource type
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name
- systemData SystemData Response 
- The system metadata relating to this snapshot.
- type String
- Resource type
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name
- systemData SystemData Response 
- The system metadata relating to this snapshot.
- type string
- Resource type
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name
- system_data SystemData Response 
- The system metadata relating to this snapshot.
- type str
- Resource type
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name
- systemData Property Map
- The system metadata relating to this snapshot.
- type String
- Resource type
Supporting Types
CreationData, CreationDataArgs    
- SourceResource stringId 
- This is the ARM ID of the source object to be used to create the target object.
- SourceResource stringId 
- This is the ARM ID of the source object to be used to create the target object.
- sourceResource StringId 
- This is the ARM ID of the source object to be used to create the target object.
- sourceResource stringId 
- This is the ARM ID of the source object to be used to create the target object.
- source_resource_ strid 
- This is the ARM ID of the source object to be used to create the target object.
- sourceResource StringId 
- This is the ARM ID of the source object to be used to create the target object.
CreationDataResponse, CreationDataResponseArgs      
- SourceResource stringId 
- This is the ARM ID of the source object to be used to create the target object.
- SourceResource stringId 
- This is the ARM ID of the source object to be used to create the target object.
- sourceResource StringId 
- This is the ARM ID of the source object to be used to create the target object.
- sourceResource stringId 
- This is the ARM ID of the source object to be used to create the target object.
- source_resource_ strid 
- This is the ARM ID of the source object to be used to create the target object.
- sourceResource StringId 
- This is the ARM ID of the source object to be used to create the target object.
SnapshotType, SnapshotTypeArgs    
- NodePool 
- NodePoolThe snapshot is a snapshot of a node pool.
- SnapshotType Node Pool 
- NodePoolThe snapshot is a snapshot of a node pool.
- NodePool 
- NodePoolThe snapshot is a snapshot of a node pool.
- NodePool 
- NodePoolThe snapshot is a snapshot of a node pool.
- NODE_POOL
- NodePoolThe snapshot is a snapshot of a node pool.
- "NodePool" 
- NodePoolThe snapshot is a snapshot of a node pool.
SystemDataResponse, SystemDataResponseArgs      
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
- createdAt string
- The timestamp of resource creation (UTC).
- createdBy string
- The identity that created the resource.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- The type of identity that last modified the resource.
- created_at str
- The timestamp of resource creation (UTC).
- created_by str
- The identity that created the resource.
- created_by_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:containerservice:Snapshot snapshot1 /subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0