Modifies a scaling rule.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyScalingRule |
The operation that you want to perform. Set the value to ModifyScalingRule. |
ScalingRuleId | String | Yes | asr-bp1dvirgwkoowxk7**** |
The ID of the scaling rule that you want to modify. |
ScalingRuleName | String | No | scalingrule**** |
The name of the scaling rule. It must be 2 to 64 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter or a digit. The name of a scaling rule must be unique within the scaling group to which it belongs for an Alibaba Cloud account. |
Cooldown | Integer | No | 60 |
The cooldown time of the scaling rule. This parameter is valid only when the ScalingRuleType parameter is set to SimpleScalingRule. Valid values: 0 to 86,400. Unit: seconds. |
MinAdjustmentMagnitude | Integer | No | 1 |
The minimum value to scale by when the adjustment type is PercentChangeInCapacity. This parameter is valid only when the ScalingRuleType parameter is set to SimpleScalingRule or StepScalingRule and the AdjustmentType parameter is set to PercentChangeInCapacity. |
AdjustmentType | String | No | QuantityChangeInCapacity |
The adjustment method of the scaling rule. This parameter is valid and required only when the ScalingRuleType parameter is set to SimpleScalingRule or StepScalingRule. Valid values:
|
AdjustmentValue | Integer | No | 100 |
The adjustment value specified for the scaling rule. This parameter is valid and required only when the ScalingRuleType parameter is set to SimpleScalingRule or StepScalingRule. The number of ECS instances to be scaled in a single scaling activity cannot exceed 1,000.
|
EstimatedInstanceWarmup | Integer | No | 60 |
The warmup period of an ECS instance. This parameter is valid only when the ScalingRuleType parameter is set to TargetTrackingScalingRule or PredictiveScalingRule. Auto Scaling adds ECS instances that are in the warmup state to a scaling group but does not report monitoring data to CloudMonitor during the warmup period. Note Auto Scaling calculates the number of ECS instances to be scaled. ECS instances in
the warmup state are not counted towards the current capacity of the scaling group.
Valid values: 0 to 86,400. Unit: seconds. |
MetricName | String | No | CpuUtilization |
The predefined metric that you want to monitor. This parameter is valid and required only when the ScalingRuleType parameter is set to TargetTrackingScalingRule or PredictiveScalingRule. Valid values when the ScalingRuleType parameter is set to TargetTrackingScalingRule:
Valid values when the ScalingRuleType parameter is set to PredictiveScalingRule:
|
TargetValue | Float | No | 0.125 |
The target value. This parameter is valid only when the ScalingRuleType parameter is set to TargetTrackingScalingRule or PredictiveScalingRule. The value must be greater than 0 and can have a maximum of three decimal places. |
DisableScaleIn | Boolean | No | true |
Specifies whether to disable scale-in. This parameter is valid only when the ScalingRuleType parameter is set to TargetTrackingScalingRule. |
ScaleInEvaluationCount | Integer | No | 15 |
The number of consecutive times that the event-triggered task created for scale-in events meets 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. |
ScaleOutEvaluationCount | Integer | No | 3 |
The number of consecutive times that the event-triggered task created for scale-in events meets 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. |
PredictiveScalingMode | String | No | PredictAndScale |
The mode of the predictive scaling rule. Valid values:
|
PredictiveValueBehavior | String | No | MaxOverridePredictiveValue |
The action you want to take on the predicted maximum value. Valid values:
|
PredictiveValueBuffer | Integer | No | 50 |
The percentage of the increment to the predicted value when the PredictiveValueBehavior parameter is set to PredictiveValueOverrideMaxWithBuffer. If the predicted value increased by this percentage is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks. Valid values: 0 to 100. |
PredictiveTaskBufferTime | Integer | No | 30 |
The amount of buffer time specified before the prediction task is executed. By default, all scheduled tasks that are automatically created for a predictive scaling rule are executed on the hour. You can set a buffer time before prediction tasks are executed to allow resources to be prepared in advance. Valid values: 0 to 60. |
InitialMaxSize | Integer | No | 100 |
The maximum number of ECS instances in the scaling group. This parameter is used together with the PredictiveValueBehavior parameter. |
StepAdjustment.N.MetricIntervalUpperBound | Float | No | 5.0 |
The upper limit value specified in a step adjustment. This parameter is valid only when the ScalingRuleType parameter is set to StepScalingRule. Valid values: -9.999999E18 to 9.999999E18. |
StepAdjustment.N.ScalingAdjustment | Integer | No | 1 |
The specified number of ECS instances to be scaled in a step adjustment. This parameter is valid only when the ScalingRuleType parameter is set to StepScalingRule. |
StepAdjustment.N.MetricIntervalLowerBound | Float | No | 1.0 |
The lower limit value specified in a step adjustment. This parameter is valid only when the ScalingRuleType parameter is set to StepScalingRule. Valid values: -9.999999E18 to 9.999999E18. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
Examples
Sample requests
https://ess.aliyuncs.com/?Action=ModifyScalingRule
&ScalingRuleId=asg-bp1ffogfdauy0jw0****
&AdjustmentType=QuantityChangeInCapacity
&AdjustmentValue=-10
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyScalingRuleResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</ModifyScalingRuleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
For a list of error codes, visit the API Error Center.
HTTP status code |
Error code |
Error message |
Description |
---|---|---|---|
404 |
InvalidScalingRuleId.NotFound |
The specified scaling rule does not exist. |
The error message returned because the specified scaling rule does not exist in the current account. |
400 |
InvalidScalingRuleName.Duplicate |
The specified value of parameter <parameter name> is duplicated. |
The error message returned because the scaling rule name already exists. |
400 |
QuotaExceeded.ScalingRule |
Scaling rule quota exceeded in the specified scaling group. |
The error message returned because the maximum number of scaling rules in the specified scaling group has been reached. |
400 |
TargetTrackingScalingRule.UnsupportedMetric |
Specific metric is not supported for target tracking scaling rule. |
The error message returned because target tracking scaling rules do not support the specified monitoring metric. |
400 |
TargetTrackingScalingRule.DumplicateMetric |
Only one TargetTrackingScaling rule for a given metric specification is allowed. |
The error message returned because the monitoring metric is already specified for a target tracking scaling rule in the scaling group. |
400 |
InvalidMinAdjustmentMagnitudeMismatchAdjustmentType |
MinAdjustmentMagnitude is not supported by the specified adjustment type. |
The error message returned because the MinAdjustmentMagnitude parameter cannot be applied to the specified adjustment method of the scaling rule. |
400 |
InvalidStepAdjustments.MultipleNullUpperBound |
At most one StepAdjustment may have an unspecified upper bound. |
The error message returned because a step adjustment without an upper limit value already exists. |
400 |
InvalidStepAdjustments.MultipleNullLowerBound |
At most one StepAdjustment may have an unspecified lower bound. |
The error message returned because a step adjustment without a lower limit value already exists. |
400 |
InvalidStepAdjustments.NoNullLowerBound |
There must be a StepAdjustment with an unspecified lower bound when one StepAdjustment has a negative lower bound. |
The error message returned because the lower limit value of a step adjustment is negative but a different step adjustment without a lower limit value does not exist. |
400 |
InvalidStepAdjustments.NoNullUpperBound |
There must be a StepAdjustment with an unspecified upper bound when one StepAdjustment has a positive upper bound. |
The error message returned because the upper limit value of a step adjustment is positive but a different step adjustment without an upper limit value does not exist. |
400 |
InvalidStepAdjustments.Gap |
StepAdjustment intervals can not have gaps between them. |
The error message returned because the specified ranges of step adjustments have gaps between them. |
400 |
InvalidStepAdjustments.Overlap |
StepAdjustment intervals can not overlap. |
The error message returned because the specified ranges of step adjustments overlap. |
400 |
InvalidStepAdjustments.LowerGtUpper |
LowerBound must be less than the UpperBound for StepAdjustment :%s. |
The error message returned because the lower limit value of a step adjustment is greater than or equal to the upper limit value. |
400 |
InvalidStepAdjustments.BothNull |
Both lower and upper bounds of a StepAdjustment can not be left unspecified. |
The error message returned because the upper limit value or the lower limit value for a step adjustment must be specified. |
400 |
InvalidStepAdjustments.MaxNum |
Your scaling rule can have at most %s StepAdjustments. |
The error message returned because the maximum number of step adjustments in a scaling group has been reached. |
400 |
StepBeyondPermitRange |
Specific parameter "%s" beyond permit range. |
The error message returned because the specified upper limit value or lower limit value of a step adjustment is invalid. |