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 | Specifies the serverless cluster id. |
| AutoPause | No | String | Specifies whether the cluster automatically pauses. valid values for the optional range. |
| AutoPauseDelay | No | Integer | Specifies the delay for cluster auto-pause in seconds. the value range is [600,691200]. the default value is 600. |
| AutoScaleUpDelay | No | Integer | The parameter is temporarily unavailable. |
| AutoScaleDownDelay | No | Integer | The parameter is temporarily unavailable. |
| MinCpu | No | Float | Minimum value of cpu. for the optional range, refer to the API response of DescribeServerlessInstanceSpecs. |
| MaxCpu | No | Float | Maximum value of cpu, optional range refers to the API response of DescribeServerlessInstanceSpecs. |
| MinRoCpu | No | Float | Minimum cpu value of a read-only instance. for valid values, refer to the API response of DescribeServerlessInstanceSpecs. |
| MaxRoCpu | No | Float | Maximum value of read-only cpu, optional range refer to the API response of DescribeServerlessInstanceSpecs. |
| MinRoCount | No | Integer | Specifies the minimum count of read-only nodes. |
| MaxRoCount | No | Integer | Maximum number of read-only nodes. |
| Parameter Name | Type | Description |
|---|---|---|
| FlowId | Integer | Async process 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. |
Modification of 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": {
"FlowId": 1008300,
"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": {
"FlowId": 917319,
"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. |
Feedback