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

Microsoft.Compute snapshots 2022-03-02

Bicep 资源定义

快照资源类型可以通过针对以下操作进行部署:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Compute/snapshots 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Compute/snapshots@2022-03-02' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    name: 'string'
  }
  extendedLocation: {
    name: 'string'
    type: 'EdgeZone'
  }
  properties: {
    completionPercent: int
    copyCompletionError: {
      errorCode: 'CopySourceNotFound'
      errorMessage: 'string'
    }
    creationData: {
      createOption: 'string'
      galleryImageReference: {
        communityGalleryImageId: 'string'
        id: 'string'
        lun: int
        sharedGalleryImageId: 'string'
      }
      imageReference: {
        communityGalleryImageId: 'string'
        id: 'string'
        lun: int
        sharedGalleryImageId: 'string'
      }
      logicalSectorSize: int
      securityDataUri: 'string'
      sourceResourceId: 'string'
      sourceUri: 'string'
      storageAccountId: 'string'
      uploadSizeBytes: int
    }
    dataAccessAuthMode: 'string'
    diskAccessId: 'string'
    diskSizeGB: int
    encryption: {
      diskEncryptionSetId: 'string'
      type: 'string'
    }
    encryptionSettingsCollection: {
      enabled: bool
      encryptionSettings: [
        {
          diskEncryptionKey: {
            secretUrl: 'string'
            sourceVault: {
              id: 'string'
            }
          }
          keyEncryptionKey: {
            keyUrl: 'string'
            sourceVault: {
              id: 'string'
            }
          }
        }
      ]
      encryptionSettingsVersion: 'string'
    }
    hyperVGeneration: 'string'
    incremental: bool
    networkAccessPolicy: 'string'
    osType: 'string'
    publicNetworkAccess: 'string'
    purchasePlan: {
      name: 'string'
      product: 'string'
      promotionCode: 'string'
      publisher: 'string'
    }
    securityProfile: {
      secureVMDiskEncryptionSetId: 'string'
      securityType: 'string'
    }
    supportedCapabilities: {
      acceleratedNetwork: bool
      architecture: 'string'
    }
    supportsHibernation: bool
  }
}

属性值

snapshots

名称 说明
name 资源名称 字符串 (必需)

字符限制:1-80

有效字符:
字母数字、下划线字符、句点和连字符。

以字母数字开头。 以字母数字或下划线结尾。
location 资源位置 字符串 (必需)
标记 资源标记 标记名称和值的字典。 请参阅 模板中的标记
sku 快照 SKU 名称。 可以是Standard_LRS、Premium_LRS或Standard_ZRS。 这是增量快照的可选参数,默认行为是 SKU 将设置为与上一个快照 SnapshotSku
extendedLocation 将在其中创建快照的扩展位置。 无法更改扩展位置。 ExtendedLocation
properties 快照资源属性。 SnapshotProperties

ExtendedLocation

名称 说明
name 扩展位置的名称。 字符串
type 扩展位置的类型。 “EdgeZone”

SnapshotProperties

