Microsoft.Compute snapshots 2020-06-30

The snapshots resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.Compute/snapshots resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Compute/snapshots@2020-06-30' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  sku: {
    name: 'string'
  properties: {
    creationData: {
      createOption: 'string'
      galleryImageReference: {
        id: 'string'
        lun: int
      imageReference: {
        id: 'string'
        lun: int
      logicalSectorSize: int
      sourceResourceId: 'string'
      sourceUri: 'string'
      storageAccountId: 'string'
      uploadSizeBytes: int
    diskAccessId: 'string'
    diskSizeGB: int
    encryption: {
      diskEncryptionSetId: 'string'
      type: 'string'
    encryptionSettingsCollection: {
      enabled: bool
      encryptionSettings: [
          diskEncryptionKey: {
            secretUrl: 'string'
            sourceVault: {
              id: 'string'
          keyEncryptionKey: {
            keyUrl: 'string'
            sourceVault: {
              id: 'string'
      encryptionSettingsVersion: 'string'
    hyperVGeneration: 'string'
    incremental: bool
    networkAccessPolicy: 'string'
    osType: 'string'

Property values


Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
name The resource name string (required)

Character limit: 1-80

Valid characters:
Alphanumerics, underscores, periods, and hyphens.

Start with alphanumeric. End with alphanumeric or underscore.
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
sku The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. SnapshotSku
properties Snapshot resource properties. SnapshotProperties


Name Description Value
creationData Data used when creating a disk. CreationData (required)
diskAccessId ARM id of the DiskAccess resource for using private endpoints on disks. string
diskSizeGB 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. int
encryption Encryption at rest settings for disk or snapshot Encryption
encryptionSettingsCollection Encryption settings for disk or snapshot EncryptionSettingsCollection
hyperVGeneration The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 'V1'
incremental Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed. bool
networkAccessPolicy Policy for accessing the disk via network. 'AllowAll'
osType The Operating System type. 'Linux'


Name Description Value
createOption This enumerates the possible sources of a disk's creation. 'Attach'
galleryImageReference The source image used for creating the disk. ImageDiskReference
imageReference The source image used for creating the disk. ImageDiskReference
logicalSectorSize Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. int
sourceResourceId If createOption is Copy, this is the ARM id of the source snapshot or disk. string
sourceUri If createOption is Import, this is the URI of a blob to be imported into a managed disk. string
storageAccountId Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. string
uploadSizeBytes 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). int


Name Description Value
id A relative uri containing either a Platform Image Repository or user image reference. string (required)
lun 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. int


Name Description Value
diskEncryptionSetId ResourceId of the disk encryption set to use for enabling encryption at rest. string
type The type of key used to encrypt the data of the disk. 'EncryptionAtRestWithCustomerKey'


Name Description Value
enabled 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. bool (required)
encryptionSettings A collection of encryption settings, one for each disk volume. EncryptionSettingsElement[]
encryptionSettingsVersion 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. string


Name Description Value
diskEncryptionKey Key Vault Secret Url and vault id of the encryption key KeyVaultAndSecretReference
keyEncryptionKey Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey KeyVaultAndKeyReference


Name Description Value
secretUrl Url pointing to a key or secret in KeyVault string (required)
sourceVault The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} SourceVault (required)


Name Description Value
id Resource Id string


Name Description Value
keyUrl Url pointing to a key or secret in KeyVault string (required)
sourceVault The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} SourceVault (required)


Name Description Value
name The sku name. 'Premium_LRS'