共用方式為


Disks - Create Or Update

建立或更新磁碟。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}?api-version=2024-03-02

URI 參數

名稱 位於 必要 類型 Description
diskName
path True

string

要建立之受控磁碟的名稱。 建立磁碟之後,就無法變更名稱。 名稱的支援字元為 a-z、A-Z、0-9、_ 和 -。 名稱長度上限為80個字元。

resourceGroupName
path True

string

資源群組的名稱。

subscriptionId
path True

string

可唯一識別Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。

api-version
query True

string

用戶端 API 版本。

要求本文

名稱 必要 類型 Description
location True

string

資源位置

properties.creationData True

CreationData

磁碟來源資訊。 建立磁碟之後,無法變更 CreationData 資訊。

extendedLocation

ExtendedLocation

將建立磁碟的擴充位置。 無法變更擴充位置。

properties.burstingEnabled

boolean

設定為 true,以啟用超出磁碟布建效能目標的高載。 預設會停用高載。 不適用於 Ultra 磁碟。

properties.completionPercent

number

透過 CopyStart 作業建立資源時,背景複製完成的百分比。

properties.dataAccessAuthMode

DataAccessAuthMode

匯出或上傳至磁碟或快照集時的其他驗證需求。

properties.diskAccessId

string

DiskAccess 資源的 ARM 識別碼,用於在磁碟上使用私人端點。

properties.diskIOPSReadOnly

integer

所有裝載共用磁碟作為 ReadOnly 的 VM 所允許的 IOPS 總數。 一個作業可以在 4k 到 256k 個字節之間傳輸。

properties.diskIOPSReadWrite

integer

此磁碟允許的 IOPS 數目;只能針對 UltraSSD 磁碟設定。 一個作業可以在 4k 到 256k 個字節之間傳輸。

properties.diskMBpsReadOnly

integer

所有裝載共用磁碟作為 ReadOnly 的 VM 所允許的總輸送量 (MBps)。 MBps 表示每秒數百萬個字節 - MB 會使用 ISO 表示法,其乘冪為 10。

properties.diskMBpsReadWrite

integer

此磁碟允許的頻寬;只能針對 UltraSSD 磁碟設定。 MBps 表示每秒數百萬個字節 - MB 會使用 ISO 表示法,其乘冪為 10。

properties.diskSizeGB

integer

如果 creationData.createOption 為 Empty,則此欄位為必要字段,並指出要建立的磁碟大小。 如果此欄位存在以其他選項進行更新或建立,表示重設大小。 只有在磁碟未連結至執行中的 VM 時,才允許重設大小,而且只能增加磁碟的大小。

properties.encryption

Encryption

加密屬性可用來使用客戶管理的密鑰或平臺受控金鑰來加密待用數據。

properties.encryptionSettingsCollection

EncryptionSettingsCollection

用於 Azure 磁碟加密的加密設定集合,可以包含每個磁碟或快照集的多個加密設定。

properties.hyperVGeneration

HyperVGeneration

虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。

properties.maxShares

integer

可以同時連結至磁碟的 VM 數目上限。 大於一個值表示可以同時掛接在多個 VM 上的磁碟。

properties.networkAccessPolicy

NetworkAccessPolicy

透過網路存取磁碟的原則。

properties.optimizedForFrequentAttach

boolean

將此屬性設定為 true 可藉由從一部虛擬機中斷連結並連結至另一部虛擬機,來改善經常(每天超過 5 次)的數據磁碟可靠性和效能。 不應該針對未中斷連結和經常連結的磁碟設定此屬性,因為它會導致磁碟與虛擬機的容錯網域不一致。

properties.osType

OperatingSystemTypes

操作系統類型。

properties.publicNetworkAccess

PublicNetworkAccess

控制磁碟上導出的原則。

properties.purchasePlan

PurchasePlan

建立OS磁碟的來源映像購買方案資訊。 例如 - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}

properties.securityProfile

DiskSecurityProfile

包含資源的安全性相關信息。

properties.supportedCapabilities

SupportedCapabilities

建立OS磁碟的映像支援功能清單。

properties.supportsHibernation

boolean

表示磁碟上的OS支援休眠。

properties.tier

string

磁碟的效能層級(例如 P4、S10)如下所述:https://azure.microsoft.com/en-us/pricing/details/managed-disks/。 不適用於 Ultra 磁碟。

sku

DiskSku

磁碟 SKU 名稱。 可以是Standard_LRS、Premium_LRS、StandardSSD_LRS、UltraSSD_LRS、Premium_ZRS、StandardSSD_ZRS或PremiumV2_LRS。

tags

object

資源標籤

zones

string[]

磁碟的邏輯區域清單。

回應

名稱 類型 Description
200 OK

Disk

還行

202 Accepted

Disk

接受

安全性

azure_auth

