你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Disks - Create Or Update

创建或更新磁盘。

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

URI 参数

名称 必需 类型 说明
diskName
path True

string

正在创建的托管磁盘的名称。 创建磁盘后,无法更改该名称。 名称支持的字符为 a-z、A-Z、0-9、_ 和 -。 最大名称长度为 80 个字符。

resourceGroupName
path True

string

资源组的名称。

subscriptionId
path True

string

唯一标识 azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

请求正文

名称 必需 类型 说明
location True

string

资源位置

properties.creationData True

CreationData

磁盘源信息。 创建磁盘后,无法更改 CreationData 信息。

extendedLocation

ExtendedLocation

将创建磁盘的扩展位置。 无法更改扩展位置。

properties.burstingEnabled

boolean

设置为 true 以启用超出磁盘预配性能目标的突发。 默认情况下禁用突发。 不适用于超级磁盘。

properties.completionPercent

number

通过 CopyStart 操作创建资源时后台副本完成的百分比。

properties.dataAccessAuthMode

DataAccessAuthMode

导出或上传到磁盘或快照时的其他身份验证要求。

properties.diskAccessId

string

磁盘上使用专用终结点的 DiskAccess 资源的 ARM ID。

properties.diskIOPSReadOnly

integer

将允许在所有 VM 中以 ReadOnly 身份装载共享磁盘的 IOPS 总数。 一个操作可以在 4k 到 256k 字节之间传输。

properties.diskIOPSReadWrite

integer

此磁盘允许的 IOPS 数;只能为 UltraSSD 磁盘设置。 一个操作可以在 4k 到 256k 字节之间传输。

properties.diskMBpsReadOnly

integer

所有装载共享磁盘的 VM(MBps)的总吞吐量(MBps)将作为 ReadOnly 装载。 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

虚拟机的虚拟机监控程序生成。 仅适用于 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/。 不适用于超级磁盘。

sku

DiskSku

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

tags

object

资源标记

zones

string[]

磁盘的逻辑区域列表。

响应

名称 类型 说明
200 OK

Disk

还行

202 Accepted

Disk

接受

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
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"
  }
}

定义

名称 说明
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

虚拟机的虚拟机监控程序生成。 仅适用于 OS 磁盘。

ImageDiskReference

用于创建磁盘的源映像。

KeyVaultAndKeyReference

KeK 的 Key Vault 密钥 URL 和保管库 ID 是可选的,当提供用于解包 encryptionKey 时

KeyVaultAndSecretReference

加密密钥的 Key Vault 机密 URL 和保管库 ID

NetworkAccessPolicy

通过网络访问磁盘的策略。

OperatingSystemTypes

操作系统类型。

PropertyUpdatesInProgress

要为其挂起更新的磁盘的属性。

ProvisionedBandwidthCopyOption

如果在快照上设置了此字段,并且 createOption 为 CopyStart,则会以更快的速度复制快照。

PublicNetworkAccess

用于控制磁盘上的导出的策略。

PurchasePlan

用于通过 MarketPlace 建立任何第三方项目的购买上下文。

ShareInfoElement
SourceVault

保管库 ID 是 Azure 资源管理器资源 ID,格式为 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}

SupportedCapabilities

VM 使用的磁盘资源上保留的受支持功能列表。

Architecture

OS 磁盘支持的 CPU 体系结构。

名称 类型 说明
Arm64

string

x64

string

CreationData

创建磁盘时使用的数据。

名称 类型 说明
createOption

DiskCreateOption

这会枚举磁盘创建可能的源。

elasticSanResourceId

string

如果 createOption 为 CopyFromSanSnapshot,则是必需的。 这是源弹性 san 卷快照的 ARM ID。

galleryImageReference

ImageDiskReference

从库映像创建时是必需的。 ImageDiskReference 的 id/sharedGalleryImageId/communityGalleryImageId 将是要从中创建磁盘的共享 galley 映像版本的 ARM ID。

imageReference

ImageDiskReference

PIR 或用户映像的磁盘源信息。

logicalSectorSize

integer

超级磁盘的逻辑扇区大小(以字节为单位)。 支持的值为 512 ad 4096。 4096 是默认值。

