You can call this operation to remove one or more SLB instances from a scaling 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
LoadBalancer.N RepeatList Yes lb-2zeur05gfs****

The IDs of SLB instances. You can remove up to five SLB instances from a scaling group at a time.

ScalingGroupId String Yes AG6CQdPU8OKdwLjgZcJ****

The ID of the scaling group.

Action String Yes DetachLoadBalancers

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

ForceDetach Boolean No false

Specifies whether to remove instances in the current scaling group from the backend servers of the SLB instance. Valid values:

  • true: removes the instances.
  • false: does not remove the instances.

Default value: false

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Examples

Sample requests


http://ess.aliyuncs.com/?Action=DetachLoadBalancers
&ScalingGroupId=AG6CQdPU8OKdwLjgZcJ****
&LoadBalancer.1=lb-2zeur05gfs****
&<Common request parameters>

Sample success responses

XML format

<DetachLoadBalancersResponse>
      <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
</RequestId>
</DetachLoadBalancersResponse>

JSON format

{
	"RequestId":"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

For more information about error codes, visit API Error Center.

HTTP status code

Error code

Error message

Description

403

Forbidden.Unauthorized

A required authorization for the specified action is not supplied.

The error message returned because Auto Scaling is not authorized to call the specified operation.

404

InvalidScalingGroupId.NotFound

The specified scaling group does not exist.

The error message returned because the specified scaling group does not exist in the current account.

404

InvalidLoadBalancerId.NotFound

The Load Balancer "%s" does not exist.

The error message returned because the specified SLB instance does not exist in the scaling group.