Azure Active Directory OAuth2 Flow

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Create a confidential VM supported disk encrypted with customer managed key
Create a managed disk and associate with disk access resource.
Create a managed disk and associate with disk encryption set.
Create a managed disk by copying a snapshot.
Create a managed disk by importing an unmanaged blob from a different subscription.
Create a managed disk by importing an unmanaged blob from the same subscription.
Create a managed disk from a platform image.
Create a managed disk from an Azure Compute Gallery community image.
Create a managed disk from an Azure Compute Gallery direct shared image.
Create a managed disk from an Azure Compute Gallery image.
Create a managed disk from an existing managed disk in the same or different subscription.
Create a managed disk from elastic san volume snapshot.
Create a managed disk from ImportSecure create option
Create a managed disk from UploadPreparedSecure create option
Create a managed disk with dataAccessAuthMode
Create a managed disk with optimizedForFrequentAttach.
Create a managed disk with performancePlus.
Create a managed disk with premium v2 account type.
Create a managed disk with security profile
Create a managed disk with ssd zrs account type.
Create a managed disk with ultra account type with readOnly property set.
Create a managed upload disk.
Create an empty managed disk in extended location.
Create an empty managed disk.
Create an ultra managed disk with logicalSectorSize 512E

Create a confidential VM supported disk encrypted with customer managed key

範例要求

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "securityProfile": {
      "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey",
      "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"
    },
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0"
      }
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Updating",
    "osType": "Windows",
    "securityProfile": {
      "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey",
      "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"
    },
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0"
      }
    }
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Succeeded",
    "osType": "Windows",
    "securityProfile": {
      "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey",
      "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"
    },
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0"
      }
    }
  }
}

Create a managed disk and associate with disk access resource.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "networkAccessPolicy": "AllowPrivate",
    "diskAccessId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/{existing-diskAccess-name}"
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Succeeded",
    "networkAccessPolicy": "AllowPrivate",
    "diskAccessId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/{existing-diskAccess-name}",
    "publicNetworkAccess": "Enabled"
  },
  "location": "West US",
  "name": "myDisk"
}

Create a managed disk and associate with disk encryption set.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "encryption": {
      "diskEncryptionSetId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Succeeded",
    "encryption": {
      "diskEncryptionSetId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
    }
  },
  "location": "West US",
  "name": "myDisk"
}

Create a managed disk by copying a snapshot.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Copy",
      "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Updating",
    "creationData": {
      "createOption": "Copy",
      "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
    }
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Updating",
    "creationData": {
      "createOption": "Copy",
      "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
    }
  }
}

Create a managed disk by importing an unmanaged blob from a different subscription.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Import",
      "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Updating",
    "creationData": {
      "createOption": "Import",
      "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
    }
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Updating",
    "creationData": {
      "createOption": "Import",
      "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
    }
  }
}

Create a managed disk by importing an unmanaged blob from the same subscription.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Import",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Updating",
    "creationData": {
      "createOption": "Import",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
    }
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Updating",
    "creationData": {
      "createOption": "Import",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
    }
  }
}

Create a managed disk from a platform image.

範例要求

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0"
      }
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "hyperVGeneration": "V1",
    "purchasePlan": {
      "name": "{sku}",
      "publisher": "{publisher}",
      "product": "{offer}"
    },
    "supportedCapabilities": {
      "acceleratedNetwork": true
    },
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0"
      }
    },
    "provisioningState": "Updating"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Succeeded",
    "osType": "Windows",
    "hyperVGeneration": "V1",
    "purchasePlan": {
      "name": "{sku}",
      "publisher": "{publisher}",
      "product": "{offer}"
    },
    "supportedCapabilities": {
      "acceleratedNetwork": true
    },
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0"
      }
    }
  }
}

範例要求

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0"
      }
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "hyperVGeneration": "V1",
    "supportedCapabilities": {
      "acceleratedNetwork": true
    },
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0"
      }
    },
    "provisioningState": "Updating"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Succeeded",
    "osType": "Windows",
    "hyperVGeneration": "V1",
    "supportedCapabilities": {
      "acceleratedNetwork": true
    },
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0"
      }
    }
  }
}

範例要求

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0"
      }
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "hyperVGeneration": "V1",
    "supportedCapabilities": {
      "acceleratedNetwork": true
    },
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0"
      }
    },
    "provisioningState": "Updating"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Succeeded",
    "osType": "Windows",
    "hyperVGeneration": "V1",
    "supportedCapabilities": {
      "acceleratedNetwork": true
    },
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0"
      }
    }
  }
}

範例要求

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0"
      }
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "hyperVGeneration": "V1",
    "supportedCapabilities": {
      "acceleratedNetwork": true
    },
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0"
      }
    },
    "provisioningState": "Updating"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Succeeded",
    "osType": "Windows",
    "hyperVGeneration": "V1",
    "supportedCapabilities": {
      "acceleratedNetwork": true
    },
    "creationData": {
      "createOption": "FromImage",
      "galleryImageReference": {
        "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0"
      }
    }
  }
}

