All Products
Search
Document Center

Key Management Service:DescribeKeyVersion

Last Updated:Apr 03, 2026

Queries the metadata of a specific CMK version.

Operation description

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.

For more information about the access policy required by a RAM user or RAM role to call this API, see Resource Access Management.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

KeyId

string

Yes

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.

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

KeyVersionId

string

Yes

The globally unique ID of the CMK version.

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

2ab1a983-7072-4bbc-a582-584b5bd8****

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

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

KeyVersion

object

The metadata of the CMK version.

KeyId

string

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.

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

KeyVersionId

string

The globally unique ID of the CMK version.

2ab1a983-7072-4bbc-a582-584b5bd8****

CreationDate

string

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

2016-03-25T10:42:40Z

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is not valid. An invalid value is specified for the parameter.
404 InvalidAccessKeyId.NotFound The Access Key ID provided does not exist in our records.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.