DeregisterInstancesFromLoadBalancer - Elastic Load Balancing
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DeregisterInstancesFromLoadBalancer

Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.

You can use DescribeLoadBalancers to verify that the instance is deregistered from the load balancer.

For more information, see Register or deregister EC2 Instances in the User Guide for Classic Load Balancers.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

Instances.member.N

The IDs of the instances.

Type: Array of Instance objects

Required: Yes

LoadBalancerName

The name of the load balancer.

Type: String

Required: Yes

Response Elements

The following element is returned by the service.

Instances.member.N

The remaining instances registered with the load balancer.

Type: Array of Instance objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidInstance

The specified endpoint is not valid.

HTTP Status Code: 400

LoadBalancerNotFound

The specified load balancer does not exist.

HTTP Status Code: 400

Examples

Deregister instances

This example deregisters the specified instance from the specified load balancer.

Sample Request

https://elasticloadbalancing.amazonaws.com/?Action=DeregisterInstancesFromLoadBalancer &LoadBalancerName=my-https-loadbalancer &Instances.member.1.InstanceId=i-e3677ad7 &Version=2012-06-01 &AUTHPARAMS

Sample Response

<DeregisterInstancesFromLoadBalancerResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/"> <DeregisterInstancesFromLoadBalancerResult> <Instances> <member> <InstanceId>i-6ec63d59</InstanceId> </member> </Instances> </DeregisterInstancesFromLoadBalancerResult> <ResponseMetadata> <RequestId>83c88b9d-12b7-11e3-8b82-87b12EXAMPLE</RequestId> </ResponseMetadata> </DeregisterInstancesFromLoadBalancerResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: