Microsoft.Compute snapshots 2018-06-01
Bicep resource definition
The snapshots resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/snapshots resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Compute/snapshots@2018-06-01' = {
location: 'string'
name: 'string'
properties: {
creationData: {
createOption: 'string'
imageReference: {
id: 'string'
lun: int
}
sourceResourceId: 'string'
sourceUri: 'string'
storageAccountId: 'string'
}
diskSizeGB: int
encryptionSettings: {
diskEncryptionKey: {
secretUrl: 'string'
sourceVault: {
id: 'string'
}
}
enabled: bool
keyEncryptionKey: {
keyUrl: 'string'
sourceVault: {
id: 'string'
}
}
}
osType: 'string'
}
sku: {
name: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property values
CreationData
Name | Description | Value |
---|---|---|
createOption | This enumerates the possible sources of a disk's creation. | 'Attach' 'Copy' 'Empty' 'FromImage' 'Import' 'Restore' (required) |
imageReference | Disk source information. | ImageDiskReference |
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 | If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription | string |
EncryptionSettings
Name | Description | Value |
---|---|---|
diskEncryptionKey | Key Vault Secret Url and vault id of the disk encryption key | KeyVaultAndSecretReference |
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 |
keyEncryptionKey | Key Vault Key Url and vault id of the key encryption key | KeyVaultAndKeyReference |
ImageDiskReference
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 |
KeyVaultAndKeyReference
Name | Description | Value |
---|---|---|
keyUrl | Url pointing to a key or secret in KeyVault | string (required) |
sourceVault | Resource id of the KeyVault containing the key or secret | SourceVault (required) |
KeyVaultAndSecretReference
Name | Description | Value |
---|---|---|
secretUrl | Url pointing to a key or secret in KeyVault | string (required) |
sourceVault | Resource id of the KeyVault containing the key or secret | SourceVault (required) |
Microsoft.Compute/snapshots
Name | Description | Value |
---|---|---|
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | Snapshot resource properties. | SnapshotProperties |
sku | The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. | SnapshotSku |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ResourceTags
Name | Description | Value |
---|
SnapshotProperties
Name | Description | Value |
---|---|---|
creationData | Disk source information. CreationData information cannot be changed after the disk has been created. | CreationData (required) |
diskSizeGB | If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD 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 |
encryptionSettings | Encryption settings for disk or snapshot | EncryptionSettings |
osType | The Operating System type. | 'Linux' 'Windows' |
SnapshotSku
Name | Description | Value |
---|---|---|
name | The sku name. | 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
SourceVault
Name | Description | Value |
---|---|---|
id | Resource Id | string |
ARM template resource definition
The snapshots resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/snapshots resource, add the following JSON to your template.
{
"type": "Microsoft.Compute/snapshots",
"apiVersion": "2018-06-01",
"name": "string",
"location": "string",
"properties": {
"creationData": {
"createOption": "string",
"imageReference": {
"id": "string",
"lun": "int"
},
"sourceResourceId": "string",
"sourceUri": "string",
"storageAccountId": "string"
},
"diskSizeGB": "int",
"encryptionSettings": {
"diskEncryptionKey": {
"secretUrl": "string",
"sourceVault": {
"id": "string"
}
},
"enabled": "bool",
"keyEncryptionKey": {
"keyUrl": "string",
"sourceVault": {
"id": "string"
}
}
},
"osType": "string"
},
"sku": {
"name": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property values
CreationData
Name | Description | Value |
---|---|---|
createOption | This enumerates the possible sources of a disk's creation. | 'Attach' 'Copy' 'Empty' 'FromImage' 'Import' 'Restore' (required) |
imageReference | Disk source information. | ImageDiskReference |
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 | If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription | string |
EncryptionSettings
Name | Description | Value |
---|---|---|
diskEncryptionKey | Key Vault Secret Url and vault id of the disk encryption key | KeyVaultAndSecretReference |
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 |
keyEncryptionKey | Key Vault Key Url and vault id of the key encryption key | KeyVaultAndKeyReference |
ImageDiskReference
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 |
KeyVaultAndKeyReference
Name | Description | Value |
---|---|---|
keyUrl | Url pointing to a key or secret in KeyVault | string (required) |
sourceVault | Resource id of the KeyVault containing the key or secret | SourceVault (required) |
KeyVaultAndSecretReference
Name | Description | Value |
---|---|---|
secretUrl | Url pointing to a key or secret in KeyVault | string (required) |
sourceVault | Resource id of the KeyVault containing the key or secret | SourceVault (required) |
Microsoft.Compute/snapshots
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2018-06-01' |
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | Snapshot resource properties. | SnapshotProperties |
sku | The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. | SnapshotSku |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.Compute/snapshots' |
ResourceTags
Name | Description | Value |
---|
SnapshotProperties
Name | Description | Value |
---|---|---|
creationData | Disk source information. CreationData information cannot be changed after the disk has been created. | CreationData (required) |
diskSizeGB | If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD 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 |
encryptionSettings | Encryption settings for disk or snapshot | EncryptionSettings |
osType | The Operating System type. | 'Linux' 'Windows' |
SnapshotSku
Name | Description | Value |
---|---|---|
name | The sku name. | 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
SourceVault
Name | Description | Value |
---|---|---|
id | Resource Id | string |
Terraform (AzAPI provider) resource definition
The snapshots resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/snapshots resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Compute/snapshots@2018-06-01"
name = "string"
location = "string"
sku = {
name = "string"
}
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
creationData = {
createOption = "string"
imageReference = {
id = "string"
lun = int
}
sourceResourceId = "string"
sourceUri = "string"
storageAccountId = "string"
}
diskSizeGB = int
encryptionSettings = {
diskEncryptionKey = {
secretUrl = "string"
sourceVault = {
id = "string"
}
}
enabled = bool
keyEncryptionKey = {
keyUrl = "string"
sourceVault = {
id = "string"
}
}
}
osType = "string"
}
})
}
Property values
CreationData
Name | Description | Value |
---|---|---|
createOption | This enumerates the possible sources of a disk's creation. | 'Attach' 'Copy' 'Empty' 'FromImage' 'Import' 'Restore' (required) |
imageReference | Disk source information. | ImageDiskReference |
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 | If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription | string |
EncryptionSettings
Name | Description | Value |
---|---|---|
diskEncryptionKey | Key Vault Secret Url and vault id of the disk encryption key | KeyVaultAndSecretReference |
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 |
keyEncryptionKey | Key Vault Key Url and vault id of the key encryption key | KeyVaultAndKeyReference |
ImageDiskReference
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 |
KeyVaultAndKeyReference
Name | Description | Value |
---|---|---|
keyUrl | Url pointing to a key or secret in KeyVault | string (required) |
sourceVault | Resource id of the KeyVault containing the key or secret | SourceVault (required) |
KeyVaultAndSecretReference
Name | Description | Value |
---|---|---|
secretUrl | Url pointing to a key or secret in KeyVault | string (required) |
sourceVault | Resource id of the KeyVault containing the key or secret | SourceVault (required) |
Microsoft.Compute/snapshots
Name | Description | Value |
---|---|---|
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | Snapshot resource properties. | SnapshotProperties |
sku | The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. | SnapshotSku |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.Compute/snapshots@2018-06-01" |
ResourceTags
Name | Description | Value |
---|
SnapshotProperties
Name | Description | Value |
---|---|---|
creationData | Disk source information. CreationData information cannot be changed after the disk has been created. | CreationData (required) |
diskSizeGB | If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD 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 |
encryptionSettings | Encryption settings for disk or snapshot | EncryptionSettings |
osType | The Operating System type. | 'Linux' 'Windows' |
SnapshotSku
Name | Description | Value |
---|---|---|
name | The sku name. | 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
SourceVault
Name | Description | Value |
---|---|---|
id | Resource Id | string |