Adds backend servers.

Note If two or more same ECS instances are added in a request, only the first ECS instance is added.


Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes AddBackendServers

The name of this action.

Value: AddBackendServers

BackendServers String Yes [{"ServerId":"eni-xxxxxxxxx","Weight":"100","Type":"eni","":""},{"ServerId":"eni-xxxxxxxxx","Weight":"100","Type":"eni","":""}]

The list of backend servers to be added.

The list must contain the following parameters:

  • ServerId: the ID of the ECS instance.
  • Weight: the weight of the backend server. Value range: 0 to 100. Default value: 100. If the weight value of a backend server is 0, no request is distributed to this server.
  • Type: the type of the backend server. Valid values:
    • ecs: ECS instance (default)
    • eni: Elastic Network Interface (ENI)
Note Only backend servers (ECS instances) in the running state can be added. You can add up to 20 backend servers at a time.
LoadBalancerId String Yes lb-2ze7o5h52g02kkzz******

The ID of the SLB instance.

RegionId String Yes cn-beijing

The ID of the region to which the SLB instance belongs.

To query the region ID, call the DescribeRegionsAPI.

Response parameters

Parameter Type Example value Description
LoadBalancerId String lb-2ze7o5h52g02kkzz****

The ID of the SLB instance.


A list of backend servers.

 └ServerId String i-2zej4lxhjoq1icu*****

The ECS instance ID or ENI instance ID.

 └Weight String 100

The weight of the backend server.

Value range: 0 to 100

Default value: 100. If the value is 0, no requests are forwarded to the backend server.

 └Description String Backend server

A description of the backend server.

 └Type String ecs

The backend server type.

  • ecs: ECS instance (Default)
  • eni: Elastic Network Interface (ENI)
RequestId String 34B82C81-F13B-4EEB-99F6-A048C67CC830

The ID of the request.


Request example

http(s)://[Endpoint]/? Action=AddBackendServers

Response examples

XML format


JSON format


Error codes

HTTP status code Error code Error message Description
400 InvalidParameter The specified load balancer does not support the network type of the ECS instance. SLB instances do not support ECS instances of the specified network type. Please change the ECS network type and try again.

See common error codes.