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

Disk Encryption Sets - Create Or Update

创建或更新磁盘加密集

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

URI 参数

名称 必需 类型 说明
diskEncryptionSetName
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

资源位置

identity

EncryptionSetIdentity

磁盘加密集的托管标识。 它应授予对密钥保管库的权限,然后才能用于加密磁盘。

properties.activeKey

KeyForDiskEncryptionSet

此磁盘加密集当前使用的密钥保管库密钥。

properties.encryptionType

DiskEncryptionSetType

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

properties.federatedClientId

string

多租户应用程序客户端 ID,用于访问不同租户中的密钥保管库。 将值设置为“None”将清除该属性。

properties.rotationToLatestKeyVersionEnabled

boolean

将此标志设置为 true 以启用此磁盘加密设置为最新密钥版本的自动更新。

tags

object

资源标记

响应

名称 类型 说明
200 OK

DiskEncryptionSet

好的

202 Accepted

DiskEncryptionSet

已接受

Other Status Codes

CloudError

描述作失败的原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

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

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Create a disk encryption set with key vault from a different subscription.
Create a disk encryption set with key vault from a different tenant.
Create a disk encryption set.

Create a disk encryption set with key vault from a different subscription.

示例请求

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

{
  "location": "West US",
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "activeKey": {
      "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey"
  }
}

示例响应

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet",
  "name": "myDiskEncryptionSet",
  "location": "West US",
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "activeKey": {
      "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey",
    "previousKeys": []
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet",
  "name": "myDiskEncryptionSet",
  "location": "West US",
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "activeKey": {
      "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey",
    "previousKeys": []
  }
}

Create a disk encryption set with key vault from a different tenant.

示例请求

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

{
  "location": "West US",
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {}
    }
  },
  "properties": {
    "activeKey": {
      "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey",
    "federatedClientId": "00000000-0000-0000-0000-000000000000"
  }
}

示例响应

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet",
  "name": "myDiskEncryptionSet",
  "location": "West US",
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {}
    }
  },
  "properties": {
    "activeKey": {
      "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey",
    "federatedClientId": "00000000-0000-0000-0000-000000000000",
    "previousKeys": []
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet",
  "name": "myDiskEncryptionSet",
  "location": "West US",
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {}
    }
  },
  "properties": {
    "activeKey": {
      "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey",
    "federatedClientId": "00000000-0000-0000-0000-000000000000",
    "previousKeys": []
  }
}

Create a disk encryption set.

示例请求

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

{
  "location": "West US",
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "activeKey": {
      "sourceVault": {
        "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
      },
      "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey"
  }
}

示例响应

{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet",
  "name": "myDiskEncryptionSet",
  "location": "West US",
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "activeKey": {
      "sourceVault": {
        "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
      },
      "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey",
    "previousKeys": []
  }
}
{
  "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet",
  "name": "myDiskEncryptionSet",
  "location": "West US",
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "activeKey": {
      "sourceVault": {
        "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
      },
      "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}"
    },
    "encryptionType": "EncryptionAtRestWithCustomerKey",
    "previousKeys": []
  }
}

定义

名称 说明
ApiError

Api 错误。

ApiErrorBase

Api 错误基数。

CloudError

来自计算服务的错误响应。

DiskEncryptionSet

磁盘加密集资源。

DiskEncryptionSetIdentityType

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

DiskEncryptionSetType

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

EncryptionSetIdentity

磁盘加密集的托管标识。 它应授予对密钥保管库的权限,然后才能用于加密磁盘。

InnerError

内部错误详细信息。

KeyForDiskEncryptionSet

用于对托管磁盘和快照进行服务器端加密的 Key Vault 密钥 URL

SourceVault

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

UserAssignedIdentities

与虚拟机关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。

ApiError

Api 错误。

名称 类型 说明
code

string

错误代码。

details

ApiErrorBase[]

API 错误详细信息

innererror

InnerError

Api 内部错误

message

string

错误消息。

