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. API Version: 2022-02-02-preview.

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/subid1/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"
"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/subid1/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 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(Map.of("sourceResourceId", "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"))
.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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1

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

Resource location

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