Attaches vServer groups to a scaling group. After a Classic Load Balancer (CLB) instance is attached to your scaling group, the instances in the scaling group are automatically added as backend servers of the CLB instance. These servers then handle requests forwarded by the CLB instance, streamlining the processing of incoming traffic. To direct varying access requests to separate backend servers or to distribute requests based on domain names or URLs, you can call the AttachVServerGroups operation. This operation enables the addition of multiple vServer groups, allowing for efficient management of various backend server configurations tailored to your routing preferences.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:AttachVServerGroups |
update |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the scaling group. Examples: cn-hangzhou and cn-shanghai. For information about regions and zones, see Regions and zones. |
cn-hangzhou |
| ScalingGroupId |
string |
Yes |
The ID of the scaling group. |
asg-bp18p2yfxow2dloq**** |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see Ensure idempotence. |
123e4567-e89b-12d3-a456-42665544**** |
| ForceAttach |
boolean |
No |
Specifies whether to add the existing Elastic Compute Service (ECS) instances or elastic container instances in the scaling group to the new vServer group. Valid values:
Default value: false. |
false |
| VServerGroups |
array<object> |
Yes |
The information about the vServer groups. |
|
|
array<object> |
No |
Details of the vServer groups. |
||
| VServerGroupAttributes |
array<object> |
No |
The attributes of the vServer group. |
|
|
object |
No |
Details of the vServer group attributes. |
||
| VServerGroupId |
string |
No |
The ID of the vServer group. |
lb-bp1u7etiogg38yvwz**** |
| Weight |
integer |
No |
The weight of an ECS instance or elastic container instance as a backend server. Valid values: 0 to 100. Default value: 50. |
100 |
| Port |
integer |
No |
The port number over which Auto Scaling adds ECS instances or elastic container instances to the new vServer group. Valid values: 1 to 65535. |
22 |
| LoadBalancerId |
string |
No |
The ID of the CLB instance to which the new vServer group belongs. |
rsp-bp1jp1rge**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.