1. Packages
  2. Azure Native
  3. API Docs
  4. containerservice
  5. Snapshot
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.containerservice.Snapshot

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

A node pool snapshot resource.

Uses Azure REST API version 2024-10-01. In version 2.x of the Azure Native provider, it used API version 2023-04-01.

Other available API versions: 2021-08-01, 2021-09-01, 2021-10-01, 2021-11-01-preview, 2022-01-01, 2022-01-02-preview, 2022-02-01, 2022-02-02-preview, 2022-03-01, 2022-03-02-preview, 2022-04-01, 2022-04-02-preview, 2022-05-02-preview, 2022-06-01, 2022-06-02-preview, 2022-07-01, 2022-07-02-preview, 2022-08-02-preview, 2022-08-03-preview, 2022-09-01, 2022-09-02-preview, 2022-10-02-preview, 2022-11-01, 2022-11-02-preview, 2023-01-01, 2023-01-02-preview, 2023-02-01, 2023-02-02-preview, 2023-03-01, 2023-03-02-preview, 2023-04-01, 2023-04-02-preview, 2023-05-01, 2023-05-02-preview, 2023-06-01, 2023-06-02-preview, 2023-07-01, 2023-07-02-preview, 2023-08-01, 2023-08-02-preview, 2023-09-01, 2023-09-02-preview, 2023-10-01, 2023-10-02-preview, 2023-11-01, 2023-11-02-preview, 2024-01-01, 2024-01-02-preview, 2024-02-01, 2024-02-02-preview, 2024-03-02-preview, 2024-04-02-preview, 2024-05-01, 2024-05-02-preview, 2024-06-02-preview, 2024-07-01, 2024-07-02-preview, 2024-08-01, 2024-09-01, 2024-09-02-preview, 2024-10-02-preview, 2025-01-01, 2025-01-02-preview, 2025-02-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native containerservice [ApiVersion]. See the version guide for details.

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/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0",
        },
        Location = "westus",
        ResourceGroupName = "rg1",
        ResourceName = "snapshot1",
        Tags = 
        {
            { "key1", "val1" },
            { "key2", "val2" },
        },
    });

});
Copy
package main

import (
	containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice/v3"
	"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/00000000-0000-0000-0000-000000000000/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
	})
}
Copy
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 com.pulumi.azurenative.containerservice.inputs.CreationDataArgs;
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(CreationDataArgs.builder()
                .sourceResourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0")
                .build())
            .location("westus")
            .resourceGroupName("rg1")
            .resourceName("snapshot1")
            .tags(Map.ofEntries(
                Map.entry("key1", "val1"),
                Map.entry("key2", "val2")
            ))
            .build());

    }
}
Copy
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/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0",
    },
    location: "westus",
    resourceGroupName: "rg1",
    resourceName: "snapshot1",
    tags: {
        key1: "val1",
        key2: "val2",
    },
});
Copy
import pulumi
import pulumi_azure_native as azure_native

snapshot = azure_native.containerservice.Snapshot("snapshot",
    creation_data={
        "source_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0",
    },
    location="westus",
    resource_group_name="rg1",
    resource_name_="snapshot1",
    tags={
        "key1": "val1",
        "key2": "val2",
    })
