tencent cloud

APIs

RotateClusterToken

Download
Focus Mode
Font Size
Last updated: 2026-11-11 15:51:37

1. API Description

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

This API is used to rotate a cluster token.

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: RotateClusterToken.
Version Yes String Common Params. The value used for this API: 2018-05-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ClusterId Yes String

Cluster ID.

ClusterType No String

Cluster type. Valid values: TKEServerless and TKE. Default value: TKE.

Operation No String

Operation to perform. Valid values: CreateNewToken, RevokeOldToken, and RecoverOldToken.
CreateNewToken: Creates a new token and makes it take effect. By default, a maximum of two tokens can take effect at the same time. If you want more tokens to take effect, Force must be set to true.
RevokeOldToken: Deletes the old token and makes it invalid. In this case, ClusterToken is required.
RecoverOldToken: Recovers the old token and makes it take effect. In this case, ClusterToken is required, and this operation can be called only when there is a corresponding RevokeOldToken task that has succeeded.

ClusterToken No String

Cluster token. It is required only when Operation is set to RevokeOldToken or RecoverOldToken.

Force No Boolean

Default value: false. It is required only when Operation is set to CreateNewToken. Only when it is set to true can more than two tokens take effect.

3. Output Parameters

Parameter Name Type Description
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 This API is used to rotate a cluster token.

Input Example

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

{
    "ClusterId": "cls-h92i9b7e",
    "Force": true,
    "ClusterType": "TKE",
    "Operation": "CreateNewToken"
}

Output Example

{
    "Response": {
        "RequestId": "8859cd95-1c52-48fd-a100-600d9bfea6b1"
    }
}

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

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Help and Support

Was this page helpful?

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

Feedback