All Products
Search
Document Center

Server Load Balancer:RemoveBackendServers

Last Updated:Oct 11, 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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:RemoveBackendServersupdate
  • 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 that you want to remove.

  • 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): Elastic Compute Service (ECS) instance
    • eni: elastic network interface (ENI)
    • eci: elastic container instance
  • Weight: the weight of the backend server. Valid values: 0 to 100. Set the value to an integer.

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

  • Remove ECS instances:

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

  • Remove ENIs:

[{"ServerId":"eni-2ze1sdp5****","Type": "eni","Weight":"100"}]

  • Remove elastic container instances:

[{"ServerId":"eci-2ze1sdp5****","Type": "eci","Weight":"100"}]

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

Response parameters

ParameterTypeDescriptionExample
object
LoadBalancerIdstring

The ID of the CLB instance.

lb-bp15lbk8uja8rvm4a****
RequestIdstring

The request ID.

365F4154-92F6-4AE4-92F8-7FF34B540710
BackendServersarray<object>

The backend servers.

BackendServerobject
Typestring

The type of backend server. Valid values:

  • ecs: ECS instance
  • eni: ENI
  • eci: elastic container instances
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 changedView Change Details