Create a managed disk from an existing managed disk in the same or different subscription.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk2?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Copy",
      "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1"
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Copy",
      "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1"
    },
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk2"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Copy",
      "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1"
    },
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk2"
}

Create a managed disk from elastic san volume snapshot.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "CopyFromSanSnapshot",
      "elasticSanResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot"
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "CopyFromSanSnapshot",
      "elasticSanResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot"
    },
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "CopyFromSanSnapshot",
      "elasticSanResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot"
    },
    "provisioningState": "Succeeded"
  },
  "location": "West US",
  "name": "myDisk"
}

Create a managed disk from ImportSecure create option

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "securityProfile": {
      "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey"
    },
    "creationData": {
      "createOption": "ImportSecure",
      "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
      "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd"
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Updating",
    "osType": "Windows",
    "securityProfile": {
      "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey"
    },
    "creationData": {
      "createOption": "ImportSecure",
      "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
      "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd"
    }
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "West US",
  "properties": {
    "provisioningState": "Succeeded",
    "osType": "Windows",
    "securityProfile": {
      "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey"
    },
    "creationData": {
      "createOption": "ImportSecure",
      "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount",
      "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
      "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd"
    }
  }
}

Create a managed disk from UploadPreparedSecure create option

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "osType": "Windows",
    "securityProfile": {
      "securityType": "TrustedLaunch"
    },
    "creationData": {
      "createOption": "UploadPreparedSecure",
      "uploadSizeBytes": 10737418752
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "osType": "Windows",
    "securityProfile": {
      "securityType": "TrustedLaunch"
    },
    "creationData": {
      "createOption": "UploadPreparedSecure",
      "uploadSizeBytes": 10737418752
    },
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "osType": "Windows",
    "securityProfile": {
      "securityType": "TrustedLaunch"
    },
    "creationData": {
      "createOption": "UploadPreparedSecure",
      "uploadSizeBytes": 10737418752
    },
    "provisioningState": "Succeeded"
  },
  "location": "West US",
  "name": "myDisk"
}

Create a managed disk with dataAccessAuthMode

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "dataAccessAuthMode": "AzureActiveDirectory"
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Succeeded",
    "dataAccessAuthMode": "AzureActiveDirectory"
  },
  "location": "West US",
  "name": "myDisk"
}

Create a managed disk with optimizedForFrequentAttach.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "optimizedForFrequentAttach": true
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating",
    "optimizedForFrequentAttach": true
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Succeeded",
    "optimizedForFrequentAttach": true
  },
  "location": "West US",
  "name": "myDisk"
}

Create a managed disk with performancePlus.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Upload",
      "performancePlus": true
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Upload",
      "performancePlus": true
    },
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Upload",
      "performancePlus": true
    },
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}

Create a managed disk with premium v2 account type.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myPremiumV2Disk?api-version=2024-03-02

{
  "location": "West US",
  "sku": {
    "name": "PremiumV2_LRS"
  },
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "diskIOPSReadWrite": 125,
    "diskMBpsReadWrite": 3000
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myPremiumV2Disk",
  "sku": {
    "name": "PremiumV2_LRS",
    "tier": "Premium"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myPremiumV2Disk",
  "sku": {
    "name": "PremiumV2_LRS",
    "tier": "Premium"
  }
}

Create a managed disk with security profile

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "North Central US",
  "properties": {
    "osType": "Windows",
    "securityProfile": {
      "securityType": "TrustedLaunch"
    },
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}"
      }
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "North Central US",
  "properties": {
    "provisioningState": "Updating",
    "osType": "Windows",
    "securityProfile": {
      "securityType": "TrustedLaunch"
    },
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}"
      }
    }
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "name": "myDisk",
  "location": "North Central US",
  "properties": {
    "provisioningState": "Succeeded",
    "osType": "Windows",
    "securityProfile": {
      "securityType": "TrustedLaunch"
    },
    "creationData": {
      "createOption": "FromImage",
      "imageReference": {
        "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}"
      }
    }
  }
}

Create a managed disk with ssd zrs account type.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "sku": {
    "name": "Premium_ZRS"
  },
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk",
  "sku": {
    "name": "Premium_ZRS",
    "tier": "Premium"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk",
  "sku": {
    "name": "Premium_ZRS",
    "tier": "Premium"
  }
}

Create a managed disk with ultra account type with readOnly property set.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myUltraReadOnlyDisk?api-version=2024-03-02