target

string

特定错误的目标。

ApiErrorBase

Api 错误基数。

名称 类型 说明
code

string

错误代码。

message

string

错误消息。

target

string

特定错误的目标。

CloudError

来自计算服务的错误响应。

名称 类型 说明
error

ApiError

Api 错误。

DiskEncryptionSet

磁盘加密集资源。

名称 类型 说明
id

string

资源 ID

identity

EncryptionSetIdentity

磁盘加密集的托管标识。 它应授予对密钥保管库的权限,然后才能用于加密磁盘。

location

string

资源位置

name

string

资源名称

properties.activeKey

KeyForDiskEncryptionSet

此磁盘加密集当前使用的密钥保管库密钥。

properties.autoKeyRotationError

ApiError

自动密钥轮换过程中遇到的错误。 如果存在错误,则在修复此磁盘加密集上的错误之前,不会尝试自动密钥轮换。

properties.encryptionType

DiskEncryptionSetType

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

properties.federatedClientId

string

多租户应用程序客户端 ID,用于访问不同租户中的密钥保管库。 将值设置为“None”将清除该属性。

properties.lastKeyRotationTimestamp

string (date-time)

更新此磁盘加密集的活动密钥的时间。

properties.previousKeys

KeyForDiskEncryptionSet[]

密钥轮换正在进行时,此磁盘加密集以前使用的密钥保管库密钥的只读集合。 如果没有正在进行的密钥轮换,则为空。

properties.provisioningState

string

磁盘加密集预配状态。

properties.rotationToLatestKeyVersionEnabled

boolean

将此标志设置为 true 以启用此磁盘加密设置为最新密钥版本的自动更新。

tags

object

资源标记

type

string

资源类型

DiskEncryptionSetIdentityType

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

说明
None
SystemAssigned
SystemAssigned, UserAssigned
UserAssigned

DiskEncryptionSetType

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

说明
ConfidentialVmEncryptedWithCustomerKey

机密 VM 支持的磁盘和 VM 来宾状态将使用客户管理的密钥进行加密。

EncryptionAtRestWithCustomerKey

使用 diskEncryptionSet 的资源将使用客户管理的密钥进行静态加密,客户可以更改和吊销这些密钥。

EncryptionAtRestWithPlatformAndCustomerKeys

使用 diskEncryptionSet 的资源将使用两层加密进行静态加密。 其中一个密钥是客户管理的,另一个密钥是平台管理的。

EncryptionSetIdentity

磁盘加密集的托管标识。 它应授予对密钥保管库的权限,然后才能用于加密磁盘。

名称 类型 说明
principalId

string

托管标识资源的对象 ID。 如果资源具有 systemAssigned(隐式)标识,则会通过 PUT 请求中的 x-ms-identity-principal-id 标头从 ARM 发送到 RP

tenantId

string

托管标识资源的租户 ID。 如果资源具有 systemAssigned(隐式)标识,则会通过 PUT 请求中的 x-ms-client-tenant-id 标头从 ARM 发送到 RP

type

DiskEncryptionSetIdentityType

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

userAssignedIdentities

UserAssignedIdentities

与磁盘加密集关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。

InnerError

内部错误详细信息。

名称 类型 说明
errordetail

string

内部错误消息或异常转储。

exceptiontype

string

异常类型。

KeyForDiskEncryptionSet

用于对托管磁盘和快照进行服务器端加密的 Key Vault 密钥 URL

名称 类型 说明
keyUrl

string

指向 KeyVault 中的密钥的完全版本控制密钥 URL。 无论 rotationToLatestKeyVersionEnabled 值如何,都需要 URL 的版本段。

sourceVault

SourceVault

包含密钥或机密的 KeyVault 的资源 ID。 此属性是可选的,如果 KeyVault 订阅与磁盘加密集订阅不同,则不能使用此属性。

SourceVault

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

名称 类型 说明
id

string

资源 ID

UserAssignedIdentities

与虚拟机关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。

名称 类型 说明