Modifies one or more attributes of a scaling rule. If an existing scaling rule no longer meets your requirements, you can call this operation to modify its attributes instead of creating a new one. This avoids unnecessary repetitive operations and saves time and resources.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:ModifyScalingRule |
update |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ScalingRuleId |
string |
Yes |
The ID of the scaling rule that you want to modify. |
asr-bp1dvirgwkoowxk7**** |
| ScalingRuleName |
string |
No |
The name of the scaling rule. The name must be 2 to 64 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter or digit. The scaling rule name must be unique within a scaling group in a region for an Alibaba Cloud account. |
scalingrule**** |
| Cooldown |
integer |
No |
The cooldown time of the scaling rule. This parameter is applicable only to simple scaling rules. Valid values: 0 to 86400. Unit: seconds. |
60 |
| MinAdjustmentMagnitude |
integer |
No |
The minimum number of instances to adjust. This parameter takes effect only when the scaling rule type is SimpleScalingRule or StepScalingRule and |
1 |
| AdjustmentType |
string |
No |
The adjustment method of the scaling rule. This parameter is required and applicable only to simple scaling rules and step scaling rules. Valid values:
|
QuantityChangeInCapacity |
| AdjustmentValue |
integer |
No |
The adjustment value of the scaling rule. This parameter is required and applicable only to simple scaling rules and step scaling rules. The number of ECS instances adjusted in a single operation cannot exceed 1,000. Valid values vary based on the adjustment method:
|
100 |
| EstimatedInstanceWarmup |
integer |
No |
The warmup period of instances. This parameter is applicable to target tracking scaling rules and step scaling rules. ECS instances in the warmup state are added to the scaling group as usual, but they do not report monitoring data to CloudMonitor during the warmup period. Note
When the system dynamically calculates the number of ECS instances to scale out or scale in, instances in the warmup state are not counted as existing instances. Valid values: 0 to 86400. Unit: seconds. |
60 |
| MetricName |
string |
No |
The predefined monitoring metric. This parameter is required and applicable to target tracking scaling rules and predictive scaling rules. Valid values for target tracking scaling rules:
Valid values for predictive scaling rules:
For more information, see System monitoring event-triggered tasks. |
CpuUtilization |
| TargetValue |
number |
No |
The target value. This parameter is applicable to target tracking scaling rules and predictive scaling rules. The value can have up to three decimal places and must be greater than 0. |
0.125 |
| DisableScaleIn |
boolean |
No |
Specifies whether to disable scale-in. This parameter is applicable only to target tracking scaling rules. |
true |
| ScaleInEvaluationCount |
integer |
No |
After a target tracking scaling rule is created, an event-triggered task is automatically created. This parameter specifies the number of consecutive times that the threshold condition must be met before the scale-in event-triggered task triggers an alert. |
15 |
| ScaleOutEvaluationCount |
integer |
No |
After a target tracking scaling rule is created, an event-triggered task is automatically created. This parameter specifies the number of consecutive times that the threshold condition must be met before the scale-out event-triggered task triggers an alert. |
3 |
| PredictiveScalingMode |
string |
No |
The mode of the predictive scaling rule. Valid values:
|
PredictAndScale |
| PredictiveValueBehavior |
string |
No |
The method to handle the maximum value for the predictive scaling rule. Valid values:
|
MaxOverridePredictiveValue |
| PredictiveValueBuffer |
integer |
No |
The buffer ratio added to the predicted value. This parameter takes effect only when |
50 |
| PredictiveTaskBufferTime |
integer |
No |
By default, predictive tasks automatically created by predictive scaling rules are executed on the hour. You can set a pre-start time to execute the predictive tasks in advance and prepare resources. Valid values: 0 to 60. Unit: minutes. |
30 |
| InitialMaxSize |
integer |
No |
The maximum number of instances in the scaling group. This parameter is used together with |
100 |
| StepAdjustments |
array<object> |
No |
The set of instance scaling configurations for step adjustments. |
|
|
object |
No |
The set of instance scaling configurations for step adjustments. |
||
| MetricIntervalUpperBound |
number |
No |
The upper boundary of the step adjustment. This parameter is applicable only to step scaling rules. Valid values: -9.999999E18 to 9.999999E18. |
5.0 |
| ScalingAdjustment |
integer |
No |
The number of instances to adjust for the step adjustment. This parameter is applicable only to step scaling rules. |
1 |
| MetricIntervalLowerBound |
number |
No |
The lower boundary of the step adjustment. This parameter is applicable only to step scaling rules. Valid values: -9.999999E18 to 9.999999E18. |
1.0 |
| AlarmDimensions |
array<object> |
No |
The dimension values of the monitoring metric. This parameter is applicable to target tracking scaling rules and is configured when the monitoring metric requires additional dimension information. For example, the LoadBalancerRealServerAverageQps metric requires the rulePool dimension. |
|
|
object |
No |
The dimension values of the monitoring metric. This parameter is applicable to target tracking scaling rules and is configured when the monitoring metric requires additional dimension information. For example, the LoadBalancerRealServerAverageQps metric requires the rulePool dimension. |
||
| DimensionKey |
string |
No |
The key of the dimension associated with the monitoring metric. |
rulePool |
| DimensionValue |
string |
No |
The value of the dimension associated with the monitoring metric. |
sgp-l1cbirz451yxu2dxxx |
| MetricType |
string |
No |
The type of the monitoring metric. Valid values:
|
system |
| HybridMonitorNamespace |
string |
No |
The ID of the Hybrid Cloud Monitoring monitoring metrics repository. For more information about how to manage monitoring metrics repositories, see Manage monitoring metrics repositories. |
aliyun-test |
| HybridMetrics |
array<object> |
No |
The Hybrid Cloud Monitoring monitoring metrics settings. For more information about how to configure the settings, see Use formula operations to customize target tracking scaling rules. |
|
|
array<object> |
No |
|||
| Id |
string |
No |
The reference ID of the metric in the metric operation expression. |
a |
| Expression |
string |
No |
The metric operation expression for multiple Hybrid Cloud Monitoring metrics. The calculation result of the expression is used to trigger scaling activities. The operation expression must comply with the Reverse Polish Notation (RPN) specification, and only the |
(a+b)/2 |
| MetricName |
string |
No |
The name of the metric in the Hybrid Cloud Monitoring monitoring metrics repository. |
AliyunSmq_NumberOfMessagesVisible |
| Statistic |
string |
No |
The statistical method of the metric. Valid values:
|
Average |
| Dimensions |
array<object> |
No |
The dimensions of the metric. This parameter is used to specify the resources monitored by the metric. |
|
|
object |
No |
|||
| DimensionKey |
string |
No |
The key of the metric dimension. |
queue |
| DimensionValue |
string |
No |
The value of the metric dimension. |
testQueue |
| AlarmOptions |
object |
No |
The alert attributes. |
|
| Period |
integer |
No |
The period for collecting monitoring metric data in the target tracking scaling rule. Unit: seconds. Valid values:
Note
Default value: 60. |
60 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response information for modifying a scaling rule. |
||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.