{
  "location": "West US",
  "sku": {
    "name": "UltraSSD_LRS"
  },
  "properties": {
    "creationData": {
      "createOption": "Empty",
      "logicalSectorSize": 4096
    },
    "diskSizeGB": 200,
    "diskIOPSReadWrite": 125,
    "diskMBpsReadWrite": 3000,
    "encryption": {
      "type": "EncryptionAtRestWithPlatformKey"
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myUltraReadOnlyDisk",
  "sku": {
    "name": "UltraSSD_LRS",
    "tier": "Ultra"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating",
    "encryption": {
      "type": "EncryptionAtRestWithPlatformKey"
    }
  },
  "location": "West US",
  "name": "myUltraReadOnlyDisk",
  "sku": {
    "name": "UltraSSD_LRS",
    "tier": "Ultra"
  }
}

Create a managed upload disk.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Upload",
      "uploadSizeBytes": 10737418752
    }
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Upload",
      "uploadSizeBytes": 10737418752
    },
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Upload",
      "uploadSizeBytes": 10737418752
    },
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}

Create an empty managed disk in extended location.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "extendedLocation": {
    "type": "EdgeZone",
    "name": "{edge-zone-id}"
  },
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk",
  "extendedLocation": {
    "type": "EdgeZone",
    "name": "{edge-zone-id}"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk",
  "extendedLocation": {
    "type": "EdgeZone",
    "name": "{edge-zone-id}"
  }
}

Create an empty managed disk.

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty"
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk"
}

Create an ultra managed disk with logicalSectorSize 512E

範例要求

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2024-03-02

{
  "location": "West US",
  "sku": {
    "name": "UltraSSD_LRS"
  },
  "properties": {
    "creationData": {
      "createOption": "Empty",
      "logicalSectorSize": 512
    },
    "diskSizeGB": 200
  }
}

範例回覆

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty",
      "logicalSectorSize": 512
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk",
  "sku": {
    "name": "UltraSSD_LRS",
    "tier": "Ultra"
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk",
  "properties": {
    "creationData": {
      "createOption": "Empty",
      "logicalSectorSize": 512
    },
    "diskSizeGB": 200,
    "provisioningState": "Updating"
  },
  "location": "West US",
  "name": "myDisk",
  "sku": {
    "name": "UltraSSD_LRS",
    "tier": "Ultra"
  }
}

定義

名稱 Description
Architecture

OS 磁碟支援的CPU架構。

CreationData

建立磁碟時所使用的數據。

DataAccessAuthMode

匯出或上傳至磁碟或快照集時的其他驗證需求。

Disk

磁碟資源。

DiskCreateOption

這會列舉磁碟建立的可能來源。

DiskSecurityProfile

包含資源的安全性相關信息。

DiskSecurityTypes

指定 VM 的 SecurityType。 僅適用於OS磁碟。

DiskSku

磁碟 SKU 名稱。 可以是Standard_LRS、Premium_LRS、StandardSSD_LRS、UltraSSD_LRS、Premium_ZRS、StandardSSD_ZRS或PremiumV2_LRS。

DiskState

這會列舉磁碟的可能狀態。

DiskStorageAccountTypes

SKU 名稱。

Encryption

磁碟或快照集的待用加密設定

EncryptionSettingsCollection

磁碟或快照集的加密設定

EncryptionSettingsElement

一個磁碟區的加密設定。

EncryptionType

用來加密磁碟數據的金鑰類型。

ExtendedLocation

擴充位置的複雜類型。

ExtendedLocationTypes

擴充位置的類型。

HyperVGeneration

虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。

ImageDiskReference

用於建立磁碟的來源映像。

KeyVaultAndKeyReference

KeK 的 Key Vault 金鑰 URL 和保存庫識別碼是選擇性的,而且當提供用來解除包裝 encryptionKey 時

KeyVaultAndSecretReference

加密金鑰的 Key Vault 秘密 URL 和保存庫識別碼

NetworkAccessPolicy

透過網路存取磁碟的原則。

OperatingSystemTypes

操作系統類型。

PropertyUpdatesInProgress

正在擱置更新之磁碟的屬性。

ProvisionedBandwidthCopyOption

如果在快照集上設定此字段,且 createOption 是 CopyStart,則會以更快的速度複製快照集。

PublicNetworkAccess

控制磁碟上導出的原則。

PurchasePlan

用於透過 MarketPlace 建立第三方成品的購買內容。

ShareInfoElement
SourceVault

保存庫標識符是 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} 格式的 Azure Resource Manager 資源標識符

SupportedCapabilities

VM 使用的磁碟資源上保存的支援功能清單。

Architecture

OS 磁碟支援的CPU架構。

名稱 類型 Description
Arm64

string

x64

string

CreationData

建立磁碟時所使用的數據。

名稱 類型 Description
createOption

DiskCreateOption

這會列舉磁碟建立的可能來源。

elasticSanResourceId

string

如果 createOption 是 CopyFromSanSnapshot,則為必要專案。 這是來源彈性 san 磁碟區快照集的 ARM 識別碼。

