Queries scaling rules and their details, such as adjustment method, instance warm-up period, and associated event-triggered tasks. You can filter results by scaling rule ID, name, or Alibaba Cloud Resource Name (ARN).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:DescribeScalingRules |
get |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the scaling group to which the scaling rules 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 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 elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| PageNumber |
integer |
The page number of the returned page. |
1 |
| PageSize |
integer |
The number of entries returned per page. |
50 |
| TotalCount |
integer |
The total number of scaling rules. |
1 |
| ScalingRules |
array<object> |
The scaling rules. |
|
|
array<object> |
The scaling rule. |
||
| MetricName |
string |
The name of the metric of the event-triggered task that is associated with the scaling rule. |
CpuUtilization |
| AdjustmentType |
string |
The adjustment method of the scaling rule. Valid values:
|
QuantityChangeInCapacity |
| InitialMaxSize |
integer |
The maximum number of ECS instances that can be contained in the scaling group. If you specify this parameter, you must also specify PredictiveValueBehavior. |
100 |
| EstimatedInstanceWarmup |
integer |
The warm-up period of instances. During this period, newly created instances undergo preparation, and their performance metrics are excluded from the monitoring range. |
300 |
| ScaleOutEvaluationCount |
integer |
The number of consecutive times that the event-triggered task created for scale-out purposes must meet the threshold conditions before an alert is triggered. After a target tracking scaling rule is created, an event-triggered task is automatically created and associated with the rule. |
3 |
| PredictiveScalingMode |
string |
The mode of the predictive scaling rule. Valid values:
|
PredictAndScale |
| MinAdjustmentMagnitude |
integer |
The minimum number of instances that must be scaled. This parameter takes effect only if you set ScalingRuleType to SimpleScalingRule or StepScalingRule and set AdjustmentType to PercentChangeInCapacity. |
1 |
| ScalingRuleAri |
string |
The unique identifier of the scaling rule. |
ari:acs:ess:cn-hangzhou:140692647406****:scalingrule/asr-bp1dvirgwkoowxk7**** |
| PredictiveTaskBufferTime |
integer |
The amount of buffer time before prediction tasks are executed. By default, all prediction tasks that are automatically created based on a predictive scaling rule are executed on the hour. You can specify a buffer time for resource preparation before prediction tasks are executed. Valid values: 0 to 60. Unit: minutes. |
30 |
| MinSize |
integer |
The minimum number of ECS instances that must be contained in the scaling group. |
1 |
| ScalingGroupId |
string |
The ID of the scaling group. |
asg-bp1ffogfdauy0jw0**** |
| PredictiveValueBehavior |
string |
The action on the predicted maximum value. Valid values:
|
MaxOverridePredictiveValue |
| TargetValue |
number |
The target value of the metric. If you set ScalingRuleType to TargetTrackingScalingRule or PredictiveScalingRule, Auto Scaling keeps the metric value close to the target value by adding instances to or removing instances from the scaling group. |
0.125 |
| Cooldown |
integer |
The cooldown period of the scaling rule. This parameter is available only if you set ScalingRuleType to SimpleScalingRule. Valid values: 0 to 86400. Unit: seconds. |
20 |
| MaxSize |
integer |
The maximum number of ECS instances that can be contained in the scaling group. |
2 |
| PredictiveValueBuffer |
integer |
The ratio based on which the predicted value is increased when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer. If the predicted value increased by this ratio is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks. Valid values: 0 to 100. |
50 |
| ScalingRuleType |
string |
The type of the scaling rule. Valid values:
|
SimpleScalingRule |
| AdjustmentValue |
integer |
The number of instances that must be scaled based on the scaling rule. |
1 |
| ScaleInEvaluationCount |
integer |
The number of consecutive times that the event-triggered task for scale-in purposes must meet the threshold conditions before an alert is triggered. After a target tracking scaling rule is created, an event-triggered task is automatically created and associated with the rule. |
15 |
| DisableScaleIn |
boolean |
Indicates whether scale-in is disabled. This parameter takes effect only if you set ScalingRuleType to TargetTrackingScalingRule. Valid values:
|
true |
| ScalingRuleName |
string |
The name of the scaling rule. |
scalingrule**** |
| ScalingRuleId |
string |
The ID of the scaling rule. |
asr-bp1dvirgwkoowxk7**** |
| Alarms |
array<object> |
The event-triggered tasks associated with the scaling rule. Returned only if ShowAlarmRules is set to true. Otherwise, null is returned. |
|
|
array<object> |
The event-triggered task associated with the scaling rule. Returned only if ShowAlarmRules is set to true. Otherwise, null is returned. |
||
| AlarmTaskId |
string |
The ID of the event-triggered task that is associated with the scaling rule. |
asg-bp18p2yfxow2dloq****_1f9458d1-70e1-4bee-8c7f-7a47695b**** |
| ComparisonOperator |
string |
The comparison operator between the statistical value and the threshold of the metric in the associated event-triggered task. It indicates the relationship that must be met to trigger an alert.
|
>= |
| MetricName |
string |
The name of the metric of the event-triggered task that is associated with the scaling rule. |
CpuUtilization |
| EvaluationCount |
integer |
The number of consecutive times the associated event-triggered task must meet the alert condition before an alert is triggered. |
3 |
| AlarmTaskName |
string |
The name of the event-triggered task that is associated with the scaling rule. |
alarmtask**** |
| MetricType |
string |
The type of the metric of the event-triggered task that is associated with the scaling rule. Valid values:
|
system |
| Threshold |
number |
The alert threshold of the event-triggered task that is associated with the scaling rule. |
50 |
| Statistics |
string |
The statistical method of the event-triggered task that is associated with the scaling rule. Valid values:
|
Average |
| Dimensions |
array<object> |
The dimensions of the event-triggered task that is associated with the scaling rule. |
|
|
object |
The dimensions of the event-triggered task that is associated with the scaling rule. |
||
| DimensionKey |
string |
The key of the dimension that is associated with the metric. Valid values:
|
scaling_group |
| DimensionValue |
string |
The value of the dimension that is associated with the metric. |
asg-bp18p2yfxow2dloq**** |
| Period |
integer |
The statistical period of the metric data in the target tracking scaling rule. |
60 |
| StepAdjustments |
array<object> |
The step adjustments of the step scaling rule. |
|
|
object |
The step adjustments of the step scaling rule. |
||
| MetricIntervalUpperBound |
number |
The upper limit of a step adjustment. Valid values: -9.999999E18 to 9.999999E18. |
5.0 |
| ScalingAdjustment |
integer |
The number of ECS instances that are scaled in a step adjustment. |
1 |
| MetricIntervalLowerBound |
number |
The lower limit of a step adjustment. Valid values: -9.999999E18 to 9.999999E18. |
1.0 |
| AlarmDimensions |
array<object> |
The dimensions. Applicable to target tracking scaling rules when your predefined metric requires extra dimensions. For example, if you predefine the LoadBalancerRealServerAverageQps metric, you must use this parameter to specify the rulePool dimension. |
|
|
object |
|||
| DimensionKey |
string |
The dimension key of the metric. |
rulePool |
| DimensionValue |
string |
The dimension value of the metric. |
sgp-l1cbirz451yxu2dxxx |
| MetricType |
string |
The metric type. Valid values:
|
system |
| HybridMonitorNamespace |
string |
The ID of the Hybrid Cloud Monitoring namespace. For information about how to manage Hybrid Cloud Monitoring namespaces, see Manage namespaces. |
aliyun-test |
| HybridMetrics |
array<object> |
The Hybrid Cloud Monitoring metrics. For more information, see Create a custom target tracking scaling rule. |
|
|
array<object> |
|||
| Id |
string |
The reference ID of the metric in the metric expression. |
a |
| Expression |
string |
The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. The calculated result is used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and supports only the following operators: |
(a+b)/2 |
| MetricName |
string |
The name of the Hybrid Cloud Monitoring metric. |
AliyunSmq_NumberOfMessagesVisible |
| Statistic |
string |
The statistical method of the metric value. Valid values:
|
Average |
| Dimensions |
array<object> |
The metric dimensions. Used to specify the monitored resources. |
|
|
object |
|||
| DimensionKey |
string |
The key of the metric dimension. |
queue |
| DimensionValue |
string |
The key of the metric dimension. |
testQueue |
Examples
Success response
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****"
}
],
"Period": 60
}
],
"StepAdjustments": [
{
"MetricIntervalUpperBound": 5,
"ScalingAdjustment": 1,
"MetricIntervalLowerBound": 1
}
],
"AlarmDimensions": [
{
"DimensionKey": "rulePool",
"DimensionValue": "sgp-l1cbirz451yxu2dxxx"
}
],
"MetricType": "system",
"HybridMonitorNamespace": "aliyun-test",
"HybridMetrics": [
{
"Id": "a",
"Expression": "(a+b)/2",
"MetricName": "AliyunSmq_NumberOfMessagesVisible",
"Statistic": "Average",
"Dimensions": [
{
"DimensionKey": "queue",
"DimensionValue": "testQueue"
}
]
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.