aws kms list-key-rotations
Returns information about the key materials associated with the specified KMS key. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To retrieve information about all completed key material rotations
The following list-key-rotations example lists information about all completed key material rotations for the specified KMS key.
aws kms list-key-rotations --key-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111Identify--key-idGets the key rotations for the specified KMS key.Its output
{
"Rotations": [
{
"KeyId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"RotationDate": "2024-03-02T10:11:36.564000+00:00",
"RotationType": "AUTOMATIC"
},
{
"KeyId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"RotationDate": "2024-04-05T15:14:47.757000+00:00",
"RotationType": "ON_DEMAND"
}
],
"Truncated": false
}For more information, see Rotating keys in the AWS Key Management Service Developer Guide.
Options
--include-key-materialUse this optional parameter to control which key materials associated with this key are listed in the response.--key-idGets the key rotations for the specified KMS key.--limitUse this parameter to specify the maximum number of items to return.--markerUse this parameter in a subsequent request after you receive a response with truncated results.