Replaces backend servers in a specified VServer group.
You can call this operation to replace the backend servers in the specified VServer group. If you want to modify the configuration of the backend servers, such as their weights, see SetVServerGroupAttribute.
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 SLB instance is created. |
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 to be replaced. The value of this parameter is a JSON string with a JSON List structure. You can specify up to 20 elements in a list in a request.
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. You can specify a maximum of 20 backend servers for each VServer group in each call. The value of this parameter is a JSON string with a JSON List structure. You can specify up to 20 elements in a list in a request.
Examples:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
VServerGroupId | String | rsp-cige6j****** |
The ID of the VServer group. |
BackendServers | Array |
The list of backend servers. |
|
BackendServer | |||
ServerId | String | vm-236 |
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 | The description of the backend server. |
The description of the backend server. |
Type | String | ecs |
Type: the type of the 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>
<RequestId>9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C</RequestId>
<VServerGroupId>rsp-cige6j*****</VServerGroupId>
<BackendServers>
<BackendServer>
<ServerId>vm-400</ServerId>
<Port>80</Port>
<Weight>100</Weight>
</BackendServer>
<BackendServer>
<ServerId>vm-401</ServerId>
<Port>90</Port>
<Weight>100</Weight>
</BackendServer>
</BackendServers>
</ModifyVServerGroupBackendServersResponse>
JSON
format
{
"ModifyVServerGroupBackendServersResponse": {
"RequestId": "9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
"VServerGroupId": "rsp-cige6j*****",
"BackendServers": {
"BackendServer": [
{
"ServerId": "vm-400",
"Port": "80",
"Weight": "100"
},
{
"ServerId": "vm-401",
"Port": "90",
"Weight": "100"
}
]
}
}
}
Error codes
For a list of error codes, visit the API Error Center.