Executes a specified scaling rule.

Description

  • The interface can be called only when the scaling group is active.
  • The interface can be called only when no scaling activity in the scaling group is in progress.
  • When no scaling activity in the scaling group is in progress, the interface can be directly executed without cooldown.
  • Successfully calling this interface only means that the Auto Scaling service has accepted the call request, and the scaling activity can be executed, but does not necessarily mean that the scaling activity can be successfully executed. You can use the returned ScalingActivityId to check the status of the scaling activity.
  • When the total capacity of to-be-attached ECS instances specified by this scaling rule plus the instances in the current scaling group is greater than MaxSize, the rule Total Capacity = MaxSize is applied.
  • When the total capacity of instances in the current scaling group minus the number of ECS instances to be reduced according to the scaling rule is smaller than MinSize, the rule Total Capacity = MinSize is applied.
  • You can only perform auto scaling for at most 1,000 ECS instances of all scaling groups in all regions. ( The number only includes the number of ECS instances automatically created, but does not include the number of manually attached ECS instances.)

Request parameters

Name Type Required Description
Action String Yes Operation interface name, required parameter. Value: ExecuteScalingRule.
ScalingRuleAri String Yes Unique identifier of the scaling rule.
ClientToken String No Guarantees the idempotence of the request. Used to ensure request idempotence. The value is generated by a client. It must be unique among all requests and can contain a maximum of 64 ASCII characters. For more information, see how to ensure idempotence.

Response parameters

Name Type Description
ScalingActivityId String Scaling activity ID.

Request example

http://ess.aliyuncs.com/?Action=ExecuteScalingRule
&ScalingRuleAri=ari:acs:ess:cn-qingdao:1344371:scalingRule/cCBpdYdQuBe2cUxOdu6piOk
&<Public Request Parameters>

Response example

XML format:

<ExecuteScalingRuleResponse>
    <ScalingActivityId>ebta5WbUzC8gcwUWvfchyT4U</ScalingActivityId>
    <RequestId>262216B9-F9D4-4D16-BE9B-BD1C39A4F42B</RequestId>
</ExecuteScalingRuleResponse>

JSON format:

{
    "RequestId": "6469DCD0-13AC-487E-85A0-CE4922908FDE",
    "ScalingActivityId": "ebta5WbUzC8gcwUWvfchyT4U"
}

Error codes

For common errors, see client errors or server errors.

Error code Error message HTTP status code Description
InvalidScalingRuleAri.NotFound The specified scaling rule Ari does not exist. 404 The specified scaling rule does not exist in this account.
Forbidden.Unauthorized A required authorization for the specified action is not supplied. 403 API is not fully authorized to the Auto Scaling service.
IncorrectScalingGroupStatus The current status of the specified scaling group does not support this action. 400 The specified scaling rule is not active.
ScalingActivityInProgress You cannot delete a scaling group or launch a new scaling activity while there is a scaling activity in progress for the specified scaling group. 400 The scaling group to which the scaling rule belongs has a scaling activity in progress.
InsufficientBalance Your account does not have enough balance. 400 Your account balance is not enough.
QuotaExceed.Instance Living instance quota exceeded. 400 Your ECS instance quota is exceeded.
IncorrectLoadBalancerStatus The current status of the specified Server Load Balancer instance does not support this action. 400 The Server Load Balancer instance in the scaling group to which the scaling rule belongs is not active.
IncorrectLoadBalancerHealthCheck The current health check type of specified load balancer does not support this action. 400 Health check is not enabled for the Server Load Balancer in the scaling group to which the specified scaling rule belongs.
InvalidLoadBalancerId.IncorrectInstanceNetworkType The network type of the instance in specified load balancer does not support this action. 400 The network type of the ECS instance contained in the specified Server Load Balancer is different from the network type of the scaling group.
InvalidLoadBalancerId.VPCMismatch The specified virtual switch and the instance in specified load balancer are not in the same VPC. 400 The ECS instance contained in the specified Server Load Balancer and VSwitchId are not in the same VPC.
Incorrectdbinstancestatus The current status of DB instance “XXX” does not support this action. 400 The RDS instance in the scaling group to which the specified scaling rule belongs is not running.
QuotaExceeded.DBInstanceSecurityIP Security IP quota exceeded in DB instance “XXX”. 400 The number of IP addresses in the white list that can access the RDS instance in the scaling group to which the specified scaling rule belongs has reached the upper limit.
QuotaExceeded.SecurityGroupInstance Instance quota exceeded in the specified security group. 400 The number of ECS instances attached to the specified security group exceeds the upper limit.
IncorrectCapacity.NoChange To execute the specified scaling rule, the total capacity will not change. 400 The number of instances in the scaling group does not change after the scaling rule is executed.
QuotaExceeded.ScalingInstance Scaling instance quota exceeded. 400 The Auto Scaling ECS instance quota is exceeded.
QuotaExceeded.AfterpayInstance Living afterpay instance quota exceeded. 400 The Pay-As-You-Go ECS instance quota is exceeded.
ResourceNotAvailable.ECS The specified region or zone does not offer the specified disk or instance category. 400 The specified ECS instance type or disk type cannot be created in the specified region.