Creates a scaling group
This example shows how to call the CreateScalingGroup operation to create a scaling group.
Description
The example uses the following parameters:
MinSize: the minimum number of Elastic Compute Service (ECS) instances in the scaling group. If the current count drops below this value, Auto Scaling adds ECS instances to reach the minimum.MaxSize: the maximum number of ECS instances in the scaling group. If the current count exceeds this value, Auto Scaling removes excess ECS instances to stay within the limit.LoadBalancerIds: the IDs of the Classic Load Balancer (CLB, formerly known as SLB) instances to associate with the scaling group. Accepts a JSON array of multiple CLB instance IDs, separated by commas (,).DBInstanceIds: the IDs of the ApsaraDB RDS instances to associate with the scaling group. Accepts a JSON array of multiple ApsaraDB RDS instance IDs, separated by commas (,).
For a full list of parameters, see CreateScalingGroup.
Sample requests
http(s)://ess.aliyuncs.com/?Action=CreateScalingGroup
&ScalingGroupName=scalinggroup****
&InstanceId=i-28wt4****
&RegionId=cn-qingdao
&MinSize=2
&MaxSize=20
&LoadBalancerIds=["lb-bp1u7etiogg38yvwz****", "lb-bp168cqrux9ai9l7f****", "lb-bp1jv3m9zvj22ufxp****"]
&DBInstanceIds=["rm-bp142f86de0t7****", "rm-bp18l1z42ar4o****", "rm-bp1lqr97h4aqk****"]
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateScalingGroupResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
<ScalingGroupId>asg-bp14wlu85wrpchm0****</ScalingGroupId>
</CreateScalingGroupResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"ScalingGroupId" : "asg-bp14wlu85wrpchm0****"
}