performancePlus

boolean

将此标志设置为 true 以提升部署的磁盘的性能目标,请参阅此处的相应性能目标。 此标志只能在磁盘创建时设置,在启用后不能禁用。

provisionedBandwidthCopySpeed

ProvisionedBandwidthCopyOption

如果在快照上设置了此字段,并且 createOption 为 CopyStart,则会以更快的速度复制快照。

securityDataUri

string

如果 createOption 为 ImportSecure,则这是要导入 VM 来宾状态的 Blob 的 URI。

sourceResourceId

string

如果 createOption 为 Copy,则这是源快照或磁盘的 ARM ID。

sourceUniqueId

string

如果设置了此字段,则这是标识此资源源的唯一 ID。

sourceUri

string

如果 createOption 为 Import,则这是要导入到托管磁盘中的 Blob 的 URI。

storageAccountId

string

如果 createOption 为 Import,则为必需。 包含要作为磁盘导入的 Blob 的存储帐户的 Azure 资源管理器标识符。

uploadSizeBytes

integer

如果 createOption 为 Upload,则这是上传内容的大小,包括 VHD 页脚。 此值应介于 20972032(VHD 页脚的 20 MiB + 512 字节)和35183298347520字节(VHD 页脚的 32 TiB + 512 字节)。

DataAccessAuthMode

导出或上传到磁盘或快照时的其他身份验证要求。

名称 类型 说明
AzureActiveDirectory

string

使用导出/上传 URL 时,系统会检查用户是否在 Azure Active Directory 中具有标识,并具有导出/上传数据所需的权限。 请参阅 aka.ms/DisksAzureADAuth。

None

string

访问导出/上传 URL 时,不会执行任何其他身份验证。

Disk

磁盘资源。

名称 类型 说明
extendedLocation

ExtendedLocation

将创建磁盘的扩展位置。 无法更改扩展位置。

id

string

资源 ID

location

string

资源位置

managedBy

string

包含附加磁盘的 VM 的 ID 的相对 URI。

managedByExtended

string[]

包含附加了磁盘的 VM 的 ID 的相对 URI 列表。 maxShares 应设置为大于一个值,以便磁盘允许将它们附加到多个 VM。

name

string

资源名称

properties.LastOwnershipUpdateTime

string

上次更改磁盘所有权状态的 UTC 时间,即上次附加或分离磁盘的时间,或者磁盘附加到的 VM 解除分配或启动的时间。

properties.burstingEnabled

boolean

设置为 true 以启用超出磁盘预配性能目标的突发。 默认情况下禁用突发。 不适用于超级磁盘。

properties.burstingEnabledTime

string

上次在磁盘上启用突发的时间。

properties.completionPercent

number

通过 CopyStart 操作创建资源时后台副本完成的百分比。

properties.creationData

CreationData

磁盘源信息。 创建磁盘后,无法更改 CreationData 信息。

properties.dataAccessAuthMode

DataAccessAuthMode

导出或上传到磁盘或快照时的其他身份验证要求。

properties.diskAccessId

string

磁盘上使用专用终结点的 DiskAccess 资源的 ARM ID。

properties.diskIOPSReadOnly

integer

将允许在所有 VM 中以 ReadOnly 身份装载共享磁盘的 IOPS 总数。 一个操作可以在 4k 到 256k 字节之间传输。

properties.diskIOPSReadWrite

integer

此磁盘允许的 IOPS 数;只能为 UltraSSD 磁盘设置。 一个操作可以在 4k 到 256k 字节之间传输。

properties.diskMBpsReadOnly

integer

所有装载共享磁盘的 VM(MBps)的总吞吐量(MBps)将作为 ReadOnly 装载。 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

虚拟机的虚拟机监控程序生成。 仅适用于 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/。 不适用于超级磁盘。

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

这会枚举磁盘创建可能的源。

名称 类型 说明
Attach

string

磁盘将附加到 VM。

Copy

string

通过从给定 sourceResourceId 指定的磁盘或快照复制来创建新的磁盘或快照。

CopyFromSanSnapshot

string