名称 说明
completionPercent 通过 CopyStart 操作创建资源时后台副本的完成百分比。 int
copyCompletionError 指示通过 CopyStart 操作创建的资源的后台副本失败时的错误详细信息。 CopyCompletionError
creationData 磁盘源信息。 创建磁盘后,无法更改创建数据信息。 CreationData (必需)
dataAccessAuthMode 导出或上传到磁盘或快照时的其他身份验证要求。 “AzureActiveDirectory”
“None”
diskAccessId 用于在磁盘上使用专用终结点的 DiskAccess 资源的 ARM ID。 字符串
diskSizeGB 如果 creationData.createOption 为空,则此字段是必需的,它指示要创建的磁盘的大小。 如果存在此字段用于更新或创建其他选项,则表示调整大小。 仅当磁盘未附加到正在运行的 VM 时,才允许调整大小,并且只能增加磁盘的大小。 int
加密 加密属性可用于使用客户管理的密钥或平台管理的密钥加密静态数据。 加密
encryptionSettingsCollection 使用的加密设置集合是 Azure 磁盘加密,可以包含每个磁盘或快照的多个加密设置。 EncryptionSettingsCollection
hyperVGeneration 虚拟机的虚拟机监控程序生成。 仅适用于 OS 磁盘。 “V1”
“V2”
增量 快照是否是增量的。 同一磁盘上的增量快照占用的空间比完整快照少,并且可以进行差异。 bool
networkAccessPolicy 用于通过网络访问磁盘的策略。 “AllowAll”
“AllowPrivate”
“DenyAll”
osType 操作系统类型。 “Linux”
“Windows”
publicNetworkAccess 用于控制磁盘导出的策略。 “Disabled”
“已启用”
purchasePlan 最初从中创建快照源磁盘的映像的购买计划信息。 PurchasePlan
securityProfile 包含资源的安全相关信息。 DiskSecurityProfile
supportedCapabilities 最初从快照创建源磁盘的映像支持的功能列表。 SupportedCapabilities
supportsHibernation 指示快照上的 OS 支持休眠。 bool

CopyCompletionError

名称 说明
errorCode 指示通过 CopyStart 操作创建的资源的后台副本失败时错误代码。 “CopySourceNotFound” (必需)
errorMessage 指示通过 CopyStart 操作创建的资源的后台副本失败时出现错误消息。 字符串 (必需)

CreationData

名称 说明
createOption 这会枚举创建磁盘的可能源。 “附加”
“Copy”
“CopyStart”
“空”
“FromImage”
“Import”
“ImportSecure”
“还原”
“Upload”
“UploadPreparedSecure” (必需)
galleryImageReference 从库映像创建时是必需的。 ImageDiskReference 的 id/sharedGalleryImageId/communityGalleryImageId 将是创建磁盘的共享映像版本的 ARM ID。 ImageDiskReference
imageReference PIR 或用户映像的磁盘源信息。 ImageDiskReference
logicalSectorSize 超级磁盘的逻辑扇区大小(以字节为单位)。 支持的值为 512 和 4096。 4096 是默认值。 int
securityDataUri 如果 createOption 为 ImportSecure,则这是要导入到 VM 来宾状态的 Blob 的 URI。 字符串
sourceResourceId 如果 createOption 为 Copy,则这是源快照或磁盘的 ARM ID。 字符串
sourceUri 如果 createOption 为 Import,则这是要导入到托管磁盘的 Blob 的 URI。 字符串
storageAccountId 如果 createOption 为 Import,则是必需的。 Azure 资源管理器存储帐户的标识符,其中包含要导入为磁盘的 Blob。 字符串
uploadSizeBytes 如果 createOption 为 Upload,则表示上传内容(包括 VHD 页脚)的大小。 对于 VHD 页脚) ,此值应介于 20972032 (20 MiB + 512 字节之间,VHD 页脚) (32 TiB + 512 字节35183298347520字节。 int

ImageDiskReference

名称 说明
communityGalleryImageId 包含社区 Azure 计算库映像引用的相对 URI。 string
id 包含平台映像存储库、用户映像或 Azure Compute Gallery 映像引用的相对 URI。 字符串
lun 如果磁盘是从映像的数据磁盘创建的,则此索引指示要使用的映像中的数据磁盘。 对于 OS 磁盘,此字段为 null。 int
sharedGalleryImageId 包含直接共享 Azure 计算库映像引用的相对 URI。 字符串

Encryption

名称 说明
diskEncryptionSetId 要用于启用静态加密的磁盘加密集的 ResourceId。 字符串
type 用于加密磁盘数据的密钥类型。 “EncryptionAtRestWithCustomerKey”
'EncryptionAtRestWithPlatformAndCustomerKeys'
“EncryptionAtRestWithPlatformKey”

EncryptionSettingsCollection

名称 说明
enabled 将此标志设置为 true,并提供 DiskEncryptionKey 和可选的 KeyEncryptionKey 以启用加密。 将此标志设置为 false 并删除 DiskEncryptionKey 和 KeyEncryptionKey 以禁用加密。 如果请求对象中的 EncryptionSettings 为 null,则现有设置保持不变。 需要 bool ()
encryptionSettings 加密设置的集合,每个磁盘卷对应一个。 EncryptionSettingsElement[]
encryptionSettingsVersion 描述磁盘使用的加密类型。 设置此字段后,无法覆盖该字段。 “1.0”对应于使用 AAD 应用的 Azure 磁盘加密。“1.1”对应于 Azure 磁盘加密。 字符串

EncryptionSettingsElement

名称 说明
diskEncryptionKey 密钥保管库磁盘加密密钥的机密 URL 和保管库 ID KeyVaultAndSecretReference
keyEncryptionKey 密钥保管库密钥加密密钥的密钥 URL 和保管库 ID。 KeyEncryptionKey 是可选的,如果提供,则用于解包磁盘加密密钥。 KeyVaultAndKeyReference

KeyVaultAndSecretReference

名称 说明
secretUrl 指向 KeyVault 中的密钥或机密的 URL 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID 需要 sourceVault ()

SourceVault

名称 说明 Value
id 资源 ID 字符串

KeyVaultAndKeyReference

名称 说明
keyUrl 指向 KeyVault 中的密钥或机密的 URL 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID 需要 sourceVault ()

PurchasePlan

名称 说明
name 计划 ID。 字符串 (必需)
product 指定市场中映像的乘积。 此值与 imageReference 元素下的 Offer 值相同。 字符串 (必需)
promotionCode 产品/服务促销代码。 字符串
发布者 发布者 ID。 字符串 (必需)

DiskSecurityProfile

名称 说明
secureVMDiskEncryptionSetId 与使用客户管理的密钥加密的机密 VM 支持的磁盘关联的磁盘加密集的 ResourceId 字符串
securityType 指定 VM 的 SecurityType。 仅适用于 OS 磁盘。 “ConfidentialVM_DiskEncryptedWithCustomerKey”
“ConfidentialVM_DiskEncryptedWithPlatformKey”
“ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey”
'TrustedLaunch'

SupportedCapabilities

名称 说明
acceleratedNetwork 如此 如果从中创建 OS 磁盘的映像支持加速网络。 bool
体系结构 OS 磁盘支持的 CPU 体系结构。 “Arm64”
“x64”

SnapshotSku

名称 说明
name SKU 名称。 “Premium_LRS”
“Standard_LRS”
“Standard_ZRS”

ARM 模板资源定义

快照资源类型可以通过针对以下操作进行部署:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Compute/snapshots 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Compute/snapshots",
  "apiVersion": "2022-03-02",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "name": "string"
  },
  "extendedLocation": {
    "name": "string",
    "type": "EdgeZone"
  },
  "properties": {
    "completionPercent": "int",
    "copyCompletionError": {
      "errorCode": "CopySourceNotFound",
      "errorMessage": "string"
    },
    "creationData": {
      "createOption": "string",
      "galleryImageReference": {
        "communityGalleryImageId": "string",
        "id": "string",
        "lun": "int",
        "sharedGalleryImageId": "string"
      },
      "imageReference": {
        "communityGalleryImageId": "string",
        "id": "string",
        "lun": "int",
        "sharedGalleryImageId": "string"
      },
      "logicalSectorSize": "int",
      "securityDataUri": "string",
      "sourceResourceId": "string",
      "sourceUri": "string",
      "storageAccountId": "string",
      "uploadSizeBytes": "int"
    },
    "dataAccessAuthMode": "string",
    "diskAccessId": "string",
    "diskSizeGB": "int",
    "encryption": {
      "diskEncryptionSetId": "string",
      "type": "string"
    },
    "encryptionSettingsCollection": {
      "enabled": "bool",
      "encryptionSettings": [
        {
          "diskEncryptionKey": {
            "secretUrl": "string",
            "sourceVault": {
              "id": "string"
            }
          },
          "keyEncryptionKey": {
            "keyUrl": "string",
            "sourceVault": {
              "id": "string"
            }
          }
        }
      ],
      "encryptionSettingsVersion": "string"
    },
    "hyperVGeneration": "string",
    "incremental": "bool",
    "networkAccessPolicy": "string",
    "osType": "string",
    "publicNetworkAccess": "string",
    "purchasePlan": {
      "name": "string",
      "product": "string",
      "promotionCode": "string",
      "publisher": "string"
    },
    "securityProfile": {
      "secureVMDiskEncryptionSetId": "string",
      "securityType": "string"
    },
    "supportedCapabilities": {
      "acceleratedNetwork": "bool",
      "architecture": "string"
    },
    "supportsHibernation": "bool"
  }
}

