This topic describes how to modify a scaling rule using the API.


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. The number of ECS instances that are increased or decreased at a time cannot exceed 500. Value range:
  • QuantityChangeInCapacity: [-500, 500]
  • PercentChangeInCapacity: [-100, 10000]
  • TotalCapacity: [0, 1000]
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.


Request example

Http:// /? Action = fig
&<Common Request Parameters>

Response example

XML format


JSON format

    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
    "ScalingRuleId": "eMKWG8SRNb9dBLAjweNI1Ik",

Error codes

For common errors, see client errors or server errors.

Error code Error message HttpCode 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.
QuotaExceeded.ScalingRule Scaling rule quota exceeded in the specified scaling group. 400 The user's action quota has been reached.