galleryImageReference

ImageDiskReference

如果從資源庫映射建立,則為必要專案。 ImageDiskReference 的 id/sharedGalleryImageId/communityGalleryImageId 將是用來建立磁碟之共用 galley 映射版本的 ARM 標識符。

imageReference

ImageDiskReference

PIR 或使用者映像的磁碟來源資訊。

logicalSectorSize

integer

Ultra 磁碟的邏輯扇區大小,以位元組為單位。 支援的值為 512 ad 4096。 4096 是預設值。

performancePlus

boolean

將此旗標設定為 true,以提升所部署磁碟的效能目標,請參閱此處的個別效能目標。 此旗標只能在磁碟建立時間上設定,而且在啟用之後無法停用。

provisionedBandwidthCopySpeed

ProvisionedBandwidthCopyOption

如果在快照集上設定此字段,且 createOption 是 CopyStart,則會以更快的速度複製快照集。

securityDataUri

string

如果 createOption 是 ImportSecure,這是要匯入至 VM 客體狀態之 Blob 的 URI。

sourceResourceId

string

如果 createOption 是 Copy,這是來源快照集或磁碟的 ARM 識別碼。

sourceUniqueId

string

如果設定此欄位,這是識別此資源來源的唯一標識符。

sourceUri

string

如果 createOption 為 Import,這是要匯入受控磁碟之 Blob 的 URI。

storageAccountId

string

如果 createOption 為 Import,則為必要專案。 記憶體帳戶的 Azure Resource Manager 識別符,其中包含要匯入為磁碟的 Blob。

uploadSizeBytes

integer

如果 createOption 是 Upload,這是上傳的內容大小,包括 VHD 頁尾。 此值應介於 20972032 (VHD 頁尾為 20 MiB + 512 位元元組)和 35183298347520 個字節之間(VHD 頁尾為 32 TiB + 512 位元組)。

DataAccessAuthMode

匯出或上傳至磁碟或快照集時的其他驗證需求。

名稱 類型 Description
AzureActiveDirectory

string

使用導出/上傳 URL 時,系統會檢查使用者在 Azure Active Directory 中是否有身分識別,並具有導出/上傳數據的必要許可權。 請參閱 aka.ms/DisksAzureADAuth。

None

string

存取匯出/上傳 URL 時,不會執行任何其他驗證。

Disk

磁碟資源。

名稱 類型 Description
extendedLocation

ExtendedLocation

將建立磁碟的擴充位置。 無法變更擴充位置。

id

string

資源標識碼

location

string

資源位置

managedBy

string

包含已連結磁碟之 VM 識別碼的相對 URI。

managedByExtended

string[]

包含已連結磁碟之 VM 識別碼的相對 URI 清單。 maxShares 應該設定為大於一個的值,讓磁碟能夠將它們連結至多個 VM。

name

string

資源名稱

properties.LastOwnershipUpdateTime

string

上次變更磁碟擁有權狀態的 UTC 時間,也就是上次連結或中斷連結磁碟的時間,或是解除分配或啟動磁碟的 VM 的時間。

properties.burstingEnabled

boolean

設定為 true,以啟用超出磁碟布建效能目標的高載。 預設會停用高載。 不適用於 Ultra 磁碟。

properties.burstingEnabledTime

string

上次在磁碟上啟用高載的時間。

properties.completionPercent

number

透過 CopyStart 作業建立資源時,背景複製完成的百分比。

properties.creationData

CreationData

磁碟來源資訊。 建立磁碟之後,無法變更 CreationData 資訊。

properties.dataAccessAuthMode

DataAccessAuthMode

匯出或上傳至磁碟或快照集時的其他驗證需求。

properties.diskAccessId

string

DiskAccess 資源的 ARM 識別碼,用於在磁碟上使用私人端點。

properties.diskIOPSReadOnly

integer

所有裝載共用磁碟作為 ReadOnly 的 VM 所允許的 IOPS 總數。 一個作業可以在 4k 到 256k 個字節之間傳輸。

properties.diskIOPSReadWrite

integer

此磁碟允許的 IOPS 數目;只能針對 UltraSSD 磁碟設定。 一個作業可以在 4k 到 256k 個字節之間傳輸。

properties.diskMBpsReadOnly

integer

所有裝載共用磁碟作為 ReadOnly 的 VM 所允許的總輸送量 (MBps)。 MBps 表示每秒數百萬個字節 - MB 會使用 ISO 表示法,其乘冪為 10。

properties.diskMBpsReadWrite

integer

此磁碟允許的頻寬;只能針對 UltraSSD 磁碟設定。 MBps 表示每秒數百萬個字節 - MB 會使用 ISO 表示法,其乘冪為 10。

properties.diskSizeBytes

integer

