Domain name for API request: cynosdb.intl.tencentcloudapi.com.
This API is used to modify the serverless policy.
A maximum of 20 requests can be initiated per second for this API.
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: ModifyServerlessStrategy. |
| Version | Yes | String | Common Params. The value used for this API: 2019-01-07. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo. |
| ClusterId | Yes | String | serverless cluster id |
| AutoPause | No | String | Whether the cluster auto-pause feature is enabled. Optional range |
| AutoPauseDelay | No | Integer | Delay of Cluster Auto-Pause in seconds, optional range [600,691200], default 600 |
| AutoScaleUpDelay | No | Integer | This parameter is temporarily unavailable |
| AutoScaleDownDelay | No | Integer | This parameter is temporarily invalid |
| MinCpu | No | Float | cpu minimum value. For optional range, see API response of DescribeServerlessInstanceSpecs. |
| MaxCpu | No | Float | Maximum value of cpu. For optional range, see API response of DescribeServerlessInstanceSpecs. |
| MinRoCpu | No | Float | Minimum value of read-only instance cpu. For the optional range, refer to the API response of DescribeServerlessInstanceSpecs. |
| MaxRoCpu | No | Float | Read-only cpu maximum value of the optional range. For reference, see API response of DescribeServerlessInstanceSpecs. |
| MinRoCount | No | Integer | Minimum count of read-only nodes |
| MaxRoCount | No | Integer | Maximum number of read-only nodes |
| AutoArchive | No | String | Whether archiving is enabled. Optional range |
| UpgradeType | No | String | Upgrade type. Default value: upgradeImmediate. Available values: upgradeImmediate - immediately complete the modification; upgradeInMaintain - complete the modification during maintenance window. |
| SecurityGroupIdsForNewRo.N | No | Array of String | List of security groups to which newly-added read-only instances need to be bound. This only applies to binding security groups to read-only instances generated during the process of this adjustment of policies. Existing instances are not bound. |
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | Integer | Task ID. |
| 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. |
Modify a serverless policy
POST / HTTP/1.1
Host: cynosdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyServerlessStrategy
<Common request parameters>
{
"AutoPause": "no",
"AutoScaleUpDelay": 200,
"AutoPauseDelay": 100,
"MinCpu": 0.25,
"MaxCpu": 2,
"ClusterId": "cynosdbmysql-8vcxoq75",
"AutoScaleDownDelay": 300
}
{
"Response": {
"TaskId": 171221,
"RequestId": "c3da7958-23e8-11eb-8e52-525400b7dd5a"
}
}
This example shows you how to adjust the primary node.
POST / HTTP/1.1
Host: cynosdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyServerlessStrategy
<Common request parameters>
{
"ClusterId": "cynosdbmysql-92oecwyv",
"MinCpu": 2,
"MaxCpu": 2
}
{
"Response": {
"TaskId": 172231,
"RequestId": "a7ef1e81-e306-45fd-ab3d-37a6ae7ecf96"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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.DatabaseAccessError | Failed to access the database. Please try again later. If the problem persists, please contact customer service. |
| FailedOperation.OperationFailedError | Operation failed. Try again later. If the problem persists, contact customer service. |
| FailedOperation.ServerlessSetStrategyError | Policy modification failed. |
| InternalError.DbOperationFailed | Failed to query the database. |
| InternalError.SystemError | Internal system error. |
| InternalError.UnknownError | Unknown internal error. |
| InvalidParameterValue.ClusterNotFound | No cluster found. |
| InvalidParameterValue.DbModeNotServerlessError | The cluster type must be serverless. |
| InvalidParameterValue.InvalidParameterValueError | Invalid parameter value. |
| InvalidParameterValue.ParamError | Incorrect parameter. |
| OperationDenied.ClusterStatusDeniedError | For the cluster in this status, the operation is not allowed. |
| ResourceNotFound.ClusterNotFoundError | The cluster does not exist. |
| UnauthorizedOperation.PermissionDenied | CAM authentication failed. |
文档反馈