All Products
Search
Document Center

Key Management Service:CreateKeyVersion

Last Updated:Jul 29, 2025

Creates a version for a customer master key (CMK).

Operation description

  • You can create a version only for an asymmetric CMK that is in the Enabled state. You can call the CreateKey operation to create an asymmetric CMK and the DescribeKey operation to query the status of the CMK. The status is specified by the KeyState parameter.
  • The minimum interval for creating a version of the same CMK is seven days. You can call the DescribeKey operation to query the time when the last version of a CMK was created. The time is specified by the LastRotationDate parameter.
  • If a CMK is in a private key store, you cannot create a version for the CMK.
  • You can create a maximum of 50 versions for a CMK in the same region.

You can create a version for the CMK whose ID is 0b30658a-ed1a-4922-b8f7-a673ca9c**** by using the parameter settings provided in this topic.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
KeyIdstringYes

The ID of the CMK. The ID must be globally unique.

Note You can also set the value to an alias that is bound to the CMK. For more information, see Overview of aliases.
0b30658a-ed1a-4922-b8f7-a673ca9c****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

b96f250a-4b75-498c-91be-22c6928f85be
KeyVersionobject

The metadata of the version.

KeyIdstring

The ID of the CMK. The ID must be globally unique.

0b30658a-ed1a-4922-b8f7-a673ca9c****
KeyVersionIdstring

The ID of the version.

c0a3d5dc-0b47-4199-a050-b289349a****
CreationDatestring

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

2019-08-02T10:38:27Z

Examples

Sample success responses

JSONformat

{
  "RequestId": "b96f250a-4b75-498c-91be-22c6928f85be",
  "KeyVersion": {
    "KeyId": "0b30658a-ed1a-4922-b8f7-a673ca9c****",
    "KeyVersionId": "c0a3d5dc-0b47-4199-a050-b289349a****",
    "CreationDate": "2019-08-02T10:38:27Z"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-18API Description Update. The Error code has changedView Change Details