import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Disk Snapshot. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "snapshot-rg", * location: "West Europe", * }); * const exampleManagedDisk = new azure.compute.ManagedDisk("example", { * name: "managed-disk", * location: example.location, * resourceGroupName: example.name, * storageAccountType: "Standard_LRS", * createOption: "Empty", * diskSizeGb: 10, * }); * const exampleSnapshot = new azure.compute.Snapshot("example", { * name: "snapshot", * location: example.location, * resourceGroupName: example.name, * createOption: "Copy", * sourceUri: exampleManagedDisk.id, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Compute` - 2022-03-02 * * ## Import * * Snapshots can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:compute/snapshot:Snapshot example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/snapshots/snapshot1 * ``` */ export declare class Snapshot extends pulumi.CustomResource { /** * Get an existing Snapshot resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SnapshotState, opts?: pulumi.CustomResourceOptions): Snapshot; /** * Returns true if the given object is an instance of Snapshot. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Snapshot; /** * Indicates how the snapshot is to be created. Possible values are `Copy` or `Import`. * * > **Note:** One of `sourceUri`, `sourceResourceId` or `storageAccountId` must be specified. */ readonly createOption: pulumi.Output; /** * Specifies the ID of the Disk Access which should be used for this Snapshot. This is used in conjunction with setting `networkAccessPolicy` to `AllowPrivate`. */ readonly diskAccessId: pulumi.Output; /** * The size of the Snapshotted Disk in GB. */ readonly diskSizeGb: pulumi.Output; /** * A `encryptionSettings` block as defined below. * * > **Note:** Removing `encryptionSettings` forces a new resource to be created. */ readonly encryptionSettings: pulumi.Output; /** * Specifies if the Snapshot is incremental. Changing this forces a new resource to be created. */ readonly incrementalEnabled: pulumi.Output; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * Specifies the name of the Snapshot resource. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Policy for accessing the disk via network. Possible values are `AllowAll`, `AllowPrivate`, or `DenyAll`. Defaults to `AllowAll`. */ readonly networkAccessPolicy: pulumi.Output; /** * Policy for controlling export on the disk. Possible values are `true` or `false`. Defaults to `true`. */ readonly publicNetworkAccessEnabled: pulumi.Output; /** * The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * Specifies a reference to an existing snapshot, when `createOption` is `Copy`. Changing this forces a new resource to be created. */ readonly sourceResourceId: pulumi.Output; /** * Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created. */ readonly sourceUri: pulumi.Output; /** * Specifies the ID of an storage account. Used with `sourceUri` to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created. */ readonly storageAccountId: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Whether Trusted Launch is enabled for the Snapshot. */ readonly trustedLaunchEnabled: pulumi.Output; /** * Create a Snapshot resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SnapshotArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Snapshot resources. */ export interface SnapshotState { /** * Indicates how the snapshot is to be created. Possible values are `Copy` or `Import`. * * > **Note:** One of `sourceUri`, `sourceResourceId` or `storageAccountId` must be specified. */ createOption?: pulumi.Input; /** * Specifies the ID of the Disk Access which should be used for this Snapshot. This is used in conjunction with setting `networkAccessPolicy` to `AllowPrivate`. */ diskAccessId?: pulumi.Input; /** * The size of the Snapshotted Disk in GB. */ diskSizeGb?: pulumi.Input; /** * A `encryptionSettings` block as defined below. * * > **Note:** Removing `encryptionSettings` forces a new resource to be created. */ encryptionSettings?: pulumi.Input; /** * Specifies if the Snapshot is incremental. Changing this forces a new resource to be created. */ incrementalEnabled?: pulumi.Input; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Snapshot resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Policy for accessing the disk via network. Possible values are `AllowAll`, `AllowPrivate`, or `DenyAll`. Defaults to `AllowAll`. */ networkAccessPolicy?: pulumi.Input; /** * Policy for controlling export on the disk. Possible values are `true` or `false`. Defaults to `true`. */ publicNetworkAccessEnabled?: pulumi.Input; /** * The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * Specifies a reference to an existing snapshot, when `createOption` is `Copy`. Changing this forces a new resource to be created. */ sourceResourceId?: pulumi.Input; /** * Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created. */ sourceUri?: pulumi.Input; /** * Specifies the ID of an storage account. Used with `sourceUri` to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created. */ storageAccountId?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Whether Trusted Launch is enabled for the Snapshot. */ trustedLaunchEnabled?: pulumi.Input; } /** * The set of arguments for constructing a Snapshot resource. */ export interface SnapshotArgs { /** * Indicates how the snapshot is to be created. Possible values are `Copy` or `Import`. * * > **Note:** One of `sourceUri`, `sourceResourceId` or `storageAccountId` must be specified. */ createOption: pulumi.Input; /** * Specifies the ID of the Disk Access which should be used for this Snapshot. This is used in conjunction with setting `networkAccessPolicy` to `AllowPrivate`. */ diskAccessId?: pulumi.Input; /** * The size of the Snapshotted Disk in GB. */ diskSizeGb?: pulumi.Input; /** * A `encryptionSettings` block as defined below. * * > **Note:** Removing `encryptionSettings` forces a new resource to be created. */ encryptionSettings?: pulumi.Input; /** * Specifies if the Snapshot is incremental. Changing this forces a new resource to be created. */ incrementalEnabled?: pulumi.Input; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Snapshot resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Policy for accessing the disk via network. Possible values are `AllowAll`, `AllowPrivate`, or `DenyAll`. Defaults to `AllowAll`. */ networkAccessPolicy?: pulumi.Input; /** * Policy for controlling export on the disk. Possible values are `true` or `false`. Defaults to `true`. */ publicNetworkAccessEnabled?: pulumi.Input; /** * The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * Specifies a reference to an existing snapshot, when `createOption` is `Copy`. Changing this forces a new resource to be created. */ sourceResourceId?: pulumi.Input; /** * Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created. */ sourceUri?: pulumi.Input; /** * Specifies the ID of an storage account. Used with `sourceUri` to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created. */ storageAccountId?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }