edit-icon download-icon

ModifyScalingRule

Last Updated: Jun 05, 2018

Description

Modifies the attributes of a scaling rule.

Request parameters

Name Type Required? Description
Action String Yes Operation interface, required. The parameter value is ModifyScalingRule.
ScalingRuleId String Yes ID of a scaling rule.
AdjustmentType String No Adjustment mode of a scaling rule. Optional values:
- QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances.
- PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances.
- TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.
AdjustmentValue Integer No Adjusted value of a scaling rule. Value range:
- QuantityChangeInCapacity: (0, 100] U [-100, 0)
- PercentChangeInCapacity: [0, 10,000] U [-10,000, 0]
- TotalCapacity: [0, 100]
ScalingRuleName String No Name shown for the scaling group, which is a string containing 2 to 40 English or Chinese characters. It must begin with a number, a letter (case-insensitive) or a Chinese character and can contain numbers, “_“, “-“ or “.”.
The account name in the same scaling group is unique in the same region. If this parameter value is not specified, the default value is ScalingRuleId.
Cooldown Integer No Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty.

Response parameters

Name Type Description
ScalingRuleId String ID of a scaling rule, generated by the system and globally unique.
ScalingRuleAri String Unique identifier of a scaling rule.

Example

Request example

  1. http://ess.aliyuncs.com/?Action=CreateScalingRule
  2. &ScalingGroupId=AG6CQdPU8OKdwLjgZcJ2eaQ
  3. &AdjustmentType=QuantityChangeInCapacity
  4. &AdjustmentValue=-10
  5. &<Common Request Parameters>

Response example

XML format

  1. <ModifyScalingRuleResponse>
  2. <ScalingRuleAri>ari:acs:ess:cn-qingdao:1344371:scalingrule/eMKWG8SRNb9dBLAjweNI1Ik</ScalingRuleAri>
  3. <ScalingRuleId>eMKWG8SRNb9dBLAjweNI1Ik</ScalingRuleId>
  4. <RequestId>570C84F4-A434-488A-AFA1-1E3213682B33</RequestId>
  5. </ModifyScalingRuleResponse>

JSON format

  1. {
  2. "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  3. "ScalingRuleId": "eMKWG8SRNb9dBLAjweNI1Ik",
  4. "ScalingRuleAri":"ari:acs:ess:cn-qingdao:1344371:scalingrule/eMKWG8SRNb9dBLAjweNI1Ik"
  5. }

Error codes

For errors common to all interfaces, refer to the Client Error Table or Server Error Table.

Error code Error message HTTP status code Description
InvalidScalingGroupId.NotFound The specified scaling group does not exist. 404 The specified scaling group does not exist in this account.
InvalidScalingRuleName.Duplicate The specified value of parameter <parameter name> is duplicated. 400 The scaling rule name already exists
Scaling rule quota exceeded in the specified scaling group. 400 Scaling rule quantity exceeds the upper limit for a user to use QuotaExceeded.ScalingRule
Thank you! We've received your feedback.