Domain name for API request: tse.intl.tencentcloudapi.com.
Create AS 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: CreateAutoScalerResourceStrategy. |
| Version | Yes | String | Common Params. The value used for this API: 2020-12-07. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| GatewayId | Yes | String | Gateway instance ID |
| StrategyName | Yes | String | Policy name. |
| Description | No | String | Policy description |
| Config | No | CloudNativeAPIGatewayStrategyAutoScalerConfig | Metric scaling configuration |
| CronConfig | No | CloudNativeAPIGatewayStrategyCronScalerConfig | Scheduled scaling configuration |
| Parameter Name | Type | Description |
|---|---|---|
| StrategyId | String | Policy 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. |
Create AS policy
POST / HTTP/1.1
Host: tse.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAutoScalerResourceStrategy
<Common request parameters>
{
"GatewayId": "gateway-4a34cf5f",
"StrategyName": "strategy-test",
"Description": "desc",
"MaxReplicas": 15,
"Config": {
"Enabled": true,
"Metrics": [
{
"Type": "Resource",
"ResourceName": "cpu",
"TargetType": "Utilization",
"TargetValue": 50
},
{
"Type": "Pods",
"ResourceName": "tcp-connection-num",
"TargetType": "AverageValue",
"TargetValue": 5
}
]
},
"CronScalerConfig": {
"Enabled": true,
"Params": [
{
"Period": "1 * *",
"StartAt": "17:00",
"TargetReplicas": 10
}
]
}
}
{
"Response": {
"RequestId": "741e4e82-371d-48de-a843-867c69ff114d",
"Result": true
}
}
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 |
|---|---|
| AuthFailure | CAM signature/authentication error. |
| AuthFailure.UnauthorizedOperation | Unauthorized operation error. |
| FailedOperation | Operation failed. |
| FailedOperation.FailedOperation | Operation failed. |
| FailedOperation.InternalError | Operation failed. Internal error. |
| InternalError | Internal error. |
| InternalError.CamNoAuth | Insufficient permissions. |
| InternalError.CreateError | Create an internal error. |
| InternalError.DecodeError | Decoding error. |
| InternalError.InternalError | Internal service error. |
| InternalError.QueryError | Query internal error. |
| InternalError.UpdateError | Refresh internal error. |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.InvalidParameterValue | Invalid parameter value. |
| LimitExceeded | The quota limit is exceeded. |
| LimitExceeded.LimitExceeded | The parameter exceeds the limit. |
| ResourceNotFound | The resource does not exist. |
| ResourceNotFound.InstanceNotFound | The instance does not exist. |
| ResourceNotFound.ResourceNotFound | The resource does not exist. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback