edit-icon download-icon

Modify a scaling group

Last Updated: May 11, 2017


  • Modifies the attributes of a scaling group. However, the following attributes cannot be modified:

    • RegionId
    • LoadBalancerId
    • DBInstanceId
  • The interface can be called only when the scaling group is active or inactive.

  • When the scaling configuration specified for the scaling group needs to be modified, the instance type attribute of the modified scaling configuration must be consistent with that of the active scaling configuration.

    • After a new scaling configuration is added to the scaling group, the running ECS instances which are created based on the previous scaling configuration remain unchanged.
  • When the number (total capacity) of ECS instances in the scaling group does not meet the modified MaxSize or MinSize specification, the Auto Scaling service automatically attaches or removes ECS instances to/from the group to make odds even.

Request parameters

Name Type Required? Description
Action String Yes Operation interface name, required parameter. Value: ModifyScalingGroup
ScalingGroupId String Yes Scaling group ID
ScalingGroupName String No Name shown for the scaling group, which must contain 2-40 characters (English or Chinese). The name must begin with a number, an upper/lower-case letter or a Chinese character and may contain numbers, “_”, “-“ or “.”. The account name is unique in the same region.
ActiveScalingConfigurationId String No ID of the active scaling configuration in the scaling group.
MinSize Integer No Minimum number of ECS instances in the scaling group. Value range: [0, 100].
MaxSize Integer No Maximum number of ECS instances in the scaling group. Value range: [0, 100].
DefaultCooldown Integer No Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400].
RemovalPolicy.N String No Policy for removing ECS instances from the scaling group.
- OldestInstance: removes the first ECS instance attached to the scaling group.
- NewestInstance: removes the first ECS instance attached to the scaling group.
- OldestScalingConfiguration: removes the ECS instance with the oldest scaling configuration.
You can enter up to two removal policies.

Return parameters

Public parameters.

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 group name already exists. InvalidScalingGroupName.Duplicate The specified value of parameter <parameter name> is duplicated. 400
The specified scaling configuration does not exist in the scaling group. InvalidScalingConfigurationId.NotFound The specified scaling configuration does not exist. 404
The instance types of the specified scaling configuration and the active scaling configuration do not match. InvalidScalingConfigurationId.InstanceTypeMismatch The specified scaling configuration and existing active scaling configuration have different instance type. 400
The specified MinSize is greater than MaxSize. InvalidParameter.Conflict The value of parameter <parameter name> and parameter <parameter name> are conflict. 400


Request example
  1. http://ess.aliyuncs.com/?Action=ModifyScalingGroup
  2. &ScalingGroupId=cqS5QbbhmvGLcJbWoDbWLj2V
  3. &ScalingGroupName=ScalingGroup
  4. &<Public Request Parameters>
Return example

XML format:

  1. < ModifyScalingGroupResponse>
  2. <RequestId>6469DCD0-13AC-487E-85A0-CE4922908FDE</RequestId>
  3. </ ModifyScalingGroupResponse>

JSON format:

  1. "RequestId": "6469DCD0-13AC-487E-85A0-CE4922908FDE"
Thank you! We've received your feedback.