PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/?api-version=2023-10-02
Creates or updates a disk.
Servers
- https://management.azure.com/
Path parameters
Name | Type | Required | Description |
---|---|---|---|
diskName |
String | Yes |
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. |
subscriptionId |
String | Yes |
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
resourceGroupName |
String | Yes |
The name of the resource group. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
id |
String | No |
Resource Id |
managedByExtended[] |
Array | No |
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. |
extendedLocation |
Object | No |
The complex type of the extended location. |
extendedLocation.name |
String | No |
The name of the extended location. |
extendedLocation.type |
String | No |
The type of extendedLocation. Possible values:
|
sku |
Object | No |
The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. |
sku.tier |
String | No |
The sku tier. |
sku.name |
String | No |
The sku name. Possible values:
|
name |
String | No |
Resource name |
properties |
Object | No |
Disk resource properties. |
properties.dataAccessAuthMode |
String | No |
Additional authentication requirements when exporting or uploading to a disk or snapshot. Possible values:
|
properties.maxShares |
Integer | No |
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. |
properties.diskSizeGB |
Integer | No |
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 |
String | No |
This enumerates the possible state of the disk. Possible values:
|
properties.shareInfo[] |
Array | No |
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. |
properties.shareInfo[].vmUri |
String | No |
A relative URI containing the ID of the VM that has the disk attached. |
properties.completionPercent |
Number | No |
Percentage complete for the background copy when a resource is created via the CopyStart operation. |
properties.timeCreated |
String | No |
The time when the disk was created. |
properties.osType |
String | No |
The Operating System type. Possible values:
|
properties.provisioningState |
String | No |
The disk provisioning state. |
properties.supportedCapabilities |
Object | No |
List of supported capabilities persisted on the disk resource for VM use. |
properties.supportedCapabilities.acceleratedNetwork |
Boolean | No |
True if the image from which the OS disk is created supports accelerated networking. |
properties.supportedCapabilities.diskControllerTypes |
String | No |
The disk controllers that an OS disk supports. If set it can be SCSI or SCSI, NVME or NVME, SCSI. |
properties.supportedCapabilities.architecture |
String | No |
CPU architecture supported by an OS disk. Possible values:
|
properties.creationData |
Object | Yes |
Data used when creating a disk. |
properties.creationData.sourceUri |
String | No |
If createOption is Import, this is the URI of a blob to be imported into a managed disk. |
properties.creationData.securityDataUri |
String | No |
If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state. |
properties.creationData.logicalSectorSize |
Integer | No |
Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. |
properties.creationData.galleryImageReference |
Object | No |
The source image used for creating the disk. |
properties.creationData.galleryImageReference.id |
String | No |
A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference. |
properties.creationData.galleryImageReference.sharedGalleryImageId |
String | No |
A relative uri containing a direct shared Azure Compute Gallery image reference. |
properties.creationData.galleryImageReference.lun |
Integer | No |
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. |
properties.creationData.galleryImageReference.communityGalleryImageId |
String | No |
A relative uri containing a community Azure Compute Gallery image reference. |
properties.creationData.storageAccountId |
String | No |
Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. |
properties.creationData.provisionedBandwidthCopySpeed |
String | No |
If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed. Possible values:
|
properties.creationData.sourceUniqueId |
String | No |
If this field is set, this is the unique id identifying the source of this resource. |
properties.creationData.elasticSanResourceId |
String | No |
Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot. |
properties.creationData.sourceResourceId |
String | No |
If createOption is Copy, this is the ARM id of the source snapshot or disk. |
properties.creationData.uploadSizeBytes |
Integer | No |
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). |
properties.creationData.createOption |
String | Yes |
This enumerates the possible sources of a disk's creation. Possible values:
|
properties.creationData.imageReference |
Object | No |
The source image used for creating the disk. |
properties.creationData.imageReference.id |
String | No |
A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference. |
properties.creationData.imageReference.sharedGalleryImageId |
String | No |
A relative uri containing a direct shared Azure Compute Gallery image reference. |
properties.creationData.imageReference.lun |
Integer | No |
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. |
properties.creationData.imageReference.communityGalleryImageId |
String | No |
A relative uri containing a community Azure Compute Gallery image reference. |
properties.creationData.performancePlus |
Boolean | No |
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. |
properties.burstingEnabled |
Boolean | No |
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. |
properties.encryptionSettingsCollection |
Object | No |
Encryption settings for disk or snapshot |
properties.encryptionSettingsCollection.encryptionSettings[] |
Array | No |
A collection of encryption settings, one for each disk volume. |
properties.encryptionSettingsCollection.encryptionSettings[].keyEncryptionKey |
Object | No |
Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey |
properties.encryptionSettingsCollection.encryptionSettings[].keyEncryptionKey.sourceVault |
Object | Yes |
The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} |
properties.encryptionSettingsCollection.encryptionSettings[].keyEncryptionKey.sourceVault.id |
String | No |
Resource Id |
properties.encryptionSettingsCollection.encryptionSettings[].keyEncryptionKey.keyUrl |
String | Yes |
Url pointing to a key or secret in KeyVault |
properties.encryptionSettingsCollection.encryptionSettings[].diskEncryptionKey |
Object | No |
Key Vault Secret Url and vault id of the encryption key |
properties.encryptionSettingsCollection.encryptionSettings[].diskEncryptionKey.sourceVault |
Object | Yes |
The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} |
properties.encryptionSettingsCollection.encryptionSettings[].diskEncryptionKey.sourceVault.id |
String | No |
Resource Id |
properties.encryptionSettingsCollection.encryptionSettings[].diskEncryptionKey.secretUrl |
String | Yes |
Url pointing to a key or secret in KeyVault |
properties.encryptionSettingsCollection.enabled |
Boolean | Yes |
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. |
properties.encryptionSettingsCollection.encryptionSettingsVersion |
String | No |
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. |
properties.tier |
String | No |
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. |
properties.diskIOPSReadOnly |
Integer | No |
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. |
properties.securityProfile |
Object | No |
Contains the security related information for the resource. |
properties.securityProfile.securityType |
String | No |
Specifies the SecurityType of the VM. Applicable for OS disks only. Possible values:
|
properties.securityProfile.secureVMDiskEncryptionSetId |
String | No |
ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key |
properties.diskAccessId |
String | No |
ARM id of the DiskAccess resource for using private endpoints on disks. |
properties.propertyUpdatesInProgress |
Object | No |
Properties of the disk for which update is pending. |
properties.propertyUpdatesInProgress.targetTier |
String | No |
The target performance tier of the disk if a tier change operation is in progress. |
properties.optimizedForFrequentAttach |
Boolean | No |
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. |
properties.diskMBpsReadOnly |
Integer | No |
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. |
properties.supportsHibernation |
Boolean | No |
Indicates the OS on a disk supports hibernation. |
properties.purchasePlan |
Object | No |
Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. |
properties.purchasePlan.name |
String | Yes |
The plan ID. |
properties.purchasePlan.publisher |
String | Yes |
The publisher ID. |
properties.purchasePlan.product |
String | Yes |
Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. |
properties.purchasePlan.promotionCode |
String | No |
The Offer Promotion Code. |
properties.LastOwnershipUpdateTime |
String | No |
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. |
properties.encryption |
Object | No |
Encryption at rest settings for disk or snapshot |
properties.encryption.diskEncryptionSetId |
String | No |
ResourceId of the disk encryption set to use for enabling encryption at rest. |
properties.encryption.type |
String | No |
The type of key used to encrypt the data of the disk. Possible values:
|
properties.diskSizeBytes |
Integer | No |
The size of the disk in bytes. This field is read only. |
properties.uniqueId |
String | No |
Unique Guid identifying the resource. |
properties.diskIOPSReadWrite |
Integer | No |
The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. |
properties.burstingEnabledTime |
String | No |
Latest time when bursting was last enabled on a disk. |
properties.publicNetworkAccess |
String | No |
Policy for controlling export on the disk. Possible values:
|
properties.networkAccessPolicy |
String | No |
Policy for accessing the disk via network. Possible values:
|
properties.hyperVGeneration |
String | No |
The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values:
|
properties.diskMBpsReadWrite |
Integer | No |
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. |
location |
String | No |
Resource location |
zones[] |
Array | No |
The Logical zone list for Disk. |
managedBy |
String | No |
A relative URI containing the ID of the VM that has the disk attached. |
tags |
Object | No |
Resource tags |
type |
String | No |
Resource type |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.