EnableKeyRotation#

Description#

Enables automatic rotation of a KMS key.

Request Parameters#

Required parameters#

  • KeyId — The ID of the KMS key.

    • Type: String

    • Required: Yes

Optional parameters#

  • RotationPeriodInDays — The KMS key rotation period in days.

    • Type: Integer

    • Required: No

    • Default value: 365

    • Range: From 90 to 2560

Response Elements#

Response body is absent.

Examples#

Sample Request#

POST / HTTP/1.1
Host: kms.<region>.<domain>
Content-Length: <PayloadSizeBytes>
Content-Type: application/x-amz-json-1.1
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature>
X-Amz-Date: <Date>
X-Amz-Target: TrentService.EnableKeyRotation

{
    "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
    "RotationPeriodInDays": 180
}

Sample Response#

HTTP/1.1 200 OK
Content-Type: application/x-amz-json-1.1