Queries the scaling rules in a scaling group and returns information about the scaling rules.
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 of the scaling rule list. Minimum value: 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page for paging queries. Settings: 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 CloudMonitor event-triggered tasks associated with the scaling rules. Valid values:
Default value: false. |
false |
| ScalingRuleId |
array |
No |
The ID of scaling rule N that you want to query. Valid values of N: 1 to 10. |
asr-bp1dvirgwkoowxk7**** |
|
string |
No |
The ID of scaling rule N that you want to query. Valid values of N: 1 to 10. |
asr-bp1dvirgwkoowxk7**** |
|
| ScalingRuleName |
array |
No |
The name of scaling rule N that you want to query. Valid values of N: 1 to 10. |
scalingrule**** |
|
string |
No |
The name of scaling rule N that you want to query. Valid values of N: 1 to 10. |
scalingrule**** |
|
| ScalingRuleAri |
array |
No |
The unique identifier of scaling rule N that you want to query. Valid values of N: 1 to 10. |
ari:acs:ess:cn-hangzhou:140692647406****:scalingrule/asr-bp1dvirgwkoowxk7**** |
|
string |
No |
The unique identifier of scaling rule N that you want to query. Valid values of N: 1 to 10. |
ari:acs:ess:cn-hangzhou:140692647406****:scalingrule/asr-bp1dvirgwkoowxk7**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| PageNumber |
integer |
The current page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
50 |
| TotalCount |
integer |
The total number of scaling rules. |
1 |
| ScalingRules |
object |
||
| ScalingRule |
array<object> |
The collection of scaling rule information. |
|
|
array<object> |
The collection of scaling rule information. |
||
| MetricName |
string |
The predefined metric of the scaling rule. If you set ScalingRuleType to TargetTrackingScalingRule or PredictiveScalingRule, you must specify this parameter. Valid values if ScalingRuleType is set to TargetTrackingScalingRule:
|
CpuUtilization |
| AdjustmentType |
string |
The adjustment method of the scaling rule. Valid values:
|
QuantityChangeInCapacity |
| InitialMaxSize |
integer |
The maximum number of ECS instances that can be added to the scaling group. If you specify InitialMaxSize, you must also specify PredictiveValueBehavior. |
100 |
| EstimatedInstanceWarmup |
integer |
The warmup period of an ECS instance. |
300 |
| ScaleOutEvaluationCount |
integer |
The number of consecutive times that the event-triggered task created for scale-outs 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 target tracking scaling 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 |
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 the prediction task runs. By default, all prediction tasks that are automatically created by a predictive scaling rule run on the hour. You can specify a buffer time to run prediction tasks and prepare resources in advance. Valid values: 0 to 60. Unit: minutes. |
30 |
| MinSize |
integer |
The minimum number of ECS instances that the scaling group must contain. |
1 |
| ScalingGroupId |
string |
The ID of the scaling group whose scaling rules are queried. |
asg-bp1ffogfdauy0jw0**** |
| PredictiveValueBehavior |
string |
The action on the predicted maximum value. Valid values:
|
MaxOverridePredictiveValue |
| TargetValue |
number |
The target value. |
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 the scaling group can contain. |
2 |
| PredictiveValueBuffer |
integer |
The ratio based on which the predicted value is increased if you set PredictiveValueBehavior to PredictiveValueOverrideMaxWithBuffer. If the predicted value that is 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 need to be scaled based on the scaling rule. |
1 |
| ScaleInEvaluationCount |
integer |
The number of consecutive times that the event-triggered task created for scale-ins 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 target tracking scaling rule. |
15 |
| DisableScaleIn |
boolean |
Indicates whether to disable scale-in. 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 |
object |
||
| Alarm |
array<object> |
The event-triggered tasks that are associated with the scaling rule. This parameter is returned only if you set ShowAlarmRules to true. Otherwise, an empty list is returned. |
|
|
array<object> |
The CloudMonitor event-triggered tasks associated with the scaling rule. The CloudMonitor event-triggered tasks associated with the scaling rule are returned only when the ShowAlarmRules parameter is set to true; otherwise, an empty list 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 event-triggered task that is associated with the scaling rule. The comparison operator indicates the relationship in which the metric value and the metric threshold can meet the alert condition.
|
>= |
| MetricName |
string |
The name of the metric in the event-triggered task that is associated with the scaling rule. |
CpuUtilization |
| EvaluationCount |
integer |
The number of consecutive times that the event-triggered task that is associated with the scaling rule 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 in the event-triggered task that is associated with the scaling rule. Valid values:
|
system |
| Threshold |
number |
The threshold of the metric in 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 |
object |
||
| Dimension |
array<object> |
The dimensions of the event-triggered task that is associated with the scaling rule. |
|
|
object |
The dimension information of the event-triggered task associated with the scaling rule. |
||
| DimensionKey |
string |
The dimension key of the event-triggered task that is associated with the scaling rule. Valid values:
|
scaling_group |
| DimensionValue |
string |
The dimension value of the event-triggered task that is associated with the scaling rule. |
asg-bp18p2yfxow2dloq**** |
| Period |
integer |
The epoch for collecting metric data in a target tracking rule. |
60 |
| StepAdjustments |
object |
||
| StepAdjustment |
array<object> |
The step adjustments of the step scaling rule. |
|
|
object |
The upper limit that is specified in a step adjustment. Valid values: -9.999999E18 to 9.999999E18. |
||
| MetricIntervalUpperBound |
number |
The number of ECS instances that are scaled in a step adjustment. |
5.0 |
| ScalingAdjustment |
integer |
The lower limit that is specified in a step adjustment. Valid values: -9.999999E18 to 9.999999E18. |
1 |
| MetricIntervalLowerBound |
number |
auditing |
1.0 |
| AlarmDimensions |
object |
||
| AlarmDimension |
array<object> |
The dimension information associated with the metric. This applies to target tracking rules and is set when the metric requires additional dimension information. For example, the |
|
|
object |
The dimension information associated with the metric. This applies to target tracking rules and is set when the metric requires additional dimension information. For example, the |
||
| DimensionKey |
string |
The key of the dimension associated with the metric. |
rulePool |
| DimensionValue |
string |
The value of the dimension associated with the metric. |
sgp-l1cbirz451yxu2**** |
| MetricType |
string |
The type of metric. Valid values:
|
system |
| HybridMonitorNamespace |
string |
The ID of the Hybrid Cloud Monitoring metric repository. For information about managing metric repositories, see Manage metric repositories. |
aliyun-test |
| HybridMetrics |
object |
||
| HybridMetric |
array<object> |
Settings for Hybrid Cloud Monitoring metrics. For more information about how to configure these settings, see Use formulas to create custom target tracking rules. |
|
|
array<object> |
|||
| Id |
string |
Reference ID of the Metric in the metric expression. |
a |
| Expression |
string |
An expression for arithmetic operations on multiple Hybrid Cloud Monitoring metrics. The result of this expression is used to trigger scale-out or scale-in. The expression must comply with the Reverse Polish Notation (RPN) specification, and the supported operators are |
(a+b)/2 |
| MetricName |
string |
The metric name in the Hybrid Cloud Monitoring metric repository. |
AliyunSmq_NumberOfMessagesVisible |
| Statistic |
string |
The statistic method of the metric. Valid values:
|
Average |
| Dimensions |
object |
||
| Dimension |
array<object> |
The metric dimensions. Used to specify the resources monitored by the metric. |
|
|
object |
|||
| DimensionKey |
string |
Metric dimension key. |
queue |
| DimensionValue |
string |
Metric dimension value. |
testQueue |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"PageNumber": 1,
"PageSize": 50,
"TotalCount": 1,
"ScalingRules": {
"ScalingRule": [
{
"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": {
"Alarm": [
{
"AlarmTaskId": "asg-bp18p2yfxow2dloq****_1f9458d1-70e1-4bee-8c7f-7a47695b****",
"ComparisonOperator": ">=",
"MetricName": "CpuUtilization",
"EvaluationCount": 3,
"AlarmTaskName": "alarmtask****",
"MetricType": "system",
"Threshold": 50,
"Statistics": "Average",
"Dimensions": {
"Dimension": [
{
"DimensionKey": "scaling_group",
"DimensionValue": "asg-bp18p2yfxow2dloq****"
}
]
},
"Period": 60
}
]
},
"StepAdjustments": {
"StepAdjustment": [
{
"MetricIntervalUpperBound": 5,
"ScalingAdjustment": 1,
"MetricIntervalLowerBound": 1
}
]
},
"AlarmDimensions": {
"AlarmDimension": [
{
"DimensionKey": "rulePool",
"DimensionValue": "sgp-l1cbirz451yxu2****"
}
]
},
"MetricType": "system",
"HybridMonitorNamespace": "aliyun-test",
"HybridMetrics": {
"HybridMetric": [
{
"Id": "a",
"Expression": "(a+b)/2",
"MetricName": "AliyunSmq_NumberOfMessagesVisible",
"Statistic": "Average",
"Dimensions": {
"Dimension": [
{
"DimensionKey": "queue",
"DimensionValue": "testQueue"
}
]
}
}
]
}
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.