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

Microsoft.Compute diskEncryptionSets 2021-08-01

Bicep 资源定义

diskEncryptionSets 资源类型可以使用面向以下对象的操作进行部署:

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

资源格式

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

resource symbolicname 'Microsoft.Compute/diskEncryptionSets@2021-08-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  identity: {
    type: 'string'
  }
  properties: {
    activeKey: {
      keyUrl: 'string'
      sourceVault: {
        id: 'string'
      }
    }
    encryptionType: 'string'
    rotationToLatestKeyVersionEnabled: bool
  }
}

属性值

diskEncryptionSets

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

字符限制:1-80

有效字符:
字母数字、下划线字符和连字符。
location 资源位置 字符串 (必需)
标记 资源标记 标记名称和值的字典。 请参阅 模板中的标记
标识 磁盘加密集的托管标识。 应先向其授予对密钥保管库的权限,然后才能使用它来加密磁盘。 EncryptionSetIdentity
properties EncryptionSetProperties

EncryptionSetIdentity

名称 说明 Value
type DiskEncryptionSet 使用的托管标识的类型。 新创建仅支持 SystemAssigned。 在将订阅迁移到新的 Azure Active Directory 租户期间,可以使用标识类型 None 更新磁盘加密集;这将导致加密的资源失去对密钥的访问权限。 “None”
“SystemAssigned”

EncryptionSetProperties

名称 说明
activeKey 此磁盘加密集当前使用的密钥保管库密钥。 KeyForDiskEncryptionSet
encryptionType 用于加密磁盘数据的密钥类型。 “ConfidentialVmEncryptedWithCustomerKey”
“EncryptionAtRestWithCustomerKey”
'EncryptionAtRestWithPlatformAndCustomerKeys'
rotationToLatestKeyVersionEnabled 将此标志设置为 true 以启用此磁盘加密集到最新密钥版本的自动更新。 bool

KeyForDiskEncryptionSet

名称 说明
keyUrl 指向 KeyVault 中的密钥的完全版本控制密钥 URL。 无论 rotationToLatestKeyVersionEnabled 值如何,都需要 URL 的版本段。 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID。 此属性是可选的,如果 KeyVault 订阅与磁盘加密集订阅不同,则无法使用此属性。 SourceVault

SourceVault

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

ARM 模板资源定义

diskEncryptionSets 资源类型可以使用面向以下对象的操作进行部署:

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

资源格式

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

{
  "type": "Microsoft.Compute/diskEncryptionSets",
  "apiVersion": "2021-08-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "identity": {
    "type": "string"
  },
  "properties": {
    "activeKey": {
      "keyUrl": "string",
      "sourceVault": {
        "id": "string"
      }
    },
    "encryptionType": "string",
    "rotationToLatestKeyVersionEnabled": "bool"
  }
}

属性值

diskEncryptionSets

名称 说明 Value
type 资源类型 “Microsoft.Compute/diskEncryptionSets”
apiVersion 资源 API 版本 '2021-08-01'
name 资源名称 字符串 (必需)

字符限制:1-80

有效字符:
字母数字、下划线字符和连字符。
location 资源位置 字符串 (必需)
标记 资源标记 标记名称和值的字典。 请参阅 模板中的标记
标识 磁盘加密集的托管标识。 在密钥保管库可用于加密磁盘之前,应向其授予对密钥保管库的权限。 EncryptionSetIdentity
properties EncryptionSetProperties

EncryptionSetIdentity

名称 说明 Value
type DiskEncryptionSet 使用的托管标识的类型。 新创建仅支持 SystemAssigned。 在将订阅迁移到新的 Azure Active Directory 租户期间,可以使用标识类型“无”更新磁盘加密集;这将导致加密的资源失去对密钥的访问权限。 “None”
“SystemAssigned”

EncryptionSetProperties

名称 说明
activeKey 此磁盘加密集当前使用的密钥保管库密钥。 KeyForDiskEncryptionSet
encryptionType 用于加密磁盘数据的密钥类型。 “ConfidentialVmEncryptedWithCustomerKey”
“EncryptionAtRestWithCustomerKey”
“EncryptionAtRestWithPlatformAndCustomerKeys”
rotationToLatestKeyVersionEnabled 将此标志设置为 true 以启用此磁盘加密集的自动更新到最新密钥版本。 bool

KeyForDiskEncryptionSet

名称 说明
keyUrl 完全版本的密钥 URL,指向 KeyVault 中的密钥。 无论 rotationToLatestKeyVersionEnabled 值如何,都需要 URL 的版本段。 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID。 此属性是可选的,如果 KeyVault 订阅与磁盘加密集订阅不同,则无法使用此属性。 SourceVault

SourceVault

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

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

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

  • 资源组

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

资源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Compute/diskEncryptionSets@2021-08-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type =  "SystemAssigned"
  }
  body = jsonencode({
    properties = {
      activeKey = {
        keyUrl = "string"
        sourceVault = {
          id = "string"
        }
      }
      encryptionType = "string"
      rotationToLatestKeyVersionEnabled = bool
    }
  })
}

属性值

diskEncryptionSets

名称 说明 Value
type 资源类型 “Microsoft.Compute/diskEncryptionSets@2021-08-01”
name 资源名称 字符串 (必需)

字符限制:1-80

有效字符:
字母数字、下划线字符和连字符。
location 资源位置 字符串 (必需)
parent_id 若要部署到资源组,请使用该资源组的 ID。 字符串 (必需)
标记 资源标记 标记名称和值的字典。
标识 磁盘加密集的托管标识。 在密钥保管库可用于加密磁盘之前,应向其授予对密钥保管库的权限。 EncryptionSetIdentity
properties EncryptionSetProperties

EncryptionSetIdentity

名称 说明 Value
type DiskEncryptionSet 使用的托管标识的类型。 新创建仅支持 SystemAssigned。 在将订阅迁移到新的 Azure Active Directory 租户期间,可以使用标识类型“无”更新磁盘加密集;这将导致加密的资源失去对密钥的访问权限。 “SystemAssigned”

EncryptionSetProperties

名称 说明
activeKey 此磁盘加密集当前使用的密钥保管库密钥。 KeyForDiskEncryptionSet
encryptionType 用于加密磁盘数据的密钥类型。 “ConfidentialVmEncryptedWithCustomerKey”
“EncryptionAtRestWithCustomerKey”
“EncryptionAtRestWithPlatformAndCustomerKeys”
rotationToLatestKeyVersionEnabled 将此标志设置为 true 以启用此磁盘加密集的自动更新到最新密钥版本。 bool

KeyForDiskEncryptionSet

名称 说明
keyUrl 完全版本的密钥 URL,指向 KeyVault 中的密钥。 无论 rotationToLatestKeyVersionEnabled 值如何,都需要 URL 的版本段。 字符串 (必需)
sourceVault 包含密钥或机密的 KeyVault 的资源 ID。 此属性是可选的,如果 KeyVault 订阅与磁盘加密集订阅不同,则无法使用此属性。 SourceVault

SourceVault

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