Replaces backend servers in a specified vServer group.
You can call this operation to replace the backend servers in a specified vServer group. To modify the configurations of the backend servers, such as their weights, you can call the SetVServerGroupAttribute operation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyVServerGroupBackendServers |
The operation that you want to perform. Set the value to ModifyVServerGroupBackendServers. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the Classic Load Balancer (CLB) instance is deployed. |
VServerGroupId | String | Yes | rsp-cige6j**** |
The ID of the vServer group. |
OldBackendServers | String | No | [{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }] |
The list of backend servers that you want to replace in the vServer group. You can specify at most 20 backend servers for a vServer group in each call.
Examples:
|
NewBackendServers | String | No | [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Port":"80","Description":"test-113" }] |
The list of new backend servers that you want to use to replace those in the vServer group. You can specify at most 20 backend servers for a vServer group in each call.
Examples:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
VServerGroupId | String | rsp-cige6j**** |
The ID of the vServer group. |
BackendServers | Array of BackendServer | N/A |
The list of backend servers. |
BackendServer | N/A | N/A | N/A |
ServerId | String | i-bp1ge5hrp**** |
The ID of the ECS instance or ENI. |
Port | Integer | 70 |
The port that is used by the backend server. |
Weight | Integer | 100 |
The weight of the backend server. |
Description | String | BackendServerDescription |
The description of the backend server. |
Type | String | ecs |
The type of backend server. Valid values:
|
RequestId | String | 9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyVServerGroupBackendServers
&RegionId=cn-hangzhou
&VServerGroupId=rsp-cige6j****
&<Common request parameters>
Sample success responses
XML
format
<ModifyVServerGroupBackendServersResponse>
<VServerGroupId>rsp-cige6j****</VServerGroupId>
<RequestId>9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C</RequestId>
<BackendServers>
<BackendServer>
<Type>ecs</Type>
<Description>BackendServerDescription </Description>
<ServerId>i-bp1ge5hrp****</ServerId>
<Port>70</Port>
<Weight>100</Weight>
</BackendServer>
</BackendServers>
</ModifyVServerGroupBackendServersResponse>
JSON
format
{
"VServerGroupId": "rsp-cige6j****",
"RequestId": "9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
"BackendServers": {
"BackendServer": {
"Type": "ecs",
"Description": "BackendServerDescription",
"ServerId": "i-bp1ge5hrp****",
"Port": 70,
"Weight": 100
}
}
}
Error codes
For a list of error codes, visit the API Error Center.