以位元組為單位的磁碟大小。 此欄位是唯讀的。

properties.diskSizeGB

integer

如果 creationData.createOption 為 Empty,則此欄位為必要字段,並指出要建立的磁碟大小。 如果此欄位存在以其他選項進行更新或建立,表示重設大小。 只有在磁碟未連結至執行中的 VM 時,才允許重設大小,而且只能增加磁碟的大小。

properties.diskState

DiskState

磁碟的狀態。

properties.encryption

Encryption

加密屬性可用來使用客戶管理的密鑰或平臺受控金鑰來加密待用數據。

properties.encryptionSettingsCollection

EncryptionSettingsCollection

用於 Azure 磁碟加密的加密設定集合,可以包含每個磁碟或快照集的多個加密設定。

properties.hyperVGeneration

HyperVGeneration

虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。

properties.maxShares

integer

可以同時連結至磁碟的 VM 數目上限。 大於一個值表示可以同時掛接在多個 VM 上的磁碟。

properties.networkAccessPolicy

NetworkAccessPolicy

透過網路存取磁碟的原則。

properties.optimizedForFrequentAttach

boolean

將此屬性設定為 true 可藉由從一部虛擬機中斷連結並連結至另一部虛擬機,來改善經常(每天超過 5 次)的數據磁碟可靠性和效能。 不應該針對未中斷連結和經常連結的磁碟設定此屬性,因為它會導致磁碟與虛擬機的容錯網域不一致。

properties.osType

OperatingSystemTypes

操作系統類型。

properties.propertyUpdatesInProgress

PropertyUpdatesInProgress

正在擱置更新之磁碟的屬性。

properties.provisioningState

string

磁碟布建狀態。

properties.publicNetworkAccess

PublicNetworkAccess

控制磁碟上導出的原則。

properties.purchasePlan

PurchasePlan

建立OS磁碟的來源映像購買方案資訊。 例如 - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}

properties.securityProfile

DiskSecurityProfile

包含資源的安全性相關信息。

properties.shareInfo

ShareInfoElement[]

已連結磁碟之所有 VM 清單的詳細數據。 maxShares 應該設定為大於一個的值,讓磁碟能夠將它們連結至多個 VM。

properties.supportedCapabilities

SupportedCapabilities

建立OS磁碟的映像支援功能清單。

properties.supportsHibernation

boolean

表示磁碟上的OS支援休眠。

properties.tier

string

磁碟的效能層級(例如 P4、S10)如下所述:https://azure.microsoft.com/en-us/pricing/details/managed-disks/。 不適用於 Ultra 磁碟。

properties.timeCreated

string

建立磁碟的時間。

properties.uniqueId

string

識別資源的唯一 Guid。

sku

DiskSku

磁碟 SKU 名稱。 可以是Standard_LRS、Premium_LRS、StandardSSD_LRS、UltraSSD_LRS、Premium_ZRS、StandardSSD_ZRS或PremiumV2_LRS。

tags

object

資源標籤

type

string

資源類型

zones

string[]

磁碟的邏輯區域清單。

DiskCreateOption

這會列舉磁碟建立的可能來源。

名稱 類型 Description
Attach

string

磁碟將會連結至 VM。

Copy

string

從指定sourceResourceId指定的磁碟或快照集複製,以建立新的磁碟或快照集。

CopyFromSanSnapshot

string

從彈性 san 磁碟區快照集導出來建立新的磁碟

CopyStart

string

使用深層複製程式建立新的磁碟,只有在從來源複製所有數據之後,才會將資源建立視為完成。

Empty

string

建立磁碟SizeGB所指定大小的空白數據磁碟。

FromImage

string

從指定的 imageReference 或 galleryImageReference 所指定的平臺映射建立新的磁碟。

Import

string

在 storageAccountId 所指定的記憶體帳戶中,從 sourceUri 指定的 Blob 匯入來建立磁碟。

ImportSecure

string

類似於 [匯入建立] 選項。 在 storageAccountId 所指定的記憶體帳戶中,匯入 securityDataUri 所指定之 VM 來賓狀態的其他 Blob,以建立新的受信任啟動 VM 或機密 VM 支援磁碟

Restore

string

從備份恢復點複製來建立新的磁碟。

Upload

string

取得寫入令牌並使用它直接上傳磁碟的內容,以建立新的磁碟。

UploadPreparedSecure

string

類似於 [上傳建立] 選項。 建立新的受信任啟動 VM 或機密 VM 支援磁碟,並使用磁碟和 VM 客體狀態的寫入令牌上傳

DiskSecurityProfile

包含資源的安全性相關信息。

名稱 類型 Description
secureVMDiskEncryptionSetId

string

與以客戶管理金鑰加密的機密 VM 支援的磁碟相關聯的磁碟加密集 ResourceId

securityType

DiskSecurityTypes

