edit-icon download-icon


Last Updated: Apr 02, 2018


Returns detailed information about the specified CMK.

Request parameters

Name Type Required Description
KeyId String Yes Globally unique identifier of the CMK. You can use aliases. For more information, see Alias Instructions.

Response parameters

Name Type Description
KeyMetadata KeyMetadata Contains metadata about a CMK.


Name Type Description
CreationDate Timestamp The date and time when the CMK was created.
Description String The description of the CMK.
KeyId String The globally unique identifier for the CMK.
KeyState String The state of the CMK.
KeyUsage String The cryptographic operations for which you can use the CMK.
DeleteDate Timestamp The date and time after which KMS deletes the CMK. This value is present only when KeyState is PendingDeletion, otherwise this value is omitted.
Creator String The creator of the CMK.
Arn String The Alibaba Cloud Resource Name (ARN) of the CMK. For more information, see Permissions.
Origin String The source of the CMK’s key material.
MaterialExpireTime String The date and time the key expires (UTC). If the value is omitted, the key does not expire.


Request example

  1. https://kms.cn-hangzhou.aliyuncs.com/?Action=DescribeKey
  2. &KeyId=<cmkid or aliasname>
  3. &<Common Request Parameters>

Response example

JSON format

  1. //json response
  2. {
  3. "KeyMetadata": {
  4. "CreationDate": "2016-03-25T10:42:40Z",
  5. "Description": "key description example",
  6. "KeyId": "08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4fb73",
  7. "KeyState": "Enabled",
  8. "KeyUsage": "ENCRYPT/DECRYPT",
  9. "DeleteDate": "",
  10. "Creator": "123456",
  11. "Arn":"acs:kms:cn-hangzhou:123456:key/08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4fb73",
  12. "Origin":"Aliyun_KMS",
  13. "MaterialExpireTime":""
  14. },
  15. "RequestId": "3455b9b4-95c1-419d-b310-db6a53b09a39"
  16. }

XML format

  1. //xml response
  2. <KMS>
  3. <KeyMetadata>
  4. <CreationDate>2016-03-25T10:40:47Z</CreationDate>
  5. <Description>key description example</Description>
  6. <KeyId>08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4fb73</KeyId>
  7. <KeyState>Enabled</KeyState>
  8. <KeyUsage>ENCRYPT/DECRYPT</KeyUsage>
  9. <DeleteDate></DeleteDate>
  10. <Creator>123456</Creator>
  11. <Arn>acs:kms:cn-hangzhou:123456:key/08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4fb73</Arn>
  12. <Origin>Aliyun_KMS</Origin>
  13. <MaterialExpireTime></MaterialExpireTime>
  14. </KeyMetadata>
  15. <RequestId>6cb4bf6b-d9c9-4660-af5f-2328378e7257</RequestId>
  16. </KMS>
Thank you! We've received your feedback.