Removes backend servers from a specified server group.

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 RemoveServersFromServerGroup

The operation that you want to perform. Set the value to RemoveServersFromServerGroup.

ServerGroupId String Yes sgp-atstuj3rtoptyui****

The ID of the server group.

Servers.N.ServerId String Yes ecs-bp67acfmxazb4p****

The ID of the server.

  • If the server group type is Instance, set the ServerId parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
  • If the server group type is Ip, set the ServerId parameter to an IP address.
Servers.N.ServerType String Yes Ecs

The type of the backend server. Valid values:

  • Ecs: an ECS instance
  • Eni: an ENI
  • Eci: an elastic container instance
  • Ip: an IP address
Servers.N.ServerIp String No 192.168.6.6

The IP address of the server. If the server group type is Ip, set the ServerId parameter to an IP address.

Servers.N.Port Integer Yes 443

The port used by the backend server. Valid values: 1 to 65535.

DryRun Boolean No false

Specifies whether only to precheck the request. Valid values:

  • true: prechecks the request but does not remove the backend servers. The system prechecks the required parameters, request syntax, and limits. If the request fails the precheck, an error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (default): sends the request. If the request passes the precheck, an HTTP 2xx status code is returned and the operation is performed.
ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must ensure that it is unique among all requests. ClientToken can contain only ASCII characters.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId of each API request may be different.
RegionId String No cn-hangzhou

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

You can call the DescribeRegions operation to query the most recent region list.

Response parameters

Parameter Type Example Description
RequestId String 54B48E3D-DF70-471B-AA93-08E683A1B45

The ID of the request.

ServerGroupId String sgp-atstuj3rtoptyui****

The ID of the server group.

JobId String 72dcd26b-f12d-4c27-b3af-18f6aed5****

The ID of the asynchronous task.

Examples

Sample requests

http(s)://[Endpoint]/?Action=RemoveServersFromServerGroup
&ServerGroupId=sgp-atstuj3rtoptyui****
&Servers=[{"ServerId":"ecs-bp67acfmxazb4p****","ServerType":"Ecs","ServerIp":"192.168.6.6","Port":443}]
&DryRun=false
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<RemoveServersFromServerGroupResponse>
    <RequestId>54B48E3D-DF70-471B-AA93-08E683A1B45</RequestId>
    <ServerGroupId>sgp-atstuj3rtoptyui****</ServerGroupId>
    <JobId>72dcd26b-f12d-4c27-b3af-18f6aed5****</JobId>
</RemoveServersFromServerGroupResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "54B48E3D-DF70-471B-AA93-08E683A1B45",
  "ServerGroupId" : "sgp-atstuj3rtoptyui****",
  "JobId" : "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}

Error codes

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