指定 VM 的 SecurityType。 僅適用於OS磁碟。

DiskSecurityTypes

指定 VM 的 SecurityType。 僅適用於OS磁碟。

名稱 類型 Description
ConfidentialVM_DiskEncryptedWithCustomerKey

string

指出使用客戶受控密鑰加密的 OS 磁碟和 VM 客體狀態的機密 VM 磁碟

ConfidentialVM_DiskEncryptedWithPlatformKey

string

指出使用平臺受控密鑰加密的 OS 磁碟和 VM 客體狀態的機密 VM 磁碟

ConfidentialVM_NonPersistedTPM

string

指出具有暫時 vTPM 的機密 VM 磁碟。 vTPM 狀態不會在 VM 重新啟動之間保存。

ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey

string

指出僅加密 VM 客體狀態的機密 VM 磁碟

TrustedLaunch

string

信任啟動提供安全性功能,例如安全開機和虛擬信任平台模組 (vTPM)

DiskSku

磁碟 SKU 名稱。 可以是Standard_LRS、Premium_LRS、StandardSSD_LRS、UltraSSD_LRS、Premium_ZRS、StandardSSD_ZRS或PremiumV2_LRS。

名稱 類型 Description
name

DiskStorageAccountTypes

SKU 名稱。

tier

string

SKU 層。

DiskState

這會列舉磁碟的可能狀態。

名稱 類型 Description
ActiveSAS

string

磁碟目前有與其相關聯的作用中 SAS URI。

ActiveSASFrozen

string

磁碟會連結至處於休眠狀態的 VM,並具有與其相關聯的作用中 SAS URI。

ActiveUpload

string

系統會建立用於上傳的磁碟,併發出寫入令牌以上傳至該磁碟。

Attached

string

磁碟目前已連結至執行中的 VM。

Frozen

string

磁碟會連結至處於休眠狀態的 VM。

ReadyToUpload

string

藉由要求寫入令牌,即可透過上傳來建立磁碟。

Reserved

string

磁碟會連結至已停止解除分配的 VM。

Unattached

string

磁碟未使用,而且可以連結至 VM。

DiskStorageAccountTypes

SKU 名稱。

名稱 類型 Description
PremiumV2_LRS

string

進階 SSD v2 本地備援記憶體。 最適合用於持續需要低延遲和高 IOPS 和輸送量的生產與效能敏感工作負載。

Premium_LRS

string

進階 SSD 本地備援記憶體。 最適合用於生產與效能敏感的工作負載。

Premium_ZRS

string

進階 SSD 區域備援記憶體。 最適合需要針對區域失敗進行記憶體復原的生產工作負載。

StandardSSD_LRS

string

標準 SSD 本地備援記憶體。 最適合用於網頁伺服器、輕用的企業應用程式和開發/測試。

StandardSSD_ZRS

string

標準 SSD 區域備援記憶體。 最適合用於 Web 伺服器,適用於需要針對區域失敗進行記憶體復原的輕用企業應用程式和開發/測試。

Standard_LRS

string

標準 HDD 本地備援記憶體。 最適合備份、非關鍵和非經常存取。

UltraSSD_LRS

string

Ultra SSD 本地備援記憶體。 最適合用於需要大量 IO 的工作負載,例如 SAP HANA、最上層資料庫(例如 SQL、Oracle),以及其他大量交易工作負載。

Encryption

磁碟或快照集的待用加密設定

名稱 類型 Description
diskEncryptionSetId

string

要用於啟用待用加密的磁碟加密集 ResourceId。

type

EncryptionType

用來加密磁碟數據的金鑰類型。

EncryptionSettingsCollection

磁碟或快照集的加密設定

名稱 類型 Description
enabled

boolean

將此旗標設定為 true,並提供 DiskEncryptionKey 和選擇性 KeyEncryptionKey 以啟用加密。 將此旗標設定為 false,並移除 DiskEncryptionKey 和 KeyEncryptionKey 以停用加密。 如果 Request 物件中的 EncryptionSettings 為 Null,則現有的設定會保持不變。

encryptionSettings

EncryptionSettingsElement[]

加密設定的集合,每個磁碟區各一個。

encryptionSettingsVersion

string

描述磁碟所使用的加密類型。 設定此欄位之後,即無法覆寫。 '1.0' 對應至使用 AAD 應用程式的 Azure 磁碟加密。'1.1' 對應至 Azure 磁碟加密。

EncryptionSettingsElement

一個磁碟區的加密設定。

名稱 類型 Description
diskEncryptionKey

KeyVaultAndSecretReference

磁碟加密金鑰的 Key Vault 秘密 URL 和保存庫識別碼

keyEncryptionKey

KeyVaultAndKeyReference

金鑰保存庫金鑰 URL 和金鑰加密金鑰的保存庫識別碼。 KeyEncryptionKey 是選擇性的,而且提供時用來解除包裝磁碟加密密鑰。

