Add backend servers to a VServer group.

Request parameters

Name Parameters Required Description
Action String  Yes The action to perform. Valid value:

AddVServerGroupBackendServers

RegionId String  Yes The ID of the region where the Server Load Balancer instance is located.

You can obtain the region ID by calling the DescribeRegions API.

VServerGroupId String  Yes The ID of the VServer group.
Backendservers List Yes The list of backend servers to add.

A VServer group can contain 20 backend servers at most.

Table 1. BackendServer
Name Parameters Required Description
ServerId String  Yes The ID of the ECS instance to add.
Port Integer Yes The port used by the backend server.

Valid value: 1-65535

Weight Integer Yes

The weight of the backend server. Valid value: [0,100]

The default value is 100. If the value is 0, no requests will be forwarded to the backend server.

Type String  Yes The type of the backend server.
  • ecs: ECS instance (Default)
  • eni: Elastic Network Interface (ENI)

Response parameters

Name Type Description
RequestId String The ID of the request.
VServerGroupId String The ID of the VServer group.
Backendservers List The list of backend servers.

Examples

Request example

https://slb.aliyuncs.com/?Action=AddVServerGroupBackendServers
&RegionId=cn-hangzhou
&LoadBalancerId=lb-t4nj5vuz8ish9emfk1f20
&VServerGroupName=Group1
&BackendServers=[
    {"ServerId":"vm-233","Port":"80","Weight":"100","Type":"ecs"},
    {"ServerId":"vm-232","Port":"90","Weight":"100","Type":"ecs"},
    
]
&CommonParameters

Response example

  • XML format
    <? xml version="1.0" encoding="utf-8"? >
    <AddVServerGroupBackendServersResponse>
    	<RequestId>9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C</RequestId>
    	<VServerGroupId>rsp-cige6j5e7p</VServerGroupId>
    	<BackendServers>
    		<BackendServer>
    			<ServerId>vm-233</ServerId>
    			<Port>80</Port>
    			<Weight>100</Weight>
                            <Type>ecs</Type>
    		</BackendServer>
    		<BackendServer>
    			<ServerId>vm-232</ServerId>
    			<Port>90</Port>
    			<Weight>100</Weight>
                            <Type>ecs</Type>
    		</BackendServer>
    		<BackendServer>
    			<ServerId>vm-231</ServerId>
    			<Port>70</Port>
    			<Weight>100</Weight>
                            <Type>ecs</Type>
    		</BackendServer>
    	</BackendServers>
    </AddVServerGroupBackendServersResponse>
  • JSON format
    {
      "RequestId":"9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
      "VServerGroupId":"rsp-cige6j5e7p",
      "BackendServers":{
      "BackendServer":[
        {"ServerId":"vm-233","Port":"80","Weight":"100","Type":"ecs"},
        {"ServerId":"vm-232","Port":"90","Weight":"100","Type":"ecs"},
        
        ]
      }
    }