Snapshots - Get
Gets information about a snapshot.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}?api-version=2024-03-02
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. |
snapshot
|
path | True |
string |
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. |
subscription
|
path | True |
string |
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api Version. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Get information about a snapshot. |
Get information about an incremental snapshot. |
Get information about a snapshot.
Sample request
Sample response
{
"properties": {
"osType": "Windows",
"hyperVGeneration": "V1",
"purchasePlan": {
"name": "test_sku",
"publisher": "test_test_pmc2pc1",
"product": "marketplace_vm_test"
},
"supportedCapabilities": {
"acceleratedNetwork": true
},
"supportsHibernation": true,
"creationData": {
"createOption": "Copy",
"sourceResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
"sourceUniqueId": "d633885d-d102-4481-901e-5b2413d1a7be"
},
"diskSizeGB": 100,
"encryptionSettingsCollection": {
"enabled": true,
"encryptionSettings": [
{
"diskEncryptionKey": {
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
},
"secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}"
},
"keyEncryptionKey": {
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
},
"keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}"
}
}
]
},
"encryption": {
"type": "EncryptionAtRestWithPlatformKey"
},
"timeCreated": "2016-12-28T04:41:35.079872+00:00",
"provisioningState": "Succeeded"
},
"type": "Microsoft.Compute/snapshots",
"location": "westus",
"tags": {
"department": "Development",
"project": "Snapshots"
},
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
"name": "mySnapshot"
}
Get information about an incremental snapshot.
Sample request
Sample response
{
"properties": {
"osType": "Windows",
"hyperVGeneration": "V1",
"purchasePlan": {
"name": "test_sku",
"publisher": "test_test_pmc2pc1",
"product": "marketplace_vm_test"
},
"supportedCapabilities": {
"acceleratedNetwork": true
},
"supportsHibernation": true,
"creationData": {
"createOption": "Copy",
"sourceResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
"sourceUniqueId": "d633885d-d102-4481-901e-5b2413d1a7be"
},
"diskSizeGB": 100,
"encryptionSettingsCollection": {
"enabled": true,
"encryptionSettings": [
{
"diskEncryptionKey": {
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
},
"secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}"
},
"keyEncryptionKey": {
"sourceVault": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
},
"keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}"
}
}
]
},
"encryption": {
"type": "EncryptionAtRestWithPlatformKey"
},
"incremental": true,
"networkAccessPolicy": "0",
"diskState": "0",
"diskSizeBytes": 10737418240,
"uniqueId": "a395e9c1-fb9e-446e-a9ba-7b2fa0bcd305",
"incrementalSnapshotFamilyId": "d1a341d5-1ea7-4a85-b304-944ad8021639",
"timeCreated": "2016-12-28T04:41:35.079872+00:00",
"provisioningState": "Succeeded"
},
"type": "Microsoft.Compute/snapshots",
"location": "westus",
"tags": {
"department": "Development",
"project": "Snapshots"
},
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/myIncrementalSnapshot",
"name": "myIncrementalSnapshot"
}
Definitions
Name | Description |
---|---|
Architecture |
CPU architecture supported by an OS disk. |
Copy |
Indicates the error details if the background copy of a resource created via the CopyStart operation fails. |
Copy |
Indicates the error code if the background copy of a resource created via the CopyStart operation fails. |
Creation |
Data used when creating a disk. |
Data |
Additional authentication requirements when exporting or uploading to a disk or snapshot. |
Disk |
This enumerates the possible sources of a disk's creation. |
Disk |
Contains the security related information for the resource. |
Disk |
Specifies the SecurityType of the VM. Applicable for OS disks only. |
Disk |
This enumerates the possible state of the disk. |
Encryption |
Encryption at rest settings for disk or snapshot |
Encryption |
Encryption settings for disk or snapshot |
Encryption |
Encryption settings for one disk volume. |
Encryption |
The type of key used to encrypt the data of the disk. |
Extended |
The complex type of the extended location. |
Extended |
The type of the extended location. |
Hyper |
The hypervisor generation of the Virtual Machine. Applicable to OS disks only. |
Image |
The source image used for creating the disk. |
Key |
Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey |
Key |
Key Vault Secret Url and vault id of the encryption key |
Network |
Policy for accessing the disk via network. |
Operating |
The Operating System type. |
Provisioned |
If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed. |
Public |
Policy for controlling export on the disk. |
Purchase |
Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. |
Snapshot |
Snapshot resource. |
Snapshot |
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 |
Snapshot |
The sku name. |
Source |
The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} |
Supported |
List of supported capabilities persisted on the disk resource for VM use. |
Architecture
CPU architecture supported by an OS disk.
Name | Type | Description |
---|---|---|
Arm64 |
string |
|
x64 |
string |
CopyCompletionError
Indicates the error details if the background copy of a resource created via the CopyStart operation fails.
Name | Type | Description |
---|---|---|
errorCode |
Indicates the error code if the background copy of a resource created via the CopyStart operation fails. |
|
errorMessage |
string |
Indicates the error message if the background copy of a resource created via the CopyStart operation fails. |
CopyCompletionErrorReason
Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
Name | Type | Description |
---|---|---|
CopySourceNotFound |
string |
Indicates that the source snapshot was deleted while the background copy of the resource created via CopyStart operation was in progress. |
CreationData
Data used when creating a disk.
Name | Type | Description |
---|---|---|
createOption |
This enumerates the possible sources of a disk's creation. |
|
elasticSanResourceId |
string |
Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot. |
galleryImageReference |
Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk. |
|
imageReference |
Disk source information for PIR or user images. |
|
logicalSectorSize |
integer |
Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. |
performancePlus |
boolean |
Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled. |
provisionedBandwidthCopySpeed |
If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed. |
|
securityDataUri |
string |
If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state. |
sourceResourceId |
string |
If createOption is Copy, this is the ARM id of the source snapshot or disk. |
sourceUniqueId |
string |
If this field is set, this is the unique id identifying the source of this resource. |
sourceUri |
string |
If createOption is Import, this is the URI of a blob to be imported into a managed disk. |
storageAccountId |
string |
Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. |
uploadSizeBytes |
integer |
If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). |
DataAccessAuthMode
Additional authentication requirements when exporting or uploading to a disk or snapshot.
Name | Type | Description |
---|---|---|
AzureActiveDirectory |
string |
When export/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth. |
None |
string |
No additional authentication would be performed when accessing export/upload URL. |
DiskCreateOption
This enumerates the possible sources of a disk's creation.
Name | Type | Description |
---|---|---|
Attach |
string |
Disk will be attached to a VM. |
Copy |
string |
Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId. |
CopyFromSanSnapshot |
string |
Create a new disk by exporting from elastic san volume snapshot |
CopyStart |
string |
Create a new disk by using a deep copy process, where the resource creation is considered complete only after all data has been copied from the source. |
Empty |
string |
Create an empty data disk of a size given by diskSizeGB. |
FromImage |
string |
Create a new disk from a platform image specified by the given imageReference or galleryImageReference. |
Import |
string |
Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId. |
ImportSecure |
string |
Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported disk by importing additional blob for VM guest state specified by securityDataUri in storage account specified by storageAccountId |
Restore |
string |
Create a new disk by copying from a backup recovery point. |
Upload |
string |
Create a new disk by obtaining a write token and using it to directly upload the contents of the disk. |
UploadPreparedSecure |
string |
Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in both disk and VM guest state |
DiskSecurityProfile
Contains the security related information for the resource.
Name | Type | Description |
---|---|---|
secureVMDiskEncryptionSetId |
string |
ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key |
securityType |
Specifies the SecurityType of the VM. Applicable for OS disks only. |
DiskSecurityTypes
Specifies the SecurityType of the VM. Applicable for OS disks only.
Name | Type | Description |
---|---|---|
ConfidentialVM_DiskEncryptedWithCustomerKey |
string |
Indicates Confidential VM disk with both OS disk and VM guest state encrypted with a customer managed key |
ConfidentialVM_DiskEncryptedWithPlatformKey |
string |
Indicates Confidential VM disk with both OS disk and VM guest state encrypted with a platform managed key |
ConfidentialVM_NonPersistedTPM |
string |
Indicates Confidential VM disk with a ephemeral vTPM. vTPM state is not persisted across VM reboots. |
ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey |
string |
Indicates Confidential VM disk with only VM guest state encrypted |
TrustedLaunch |
string |
Trusted Launch provides security features such as secure boot and virtual Trusted Platform Module (vTPM) |
DiskState
This enumerates the possible state of the disk.
Name | Type | Description |
---|---|---|
ActiveSAS |
string |
The disk currently has an Active SAS Uri associated with it. |
ActiveSASFrozen |
string |
The disk is attached to a VM in hibernated state and has an active SAS URI associated with it. |
ActiveUpload |
string |
A disk is created for upload and a write token has been issued for uploading to it. |
Attached |
string |
The disk is currently attached to a running VM. |
Frozen |
string |
The disk is attached to a VM which is in hibernated state. |
ReadyToUpload |
string |
A disk is ready to be created by upload by requesting a write token. |
Reserved |
string |
The disk is attached to a stopped-deallocated VM. |
Unattached |
string |
The disk is not being used and can be attached to a VM. |
Encryption
Encryption at rest settings for disk or snapshot
Name | Type | Description |
---|---|---|
diskEncryptionSetId |
string |
ResourceId of the disk encryption set to use for enabling encryption at rest. |
type |
The type of key used to encrypt the data of the disk. |
EncryptionSettingsCollection
Encryption settings for disk or snapshot
Name | Type | Description |
---|---|---|
enabled |
boolean |
Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. |
encryptionSettings |
A collection of encryption settings, one for each disk volume. |
|
encryptionSettingsVersion |
string |
Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption. |
EncryptionSettingsElement
Encryption settings for one disk volume.
Name | Type | Description |
---|---|---|
diskEncryptionKey |
Key Vault Secret Url and vault id of the disk encryption key |
|
keyEncryptionKey |
Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. |
EncryptionType
The type of key used to encrypt the data of the disk.
Name | Type | Description |
---|---|---|
EncryptionAtRestWithCustomerKey |
string |
Disk is encrypted at rest with Customer managed key that can be changed and revoked by a customer. |
EncryptionAtRestWithPlatformAndCustomerKeys |
string |
Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed. |
EncryptionAtRestWithPlatformKey |
string |
Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is not a valid encryption type for disk encryption sets. |
ExtendedLocation
The complex type of the extended location.
Name | Type | Description |
---|---|---|
name |
string |
The name of the extended location. |
type |
The type of the extended location. |
ExtendedLocationTypes
The type of the extended location.
Name | Type | Description |
---|---|---|
EdgeZone |
string |
HyperVGeneration
The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
Name | Type | Description |
---|---|---|
V1 |
string |
|
V2 |
string |
ImageDiskReference
The source image used for creating the disk.
Name | Type | Description |
---|---|---|
communityGalleryImageId |
string |
A relative uri containing a community Azure Compute Gallery image reference. |
id |
string |
A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference. |
lun |
integer |
If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. |
sharedGalleryImageId |
string |
A relative uri containing a direct shared Azure Compute Gallery image reference. |
KeyVaultAndKeyReference
Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey
Name | Type | Description |
---|---|---|
keyUrl |
string |
Url pointing to a key or secret in KeyVault |
sourceVault |
Resource id of the KeyVault containing the key or secret |
KeyVaultAndSecretReference
Key Vault Secret Url and vault id of the encryption key
Name | Type | Description |
---|---|---|
secretUrl |
string |
Url pointing to a key or secret in KeyVault |
sourceVault |
Resource id of the KeyVault containing the key or secret |
NetworkAccessPolicy
Policy for accessing the disk via network.
Name | Type | Description |
---|---|---|
AllowAll |
string |
The disk can be exported or uploaded to from any network. |
AllowPrivate |
string |
The disk can be exported or uploaded to using a DiskAccess resource's private endpoints. |
DenyAll |
string |
The disk cannot be exported. |
OperatingSystemTypes
The Operating System type.
Name | Type | Description |
---|---|---|
Linux |
string |
|
Windows |
string |
ProvisionedBandwidthCopyOption
If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed.
Name | Type | Description |
---|---|---|
Enhanced |
string |
|
None |
string |
PublicNetworkAccess
Policy for controlling export on the disk.
Name | Type | Description |
---|---|---|
Disabled |
string |
You cannot access the underlying data of the disk publicly on the internet even when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate. |
Enabled |
string |
You can generate a SAS URI to access the underlying data of the disk publicly on the internet when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate. |
PurchasePlan
Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
Name | Type | Description |
---|---|---|
name |
string |
The plan ID. |
product |
string |
Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. |
promotionCode |
string |
The Offer Promotion Code. |
publisher |
string |
The publisher ID. |
Snapshot
Snapshot resource.
Name | Type | Description |
---|---|---|
extendedLocation |
The extended location where the snapshot will be created. Extended location cannot be changed. |
|
id |
string |
Resource Id |
location |
string |
Resource location |
managedBy |
string |
Unused. Always Null. |
name |
string |
Resource name |
properties.completionPercent |
number |
Percentage complete for the background copy when a resource is created via the CopyStart operation. |
properties.copyCompletionError |
Indicates the error details if the background copy of a resource created via the CopyStart operation fails. |
|
properties.creationData |
Disk source information. CreationData information cannot be changed after the disk has been created. |
|
properties.dataAccessAuthMode |
Additional authentication requirements when exporting or uploading to a disk or snapshot. |
|
properties.diskAccessId |
string |
ARM id of the DiskAccess resource for using private endpoints on disks. |
properties.diskSizeBytes |
integer |
The size of the disk in bytes. This field is read only. |
properties.diskSizeGB |
integer |
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. |
properties.diskState |
The state of the snapshot. |
|
properties.encryption |
Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. |
|
properties.encryptionSettingsCollection |
Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. |
|
properties.hyperVGeneration |
The hypervisor generation of the Virtual Machine. Applicable to OS disks only. |
|
properties.incremental |
boolean |
Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed. |
properties.incrementalSnapshotFamilyId |
string |
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. |
properties.networkAccessPolicy |
Policy for accessing the disk via network. |
|
properties.osType |
The Operating System type. |
|
properties.provisioningState |
string |
The disk provisioning state. |
properties.publicNetworkAccess |
Policy for controlling export on the disk. |
|
properties.purchasePlan |
Purchase plan information for the image from which the source disk for the snapshot was originally created. |
|
properties.securityProfile |
Contains the security related information for the resource. |
|
properties.supportedCapabilities |
List of supported capabilities for the image from which the source disk from the snapshot was originally created. |
|
properties.supportsHibernation |
boolean |
Indicates the OS on a snapshot supports hibernation. |
properties.timeCreated |
string |
The time when the snapshot was created. |
properties.uniqueId |
string |
Unique Guid identifying the resource. |
sku |
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 |
|
tags |
object |
Resource tags |
type |
string |
Resource type |
SnapshotSku
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
Name | Type | Description |
---|---|---|
name |
The sku name. |
|
tier |
string |
The sku tier. |
SnapshotStorageAccountTypes
The sku name.
Name | Type | Description |
---|---|---|
Premium_LRS |
string |
Premium SSD locally redundant storage |
Standard_LRS |
string |
Standard HDD locally redundant storage |
Standard_ZRS |
string |
Standard zone redundant storage |
SourceVault
The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
Name | Type | Description |
---|---|---|
id |
string |
Resource Id |
SupportedCapabilities
List of supported capabilities persisted on the disk resource for VM use.
Name | Type | Description |
---|---|---|
acceleratedNetwork |
boolean |
True if the image from which the OS disk is created supports accelerated networking. |
architecture |
CPU architecture supported by an OS disk. |
|
diskControllerTypes |
string |
The disk controllers that an OS disk supports. If set it can be SCSI or SCSI, NVME or NVME, SCSI. |