Removes backend servers.

Note If the backend servers that you want to remove are not in the server list of the Classic Load Balancer (CLB) instance, the request fails. However, the system does not report an error.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes RemoveBackendServers

The operation that you want to perform.

Set the value to RemoveBackendServers.

BackendServers String Yes [{"ServerId":"i-bp1fq61enf4loa5i****", "Type": "ecs","Weight":"100"}]

The backend servers to be removed.

  • ServerId: The IDs of the backend servers. Set the value to a string. This parameter is required.
  • Type: The type of the backend server. Valid values:
    • ecs (default): an Elastic Compute Service (ECS) instance
    • eni: an elastic network interface (ENI)
  • Weight: the weight of the backend server. Valid values: 0 to 100. Set the value to an integer.

You can remove at most 20 backend servers in each call. Examples:

  • Remove an ECS instance: [{"ServerId":"i-bp1fq61enf4loa5i****", "Type": "ecs","Weight":"100"}]
  • Remove an ENI: [{"ServerId":"eni-2ze1sdp5****","Type": "eni","Weight":"100"}]
LoadBalancerId String Yes lb-bp15lbk8uja8rvm4a****

The ID of the CLB instance.

RegionId String Yes cn-hangzhou

The ID of the region where the CLB instance is deployed.

Response parameters

Parameter Type Example Description
LoadBalancerId String lb-bp15lbk8uja8rvm4a****

The ID of the CLB instance.

BackendServers Array of BackendServer

The list of backend servers.

BackendServer
Description String BackendServer1

The description of the server group.

ServerId String i-bp1fq61enf4loa5i****

The ID of the backend server.

Type String ecs

The type of the backend server. Valid values:

  • ecs: an ECS instance
  • eni: an ENI
Weight Integer 100

The weight of the backend server. Valid values: 0 to 100.

RequestId String 365F4154-92F6-4AE4-92F8-7FF34B540710

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=RemoveBackendServers
&BackendServers=[{"ServerId":"i-bp1fq61enf4loa5i****", "Type": "ecs","Weight":"100"}]
&LoadBalancerId=lb-bp15lbk8uja8rvm4a****
&<Common request parameters>

Sample success responses

XML format

<RemoveBackendServersResponse>
  <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
  <LoadBalancerId>lb-bp15lbk8uja8rvm4a****</LoadBalancerId>
  <BackendServers>
        <BackendServer>
              <Type>ecs</Type>
              <Description>BackendServer1</Description>
              <ServerId>i-bp1fq61enf4loa5i****</ServerId>
              <Weight>100</Weight>
        </BackendServer>
        <BackendServer>
              <Type>eni</Type>
              <Description>BackendServer2</Description>
              <ServerId>eni-2ze1sdp5****</ServerId>
              <Weight>100</Weight>
        </BackendServer>
  </BackendServers>
</RemoveBackendServersResponse>

JSON format

{
    "RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
    "LoadBalancerId": "lb-bp15lbk8uja8rvm4a****",
    "BackendServers": {
        "BackendServer": [
            {
                "Type": "ecs",
                "Description": "BackendServer1",
                "ServerId": "i-bp1fq61enf4loa5i****",
                "Weight": 100
            },
            {
                "Type": "eni",
                "Description": "BackendServer2",
                "ServerId": "eni-2ze1sdp5****",
                "Weight": 100
            }
        ]
    }
}

Error codes

For a list of error codes, visit the API Error Center.