tencent cloud

Key Rotation

Download
Focus Mode
Font Size
Last updated: 2026-07-30 16:45:13
AI-Translated

Overview

The key rotation feature operation consists of three APIs, as follows:
API Name
API Description
Description
GetKeyRotationStatus
Checks the status of the key rotation feature.
The KeyId parameter is required for this API operation. For details, see the GetKeyRotationStatus API documentation.
EnableKeyRotation
Enables key rotation.
The KeyId parameter is required for this API operation. For details, see the EnableKeyRotation API documentation.
DisableKeyRotation
Disables key rotation.
The KeyId parameter is required for this API operation. For details, see the DisableKeyRotation API documentation.
The examples in this document use the Tencent Cloud command-line tool TCCLI. Subsequently, you can make calls using any supported programming language.

Examples

Viewing Key Rotation Status Examples

Inputs

tccli kms GetKeyRotationStatus --region ap-guangzhou --KeyId 5xxxxx-xxxx-xxxx-xxxx-52xxxxx4

Output

When the API call is successful, the key rotation status of the CMK is returned.
{
"KeyRotationEnabled": false,
"RequestId": "e1432224-4dc2-48da-a8e8-e84d30afd9ef"
}

Enabling Key Rotation Examples

Inputs

tccli kms EnableKeyRotation --region ap-guangzhou --KeyId 5xxxxx-xxxx-xxxx-xxxx-52xxxxx4

Output

If the feature is enabled normally, the following request information is returned.
{
"RequestId": "4e0fa96f-e86e-4517-af27-3dfe6e5b2a72"
}

Disabling Key Rotation Examples

Inputs

tccli kms DisableKeyRotation --region ap-guangzhou --KeyId 5xxxxx-xxxx-xxxx-xxxx-52xxxxx4

Output

If the feature is enabled normally, the following request information is returned.
{
"RequestId": "c8b73c8b-1ee5-4b23-b800-7cccc58e7ffb"
}


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback