tencent cloud

DescribeAutoScaleStrategies
Last updated: 2025-11-13 20:48:57
DescribeAutoScaleStrategies
Last updated: 2025-11-13 20:48:57

1. API Description

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

This API is used to access automatic scaling rules.

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: DescribeAutoScaleStrategies.
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.
GroupId No Integer Scaling group ID.

3. Output Parameters

Parameter Name Type Description
LoadAutoScaleStrategies Array of LoadAutoScaleStrategy Load-based scaling rules

Note: This field may return null, indicating that no valid values can be obtained.
TimeBasedAutoScaleStrategies Array of TimeAutoScaleStrategy Scaling rules by time

Note: This field may return null, indicating that no valid values can be obtained.
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 Obtaining Automatic Scaling Rules

Input Example

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

{
    "InstanceId": "emr-123",
    "GroupId": 0
}

Output Example

{
    "Response": {
        "LoadAutoScaleStrategies": [
            {
                "CalmDownTime": 60,
                "ConfigGroupAssigned": "",
                "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",
                "PeriodValid": "",
                "Priority": 3,
                "ProcessMethod": 3,
                "ScaleAction": 2,
                "ScaleNum": 2,
                "ServiceNodeInfo": null,
                "Soft": "yarn",
                "SoftDeployInfo": null,
                "StrategyId": 1521,
                "StrategyName": "Load-Based Scale-In",
                "StrategyStatus": 3,
                "Tags": [],
                "YarnNodeLabel": ""
            }
        ],
        "RequestId": "272c1c07-2840-44c8-8753-a761617f71fd",
        "TimeBasedAutoScaleStrategies": [
            {
                "CompensateFlag": 1,
                "ConfigGroupAssigned": "{\"HDFS-3.2.2\":-1,\"IMPALA-4.1.0\":-1,\"KYUUBI-1.6.0\":-1,\"TRINO-389\":-1,\"YARN-3.2.2\":-1}",
                "GraceDownFlag": false,
                "GraceDownTime": 0,
                "GroupId": 0,
                "IntervalTime": 300,
                "MaxUse": 0,
                "MeasureMethod": "INSTANCE",
                "Priority": 1,
                "RepeatStrategy": {
                    "DayRepeat": {
                        "ExecuteAtTimeOfDay": "08:30:00",
                        "Step": 1
                    },
                    "Expire": "2024-09-11 23:59:59",
                    "MonthRepeat": {
                        "DaysOfMonthRange": null,
                        "ExecuteAtTimeOfDay": ""
                    },
                    "NotRepeat": {
                        "ExecuteAt": ""
                    },
                    "RepeatType": "DAY",
                    "WeekRepeat": {
                        "DaysOfWeek": null,
                        "ExecuteAtTimeOfDay": ""
                    }
                },
                "RetryValidTime": 300,
                "ScaleAction": 1,
                "ScaleNum": 1,
                "ServiceNodeInfo": [
                    7
                ],
                "SoftDeployInfo": [
                    1,
                    2
                ],
                "StrategyId": 1274,
                "StrategyName": "Time-based Periodic Scale-Out",
                "StrategyStatus": 3,
                "Tags": [
                    {
                        "TagKey": "key09993",
                        "TagValue": "value1"
                    },
                    {
                        "TagKey": "key09991",
                        "TagValue": "value1"
                    }
                ],
                "TerminatePolicy": "DEFAULT"
            },
            {
                "CompensateFlag": 0,
                "ConfigGroupAssigned": "",
                "GraceDownFlag": true,
                "GraceDownTime": 180,
                "GroupId": 0,
                "IntervalTime": 60,
                "MaxUse": 0,
                "MeasureMethod": "INSTANCE",
                "Priority": 2,
                "RepeatStrategy": {
                    "DayRepeat": {
                        "ExecuteAtTimeOfDay": "09:30:00",
                        "Step": 1
                    },
                    "Expire": "2024-09-11 23:59:59",
                    "MonthRepeat": {
                        "DaysOfMonthRange": null,
                        "ExecuteAtTimeOfDay": ""
                    },
                    "NotRepeat": {
                        "ExecuteAt": ""
                    },
                    "RepeatType": "DAY",
                    "WeekRepeat": {
                        "DaysOfWeek": null,
                        "ExecuteAtTimeOfDay": ""
                    }
                },
                "RetryValidTime": 60,
                "ScaleAction": 2,
                "ScaleNum": 1,
                "ServiceNodeInfo": null,
                "SoftDeployInfo": null,
                "StrategyId": 1275,
                "StrategyName": "Time-based Periodic Scale-In - Enable Graceful Scale-In",
                "StrategyStatus": 3,
                "Tags": [],
                "TerminatePolicy": "DEFAULT"
            }
        ]
    }
}

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

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 An error occurred while calling another service API.
InternalError.WoodServerError An error occurred while calling another service API.
InvalidParameter.InvalidStrategyType Unsupported scaling policy type.
ResourceNotFound.InstanceNotFound The instance was not found.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback