You can call this operation to query detailed information about a specified CMK.

Request parameters

Parameter Type Required Description
KeyId String Yes The globally unique ID of the CMK to query. You can use aliases in the request. For more information, see Alias Instructions.

Response parameters

Parameter Type Description
KeyMetadata KeyMetadata parameters The metadata of the CMK queried.

KeyMetadata parameters

Parameter Type Description
CreationDate Timestamp The date and time when the CMK was created. The time is displayed in UTC.
Description String The description of the CMK.
KeyId String The globally unique ID of the CMK.
KeyState String The status of the CMK. For more information, see Impact of CMK states on API call.
KeyUsage String The purpose of the CMK.
DeleteDate Timestamp The scheduled date to delete CMK. For more information, see ScheduleKeyDeletion. This value is returned only when the KeyState value is PendingDeletion.
Creator String The creator of the CMK.
Arn String The Alibaba Cloud Resource Name (ARN) of the CMK.
Origin String The source of the key material for the CMK.
MaterialExpireTime String The time when the key material for the CMK expires. The time is displayed in UTC. If the value is empty, the key material for the CMK does not expire.
ProtectionLevel String The protection level of the CMK.

Examples

Sample requests

https://kms.cn-hangzhou.aliyuncs.com/?Action=DescribeKey
&KeyId=<your-key-id>
&<Common request parameters>

Sample responses

JSON format

//json response
{
        "KeyMetadata": {
                "CreationDate": "2016-03-25T10:42:40Z",
                "Description": "key description example",
                "KeyId": "08c33a6f-4e0a-4a1b-a3fa-7ddf****",
                "KeyState": "Enabled",
                "KeyUsage": "ENCRYPT/DECRYPT",
                "DeleteDate": "",
                "Creator":"123456",
                "Arn":"acs:kms:cn-hangzhou:123456:key/08c33a6f-4e0a-4a1b-a3fa-7ddf****",
                "Origin":"Aliyun_KMS",
                "MaterialExpireTime":"",
                "ProtectionLevel":"HSM"
        },
        "RequestId": "3455b9b4-95c1-419d-b310-db6a53b09a39"
}

XML format

//xml response
<KMS>
 <KeyMetadata>
        <CreationDate>2016-03-25T10:40:47Z</CreationDate>
        <Description>key description example</Description>
        <KeyId>08c33a6f-4e0a-4a1b-a3fa-7ddf****</KeyId>
        <KeyState>Enabled</KeyState>
        <KeyUsage>ENCRYPT/DECRYPT</KeyUsage>
        <DeleteDate></DeleteDate>
        <Creator>123456</Creator>
        <Arn>acs:kms:cn-hangzhou:123456:key/08c33a6f-4e0a-4a1b-a3fa-7ddf****</Arn>
        <Origin>Aliyun_KMS</Origin>
        <MaterialExpireTime></MaterialExpireTime>
        <ProtectionLevel>HSM</ProtectionLevel>
 </KeyMetadata>
 <RequestId>6cb4bf6b-d9c9-4660-af5f-2328378e7257</RequestId>
</KMS>