tencent cloud

APIs

RotateKey

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-08-04 11:59:59

1. API Description

Domain name for API request: kms.intl.tencentcloudapi.com.

Rotate the designated customer master key immediately. You can call DescribeKey to return the last rotation time and the next rotation time, and determine whether the rotation is successful.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: RotateKey.
Version Yes String Common Params. The value used for this API: 2019-01-18.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
KeyId Yes String

Globally unique ID of the CMK.

MemberAccount No MemberAccount

Member account information for multi-account scenarios

3. Output Parameters

Parameter Name Type Description
TaskId String

Task ID used to identify this rotation. You can call DescribeKey to return the last rotation time and next rotation time, and determine whether the rotation is successful.

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Rotate key immediately

Rotate key immediately

Input Example

POST / HTTP/1.1
Host: kms.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RotateKey
<Common request parameters>

{
    "KeyId": "6ce625e3-01a4-11f1-9481-525400faed4b"
}

Output Example

{
    "Response": {
        "TaskId": "3027e0ed-28f1-11f1-b397-525400796650",
        "RequestId": "a09e3218-fb08-4560-8377-189e1b791032"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.RotateTaskRunning Existing ongoing rotation tasks
InternalError Internal error.
InvalidParameter Invalid parameter.
InvalidParameterValue.InvalidKeyId Invalid KeyId.
RequestLimitExceeded.RotateRateLimited Rotation operation triggers frequency limit, default can only rotate once within 24 hours.
ResourceUnavailable.CmkNotFound The CMK does not exist.
ResourceUnavailable.CmkStateNotSupport This operation cannot be performed under the current CMK status.
UnauthorizedOperation Unauthorized operation.
UnsupportedOperation.RotateNotSupported Rotation not supported (rotation not enabled, external key, replica key)

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan