Queries scaling rules. When you call this operation, you can specify the ID, name, or Alibaba Cloud Resource Name (ARN) of a scaling rule to query the details of the scaling rule. For example, you can query the adjustment method, instance warm-up period, and associated event-triggered tasks of the desired scaling rule.
Operation description
You can specify a scaling group ID to query all scaling rules in the scaling group. You can also specify the scaling rule ID, name, unique identifier, and type in the request parameters as filter conditions.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ess:DescribeScalingRules | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the scaling group to which the scaling rules that you want to query belong. | cn-qingdao |
PageNumber | integer | No | The page number. Pages start from page 1. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Maximum value: 50. Default value: 10. | 50 |
ScalingGroupId | string | No | The ID of the scaling group. | asg-bp1ffogfdauy0jw0**** |
ScalingRuleType | string | No | The type of the scaling rule. Valid values:
| SimpleScalingRule |
ShowAlarmRules | boolean | No | Specifies whether to return the event-triggered tasks that are associated with the scaling rule. Valid values:
Default value: false. | false |
ScalingRuleIds | array | No | The IDs of the scaling rules that you want to query. | |
string | No | The IDs of the scaling rules that you want to query. | asr-bp1dvirgwkoowxk7**** | |
ScalingRuleNames | array | No | The names of the scaling rules that you want to query. | |
string | No | The names of the scaling rules that you want to query. | scalingrule**** | |
ScalingRuleAris | array | No | The unique identifiers of the scaling rules that you want to query. | |
string | No | The unique identifiers of the scaling rules that you want to query. | ari:acs:ess:cn-hangzhou:140692647406****:scalingrule/asr-bp1dvirgwkoowxk7**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"PageNumber": 1,
"PageSize": 50,
"TotalCount": 1,
"ScalingRules": [
{
"MetricName": "CpuUtilization",
"AdjustmentType": "QuantityChangeInCapacity",
"InitialMaxSize": 100,
"EstimatedInstanceWarmup": 300,
"ScaleOutEvaluationCount": 3,
"PredictiveScalingMode": "PredictAndScale",
"MinAdjustmentMagnitude": 1,
"ScalingRuleAri": "ari:acs:ess:cn-hangzhou:140692647406****:scalingrule/asr-bp1dvirgwkoowxk7****",
"PredictiveTaskBufferTime": 30,
"MinSize": 1,
"ScalingGroupId": "asg-bp1ffogfdauy0jw0****",
"PredictiveValueBehavior": "MaxOverridePredictiveValue",
"TargetValue": 0.125,
"Cooldown": 20,
"MaxSize": 2,
"PredictiveValueBuffer": 50,
"ScalingRuleType": "SimpleScalingRule",
"AdjustmentValue": 1,
"ScaleInEvaluationCount": 15,
"DisableScaleIn": true,
"ScalingRuleName": "scalingrule****",
"ScalingRuleId": "asr-bp1dvirgwkoowxk7****",
"Alarms": [
{
"AlarmTaskId": "asg-bp18p2yfxow2dloq****_1f9458d1-70e1-4bee-8c7f-7a47695b****",
"ComparisonOperator": ">=",
"MetricName": "CpuUtilization",
"EvaluationCount": 3,
"AlarmTaskName": "alarmtask****",
"MetricType": "system",
"Threshold": 50,
"Statistics": "Average",
"Dimensions": [
{
"DimensionKey": "scaling_group",
"DimensionValue": "asg-bp18p2yfxow2dloq****"
}
]
}
],
"StepAdjustments": [
{
"MetricIntervalUpperBound": 5,
"ScalingAdjustment": 1,
"MetricIntervalLowerBound": 1
}
],
"AlarmDimensions": [
{
"DimensionKey": "rulePool",
"DimensionValue": "sgp-l1cbirz451yxu2dxxx"
}
],
"MetricType": "",
"HybridMonitorNamespace": "",
"HybridMetrics": [
{
"Id": "",
"Expression": "",
"MetricName": "",
"Statistic": "",
"Dimensions": [
{
"DimensionKey": "",
"DimensionValue": ""
}
]
}
]
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-13 | The response structure of the API has changed | View Change Details |
2023-04-03 | The response structure of the API has changed | View Change Details |