ManagedClusterSnapshotArgs

data class ManagedClusterSnapshotArgs(val creationData: Output<CreationDataArgs>? = null, val location: Output<String>? = null, val resourceGroupName: Output<String>? = null, val resourceName: Output<String>? = null, val snapshotType: Output<Either<String, SnapshotType>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ManagedClusterSnapshotArgs>

A managed cluster snapshot resource. Uses Azure REST API version 2024-10-02-preview. In version 2.x of the Azure Native provider, it used API version 2023-05-02-preview. Other available API versions: 2022-02-02-preview, 2022-03-02-preview, 2022-04-02-preview, 2022-05-02-preview, 2022-06-02-preview, 2022-07-02-preview, 2022-08-02-preview, 2022-08-03-preview, 2022-09-02-preview, 2022-10-02-preview, 2022-11-02-preview, 2023-01-02-preview, 2023-02-02-preview, 2023-03-02-preview, 2023-04-02-preview, 2023-05-02-preview, 2023-06-02-preview, 2023-07-02-preview, 2023-08-02-preview, 2023-09-02-preview, 2023-10-02-preview, 2023-11-02-preview, 2024-01-02-preview, 2024-02-02-preview, 2024-03-02-preview, 2024-04-02-preview, 2024-05-02-preview, 2024-06-02-preview, 2024-07-02-preview, 2024-09-02-preview. 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/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create/Update Managed Cluster Snapshot

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedClusterSnapshot = new AzureNative.ContainerService.ManagedClusterSnapshot("managedClusterSnapshot", new()
{
CreationData = new AzureNative.ContainerService.Inputs.CreationDataArgs
{
SourceResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1",
},
Location = "westus",
ResourceGroupName = "rg1",
ResourceName = "snapshot1",
Tags =
{
{ "key1", "val1" },
{ "key2", "val2" },
},
});
});
package main
import (
containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := containerservice.NewManagedClusterSnapshot(ctx, "managedClusterSnapshot", &containerservice.ManagedClusterSnapshotArgs{
CreationData: &containerservice.CreationDataArgs{
SourceResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"),
},
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.ManagedClusterSnapshot;
import com.pulumi.azurenative.containerservice.ManagedClusterSnapshotArgs;
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 managedClusterSnapshot = new ManagedClusterSnapshot("managedClusterSnapshot", ManagedClusterSnapshotArgs.builder()
.creationData(CreationDataArgs.builder()
.sourceResourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1")
.build())
.location("westus")
.resourceGroupName("rg1")
.resourceName("snapshot1")
.tags(Map.ofEntries(
Map.entry("key1", "val1"),
Map.entry("key2", "val2")
))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:containerservice:ManagedClusterSnapshot snapshot1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}

Constructors

Link copied to clipboard
constructor(creationData: Output<CreationDataArgs>? = null, location: Output<String>? = null, resourceGroupName: Output<String>? = null, resourceName: Output<String>? = null, snapshotType: Output<Either<String, SnapshotType>>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val creationData: Output<CreationDataArgs>? = null

CreationData to be used to specify the source resource ID to create this snapshot.

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val resourceName: Output<String>? = null

The name of the managed cluster resource.

Link copied to clipboard
val snapshotType: Output<Either<String, SnapshotType>>? = null

The type of a snapshot. The default is NodePool.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Functions

Link copied to clipboard
open override fun toJava(): ManagedClusterSnapshotArgs