EncryptionType

用來加密磁碟數據的金鑰類型。

名稱 類型 Description
EncryptionAtRestWithCustomerKey

string

磁碟會使用客戶管理的密鑰進行待用加密,可由客戶變更和撤銷。

EncryptionAtRestWithPlatformAndCustomerKeys

string

磁碟會以 2 層加密進行待用加密。 其中一個金鑰是客戶管理,另一個金鑰是平臺管理。

EncryptionAtRestWithPlatformKey

string

磁碟會使用平臺受控密鑰進行待用加密。 這是預設加密類型。 這不是磁碟加密集的有效加密類型。

ExtendedLocation

擴充位置的複雜類型。

名稱 類型 Description
name

string

擴充位置的名稱。

type

ExtendedLocationTypes

擴充位置的類型。

ExtendedLocationTypes

擴充位置的類型。

名稱 類型 Description
EdgeZone

string

HyperVGeneration

虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。

名稱 類型 Description
V1

string

V2

string

ImageDiskReference

用於建立磁碟的來源映像。

名稱 類型 Description
communityGalleryImageId

string

包含社群 Azure 計算資源庫映像參考的相對 URI。

id

string

包含平臺映像存放庫、使用者映像或 Azure 計算資源庫映像參考的相對 URI。

lun

integer

如果磁碟是從映射的數據磁碟建立的,這是一個索引,指出映射中要使用的數據磁碟。 針對OS磁碟,此欄位為 null。

sharedGalleryImageId

string

包含直接共用 Azure 計算資源庫映像參考的相對 URI。

KeyVaultAndKeyReference

KeK 的 Key Vault 金鑰 URL 和保存庫識別碼是選擇性的,而且當提供用來解除包裝 encryptionKey 時

名稱 類型 Description
keyUrl

string

指向 KeyVault 中金鑰或秘密的 URL

sourceVault

SourceVault

包含金鑰或秘密之 KeyVault 的資源識別碼

KeyVaultAndSecretReference

加密金鑰的 Key Vault 秘密 URL 和保存庫識別碼

名稱 類型 Description
secretUrl

string

指向 KeyVault 中金鑰或秘密的 URL

sourceVault

SourceVault

包含金鑰或秘密之 KeyVault 的資源識別碼

NetworkAccessPolicy

透過網路存取磁碟的原則。

名稱 類型 Description
AllowAll

string

您可以從任何網路匯出或上傳磁碟。

AllowPrivate

string

您可以使用 DiskAccess 資源的私人端點來匯出或上傳磁碟。

DenyAll

string

無法匯出磁碟。

OperatingSystemTypes

操作系統類型。

名稱 類型 Description
Linux

string

Windows

string

PropertyUpdatesInProgress

正在擱置更新之磁碟的屬性。

名稱 類型 Description
targetTier

string

如果層變更作業正在進行中,磁碟的目標效能層級。

ProvisionedBandwidthCopyOption

如果在快照集上設定此字段,且 createOption 是 CopyStart,則會以更快的速度複製快照集。

名稱 類型 Description
Enhanced

string

None

string

PublicNetworkAccess

控制磁碟上導出的原則。

名稱 類型 Description
Disabled

string

即使 NetworkAccessPolicy 設定為 AllowAll,您也無法在因特網上公開存取磁碟的基礎數據。 當 NetworkAccessPolicy 設定為 AllowPrivate 時,您只能從信任的 Azure VNET 存取數據。

Enabled

string

當 NetworkAccessPolicy 設定為 AllowAll 時,您可以產生 SAS URI,以在因特網上公開存取磁碟的基礎數據。 當 NetworkAccessPolicy 設定為 AllowPrivate 時,您只能從信任的 Azure VNET 存取數據。

PurchasePlan

用於透過 MarketPlace 建立第三方成品的購買內容。

名稱 類型 Description
name

string

方案標識碼。

product

string

指定來自市集的映像產品。 這個值與 imageReference 元素下的 Offer 值相同。

promotionCode

string

供應項目促銷碼。

publisher

string

發行者標識碼。

ShareInfoElement

名稱 類型 Description
vmUri

string

包含已連結磁碟之 VM 識別碼的相對 URI。

SourceVault

保存庫標識符是 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} 格式的 Azure Resource Manager 資源標識符

名稱 類型 Description
id

string

資源標識碼

SupportedCapabilities

VM 使用的磁碟資源上保存的支援功能清單。

名稱 類型 Description
acceleratedNetwork

boolean

如果建立OS磁碟的映像支援加速網路,則為True。

architecture

Architecture

OS 磁碟支援的CPU架構。

diskControllerTypes

string

OS 磁碟支援的磁碟控制器。 如果設定它可以是 SCSI 或 SCSI、NVME 或 NVME、SCSI。