Queries detailed information about a specified customer master key (CMK) version.

This topic provides an example on how to query the information about a version of the CMK 1234abcd-12ab-34cd-56ef-12345678****. The ID of the CMK version is 2ab1a983-7072-4bbc-a582-584b5bd8****. The response shows that the creation time of the CMK version is 2016-03-25T10:42:40Z.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeKeyVersion

The operation that you want to perform. Set the value to DescribeKeyVersion.

KeyId String Yes 1234abcd-12ab-34cd-56ef-12345678****

The globally unique ID of the CMK.

You can also set this parameter to an alias that is bound to the CMK. For more information, see Alias overview.

KeyVersionId String Yes 2ab1a983-7072-4bbc-a582-584b5bd8****

The globally unique ID of the CMK version.

You can call the ListKeyVersions operation to query the versions of the CMK.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
KeyVersion Struct

The metadata of the CMK version.

CreationDate String 2016-03-25T10:42:40Z

The date and time when the CMK version was created. The time is displayed in UTC.

KeyId String 1234abcd-12ab-34cd-56ef-12345678****

The globally unique ID of the CMK.

Note If you set the KeyId parameter in the request to an alias of the CMK, the ID of the CMK to which the alias is bound is returned.
KeyVersionId String 2ab1a983-7072-4bbc-a582-584b5bd8****

The globally unique ID of the CMK version.

RequestId String 7021b6ec-4be7-4d3c-8a68-1e85d4d515a0

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeKeyVersion
&KeyId=1234abcd-12ab-34cd-56ef-12345678****
&KeyVersionId=2ab1a983-7072-4bbc-a582-584b5bd8****
&<Common request parameters>

Sample success responses

XML format

<KMS>
         <RequestId>7021b6ec-4be7-4d3c-8a68-1e85d4d515a0</RequestId>
         <KeyVersion>
                   <CreationDate>2016-03-25T10:42:40Z</CreationDate>
                   <KeyId>1234abcd-12ab-34cd-56ef-12345678****</KeyId>
                   <KeyVersionId>2ab1a983-7072-4bbc-a582-584b5bd8****</KeyVersionId>
         </KeyVersion>
</KMS>

JSON format

{
    "RequestId":"7021b6ec-4be7-4d3c-8a68-1e85d4d515a0",
    "KeyVersion":{
        "CreationDate":"2016-03-25T10:42:40Z",
        "KeyId":"1234abcd-12ab-34cd-56ef-12345678****",
        "KeyVersionId":"2ab1a983-7072-4bbc-a582-584b5bd8****"
        }
}

Error codes

For a list of error codes, visit the API Error Center.