All Products
Search
Document Center

Server Load Balancer:RemoveBackendServers

Last Updated:Mar 14, 2024

Removes backend servers.

Operation description

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
slb:RemoveBackendServersWRITE
  • instance
    acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}
  • loadbalancer
    acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
  • ecs:tag
  • slb:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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

cn-hangzhou
LoadBalancerIdstringYes

The ID of the CLB instance.

lb-bp15lbk8uja8rvm4a****
BackendServersstringYes

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"}]
[{"ServerId":"i-bp1fq61enf4loa5i****", "Type": "ecs","Weight":"100"}]

Response parameters

ParameterTypeDescriptionExample
object
LoadBalancerIdstring

The ID of the CLB instance.

lb-bp15lbk8uja8rvm4a****
RequestIdstring

The ID of the request.

365F4154-92F6-4AE4-92F8-7FF34B540710
BackendServersobject []

The list of backend servers.

Typestring

The type of the backend server. Valid values:

  • ecs: an ECS instance
  • eni: an ENI
ecs
Weightinteger

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

100
Descriptionstring

The description of the server group.

BackendServer1
ServerIdstring

The ID of the backend server.

i-bp1fq61enf4loa5i****

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400SystemBusyThe system is busy.The service is unavailable. Please try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400