You can call the CreateScalingGroup operation to create a scaling group. A scaling group automatically adjusts your computing capacity, which is the number of instances, based on your business needs and policies.
Usage notes
A scaling group is a collection of Elastic Compute Service (ECS) instances that are used in the same application scenario.
The number of scaling groups that you can create in a region depends on your Auto Scaling usage. To view your quota for the total number of scaling groups, go to Quota Center.
A scaling group does not take effect immediately after it is created. You must call the EnableScalingGroup operation to enable the scaling group. After the scaling group is enabled, it can trigger scaling activities and execute scaling rules.
The scaling group, its associated Classic Load Balancer (CLB) (formerly SLB) instances, and its associated RDS instances must be in the same region. For more information, see Regions and zones.
If you associate a CLB instance with a scaling group, Auto Scaling automatically adds the ECS instances in the scaling group to the backend server groups of the CLB instance. You can specify the server groups to which the ECS instances are added. Default server groups and vServer groups are supported. The following types of server groups are supported:
If you specify the default server group and multiple vServer groups at the same time, ECS instances are added to all specified server groups.
Default server group: This is a group of ECS instances that receive frontend requests. If a listener is not configured with a vServer group or a primary/secondary server group, requests are forwarded to the ECS instances in the default server group.
vServer group: You can use vServer groups to forward different requests to different backend servers, or to forward requests based on domain names and URLs.
After an ECS instance is added to a backend server group of a CLB instance, its weight is 50 by default. The CLB instance must meet the following conditions:
The CLB instance must be in the active state. You can call the DescribeLoadBalancers operation to check the status of the CLB instance.
Health checks must be enabled for all listener ports that are configured for the CLB instance. Otherwise, the scaling group cannot be created.
If you associate an Application Load Balancer (ALB) server group or a Network Load Balancer (NLB) server group with a scaling group, Auto Scaling automatically adds the ECS instances in the scaling group as backend servers to the specified server group. These servers process access requests that are distributed by the ALB or NLB instance. You can specify multiple ALB or NLB server groups, but they must be in the same VPC as the scaling group. For more information, see AttachAlbServerGroups or AttachServerGroups.
If you associate an RDS instance with a scaling group, Auto Scaling automatically adds the private IP addresses of the ECS instances in the scaling group to the access whitelist of the RDS instance. The RDS instance must meet the following conditions:
The RDS instance must be in the Running state. You can call the DescribeDBInstances operation to check the status of the RDS instance.
The number of IP addresses in the access whitelist of the RDS instance cannot exceed the upper limit. For more information, see the RDS document about setting whitelists.
If you set the MultiAZPolicy of the scaling group to COST_OPTIMIZED:
If you specify the OnDemandBaseCapacity, OnDemandPercentageAboveBaseCapacity, and SpotInstancePools parameters, these parameters define the instance allocation method for the cost optimization policy. This allocation method is prioritized during scale-outs and scale-ins.
If you do not specify the OnDemandBaseCapacity, OnDemandPercentageAboveBaseCapacity, or SpotInstancePools parameters, instances are created based on the lowest cost as determined by the cost optimization policy.
If you configure propagatable tags for the scaling group, which means Tag.N.Propagate is set to true:
The tags of the scaling group are propagated only to newly created instances, not to instances that are already running in the scaling group.
If you specify instance tags in the scaling configuration and choose to propagate the tags of the scaling group to the instances, all tags are applied to the instances.
If a tag in the scaling configuration has the same key as a propagatable tag of the scaling group, the tag value from the scaling configuration takes precedence.
Try it now
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | CreateScalingGroup | A required parameter. Set the value to CreateScalingGroup. |
ScalingGroupName | String | No | scalinggroup**** | The name of the scaling group. The name must be unique within a region. The name must be 2 to 64 characters in length. It must start with a digit, an uppercase or lowercase letter, or a Chinese character. It can contain digits, underscores (_), hyphens (-), and periods (.). If you do not specify this parameter, the value of ScalingGroupId is used by default. |
LaunchTemplateId | String | No | lt-m5e3ofjr1zn1aw7**** | The ID of the launch template that provides the launch configurations for the scaling group. |
LaunchTemplateVersion | String | No | Default | The version of the launch template. Valid values:
|
InstanceId | String | No | i-28wt4**** | The ID of the instance. When you create a scaling group, the system obtains the required configuration information from the specified instance and automatically creates a scaling configuration. |
RegionId | String | Yes | cn-qingdao | The ID of the region where the scaling group is located. For more information, see Regions and zones. |
MinSize | Integer | Yes | 2 | The minimum number of instances in the scaling group. Auto Scaling automatically creates instances if the number of instances in the scaling group is less than the value of Note
|
MaxSize | Integer | Yes | 20 | The maximum number of instances in the scaling group. Auto Scaling automatically removes instances if the number of instances in the scaling group is greater than the value of The value range of MaxSize depends on your Auto Scaling usage. To view your quota for the maximum number of instances in a single scaling group, go to Quota Center. If your quota for the maximum number of instances in a single scaling group is 2,000, the value range for |
DefaultCooldown | Integer | No | 300 | The cooldown period of the scaling group after a scaling activity is complete. Valid values: 0 to 86400. Unit: seconds. During the cooldown period, the scaling group does not execute other scaling activities. This parameter is effective only for scaling activities that are triggered by event-triggered tasks. Default value: 300. |
LoadBalancerIds | String | No | ["lb-bp1u7etiogg38yvwz****", "lb-bp168cqrux9ai9l7f****", "lb-bp1jv3m9zvj22ufxp****"] | The IDs of Classic Load Balancer (CLB) (formerly SLB) instances. You can specify multiple CLB instance IDs in a JSON array. Separate the IDs with commas (,). The total number of CLB instances that can be associated with a single scaling group depends on your Auto Scaling usage. To view your quota for the total number of SLB instances that can be associated with a single scaling group, go to Quota Center. |
DBInstanceIds | String | No | ["rm-bp142f86de0t7****", "rm-bp18l1z42ar4o****", "rm-bp1lqr97h4aqk****"] | The IDs of RDS instances. You can specify multiple RDS instance IDs in a JSON array. Separate the IDs with commas (,). The total number of RDS instances that can be associated with a single scaling group depends on your Auto Scaling usage. To view your quota for the total number of RDS instances that can be associated with a single scaling group, go to Quota Center. |
RemovalPolicy.1 | String | No | OldestScalingConfiguration | The first policy for removing instances from the scaling group. This value cannot be the same as the values of RemovalPolicy.2 and RemovalPolicy.3. Valid values:
The scaling configuration mentioned in OldestScalingConfiguration refers to the source of the instance configuration in the group, including scaling configurations and launch templates. CustomPolicy can be set only as the first removal policy. If you set this parameter to CustomPolicy, you must also specify the CustomPolicyARN parameter. Note The removal of ECS instances from a scaling group is also affected by the scale-in and scale-out policy (MultiAZPolicy) of the scaling group. For more information, see Configure a combination of instance removal policies. |
RemovalPolicy.2 | String | No | OldestInstance | The second policy for removing instances from the scaling group. This value cannot be the same as the values of RemovalPolicy.1 and RemovalPolicy.3. Valid values:
Note The removal of ECS instances from a scaling group is also affected by the scale-in and scale-out policy (MultiAZPolicy) of the scaling group. For more information, see Configure a combination of instance removal policies. |
RemovalPolicy.3 | String | No | NewestInstance | The third policy for removing instances from the scaling group. This value cannot be the same as the values of RemovalPolicy.1 and RemovalPolicy.2. Valid values:
Note The removal of ECS instances from a scaling group is also affected by the scale-in and scale-out policy (MultiAZPolicy) of the scaling group. For more information, see Configure a combination of instance removal policies. |
VSwitchId | String | No | vsw-bp14zolna43z266bq**** | The ID of the vSwitch. If you specify this parameter, the network type of the scaling group is VPC. Note If you do not specify the VSwitchId or VSwitchIds.N parameter, the network type of the scaling group is classic network by default. |
MultiAZPolicy | String | No | PRIORITY | The policy for scaling ECS instances in a multi-zone scaling group. Valid values:
Default value: PRIORITY. |
HealthCheckType | String | No | ECS | The health check method of the scaling group. Valid values:
Default value: ECS. Note If you want to enable both instance health checks and load balancer health checks, use the |
ScalingPolicy | String | No | recycle | The reclaim mode of the scaling group. Valid values:
ScalingPolicy specifies the reclaim mode of the scaling group. However, the specific action taken when an instance is removed from the scaling group is determined by the RemovePolicy parameter of the RemoveInstances operation. For more information, see RemoveInstances. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-42665544**** | A client token to ensure the idempotence of the request. Generate a parameter value from your client to make sure that the value is unique among different requests. This parameter can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
OnDemandBaseCapacity | Integer | No | 30 | The minimum number of pay-as-you-go instances that are required for the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is less than this value, Auto Scaling preferentially creates pay-as-you-go instances. When the |
OnDemandPercentageAboveBaseCapacity | Integer | No | 20 | The percentage of pay-as-you-go instances among the excess instances when the minimum number of pay-as-you-go instances (OnDemandBaseCapacity) is met. Valid values: 0 to 100. When the |
SpotInstanceRemedy | Boolean | No | true | Specifies whether to enable supplementation of spot instances. If this parameter is set to true, Auto Scaling creates a new instance to replace a spot instance that is about to be reclaimed. |
CompensateWithOnDemand | Boolean | No | true | This parameter takes effect only when
Default value: true. |
SpotInstancePools | Integer | No | 5 | The number of instance types that you can specify. The scaling group creates spot instances of the specified instance types in a balanced manner and at the lowest cost. Valid values: 1 to 10. When the |
DesiredCapacity | Integer | No | 5 | The expected number of ECS instances in the scaling group. Auto Scaling automatically maintains the number of ECS instances at the expected value. The value of this parameter must be less than or equal to MaxSize and greater than or equal to MinSize. |
GroupDeletionProtection | Boolean | No | true | Specifies whether to enable deletion protection for the scaling group. Valid values:
Default value: false. |
GroupType | String | No | ECS | The type of instances that are managed by the scaling group. Valid values:
Default value: ECS. |
ContainerGroupId | String | No | eci-uf6fonnghi50u374**** | The ID of the ECI instance, which is the container group ID. |
VSwitchIds.N | String | No | vsw-bp14zolna43z266bq**** | The IDs of one or more vSwitches. If you specify this parameter, the VSwitchId parameter is ignored. If you specify this parameter, the network type of the scaling group is VPC. If you specify multiple vSwitches:
Note If you do not specify the VSwitchId or VSwitchIds.N parameter, the network type of the scaling group is classic network by default. |
LifecycleHook.N.DefaultResult | String | No | CONTINUE | The action to take after the wait state ends. Valid values:
If a scale-in (SCALE_IN) activity triggers multiple lifecycle hooks, and one of them has DefaultResult set to ABANDON, the other wait states end when the wait state for that hook ends. In all other cases, the next action is based on the action of the last wait state to end. Default value: CONTINUE. |
LifecycleHook.N.LifecycleHookName | String | No | lifecyclehook**** | The name of the lifecycle hook. The name cannot be modified after you specify it. If you do not specify this parameter, the ID of the lifecycle hook is used by default. |
LifecycleHook.N.LifecycleTransition | String | No | SCALE_OUT | The type of scaling activity to which the lifecycle hook applies. Valid values:
Note If you specify a lifecycle hook for the scaling group, this parameter is required. Other related parameters are optional. |
LifecycleHook.N.NotificationMetadata | String | No | Test | The fixed string of information for the wait state of a scaling activity. The value of this parameter cannot exceed 128 characters in length. When Auto Scaling sends a message to a notification recipient, it includes the value of this parameter. This helps you manage and categorize notifications. This parameter takes effect only when you specify the NotificationArn parameter. |
LifecycleHook.N.NotificationArn | String | No | acs:ess:cn-hangzhou:1111111111:queue/queue2 | The Alibaba Cloud Resource Name (ARN) of the notification recipient for the lifecycle hook. You can specify a Simple Message Queue (formerly MNS) queue or topic. The ARN must be in the following format: acs:ess:{region}:{account-id}:{resource-relative-id}.
Examples:
|
LifecycleHook.N.HeartbeatTimeout | Integer | No | 600 | The wait time of the lifecycle hook for a scaling activity. After the wait time expires, the next action is performed. Valid values: 30 to 21600. Unit: seconds. After you create a lifecycle hook, you can call RecordLifecycleActionHeartbeat to extend the wait time of an ECS instance, or call CompleteLifecycleAction to end the wait state of the scaling activity ahead of schedule. Default value: 600. |
VServerGroup.N.VServerGroupAttribute.N.VServerGroupId | String | No | rsp-bp1443g77**** | The ID of the vServer group. For more information, see AttachVServerGroups. |
VServerGroup.N.VServerGroupAttribute.N.Weight | Integer | No | 100 | After Auto Scaling adds an instance to a vServer group, this is the weight of the instance as a backend server. A higher weight means the instance is allocated more access requests. If the weight is 0, the instance does not receive access requests. Valid values: 0 to 100. Default value: 50. For more information, see AttachVServerGroups. |
VServerGroup.N.VServerGroupAttribute.N.Port | Integer | No | 22 | After Auto Scaling adds an instance to a vServer group, this is the port number used by the instance. Valid values: 1 to 65535. For more information, see AttachVServerGroups. |
VServerGroup.N.LoadBalancerId | String | No | lb-bp1u7etiogg38yvwz**** | The ID of the CLB (formerly SLB) instance to which the vServer group belongs. For more information, see AttachVServerGroups. |
Tag.N.Key | String | No | Department | The key of the tag for the scaling group. |
Tag.N.Value | String | No | Finance | The value of the tag for the scaling group. |
Tag.N.Propagate | Boolean | No | false | Indicates whether the tag can be propagated. Valid values:
Default value: false. |
LaunchTemplateOverride.N.InstanceType | String | No | ecs.c5.xlarge | If you want the scaling group to scale instances based on the capacity of instance types, specify both this parameter and LaunchTemplateOverride.N.WeightedCapacity. This parameter specifies an instance type that is used to override the instance type in the launch template. You can specify N values for this parameter to support N instance types. N specifies the number of instance types. Valid values of N: 1 to 20. Note This parameter takes effect only when the LaunchTemplateId parameter is specified. For the valid values of InstanceType, see Instance families. |
LaunchTemplateOverride.N.WeightedCapacity | Integer | No | 4 | If you want the scaling group to scale instances based on the capacity of instance types, specify this parameter after you specify LaunchTemplateOverride.N.InstanceType. The values of N for these two parameters must be the same. This parameter specifies the weight of the instance type. The weight indicates the capacity of a single instance of the specified instance type in the scaling group. A higher weight indicates that a smaller number of instances of the specified instance type are required to meet the expected capacity. Because performance metrics such as the number of vCPUs and memory size vary for each instance type, you can configure different weights for different instance types based on your needs. Example:
To meet the expected capacity, the scaling group will scale out two ecs.c5.xlarge instances. Note During a scale-out, the capacity of the scaling group cannot exceed the sum of the maximum capacity (MaxSize) and the maximum weight of an instance type. Valid values for WeightedCapacity: 1 to 500. |
LaunchTemplateOverride.N.SpotPriceLimit | Float | No | 0.025 | The maximum bid price for the instance type that is specified by Note This parameter takes effect only when the |
AlbServerGroup.N.AlbServerGroupId | String | No | sgp-ddwb0y0g6y9bjm**** | The ID of the ALB server group. N is the number of the ALB server group. The number of ALB server groups that can be associated with a scaling group is limited. To view or request an increase in the quota, go to Quota Center. |
AlbServerGroup.N.Weight | Integer | No | 100 | After Auto Scaling adds an instance to an ALB server group, this is the weight of the instance as a backend server. A higher weight means the instance is allocated more access requests. If the weight is 0, the instance does not receive access requests. Valid values: 0 to 100. N is the number of the ALB server group. |
AlbServerGroup.N.Port | Integer | No | 22 | After Auto Scaling adds an instance to an ALB server group, this is the port number used by the instance. Valid values: 1 to 65535. N is the number of the ALB server group. Note If the value of N is the same but the value of Port is different, the system associates the ALB server group with the scaling group on multiple different ports by default. |
ServerGroup.N.ServerGroupId | String | No | sgp-5yc3bd9lfyh***** | The ID of the server group. |
ServerGroup.N.Type | String | No | ALB | The type of the server group. Valid values:
|
ServerGroup.N.Weight | Integer | No | 100 | After Auto Scaling adds an instance to a server group, this is the weight of the instance as a backend server. Valid values: 0 to 100. A higher weight means the instance is allocated more access requests. If the weight is 0, the instance does not receive access requests. |
ServerGroup.N.Port | Integer | No | 22 | After Auto Scaling adds an instance to a server group, this is the port number used by the instance. Valid values: 1 to 65535. |
AzBalance | Boolean | No | false | Specifies whether to evenly distribute the capacity of the scaling group across multiple zones. This parameter takes effect only when
Default value: false. |
AllocationStrategy | String | No | priority | The capacity allocation policy. This policy determines how the scaling group selects available instance types to meet the capacity requirements. The policy applies to both pay-as-you-go and spot instances. This parameter takes effect only when
Default value: priority. |
SpotAllocationStrategy | String | No | lowestPrice | The allocation policy for spot instances. You can use this parameter to separately specify the allocation policy for spot instances. This parameter takes effect only when
Default value: priority. |
MaxInstanceLifetime | Integer | No | null | The maximum lifetime of an instance in the scaling group. Unit: seconds. Valid values: Default value: null. Note This parameter is not supported for scaling groups of the ECI type or scaling groups for which the economical mode is enabled. |
CustomPolicyARN | String | No | acs:fc:cn-zhangjiakou:16145688****:services/ess_custom_terminate_policy.LATEST/functions/ess_custom_terminate_policy_name | The ARN of the custom scale-in policy (Function). This parameter takes effect only when the first removal policy in RemovalPolicies is set to CustomPolicy. |
ResourceGroupId | String | No | rg-123**** | The ID of the resource group to which the new scaling group belongs. Note The new scaling group is placed in the specified resource group. If you do not specify this parameter, the scaling group is placed in the default resource group. |
LoadBalancerConfig.N.LoadBalancerId | String | No | 147b46d767c-cn-qingdao-cm5**** | The ID of the CLB (formerly SLB) instance. |
LoadBalancerConfig.N.Weight | Integer | No | 10 | After Auto Scaling adds an instance to a CLB (formerly SLB) server group, this is the weight of the instance as a backend server. A higher weight means the instance is allocated more access requests. If the weight is 0, the instance does not receive access requests. Valid values: 0 to 100. |
HealthCheckTypes.N | String | No | ECS | The list of health check methods for the scaling group. Valid values:
Default value: ECS. |
DBInstance.N.DBInstanceId | String | No | rm-m5eqju85s45mu0*** | The ID of the database instance. |
DBInstance.N.Type | String | No | RDS | The type of the database. Valid values:
Default value: RDS. |
DBInstance.N.AttachMode | String | No | SecurityIp | The method for associating the database with the scaling group. Valid values:
|
StopInstanceTimeout | Integer | No | 60 | The timeout period for waiting for an ECS instance to stop during a scale-in. Unit: seconds. Valid values: 30 to 240. Note
|
CapacityOptions.OnDemandBaseCapacity | Integer | No | 30 | The minimum number of pay-as-you-go instances that are required for the scaling group. If the number of pay-as-you-go instances in the scaling group is less than this value, the system preferentially creates pay-as-you-go instances. Valid values: 0 to 1000. When the |
CapacityOptions.OnDemandPercentageAboveBaseCapacity | Integer | No | 20 | The percentage of pay-as-you-go instances among the excess instances after the minimum pay-as-you-go instance requirement ( When the |
CapacityOptions.CompensateWithOnDemand | Boolean | No | true | This parameter takes effect only when
Default value: true. |
CapacityOptions.SpotAutoReplaceOnDemand | Boolean | No | false | If you enable
Default value: false. |
CapacityOptions.PriceComparisonMode | String | No | PricePerUnit | The price comparison mode for the cost optimization policy of the scaling group. Valid values:
Default value: PricePerUnit. |
BalanceMode | String | No | BalancedBestEffort | The zone balancing mode. This parameter takes effect only when zone balancing is enabled. Valid values:
Default value: BalancedBestEffort. |
AutoRebalance | Boolean | No | false | Specifies whether to enable automatic rebalancing for the scaling group. This parameter takes effect only when BalancedOnly is enabled for a zone-balanced scaling group. Valid values:
Default value: false. |
Response parameters
Parameter | Type | Example | Description |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** | The ID of the request. |
ScalingGroupId | String | asg-bp14wlu85wrpchm0**** | The ID of the scaling group. |
Examples
Sample request
http(s)://ess.aliyuncs.com/?Action=CreateScalingGroup
&ScalingGroupName=scalinggroup****
&LaunchTemplateId=lt-m5e3ofjr1zn1aw7****
&LaunchTemplateVersion=Default
&InstanceId=i-28wt4****
&RegionId=cn-qingdao
&MinSize=2
&MaxSize=20
&DefaultCooldown=300
&LoadBalancerIds=["lb-bp1u7etiogg38yvwz****", "lb-bp168cqrux9ai9l7f****", "lb-bp1jv3m9zvj22ufxp****"]
&DBInstanceIds=["rm-bp142f86de0t7****", "rm-bp18l1z42ar4o****", "rm-bp1lqr97h4aqk****"]
&RemovalPolicy.1=OldestScalingConfiguration
&RemovalPolicy.2=OldestInstance
&RemovalPolicy.3=NewestInstance
&VSwitchId=vsw-bp14zolna43z266bq****
&MultiAZPolicy=PRIORITY
&HealthCheckType=ECS
&ScalingPolicy=recycle
&ClientToken=123e4567-e89b-12d3-a456-42665544****
&OnDemandBaseCapacity=30
&OnDemandPercentageAboveBaseCapacity=20
&SpotInstanceRemedy=true
&CompensateWithOnDemand=true
&SpotInstancePools=5
&DesiredCapacity=5
&GroupDeletionProtection=true
&GroupType=ECS
&ContainerGroupId=eci-uf6fonnghi50u374****
&VSwitchIds=["vsw-bp14zolna43z266bq****"]
&LifecycleHook=[{"DefaultResult":"CONTINUE","LifecycleHookName":"lifecyclehook****","LifecycleTransition":"SCALE_OUT","NotificationMetadata":"Test","NotificationArn":"acs:ess:cn-hangzhou:1111111111:queue/queue2","HeartbeatTimeout":600}]
&VServerGroup=[{"VServerGroupAttribute":[{"VServerGroupId":"rsp-bp1443g77****","Weight":100,"Port":22}],"LoadBalancerId":"lb-bp1u7etiogg38yvwz****"}]
&Tag=[{"Key":"Department","Value":"Finance","Propagate":false}]
&LaunchTemplateOverride=[{"InstanceType":"ecs.c5.xlarge","WeightedCapacity":4,"SpotPriceLimit":0.025}]
&AlbServerGroup=[{"AlbServerGroupId":"sgp-ddwb0y0g6y9bjm****","Weight":100,"Port":22}]
&ServerGroup=[{"ServerGroupId":"sgp-5yc3bd9lfyh*****","Type":"ALB","Weight":100,"Port":22}]
&AzBalance=false
&AllocationStrategy=priority
&SpotAllocationStrategy=lowestPrice
&CustomPolicyARN=acs:fc:cn-zhangjiakou:16145688****:services/ess_custom_terminate_policy.LATEST/functions/ess_custom_terminate_policy_name
&ResourceGroupId=rg-123****
&LoadBalancerConfig=[{"LoadBalancerId":"147b46d767c-cn-qingdao-cm5****","Weight":10}]
&HealthCheckTypes=["ECS"]
&DBInstance=[{"DBInstanceId":"rm-m5eqju85s45mu0***","Type":"RDS","AttachMode":"SecurityIp"}]
&StopInstanceTimeout=60
&CapacityOptions={"OnDemandBaseCapacity":30,"OnDemandPercentageAboveBaseCapacity":20,"CompensateWithOnDemand":true,"SpotAutoReplaceOnDemand":false}
&<Common request parameters>Sample 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****"
}Error codes
For a list of error codes, visit the Error Center.
HTTP status code | Error code | Error message | Description |
400 | IncorrectDBInstanceStatus | The current status of DB instance "XXX" does not support this action. | The specified RDS instance must be in the Running state. |
400 | IncorrectLoadBalancerHealthCheck | The current health check type of specified load balancer does not support this action. | Health checks must be enabled for the specified CLB instance. |
400 | IncorrectLoadBalancerStatus | The current status of the specified load balancer does not support this action. | The specified CLB instance must be in the active state. |
400 | IncorrectVSwitchStatus | The current status of virtual switch does not support this operation. | The vSwitch is unavailable. ECS instances cannot be created. |
400 | InvalidDBInstanceId. RegionMismatch | DB instance "XXX" and the specified scaling group are not in the same Region. | The specified RDS instance and the scaling group must be in the same region. |
400 | InvalidLoadBalancerId.IncorrectAddressType | The current address type of specified load balancer does not support this action. | If you specify a vSwitch, the CLB instance must be of the internal network type. |
400 | InvalidLoadBalancerId.IncorrectInstanceNetworkType | The network type of the instance in specified Load Balancer does not support this action. | The network type of the ECS instances in the specified CLB instance must be the same as the network type of the scaling group. |
400 | InvalidLoadBalancerId.RegionMismatch | The specified Load Balancer and the specified scaling group are not in the same Region. | The specified CLB instance and the scaling group must be in the same region. |
400 | InvalidLoadBalancerId.VPCMismatch | The specified virtual switch and the instance in specified Load Balancer are not in the same VPC. | The ECS instances attached to the CLB instance and the vSwitch must be in the same VPC. |
400 | InvalidParameter | The specified value of parameter "ScalingPolicy" is not valid. | The specified reclaim mode parameter is invalid. |
400 | InvalidParameter.Conflict | The value of parameter <parameter name> and parameter <parameter name> are conflict. | The specified MinSize cannot be greater than MaxSize. |
400 | InvalidScalingGroupName.Duplicate | The specified value of parameter <parameter name> is duplicated. | The scaling group name already exists. |
400 | QuotaExceeded.DBInstanceSecurityIP | Security IP quota exceeded in DB instance "XXX". | The number of IP addresses in the whitelist of the specified RDS instance has reached the upper limit. |
400 | QuotaExceeded.PrivateIpAddress | Private IP address quota exceeded in the specified virtual switch. | The vSwitch cannot allocate more private IP addresses. |
400 | QuotaExceeded.ScalingGroup | Scaling group quota exceeded. | The number of scaling groups that you can use has reached the upper limit. |
400 | QuotaExceeded.VPCInstance | Instance quota exceeded in the specified VPC. | The number of instances in the VPC has exceeded the upper limit. |
404 | InvalidDBInstanceId.NotFound | DB instance "XXX" does not exist. | The specified RDS instance does not exist. |
404 | InvalidLoadBalancerId.NotFound | The specified Load Balancer does not exist. | The specified CLB instance does not exist. |
404 | InvalidRegionId.NotFound | The specified region does not exist. | The specified region does not exist. |
404 | InvalidVSwitchId.NotFound | The specified virtual switch does not exist. | The specified vSwitch does not exist. |
400 | LaunchTemplateVersionSet.NotFound | The specific version of launch template is not exist. | The specified version of the launch template does not exist. |
400 | LaunchTemplateSet.NotFound | The specified launch template set is not found. | The specified launch template does not exist. |
400 | TemplateMissingParameter.ImageId | The input parameter "ImageId" that is mandatory for processing this request is not supplied. | The specified version of the launch template is missing image information. |
400 | TemplateMissingParameter.InstanceTypes | The input parameter "InstanceTypes" that is mandatory for processing this request is not supplied. | The specified version of the launch template is missing instance type information. |
400 | TemplateMissingParameter.SecurityGroup | The input parameter "SecurityGroup" that is mandatory for processing this request is not supplied. | The specified version of the launch template is missing security group information. |
400 | TemplateVersion.NotNumber | The input parameter "LaunchTemplateVersion" is supposed to be a string representing the version number. | The specified fixed version number of the launch template is not a number. |
400 | AlbServerGroup.NotExist | The ServerGroup "%s" do(es) not exist. | The specified ALB server group does not exist in your account. |