属性值

snapshots

名称 说明 Value
type 资源类型 “Microsoft.Compute/snapshots”
apiVersion 资源 API 版本 '2022-03-02'
name 资源名称 字符串 (必需)

字符限制:1-80

有效字符:
字母数字、下划线字符、句点和连字符。

以字母数字开头。 以字母数字或下划线结尾。
location 资源位置 字符串 (必需)
标记 资源标记 标记名称和值的字典。 请参阅 模板中的标记
sku 快照 SKU 名称。 可以是Standard_LRS、Premium_LRS或Standard_ZRS。 这是增量快照的可选参数,默认行为是 SKU 将设置为与上一个快照 SnapshotSku
extendedLocation 将在其中创建快照的扩展位置。 无法更改扩展位置。 ExtendedLocation
properties 快照资源属性。 SnapshotProperties

ExtendedLocation

名称 说明
name 扩展位置的名称。 字符串
type 扩展位置的类型。 “EdgeZone”

SnapshotProperties

名称 说明
completionPercent 通过 CopyStart 操作创建资源时后台副本的完成百分比。 int
copyCompletionError 指示通过 CopyStart 操作创建的资源的后台副本失败时的错误详细信息。 CopyCompletionError
creationData 磁盘源信息。 创建磁盘后,无法更改创建数据信息。 CreationData (必需)
dataAccessAuthMode 导出或上传到磁盘或快照时的其他身份验证要求。 “AzureActiveDirectory”
“None”
diskAccessId 用于在磁盘上使用专用终结点的 DiskAccess 资源的 ARM ID。 字符串
diskSizeGB 如果 creationData.createOption 为空,则此字段是必需的,它指示要创建的磁盘的大小。 如果存在此字段用于更新或创建其他选项,则表示调整大小。 仅当磁盘未附加到正在运行的 VM 时,才允许调整大小,并且只能增加磁盘的大小。 int
加密 加密属性可用于使用客户管理的密钥或平台管理的密钥加密静态数据。 加密
encryptionSettingsCollection 加密设置集合是 Azure 磁盘加密,可以包含每个磁盘或快照的多个加密设置。 EncryptionSettingsCollection
hyperVGeneration 虚拟机的虚拟机监控程序生成。 仅适用于 OS 磁盘。 “V1”
“V2”
增量 快照是否为增量。 同一磁盘上的增量快照比完整快照占用的空间少,可以进行差异。 bool
networkAccessPolicy 用于通过网络访问磁盘的策略。 “AllowAll”
'AllowPrivate'
“DenyAll”
osType 操作系统类型。 'Linux'
“Windows”
publicNetworkAccess 用于控制磁盘上的导出的策略。 'Disabled'
'Enabled'
purchasePlan 最初从中创建快照源磁盘的映像的购买计划信息。 PurchasePlan
securityProfile 包含资源的安全相关信息。 DiskSecurityProfile
supportedCapabilities 最初从中创建快照源磁盘的映像支持的功能列表。 SupportedCapabilities
supportsHibernation 指示快照上的 OS 支持休眠。 bool

CopyCompletionError