通过从弹性 san 卷快照导出来创建新磁盘

CopyStart

string

使用深层复制过程创建新磁盘,只有在从源复制所有数据后,资源创建才被视为完成。

Empty

string

创建由 diskSizeGB 提供大小的空数据磁盘。

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

包含资源的安全相关信息。

名称 类型 说明
secureVMDiskEncryptionSetId

string

与使用客户托管密钥加密的机密 VM 支持的磁盘关联的磁盘加密集的 ResourceId

securityType

DiskSecurityTypes

指定 VM 的 SecurityType。 仅适用于 OS 磁盘。

DiskSecurityTypes

指定 VM 的 SecurityType。 仅适用于 OS 磁盘。

名称 类型 说明
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。

名称 类型 说明
name

DiskStorageAccountTypes

SKU 名称。

tier

string

SKU 层。

DiskState

这会枚举磁盘的可能状态。

名称 类型 说明
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 名称。

名称 类型 说明
PremiumV2_LRS

string

高级 SSD v2 本地冗余存储。 最适合需要低延迟和高 IOPS 和吞吐量的生产和性能敏感工作负荷。

Premium_LRS

string

高级 SSD 本地冗余存储。 最适合生产和性能敏感的工作负荷。

Premium_ZRS

string

高级 SSD 区域冗余存储。 最适合需要针对区域故障进行存储复原的生产工作负荷。

StandardSSD_LRS

string

标准 SSD 本地冗余存储。 最适合 Web 服务器、轻型企业应用程序和开发/测试。

StandardSSD_ZRS

string

标准 SSD 区域冗余存储。 最适合用于 Web 服务器、轻型企业应用程序和开发/测试,这些应用程序需要针对区域故障的存储复原能力。

Standard_LRS

string

标准 HDD 本地冗余存储。 最适合备份、非关键访问和不经常访问。

UltraSSD_LRS

string

超级 SSD 本地冗余存储。 最适合 IO 密集型工作负荷,例如 SAP HANA、顶层数据库(例如 SQL、Oracle)和其他事务密集型工作负荷。

Encryption

磁盘或快照的静态加密设置

名称 类型 说明
diskEncryptionSetId

string

用于启用静态加密的磁盘加密集的 ResourceId。

type

EncryptionType

用于加密磁盘数据的密钥类型。

EncryptionSettingsCollection

磁盘或快照的加密设置

名称 类型 说明
enabled

boolean

将此标志设置为 true,并提供 DiskEncryptionKey 和可选 KeyEncryptionKey 以启用加密。 将此标志设置为 false,并删除 DiskEncryptionKey 和 KeyEncryptionKey 以禁用加密。 如果 Request 对象中的 EncryptionSettings 为 null,则现有设置保持不变。

encryptionSettings

EncryptionSettingsElement[]

加密设置的集合,每个磁盘卷各有一个。

encryptionSettingsVersion

string

描述磁盘使用哪种类型的加密。 设置此字段后,无法覆盖它。 “1.0”对应于 AAD 应用的 Azure 磁盘加密。“1.1”对应于 Azure 磁盘加密。

EncryptionSettingsElement

一个磁盘卷的加密设置。

名称 类型 说明
diskEncryptionKey

KeyVaultAndSecretReference

磁盘加密密钥的 Key Vault 机密 URL 和保管库 ID

keyEncryptionKey

KeyVaultAndKeyReference

密钥保管库密钥 URL 和密钥加密密钥的保管库 ID。 KeyEncryptionKey 是可选的,当提供用于解包磁盘加密密钥时。

EncryptionType

用于加密磁盘数据的密钥类型。

名称 类型 说明
EncryptionAtRestWithCustomerKey

string

磁盘使用客户管理的密钥进行静态加密,客户可以更改和吊销。

EncryptionAtRestWithPlatformAndCustomerKeys

string

磁盘使用 2 层加密进行静态加密。 其中一个密钥是客户管理的,另一个密钥是平台管理的。

EncryptionAtRestWithPlatformKey

string

磁盘使用平台托管密钥进行静态加密。 它是默认加密类型。 这不是磁盘加密集的有效加密类型。

