DisableAvailabilityZonesForLoadBalancer - Elastic Load Balancing


Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets.

There must be at least one Availability Zone registered with a load balancer at all times. After an Availability Zone is removed, all instances registered with the load balancer that are in the removed Availability Zone go into the OutOfService state. Then, the load balancer attempts to equally balance the traffic among its remaining Availability Zones.

Request Parameters

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


The Availability Zones.

Type: Array of strings

Required: Yes


The name of the load balancer.

Type: String

Required: Yes

Response Elements

The following element is returned by the service.


The remaining Availability Zones for the load balancer.

Type: Array of strings


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


The requested configuration change is not valid.

HTTP Status Code: 409


The specified load balancer does not exist.

HTTP Status Code: 400


Disable Availability Zones

This example disables the specified Availability Zone for the specified load balancer.

Sample Request

https://elasticloadbalancing.amazonaws.com/?Action=DisableAvailabilityZonesForLoadBalancer &LoadBalancerName=my-https-loadbalancer &AvailabilityZones.member.1=us-east-1a &Version=2012-06-01 &AUTHPARAMS

Sample Response

<DisableAvailabilityZonesForLoadBalancerResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/"> <DisableAvailabilityZonesForLoadBalancerResult> <AvailabilityZones> <member>us-east-1b</member> </AvailabilityZones> </DisableAvailabilityZonesForLoadBalancerResult> <ResponseMetadata> <RequestId>ba6267d5-2566-11e3-9c6d-eb728EXAMPLE</RequestId> </ResponseMetadata> </DisableAvailabilityZonesForLoadBalancerResponse>

See Also

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