名称 说明
errorCode 如果通过 CopyStart 操作创建的资源的后台副本失败,则指示错误代码。 需要“CopySourceNotFound” ()
errorMessage 如果通过 CopyStart 操作创建的资源的后台副本失败,则指示错误消息。 字符串 (必需)

CreationData

名称 说明
createOption 这会枚举创建磁盘的可能来源。 “Attach”
'Copy'
“CopyStart”
“Empty”
“FromImage”
“Import”
“ImportSecure”
“还原”
“Upload”
“UploadPreparedSecure” (必需)
galleryImageReference 如果从库映像创建,则为必需项。 ImageDiskReference 的 id/sharedGalleryImageId/communityGalleryImageId 将是要从中创建磁盘的共享映像版本的 ARM ID。 ImageDiskReference
imageReference PIR 或用户映像的磁盘源信息。 ImageDiskReference
logicalSectorSize 超级磁盘的逻辑扇区大小(以字节为单位)。 支持的值为 512 和 4096。 4096 是默认值。 int
securityDataUri 如果 createOption 为 ImportSecure,则这是要导入到 VM 来宾状态的 Blob 的 URI。 字符串
sourceResourceId 如果 createOption 为 Copy,则这是源快照或磁盘的 ARM ID。 字符串
sourceUri 如果 createOption 为 Import,则这是要导入到托管磁盘的 Blob 的 URI。 字符串
storageAccountId 如果 createOption 为 Import,则为必需项。 包含要导入为磁盘的 Blob 的存储帐户的 Azure 资源管理器标识符。 字符串
uploadSizeBytes 如果 createOption 为 Upload,则这是上传内容(包括 VHD 页脚)的大小。 对于 VHD 页脚) ,此值应介于 20972032 (20 MiB + 512 字节之间,对于 VHD 页脚) ,此值应介于 32 TiB + 512 字节 (35183298347520字节之间。 int

ImageDiskReference

名称 说明
communityGalleryImageId 包含社区 Azure Compute Gallery 映像引用的相对 URI。 string
id 包含平台映像存储库、用户映像或 Azure Compute Gallery 映像引用的相对 URI。 字符串
lun 如果磁盘是从映像的数据磁盘创建的,则这是一个索引,指示要使用映像中的哪个数据磁盘。 对于 OS 磁盘,此字段为 null。 int
sharedGalleryImageId 包含直接共享 Azure Compute Gallery 映像引用的相对 URI。 字符串

Encryption

名称 说明
diskEncryptionSetId 要用于启用静态加密的磁盘加密集的 ResourceId。 字符串
type 用于加密磁盘数据的密钥类型。 “EncryptionAtRestWithCustomerKey”
'EncryptionAtRestWithPlatformAndCustomerKeys'
“EncryptionAtRestWithPlatformKey”

EncryptionSettingsCollection

名称 说明
enabled 将此标志设置为 true,并提供 DiskEncryptionKey 和可选的 KeyEncryptionKey 以启用加密。 将此标志设置为 false 并删除 DiskEncryptionKey 和 KeyEncryptionKey 以禁用加密。 如果请求对象中的 EncryptionSettings 为 null,则现有设置保持不变。 需要 bool ()
encryptionSettings 加密设置的集合,每个磁盘卷对应一个。 EncryptionSettingsElement[]
encryptionSettingsVersion 描述磁盘使用的加密类型。 设置此字段后,无法覆盖该字段。 “1.0”对应于使用 AAD 应用的 Azure 磁盘加密。“1.1”对应于 Azure 磁盘加密。 字符串

EncryptionSettingsElement

名称 说明
diskEncryptionKey 密钥保管库磁盘加密密钥的机密 URL 和保管库 ID KeyVaultAndSecretReference
keyEncryptionKey 密钥保管库密钥加密密钥的密钥 URL 和保管库 ID。 KeyEncryptionKey 是可选的,如果提供,则用于解包磁盘加密密钥。 KeyVaultAndKeyReference

KeyVaultAndSecretReference

名称 说明
secretUrl 指向 KeyVault 中的密钥或机密的 URL 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID 需要 sourceVault ()

SourceVault

名称 说明 Value
id 资源 ID 字符串

KeyVaultAndKeyReference

名称 说明
keyUrl 指向 KeyVault 中的密钥或机密的 URL 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID 需要 sourceVault ()

PurchasePlan

名称 说明
name 计划 ID。 字符串 (必需)
product 指定市场中映像的乘积。 此值与 imageReference 元素下的 Offer 值相同。 字符串 (必需)
promotionCode 产品/服务促销代码。 字符串
发布者 发布者 ID。 字符串 (必需)

DiskSecurityProfile

名称 说明
secureVMDiskEncryptionSetId 与使用客户管理的密钥加密的机密 VM 支持的磁盘关联的磁盘加密集的 ResourceId 字符串
securityType 指定 VM 的 SecurityType。 仅适用于 OS 磁盘。 “ConfidentialVM_DiskEncryptedWithCustomerKey”
“ConfidentialVM_DiskEncryptedWithPlatformKey”
“ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey”
'TrustedLaunch'

SupportedCapabilities

名称 说明
acceleratedNetwork 如果从中创建 OS 磁盘的映像支持加速网络,则其值为 True。 bool
体系结构 OS 磁盘支持的 CPU 体系结构。 'Arm64'
'x64'

SnapshotSku

名称 说明
name SKU 名称。 “Premium_LRS”
“Standard_LRS”
“Standard_ZRS”

Terraform (AzAPI 提供程序) 资源定义

可以使用面向以下操作部署快照资源类型:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Compute/snapshots 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Compute/snapshots@2022-03-02"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      completionPercent = int
      copyCompletionError = {
        errorCode = "CopySourceNotFound"
        errorMessage = "string"
      }
      creationData = {
        createOption = "string"
        galleryImageReference = {
          communityGalleryImageId = "string"
          id = "string"
          lun = int
          sharedGalleryImageId = "string"
        }
        imageReference = {
          communityGalleryImageId = "string"
          id = "string"
          lun = int
          sharedGalleryImageId = "string"
        }
        logicalSectorSize = int
        securityDataUri = "string"
        sourceResourceId = "string"
        sourceUri = "string"
        storageAccountId = "string"
        uploadSizeBytes = int
      }
      dataAccessAuthMode = "string"
      diskAccessId = "string"
      diskSizeGB = int
      encryption = {
        diskEncryptionSetId = "string"
        type = "string"
      }
      encryptionSettingsCollection = {
        enabled = bool
        encryptionSettings = [
          {
            diskEncryptionKey = {
              secretUrl = "string"
              sourceVault = {
                id = "string"
              }
            }
            keyEncryptionKey = {
              keyUrl = "string"
              sourceVault = {
                id = "string"
              }
            }
          }
        ]
        encryptionSettingsVersion = "string"
      }
      hyperVGeneration = "string"
      incremental = bool
      networkAccessPolicy = "string"
      osType = "string"
      publicNetworkAccess = "string"
      purchasePlan = {
        name = "string"
        product = "string"
        promotionCode = "string"
        publisher = "string"
      }
      securityProfile = {
        secureVMDiskEncryptionSetId = "string"
        securityType = "string"
      }
      supportedCapabilities = {
        acceleratedNetwork = bool
        architecture = "string"
      }
      supportsHibernation = bool
    }
    sku = {
      name = "string"
    }
    extendedLocation = {
      name = "string"
      type = "EdgeZone"
    }
  })
}

