set_key_rotation_status Method
Enables or disables automatic key rotation for a CMK.
Syntax
def set_key_rotation_status(key_id: str, enabled: bool) -> None: ...
Remarks
This method enables or disables automatic key material rotation for the CMK specified by KeyId.
The value passed for the KeyId parameter must be the Id or ARN of a CMK in the current account and region.
This method will fail if any of the following are true regarding the specified CMK:
- Its key_state is anything other than aksEnabled (0).
- It is asymmetric (see key_key_spec).
- It has imported key material (see key_origin).
- It resides in a custom key store (see key_custom_key_store_id).
- It is an AWS-managed CMK (see key_aws_managed).