ExtendedLocation

扩展位置的复杂类型。

名称 类型 说明
name

string

扩展位置的名称。

type

ExtendedLocationTypes

扩展位置的类型。

ExtendedLocationTypes

扩展位置的类型。

名称 类型 说明
EdgeZone

string

HyperVGeneration

虚拟机的虚拟机监控程序生成。 仅适用于 OS 磁盘。

名称 类型 说明
V1

string

V2

string

ImageDiskReference

用于创建磁盘的源映像。

名称 类型 说明
communityGalleryImageId

string

包含社区 Azure 计算库映像引用的相对 URI。

id

string

包含平台映像存储库、用户映像或 Azure 计算库映像引用的相对 URI。

lun

integer

如果磁盘是从映像的数据磁盘创建的,则这是一个索引,指示要使用的映像中的数据磁盘。 对于 OS 磁盘,此字段为 null。

sharedGalleryImageId

string

包含直接共享 Azure 计算库映像引用的相对 URI。

KeyVaultAndKeyReference

KeK 的 Key Vault 密钥 URL 和保管库 ID 是可选的,当提供用于解包 encryptionKey 时

名称 类型 说明
keyUrl

string

指向 KeyVault 中的密钥或机密的 URL

sourceVault

SourceVault

包含密钥或机密的 KeyVault 的资源 ID

KeyVaultAndSecretReference

加密密钥的 Key Vault 机密 URL 和保管库 ID

名称 类型 说明
secretUrl

string

指向 KeyVault 中的密钥或机密的 URL

sourceVault

SourceVault

包含密钥或机密的 KeyVault 的资源 ID

NetworkAccessPolicy

通过网络访问磁盘的策略。

名称 类型 说明
AllowAll

string

磁盘可以导出或上传到任何网络。

AllowPrivate

string

可以使用 DiskAccess 资源的专用终结点导出或上传到该磁盘。

DenyAll

string

无法导出磁盘。

OperatingSystemTypes

操作系统类型。

名称 类型 说明
Linux

string

Windows

string

PropertyUpdatesInProgress

要为其挂起更新的磁盘的属性。

名称 类型 说明
targetTier

string

如果正在进行层更改操作,则磁盘的目标性能层。

ProvisionedBandwidthCopyOption

如果在快照上设置了此字段,并且 createOption 为 CopyStart,则会以更快的速度复制快照。

名称 类型 说明
Enhanced

string

None

string

PublicNetworkAccess

用于控制磁盘上的导出的策略。

名称 类型 说明
Disabled

string

即使 NetworkAccessPolicy 设置为 AllowAll,也不能在 Internet 上公开访问磁盘的基础数据。 当 NetworkAccessPolicy 设置为 AllowPrivate 时,只能从受信任的 Azure VNET 访问数据。

Enabled

string

当 NetworkAccessPolicy 设置为 AllowAll 时,可以生成 SAS URI 以访问 Internet 上公开的磁盘的基础数据。 当 NetworkAccessPolicy 设置为 AllowPrivate 时,只能从受信任的 Azure VNET 访问数据。

PurchasePlan

用于通过 MarketPlace 建立任何第三方项目的购买上下文。

名称 类型 说明
name

string

计划 ID。

product

string

指定来自市场的映像的产品。 此值与 imageReference 元素下的 Offer 相同。

promotionCode

string

产品/服务促销代码。

publisher

string

发布者 ID。

ShareInfoElement

名称 类型 说明
vmUri

string

包含附加磁盘的 VM 的 ID 的相对 URI。

SourceVault

保管库 ID 是 Azure 资源管理器资源 ID,格式为 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}

名称 类型 说明
id

string

资源 ID

SupportedCapabilities

VM 使用的磁盘资源上保留的受支持功能列表。

名称 类型 说明
acceleratedNetwork

boolean

如此 如果从中创建 OS 磁盘的映像支持加速网络。

architecture

Architecture

OS 磁盘支持的 CPU 体系结构。

diskControllerTypes

string

OS 磁盘支持的磁盘控制器。 如果将其设置为 SCSI 或 SCSI、NVME 或 NVME、SCSI。