Modify a scaling rule

Last Updated: May 11, 2017

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.

Return 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.

Error code

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

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

Example

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

XML format:

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

JSON format:

  1. "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  2. "ScalingRuleId": "eMKWG8SRNb9dBLAjweNI1Ik",
  3. "ScalingRuleAri":"ari:acs:ess:cn-qingdao:1344371:scalingrule/eMKWG8SRNb9dBLAjweNI1Ik"
Thank you! We've received your feedback.