@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 11.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
/**
* Snapshot resource.
*
* Uses Azure REST API version 2024-03-02. In version 2.x of the Azure Native provider, it used API version 2022-07-02.
*
* Other available API versions: 2022-07-02, 2023-01-02, 2023-04-02, 2023-10-02, 2025-01-02. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native compute [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
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 opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, 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;
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: pulumi.Output<string>;
/**
* Percentage complete for the background copy when a resource is created via the CopyStart operation.
*/
readonly completionPercent: pulumi.Output<number | undefined>;
/**
* Indicates the error details if the background copy of a resource created via the CopyStart operation fails.
*/
readonly copyCompletionError: pulumi.Output<outputs.compute.CopyCompletionErrorResponse | undefined>;
/**
* Disk source information. CreationData information cannot be changed after the disk has been created.
*/
readonly creationData: pulumi.Output<outputs.compute.CreationDataResponse>;
/**
* Additional authentication requirements when exporting or uploading to a disk or snapshot.
*/
readonly dataAccessAuthMode: pulumi.Output<string | undefined>;
/**
* ARM id of the DiskAccess resource for using private endpoints on disks.
*/
readonly diskAccessId: pulumi.Output<string | undefined>;
/**
* The size of the disk in bytes. This field is read only.
*/
readonly diskSizeBytes: pulumi.Output<number>;
/**
* If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
*/
readonly diskSizeGB: pulumi.Output<number | undefined>;
/**
* The state of the snapshot.
*/
readonly diskState: pulumi.Output<string>;
/**
* Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
*/
readonly encryption: pulumi.Output<outputs.compute.EncryptionResponse | undefined>;
/**
* Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
*/
readonly encryptionSettingsCollection: pulumi.Output<outputs.compute.EncryptionSettingsCollectionResponse | undefined>;
/**
* The extended location where the snapshot will be created. Extended location cannot be changed.
*/
readonly extendedLocation: pulumi.Output<outputs.compute.ExtendedLocationResponse | undefined>;
/**
* The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
*/
readonly hyperVGeneration: pulumi.Output<string | undefined>;
/**
* Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
*/
readonly incremental: pulumi.Output<boolean | undefined>;
/**
* Incremental snapshots for a disk share an incremental snapshot family id. The Get Page Range Diff API can only be called on incremental snapshots with the same family id.
*/
readonly incrementalSnapshotFamilyId: pulumi.Output<string>;
/**
* The geo-location where the resource lives
*/
readonly location: pulumi.Output<string>;
/**
* Unused. Always Null.
*/
readonly managedBy: pulumi.Output<string>;
/**
* The name of the resource
*/
readonly name: pulumi.Output<string>;
/**
* Policy for accessing the disk via network.
*/
readonly networkAccessPolicy: pulumi.Output<string | undefined>;
/**
* The Operating System type.
*/
readonly osType: pulumi.Output<string | undefined>;
/**
* The disk provisioning state.
*/
readonly provisioningState: pulumi.Output<string>;
/**
* Policy for controlling export on the disk.
*/
readonly publicNetworkAccess: pulumi.Output<string | undefined>;
/**
* Purchase plan information for the image from which the source disk for the snapshot was originally created.
*/
readonly purchasePlan: pulumi.Output<outputs.compute.DiskPurchasePlanResponse | undefined>;
/**
* Contains the security related information for the resource.
*/
readonly securityProfile: pulumi.Output<outputs.compute.DiskSecurityProfileResponse | undefined>;
/**
* The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
*/
readonly sku: pulumi.Output<outputs.compute.SnapshotSkuResponse | undefined>;
/**
* List of supported capabilities for the image from which the source disk from the snapshot was originally created.
*/
readonly supportedCapabilities: pulumi.Output<outputs.compute.SupportedCapabilitiesResponse | undefined>;
/**
* Indicates the OS on a snapshot supports hibernation.
*/
readonly supportsHibernation: pulumi.Output<boolean | undefined>;
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
readonly systemData: pulumi.Output<outputs.compute.SystemDataResponse>;
/**
* Resource tags.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The time when the snapshot was created.
*/
readonly timeCreated: pulumi.Output<string>;
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
readonly type: pulumi.Output<string>;
/**
* Unique Guid identifying the resource.
*/
readonly uniqueId: pulumi.Output<string>;
/**
* 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);
}
/**
* The set of arguments for constructing a Snapshot resource.
*/
export interface SnapshotArgs {
/**
* Percentage complete for the background copy when a resource is created via the CopyStart operation.
*/
completionPercent?: pulumi.Input<number>;
/**
* Indicates the error details if the background copy of a resource created via the CopyStart operation fails.
*/
copyCompletionError?: pulumi.Input<inputs.compute.CopyCompletionErrorArgs>;
/**
* Disk source information. CreationData information cannot be changed after the disk has been created.
*/
creationData: pulumi.Input<inputs.compute.CreationDataArgs>;
/**
* Additional authentication requirements when exporting or uploading to a disk or snapshot.
*/
dataAccessAuthMode?: pulumi.Input<string | enums.compute.DataAccessAuthMode>;
/**
* ARM id of the DiskAccess resource for using private endpoints on disks.
*/
diskAccessId?: pulumi.Input<string>;
/**
* If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
*/
diskSizeGB?: pulumi.Input<number>;
/**
* Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
*/
encryption?: pulumi.Input<inputs.compute.EncryptionArgs>;
/**
* Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
*/
encryptionSettingsCollection?: pulumi.Input<inputs.compute.EncryptionSettingsCollectionArgs>;
/**
* The extended location where the snapshot will be created. Extended location cannot be changed.
*/
extendedLocation?: pulumi.Input<inputs.compute.ExtendedLocationArgs>;
/**
* The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
*/
hyperVGeneration?: pulumi.Input<string | enums.compute.HyperVGeneration>;
/**
* Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
*/
incremental?: pulumi.Input<boolean>;
/**
* The geo-location where the resource lives
*/
location?: pulumi.Input<string>;
/**
* Policy for accessing the disk via network.
*/
networkAccessPolicy?: pulumi.Input<string | enums.compute.NetworkAccessPolicy>;
/**
* The Operating System type.
*/
osType?: pulumi.Input<enums.compute.OperatingSystemTypes>;
/**
* Policy for controlling export on the disk.
*/
publicNetworkAccess?: pulumi.Input<string | enums.compute.PublicNetworkAccess>;
/**
* Purchase plan information for the image from which the source disk for the snapshot was originally created.
*/
purchasePlan?: pulumi.Input<inputs.compute.DiskPurchasePlanArgs>;
/**
* The name of the resource group. The name is case insensitive.
*/
resourceGroupName: pulumi.Input<string>;
/**
* Contains the security related information for the resource.
*/
securityProfile?: pulumi.Input<inputs.compute.DiskSecurityProfileArgs>;
/**
* The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
*/
sku?: pulumi.Input<inputs.compute.SnapshotSkuArgs>;
/**
* The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters.
*/
snapshotName?: pulumi.Input<string>;
/**
* List of supported capabilities for the image from which the source disk from the snapshot was originally created.
*/
supportedCapabilities?: pulumi.Input<inputs.compute.SupportedCapabilitiesArgs>;
/**
* Indicates the OS on a snapshot supports hibernation.
*/
supportsHibernation?: pulumi.Input<boolean>;
/**
* Resource tags.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}