Copy
resources:
  snapshot:
    type: azure-native:containerservice:Snapshot
    properties:
      creationData:
        sourceResourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0
      location: westus
      resourceGroupName: rg1
      resourceName: snapshot1
      tags:
        key1: val1
        key2: val2
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. SnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. SnapshotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 = new AzureNative.ContainerService.Inputs.CreationDataArgs
    {
        SourceResourceId = "string",
    },
    Location = "string",
    ResourceName = "string",
    SnapshotType = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := containerservice.NewSnapshot(ctx, "azure-nativeSnapshotResource", &containerservice.SnapshotArgs{
	ResourceGroupName: pulumi.String("string"),
	CreationData: &containerservice.CreationDataArgs{
		SourceResourceId: pulumi.String("string"),
	},
	Location:     pulumi.String("string"),
	ResourceName: pulumi.String("string"),
	SnapshotType: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var azure_nativeSnapshotResource = new Snapshot("azure-nativeSnapshotResource", SnapshotArgs.builder()
    .resourceGroupName("string")
    .creationData(CreationDataArgs.builder()
        .sourceResourceId("string")
        .build())
    .location("string")
    .resourceName("string")
    .snapshotType("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
azure_native_snapshot_resource = azure_native.containerservice.Snapshot("azure-nativeSnapshotResource",
    resource_group_name="string",
    creation_data={
        "source_resource_id": "string",
    },
    location="string",
    resource_name_="string",
    snapshot_type="string",
    tags={
        "string": "string",
    })
Copy
const azure_nativeSnapshotResource = new azure_native.containerservice.Snapshot("azure-nativeSnapshotResource", {
    resourceGroupName: "string",
    creationData: {
        sourceResourceId: "string",
    },
    location: "string",
    resourceName: "string",
    snapshotType: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure-native:containerservice:Snapshot
properties:
    creationData:
        sourceResourceId: string
    location: string
    resourceGroupName: string
    resourceName: string
    snapshotType: string
    tags:
        string: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Snapshot resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
CreationData Pulumi.AzureNative.ContainerService.Inputs.CreationData
CreationData to be used to specify the source agent pool resource ID to create this snapshot.
Location Changes to this property will trigger replacement. string
The geo-location where the resource lives
ResourceName Changes to this property will trigger replacement. string
The name of the managed cluster resource.
SnapshotType string | Pulumi.AzureNative.ContainerService.SnapshotType
The type of a snapshot. The default is NodePool.
Tags Dictionary<string, string>
Resource tags.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
CreationData CreationDataArgs
CreationData to be used to specify the source agent pool resource ID to create this snapshot.
Location Changes to this property will trigger replacement. string
The geo-location where the resource lives
ResourceName Changes to this property will trigger replacement. string
The name of the managed cluster resource.
SnapshotType string | SnapshotType
The type of a snapshot. The default is NodePool.
Tags map[string]string
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
creationData CreationData
CreationData to be used to specify the source agent pool resource ID to create this snapshot.
location Changes to this property will trigger replacement. String
The geo-location where the resource lives
resourceName Changes to this property will trigger replacement. String
The name of the managed cluster resource.
snapshotType String | SnapshotType
The type of a snapshot. The default is NodePool.
tags Map<String,String>
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
creationData CreationData
CreationData to be used to specify the source agent pool resource ID to create this snapshot.
location Changes to this property will trigger replacement. string
The geo-location where the resource lives
resourceName Changes to this property will trigger replacement. string
The name of the managed cluster resource.
snapshotType string | SnapshotType
The type of a snapshot. The default is NodePool.
tags {[key: string]: string}
Resource tags.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
creation_data CreationDataArgs
CreationData to be used to specify the source agent pool resource ID to create this snapshot.
location Changes to this property will trigger replacement. str
The geo-location where the resource lives
resource_name Changes to this property will trigger replacement. str
The name of the managed cluster resource.
snapshot_type str | SnapshotType
The type of a snapshot. The default is NodePool.
tags Mapping[str, str]
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
creationData Property Map
CreationData to be used to specify the source agent pool resource ID to create this snapshot.
location Changes to this property will trigger replacement. String
The geo-location where the resource lives
resourceName Changes to this property will trigger replacement. String
The name of the managed cluster resource.
snapshotType String | "NodePool"
The type of a snapshot. The default is NodePool.
tags Map<String>
Resource tags.

Outputs

All input properties are implicitly available as output properties. Additionally, the Snapshot resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
EnableFIPS bool
Whether to use a FIPS-enabled OS.
Id string
The provider-assigned unique ID for this managed resource.
KubernetesVersion string
The version of Kubernetes.
Name string
The name of the resource
NodeImageVersion string
The version of node image.
OsSku string
Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
OsType string
The operating system type. The default is Linux.
SystemData Pulumi.AzureNative.ContainerService.Outputs.SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
VmSize string
The size of the VM.
AzureApiVersion string
The Azure API version of the resource.
EnableFIPS bool
Whether to use a FIPS-enabled OS.
Id string
The provider-assigned unique ID for this managed resource.
KubernetesVersion string
The version of Kubernetes.
Name string
The name of the resource
NodeImageVersion string
The version of node image.
OsSku string
Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
OsType string
The operating system type. The default is Linux.
SystemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
VmSize string
The size of the VM.
azureApiVersion String
The Azure API version of the resource.
enableFIPS Boolean
Whether to use a FIPS-enabled OS.
id String
The provider-assigned unique ID for this managed resource.
kubernetesVersion String
The version of Kubernetes.
name String
The name of the resource
nodeImageVersion String
The version of node image.
osSku String
Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
osType String
The operating system type. The default is Linux.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
vmSize String
The size of the VM.
azureApiVersion string
The Azure API version of the resource.
enableFIPS boolean
Whether to use a FIPS-enabled OS.
id string
The provider-assigned unique ID for this managed resource.
kubernetesVersion string
The version of Kubernetes.
name string
The name of the resource
nodeImageVersion string
The version of node image.
osSku string
Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
osType string
The operating system type. The default is Linux.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
vmSize string
The size of the VM.
azure_api_version str
The Azure API version of the resource.
enable_fips bool
Whether to use a FIPS-enabled OS.
id str
The provider-assigned unique ID for this managed resource.
kubernetes_version str
The version of Kubernetes.
name str
The name of the resource
node_image_version str
The version of node image.
os_sku str
Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
os_type str
The operating system type. The default is Linux.
system_data SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
vm_size str
The size of the VM.
azureApiVersion String
The Azure API version of the resource.
enableFIPS Boolean
Whether to use a FIPS-enabled OS.
id String
The provider-assigned unique ID for this managed resource.
kubernetesVersion String
The version of Kubernetes.
name String
The name of the resource
nodeImageVersion String
The version of node image.
osSku String
Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
osType String
The operating system type. The default is Linux.
systemData Property Map
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
vmSize String
The size of the VM.

Supporting Types

CreationData
, CreationDataArgs

SourceResourceId string
This is the ARM ID of the source object to be used to create the target object.
SourceResourceId string
This is the ARM ID of the source object to be used to create the target object.
sourceResourceId String
This is the ARM ID of the source object to be used to create the target object.
sourceResourceId string
This is the ARM ID of the source object to be used to create the target object.
source_resource_id str
This is the ARM ID of the source object to be used to create the target object.
sourceResourceId String
This is the ARM ID of the source object to be used to create the target object.

CreationDataResponse
, CreationDataResponseArgs

SourceResourceId string
This is the ARM ID of the source object to be used to create the target object.
SourceResourceId string
This is the ARM ID of the source object to be used to create the target object.
sourceResourceId String
This is the ARM ID of the source object to be used to create the target object.
sourceResourceId string
This is the ARM ID of the source object to be used to create the target object.
source_resource_id str
This is the ARM ID of the source object to be used to create the target object.
sourceResourceId String
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.
SnapshotTypeNodePool
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.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
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.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
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.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
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.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
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_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
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.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi