disks
Creates, updates, deletes, gets or lists a disks resource.
Overview
| Name | disks |
| Type | Resource |
| Id | azure.compute.disks |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
LastOwnershipUpdateTime | string (date-time) | The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. |
availabilityPolicy | object | Determines how platform treats disk failures. |
burstingEnabled | boolean | Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. |
burstingEnabledTime | string (date-time) | Latest time when bursting was last enabled on a disk. |
completionPercent | number | Percentage complete for the background copy when a resource is created via the CopyStart operation. |
creationData | object | Disk source information. CreationData information cannot be changed after the disk has been created. Required. |
dataAccessAuthMode | string | Additional authentication requirements when exporting or uploading to a disk or snapshot. Known values are: "AzureActiveDirectory" and "None". (AzureActiveDirectory, None) |
diskAccessId | string | ARM id of the DiskAccess resource for using private endpoints on disks. |
diskIOPSReadOnly | integer | The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. |
diskIOPSReadWrite | integer | The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. |
diskMBpsReadOnly | integer | The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. |
diskMBpsReadWrite | integer | The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. |
diskSizeBytes | integer | The size of the disk in bytes. This field is read only. |
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. |
diskState | string | The state of the disk. Known values are: "Unattached", "Attached", "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", and "ActiveUpload". (Unattached, Attached, Reserved, Frozen, ActiveSAS, ActiveSASFrozen, ReadyToUpload, ActiveUpload) |
encryption | object | Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. |
encryptionSettingsCollection | object | Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. |
extendedLocation | object | The extended location where the disk will be created. Extended location cannot be changed. |
hyperVGeneration | string | The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values are: "V1" and "V2". (V1, V2) |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | A relative URI containing the ID of the VM that has the disk attached. |
managedByExtended | array | List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. |
maxShares | integer | The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. |
networkAccessPolicy | string | Policy for accessing the disk via network. Known values are: "AllowAll", "AllowPrivate", and "DenyAll". (AllowAll, AllowPrivate, DenyAll) |
optimizedForFrequentAttach | boolean | Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. |
osType | string | The Operating System type. Known values are: "Windows" and "Linux". (Windows, Linux) |
propertyUpdatesInProgress | object | Properties of the disk for which update is pending. |
provisioningState | string | The disk provisioning state. |
publicNetworkAccess | string | Policy for controlling export on the disk. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
purchasePlan | object | Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}. |
securityProfile | object | Contains the security related information for the resource. |
shareInfo | array | Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. |
sku | object | The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. |
supportedCapabilities | object | List of supported capabilities for the image from which the OS disk was created. |
supportsHibernation | boolean | Indicates the OS on a disk supports hibernation. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tier | string | Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/ _. Does not apply to Ultra disks. |
timeCreated | string (date-time) | The time when the disk was created. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uniqueId | string | Unique Guid identifying the resource. |
zones | array | The Logical zone list for Disk. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
LastOwnershipUpdateTime | string (date-time) | The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. |
availabilityPolicy | object | Determines how platform treats disk failures. |
burstingEnabled | boolean | Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. |
burstingEnabledTime | string (date-time) | Latest time when bursting was last enabled on a disk. |
completionPercent | number | Percentage complete for the background copy when a resource is created via the CopyStart operation. |
creationData | object | Disk source information. CreationData information cannot be changed after the disk has been created. Required. |
dataAccessAuthMode | string | Additional authentication requirements when exporting or uploading to a disk or snapshot. Known values are: "AzureActiveDirectory" and "None". (AzureActiveDirectory, None) |
diskAccessId | string | ARM id of the DiskAccess resource for using private endpoints on disks. |
diskIOPSReadOnly | integer | The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. |
diskIOPSReadWrite | integer | The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. |
diskMBpsReadOnly | integer | The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. |
diskMBpsReadWrite | integer | The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. |
diskSizeBytes | integer | The size of the disk in bytes. This field is read only. |
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. |
diskState | string | The state of the disk. Known values are: "Unattached", "Attached", "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", and "ActiveUpload". (Unattached, Attached, Reserved, Frozen, ActiveSAS, ActiveSASFrozen, ReadyToUpload, ActiveUpload) |
encryption | object | Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. |
encryptionSettingsCollection | object | Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. |
extendedLocation | object | The extended location where the disk will be created. Extended location cannot be changed. |
hyperVGeneration | string | The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values are: "V1" and "V2". (V1, V2) |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | A relative URI containing the ID of the VM that has the disk attached. |
managedByExtended | array | List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. |
maxShares | integer | The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. |
networkAccessPolicy | string | Policy for accessing the disk via network. Known values are: "AllowAll", "AllowPrivate", and "DenyAll". (AllowAll, AllowPrivate, DenyAll) |
optimizedForFrequentAttach | boolean | Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. |
osType | string | The Operating System type. Known values are: "Windows" and "Linux". (Windows, Linux) |
propertyUpdatesInProgress | object | Properties of the disk for which update is pending. |
provisioningState | string | The disk provisioning state. |
publicNetworkAccess | string | Policy for controlling export on the disk. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
purchasePlan | object | Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}. |
securityProfile | object | Contains the security related information for the resource. |
shareInfo | array | Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. |
sku | object | The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. |
supportedCapabilities | object | List of supported capabilities for the image from which the OS disk was created. |
supportsHibernation | boolean | Indicates the OS on a disk supports hibernation. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tier | string | Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/ _. Does not apply to Ultra disks. |
timeCreated | string (date-time) | The time when the disk was created. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uniqueId | string | Unique Guid identifying the resource. |
zones | array | The Logical zone list for Disk. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
LastOwnershipUpdateTime | string (date-time) | The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. |
availabilityPolicy | object | Determines how platform treats disk failures. |
burstingEnabled | boolean | Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. |
burstingEnabledTime | string (date-time) | Latest time when bursting was last enabled on a disk. |
completionPercent | number | Percentage complete for the background copy when a resource is created via the CopyStart operation. |
creationData | object | Disk source information. CreationData information cannot be changed after the disk has been created. Required. |
dataAccessAuthMode | string | Additional authentication requirements when exporting or uploading to a disk or snapshot. Known values are: "AzureActiveDirectory" and "None". (AzureActiveDirectory, None) |
diskAccessId | string | ARM id of the DiskAccess resource for using private endpoints on disks. |
diskIOPSReadOnly | integer | The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. |
diskIOPSReadWrite | integer | The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. |
diskMBpsReadOnly | integer | The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. |
diskMBpsReadWrite | integer | The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. |
diskSizeBytes | integer | The size of the disk in bytes. This field is read only. |
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. |
diskState | string | The state of the disk. Known values are: "Unattached", "Attached", "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", and "ActiveUpload". (Unattached, Attached, Reserved, Frozen, ActiveSAS, ActiveSASFrozen, ReadyToUpload, ActiveUpload) |
encryption | object | Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. |
encryptionSettingsCollection | object | Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. |
extendedLocation | object | The extended location where the disk will be created. Extended location cannot be changed. |
hyperVGeneration | string | The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Known values are: "V1" and "V2". (V1, V2) |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | A relative URI containing the ID of the VM that has the disk attached. |
managedByExtended | array | List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. |
maxShares | integer | The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. |
networkAccessPolicy | string | Policy for accessing the disk via network. Known values are: "AllowAll", "AllowPrivate", and "DenyAll". (AllowAll, AllowPrivate, DenyAll) |
optimizedForFrequentAttach | boolean | Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. |
osType | string | The Operating System type. Known values are: "Windows" and "Linux". (Windows, Linux) |
propertyUpdatesInProgress | object | Properties of the disk for which update is pending. |
provisioningState | string | The disk provisioning state. |
publicNetworkAccess | string | Policy for controlling export on the disk. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
purchasePlan | object | Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}. |
securityProfile | object | Contains the security related information for the resource. |
shareInfo | array | Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. |
sku | object | The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. |
supportedCapabilities | object | List of supported capabilities for the image from which the OS disk was created. |
supportsHibernation | boolean | Indicates the OS on a disk supports hibernation. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tier | string | Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/ _. Does not apply to Ultra disks. |
timeCreated | string (date-time) | The time when the disk was created. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uniqueId | string | Unique Guid identifying the resource. |
zones | array | The Logical zone list for Disk. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, disk_name, subscription_id | Gets information about a disk. | |
list_by_resource_group | select | resource_group_name, subscription_id | Lists all the disks under a resource group. | |
list | select | subscription_id | Lists all the disks under a subscription. | |
create_or_update | insert | resource_group_name, disk_name, subscription_id, location | Creates or updates a disk. | |
update | update | resource_group_name, disk_name, subscription_id | Updates (patches) a disk. | |
create_or_update | replace | resource_group_name, disk_name, subscription_id, location | Creates or updates a disk. | |
delete | delete | resource_group_name, disk_name, subscription_id | Deletes a disk. | |
grant_access | exec | resource_group_name, disk_name, subscription_id, access, durationInSeconds | Grants access to a disk. | |
revoke_access | exec | resource_group_name, disk_name, subscription_id | Revokes access to a disk. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
disk_name | string | The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list
Gets information about a disk.
SELECT
id,
name,
LastOwnershipUpdateTime,
availabilityPolicy,
burstingEnabled,
burstingEnabledTime,
completionPercent,
creationData,
dataAccessAuthMode,
diskAccessId,
diskIOPSReadOnly,
diskIOPSReadWrite,
diskMBpsReadOnly,
diskMBpsReadWrite,
diskSizeBytes,
diskSizeGB,
diskState,
encryption,
encryptionSettingsCollection,
extendedLocation,
hyperVGeneration,
location,
managedBy,
managedByExtended,
maxShares,
networkAccessPolicy,
optimizedForFrequentAttach,
osType,
propertyUpdatesInProgress,
provisioningState,
publicNetworkAccess,
purchasePlan,
securityProfile,
shareInfo,
sku,
supportedCapabilities,
supportsHibernation,
systemData,
tags,
tier,
timeCreated,
type,
uniqueId,
zones
FROM azure.compute.disks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND disk_name = '{{ disk_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the disks under a resource group.
SELECT
id,
name,
LastOwnershipUpdateTime,
availabilityPolicy,
burstingEnabled,
burstingEnabledTime,
completionPercent,
creationData,
dataAccessAuthMode,
diskAccessId,
diskIOPSReadOnly,
diskIOPSReadWrite,
diskMBpsReadOnly,
diskMBpsReadWrite,
diskSizeBytes,
diskSizeGB,
diskState,
encryption,
encryptionSettingsCollection,
extendedLocation,
hyperVGeneration,
location,
managedBy,
managedByExtended,
maxShares,
networkAccessPolicy,
optimizedForFrequentAttach,
osType,
propertyUpdatesInProgress,
provisioningState,
publicNetworkAccess,
purchasePlan,
securityProfile,
shareInfo,
sku,
supportedCapabilities,
supportsHibernation,
systemData,
tags,
tier,
timeCreated,
type,
uniqueId,
zones
FROM azure.compute.disks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the disks under a subscription.
SELECT
id,
name,
LastOwnershipUpdateTime,
availabilityPolicy,
burstingEnabled,
burstingEnabledTime,
completionPercent,
creationData,
dataAccessAuthMode,
diskAccessId,
diskIOPSReadOnly,
diskIOPSReadWrite,
diskMBpsReadOnly,
diskMBpsReadWrite,
diskSizeBytes,
diskSizeGB,
diskState,
encryption,
encryptionSettingsCollection,
extendedLocation,
hyperVGeneration,
location,
managedBy,
managedByExtended,
maxShares,
networkAccessPolicy,
optimizedForFrequentAttach,
osType,
propertyUpdatesInProgress,
provisioningState,
publicNetworkAccess,
purchasePlan,
securityProfile,
shareInfo,
sku,
supportedCapabilities,
supportsHibernation,
systemData,
tags,
tier,
timeCreated,
type,
uniqueId,
zones
FROM azure.compute.disks
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a disk.
INSERT INTO azure.compute.disks (
tags,
location,
properties,
sku,
zones,
extendedLocation,
resource_group_name,
disk_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ sku }}',
'{{ zones }}',
'{{ extendedLocation }}',
'{{ resource_group_name }}',
'{{ disk_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
location,
managedBy,
managedByExtended,
properties,
sku,
systemData,
tags,
type,
zones
;
# Description fields are for documentation purposes
- name: disks
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the disks resource.
- name: disk_name
value: "{{ disk_name }}"
description: Required parameter for the disks resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the disks resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Disk resource properties.
value:
timeCreated: "{{ timeCreated }}"
osType: "{{ osType }}"
hyperVGeneration: "{{ hyperVGeneration }}"
purchasePlan:
name: "{{ name }}"
publisher: "{{ publisher }}"
product: "{{ product }}"
promotionCode: "{{ promotionCode }}"
supportedCapabilities:
diskControllerTypes: "{{ diskControllerTypes }}"
acceleratedNetwork: {{ acceleratedNetwork }}
architecture: "{{ architecture }}"
supportedSecurityOption: "{{ supportedSecurityOption }}"
creationData:
createOption: "{{ createOption }}"
storageAccountId: "{{ storageAccountId }}"
imageReference:
id: "{{ id }}"
sharedGalleryImageId: "{{ sharedGalleryImageId }}"
communityGalleryImageId: "{{ communityGalleryImageId }}"
lun: {{ lun }}
galleryImageReference:
id: "{{ id }}"
sharedGalleryImageId: "{{ sharedGalleryImageId }}"
communityGalleryImageId: "{{ communityGalleryImageId }}"
lun: {{ lun }}
sourceUri: "{{ sourceUri }}"
sourceResourceId: "{{ sourceResourceId }}"
sourceUniqueId: "{{ sourceUniqueId }}"
uploadSizeBytes: {{ uploadSizeBytes }}
logicalSectorSize: {{ logicalSectorSize }}
securityDataUri: "{{ securityDataUri }}"
securityMetadataUri: "{{ securityMetadataUri }}"
performancePlus: {{ performancePlus }}
elasticSanResourceId: "{{ elasticSanResourceId }}"
provisionedBandwidthCopySpeed: "{{ provisionedBandwidthCopySpeed }}"
instantAccessDurationMinutes: {{ instantAccessDurationMinutes }}
diskSizeGB: {{ diskSizeGB }}
diskSizeBytes: {{ diskSizeBytes }}
uniqueId: "{{ uniqueId }}"
encryptionSettingsCollection:
enabled: {{ enabled }}
encryptionSettings:
- diskEncryptionKey:
sourceVault:
id: "{{ id }}"
secretUrl: "{{ secretUrl }}"
keyEncryptionKey:
sourceVault:
id: "{{ id }}"
keyUrl: "{{ keyUrl }}"
encryptionSettingsVersion: "{{ encryptionSettingsVersion }}"
provisioningState: "{{ provisioningState }}"
diskIOPSReadWrite: {{ diskIOPSReadWrite }}
diskMBpsReadWrite: {{ diskMBpsReadWrite }}
diskIOPSReadOnly: {{ diskIOPSReadOnly }}
diskMBpsReadOnly: {{ diskMBpsReadOnly }}
diskState: "{{ diskState }}"
encryption:
diskEncryptionSetId: "{{ diskEncryptionSetId }}"
type: "{{ type }}"
maxShares: {{ maxShares }}
shareInfo:
- vmUri: "{{ vmUri }}"
networkAccessPolicy: "{{ networkAccessPolicy }}"
diskAccessId: "{{ diskAccessId }}"
burstingEnabledTime: "{{ burstingEnabledTime }}"
tier: "{{ tier }}"
burstingEnabled: {{ burstingEnabled }}
propertyUpdatesInProgress:
targetTier: "{{ targetTier }}"
supportsHibernation: {{ supportsHibernation }}
securityProfile:
securityType: "{{ securityType }}"
secureVMDiskEncryptionSetId: "{{ secureVMDiskEncryptionSetId }}"
completionPercent: {{ completionPercent }}
publicNetworkAccess: "{{ publicNetworkAccess }}"
dataAccessAuthMode: "{{ dataAccessAuthMode }}"
optimizedForFrequentAttach: {{ optimizedForFrequentAttach }}
LastOwnershipUpdateTime: "{{ LastOwnershipUpdateTime }}"
availabilityPolicy:
actionOnDiskDelay: "{{ actionOnDiskDelay }}"
- name: sku
description: |
The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.
value:
name: "{{ name }}"
tier: "{{ tier }}"
- name: zones
value:
- "{{ zones }}"
description: |
The Logical zone list for Disk.
- name: extendedLocation
description: |
The extended location where the disk will be created. Extended location cannot be changed.
value:
name: "{{ name }}"
type: "{{ type }}"
UPDATE examples
- update
Updates (patches) a disk.
UPDATE azure.compute.disks
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND disk_name = '{{ disk_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
extendedLocation,
location,
managedBy,
managedByExtended,
properties,
sku,
systemData,
tags,
type,
zones;
REPLACE examples
- create_or_update
Creates or updates a disk.
REPLACE azure.compute.disks
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
sku = '{{ sku }}',
zones = '{{ zones }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND disk_name = '{{ disk_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
extendedLocation,
location,
managedBy,
managedByExtended,
properties,
sku,
systemData,
tags,
type,
zones;
DELETE examples
- delete
Deletes a disk.
DELETE FROM azure.compute.disks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND disk_name = '{{ disk_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- grant_access
- revoke_access
Grants access to a disk.
EXEC azure.compute.disks.grant_access
@resource_group_name='{{ resource_group_name }}' --required,
@disk_name='{{ disk_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"access": "{{ access }}",
"durationInSeconds": {{ durationInSeconds }},
"getSecureVMGuestStateSAS": {{ getSecureVMGuestStateSAS }},
"fileFormat": "{{ fileFormat }}"
}'
;
Revokes access to a disk.
EXEC azure.compute.disks.revoke_access
@resource_group_name='{{ resource_group_name }}' --required,
@disk_name='{{ disk_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;