All Products
Search
Document Center

Auto Scaling:Enables a scaling group

Last Updated:Oct 23, 2023

This topic provides an example of how to call an API operation to enable a scaling group.

Description

In this example, the following parameters are used to enable a scaling group and add an Elastic Compute Service (ECS) instance to the scaling group:

  • ActiveScalingConfigurationId: the ID of the scaling configuration that you want to enable in the scaling group.

  • ScalingGroupId: the ID of the scaling group that you want to enable.

  • InstanceId: the ID of the ECS instance that you want to add to the scaling group.

For more information about the parameters, see EnableScalingGroup.

Sample requests

http(s)://ess.aliyuncs.com/?Action=EnableScalingGroup
&ScalingGroupId=asg-bp14wlu85wrpchm0****
&ActiveScalingConfigurationId=asc-bp1ffogfdauy0nu5****
&InstanceId=["i-283vv****"]
&RegionId=cn-qingdao
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<EnableScalingGroupResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</EnableScalingGroupResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}