SnapshotArgs

data class SnapshotArgs(val createOption: Output<String>? = null, val diskSizeGb: Output<Int>? = null, val encryptionSettings: Output<SnapshotEncryptionSettingsArgs>? = null, val incrementalEnabled: Output<Boolean>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val sourceResourceId: Output<String>? = null, val sourceUri: Output<String>? = null, val storageAccountId: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<SnapshotArgs>

Manages a Disk Snapshot.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.compute.ManagedDisk;
import com.pulumi.azure.compute.ManagedDiskArgs;
import com.pulumi.azure.compute.Snapshot;
import com.pulumi.azure.compute.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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleManagedDisk = new ManagedDisk("exampleManagedDisk", ManagedDiskArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.storageAccountType("Standard_LRS")
.createOption("Empty")
.diskSizeGb("10")
.build());
var exampleSnapshot = new Snapshot("exampleSnapshot", SnapshotArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.createOption("Copy")
.sourceUri(exampleManagedDisk.id())
.build());
}
}

Import

Snapshots can be imported using the resource id, e.g.

$ pulumi import azure:compute/snapshot:Snapshot example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/snapshots/snapshot1

Constructors

Link copied to clipboard
fun SnapshotArgs(createOption: Output<String>? = null, diskSizeGb: Output<Int>? = null, encryptionSettings: Output<SnapshotEncryptionSettingsArgs>? = null, incrementalEnabled: Output<Boolean>? = null, location: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, sourceResourceId: Output<String>? = null, sourceUri: Output<String>? = null, storageAccountId: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Functions

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

Properties

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

Indicates how the snapshot is to be created. Possible values are Copy or Import.

Link copied to clipboard
val diskSizeGb: Output<Int>? = null

The size of the Snapshotted Disk in GB.

Link copied to clipboard

A encryption_settings block as defined below.

Link copied to clipboard
val incrementalEnabled: Output<Boolean>? = null

Specifies if the Snapshot is incremental.

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

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

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

Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.

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

The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.

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

Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.

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

Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.

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

Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.

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

A mapping of tags to assign to the resource.