属性值

snapshots

名称 说明 Value
type 资源类型 “Microsoft.Compute/snapshots@2022-03-02”
name 资源名称 字符串 (必需)

字符限制:1-80

有效字符:
字母数字、下划线字符、句点和连字符。

以字母数字开头。 以字母数字或下划线结尾。
location 资源位置 字符串 (必需)
parent_id 若要部署到资源组,请使用该资源组的 ID。 字符串 (必需)
标记 资源标记 标记名称和值的字典。
sku 快照 SKU 名称。 可以是Standard_LRS、Premium_LRS或Standard_ZRS。 这是增量快照的可选参数,默认行为是 SKU 将设置为与上一个 sku 相同的 sku 快照 SnapshotSku
extendedLocation 将在其中创建快照的扩展位置。 无法更改扩展位置。 ExtendedLocation
properties 快照资源属性。 SnapshotProperties

ExtendedLocation

名称 说明
name 扩展位置的名称。 字符串
type 扩展位置的类型。 “EdgeZone”

SnapshotProperties

名称 说明
completionPercent 通过 CopyStart 操作创建资源时后台副本的完成百分比。 int
copyCompletionError 指示通过 CopyStart 操作创建的资源的后台副本失败时的错误详细信息。 CopyCompletionError
creationData 磁盘源信息。 创建磁盘后,无法更改创建数据信息。 CreationData (必需)
dataAccessAuthMode 导出或上传到磁盘或快照时的其他身份验证要求。 “AzureActiveDirectory”
"None"
diskAccessId 用于在磁盘上使用专用终结点的 DiskAccess 资源的 ARM ID。 字符串
diskSizeGB 如果 creationData.createOption 为 Empty,则此字段是必需的,它指示要创建的磁盘的大小。 如果此字段可用于使用其他选项进行更新或创建,则表示调整大小。 仅当磁盘未附加到正在运行的 VM 时,才允许重设大小,并且只能增加磁盘的大小。 int
加密 加密属性可用于使用客户管理的密钥或平台管理的密钥加密静态数据。 加密
encryptionSettingsCollection 加密设置集合是 Azure 磁盘加密,可以包含每个磁盘或快照的多个加密设置。 EncryptionSettingsCollection
hyperVGeneration 虚拟机的虚拟机监控程序生成。 仅适用于 OS 磁盘。 “V1”
“V2”
增量 快照是否为增量。 同一磁盘上的增量快照比完整快照占用的空间少,可以进行差异。 bool
networkAccessPolicy 用于通过网络访问磁盘的策略。 “AllowAll”
“AllowPrivate”
“DenyAll”
osType 操作系统类型。 “Linux”
“Windows”
publicNetworkAccess 用于控制磁盘上的导出的策略。 “Disabled”
“Enabled”
purchasePlan 最初从中创建快照源磁盘的映像的购买计划信息。 PurchasePlan
securityProfile 包含资源的安全相关信息。 DiskSecurityProfile
supportedCapabilities 最初从中创建快照源磁盘的映像支持的功能列表。 SupportedCapabilities
supportsHibernation 指示快照上的 OS 支持休眠。 bool

