Domain name for API request: emr.intl.tencentcloudapi.com.
This API is used to modify an automatic scaling rule.
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: ModifyAutoScaleStrategy. |
| Version | Yes | String | Common Params. The value used for this API: 2019-01-03. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | Instance ID. |
| StrategyType | Yes | Integer | Automatic scaling rule type. Valid values: 1 (scaling by load metric) and 2 (scaling by time). |
| LoadAutoScaleStrategies.N | No | Array of LoadAutoScaleStrategy | Metric for load-based scaling. |
| TimeAutoScaleStrategies.N | No | Array of TimeAutoScaleStrategy | Time-based scaling rule. |
| GroupId | No | Integer | Scaling group ID. |
| 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. |
This example shows you how to modify a scaling rule.
POST / HTTP/1.1
Host: emr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyAutoScaleStrategy
<Common request parameters>
{
"InstanceId": "emr-123",
"StrategyType": 0,
"LoadAutoScaleStrategies": [
{
"CalmDownTime": 60,
"GraceDownFlag": false,
"GraceDownTime": 0,
"GroupId": 0,
"LoadMetricsConditions": {
"LoadMetrics": [
{
"Conditions": [
{
"CompareMethod": 1,
"Threshold": 16
}
],
"LoadMetrics": "AvailableVCores#root.default",
"MetricId": 1,
"StatisticPeriod": 60,
"TriggerThreshold": 1
}
]
},
"MeasureMethod": "INSTANCE",
"Priority": 3,
"ProcessMethod": 3,
"ScaleAction": 2,
"ScaleNum": 2,
"Soft": "yarn",
"StrategyId": 1521,
"StrategyName": "Load-based scale-in",
"StrategyStatus": 3
}
],
"TimeAutoScaleStrategies": [
{
"CompensateFlag": 1,
"ConfigGroupAssigned": "{\"HDFS-2.8.5\":-1,\"YARN-2.8.5\":-1}",
"GraceDownFlag": false,
"GraceDownTime": 0,
"GroupId": 0,
"IntervalTime": 0,
"MaxUse": 8,
"MeasureMethod": "INSTANCE",
"Priority": 2,
"RepeatStrategy": {
"Expire": "2025-11-05 23:59:59",
"NotRepeat": {
"ExecuteAt": "2024-11-06 09:10:00"
},
"RepeatType": "NONE"
},
"RetryValidTime": 60,
"ScaleAction": 1,
"ScaleNum": 6,
"ServiceNodeInfo": [
7
],
"SoftDeployInfo": [
1,
2
],
"StrategyId": 1783,
"StrategyName": "Test near-real-time task scale-out.",
"StrategyStatus": 3,
"Tags": [
{
"TagKey": "group",
"TagValue": "data"
}
],
"TerminatePolicy": "TIMING"
}
]
}
{
"Response": {
"RequestId": "8833a2df-1487-4f78-89b6-eff26058a240"
}
}
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 | Operation failed. |
| InternalError.CamCgwError | Internal service call exception. |
| InvalidParameter.InvalidStatisticPeriodOrTriggerThreshold | Invalid StatisticPeriod or TriggerThreshold parameter. |
| InvalidParameter.InvalidStrategy | Parameter error. |
| InvalidParameter.InvalidStrategyPriority | Invalid rule priority. |
| InvalidParameter.InvalidStrategySpec | Invalid specifications. |
| InvalidParameter.InvalidStrategyType | Unsupported scaling policy type. |
| InvalidParameter.InvalidTimeLayout | Parameter error. |
| InvalidParameter.RepeatedExecutionTime | Duplicate execution time. |
| InvalidParameter.RepeatedStrategyName | Duplicate scaling rule name. |
| ResourceNotFound.StrategyNotFound | Corresponding scaling rules are not found. |
| UnauthorizedOperation.CheckCamAuth | No permission to verify account operations. |
文档反馈