Snapshot

class Snapshot : KotlinCustomResource

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

Properties

Link copied to clipboard
val createOption: Output<String>

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

Link copied to clipboard
val diskSizeGb: Output<Int>

The size of the Snapshotted Disk in GB.

Link copied to clipboard

A encryption_settings block as defined below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Specifies if the Snapshot is incremental.

Link copied to clipboard
val location: Output<String>

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>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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>?

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>?

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>?

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>>?

A mapping of tags to assign to the resource.

Link copied to clipboard

Whether Trusted Launch is enabled for the Snapshot.

Link copied to clipboard
val urn: Output<String>