CopyCompletionError

名称 说明
errorCode 如果通过 CopyStart 操作创建的资源的后台副本失败,则指示错误代码。 “CopySourceNotFound” (必需)
errorMessage 如果通过 CopyStart 操作创建的资源的后台副本失败,则指示错误消息。 字符串 (必需)

CreationData

名称 说明
createOption 这会枚举创建磁盘的可能来源。 “附加”
“Copy”
“CopyStart”
“Empty”
“FromImage”
“Import”
“ImportSecure”
“还原”
“上传”
“UploadPreparedSecure” (必需)
galleryImageReference 如果从库映像创建,则为必需项。 ImageDiskReference 的 id/sharedGalleryImageId/communityGalleryImageId 将是要从中创建磁盘的共享映像版本的 ARM ID。 ImageDiskReference
imageReference PIR 或用户映像的磁盘源信息。 ImageDiskReference
logicalSectorSize 超级磁盘的逻辑扇区大小(以字节为单位)。 支持的值为 512 和 4096。 4096 是默认值。 int
securityDataUri 如果 createOption 为 ImportSecure,则这是要导入到 VM 来宾状态的 Blob 的 URI。 字符串
sourceResourceId 如果 createOption 为 Copy,则这是源快照或磁盘的 ARM ID。 字符串
sourceUri 如果 createOption 为 Import,则这是要导入到托管磁盘的 Blob 的 URI。 字符串
storageAccountId 如果 createOption 为 Import,则为必需项。 包含要导入为磁盘的 Blob 的存储帐户的 Azure 资源管理器标识符。 字符串
uploadSizeBytes 如果 createOption 为 Upload,则这是上传内容(包括 VHD 页脚)的大小。 对于 VHD 页脚) ,此值应介于 20972032 (20 MiB + 512 字节之间,VHD 页脚) (32 TiB + 512 字节35183298347520字节。 int

ImageDiskReference

名称 说明
communityGalleryImageId 包含社区 Azure 计算库映像引用的相对 URI。 string
id 包含平台映像存储库、用户映像或 Azure Compute Gallery 映像引用的相对 URI。 字符串
lun 如果磁盘是从映像的数据磁盘创建的,则此索引指示要使用的映像中的数据磁盘。 对于 OS 磁盘,此字段为 null。 int
sharedGalleryImageId 包含直接共享 Azure 计算库映像引用的相对 URI。 字符串

Encryption

名称 说明
diskEncryptionSetId 要用于启用静态加密的磁盘加密集的 ResourceId。 字符串
type 用于加密磁盘数据的密钥类型。 “EncryptionAtRestWithCustomerKey”
“EncryptionAtRestWithPlatformAndCustomerKeys”
“EncryptionAtRestWithPlatformKey”

EncryptionSettingsCollection

名称 说明
enabled 将此标志设置为 true,并提供 DiskEncryptionKey 和可选的 KeyEncryptionKey 以启用加密。 将此标志设置为 false 并删除 DiskEncryptionKey 和 KeyEncryptionKey 以禁用加密。 如果请求对象中的 EncryptionSettings 为 null,则现有设置保持不变。 bool (必需)
encryptionSettings 加密设置的集合,每个磁盘卷各一个。 EncryptionSettingsElement[]
encryptionSettingsVersion 描述磁盘使用的加密类型。 设置此字段后,无法覆盖它。 “1.0”对应于使用 AAD 应用的 Azure 磁盘加密。“1.1”对应于 Azure 磁盘加密。 字符串

EncryptionSettingsElement

名称 说明
diskEncryptionKey 密钥保管库磁盘加密密钥的机密 URL 和保管库 ID KeyVaultAndSecretReference
keyEncryptionKey 密钥保管库密钥加密密钥的密钥 URL 和保管库 ID。 KeyEncryptionKey 是可选的,提供时用于解包磁盘加密密钥。 KeyVaultAndKeyReference

KeyVaultAndSecretReference

名称 说明
secretUrl 指向 KeyVault 中的密钥或机密的 URL 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID SourceVault (必需)

SourceVault

名称 说明 Value
id 资源 ID 字符串

KeyVaultAndKeyReference

名称 说明
keyUrl 指向 KeyVault 中的密钥或机密的 URL 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID SourceVault (必需)

PurchasePlan

名称 说明
name 计划 ID。 字符串 (必需)
product 指定市场中映像的产品。 此值与 imageReference 元素下的 Offer 相同。 字符串 (必需)
promotionCode 产品/服务促销代码。 字符串
发布者 发布者 ID。 字符串 (必需)

DiskSecurityProfile

名称 说明
secureVMDiskEncryptionSetId 与使用客户管理的密钥加密的机密 VM 支持的磁盘关联的磁盘加密集的 ResourceId 字符串
securityType 指定 VM 的 SecurityType。 仅适用于 OS 磁盘。 “ConfidentialVM_DiskEncryptedWithCustomerKey”
“ConfidentialVM_DiskEncryptedWithPlatformKey”
“ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey”
“TrustedLaunch”

SupportedCapabilities

名称 说明
acceleratedNetwork 如此 如果从中创建 OS 磁盘的映像支持加速网络。 bool
体系结构 OS 磁盘支持的 CPU 体系结构。 “Arm64”
“x64”

SnapshotSku

名称 说明
name SKU 名称。 “Premium_LRS”
“Standard_LRS”
“Standard_ZRS”