DisableAvailabilityZonesForLoadBalancer - Elastic Load Balancing

DisableAvailabilityZonesForLoadBalancer

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.

AvailabilityZones.member.N

The Availability Zones.

Type: Array of strings

Required: Yes

LoadBalancerName

The name of the load balancer.

Type: String

Required: Yes

Response Elements

The following element is returned by the service.

AvailabilityZones.member.N

The remaining Availability Zones for the load balancer.

Type: Array of strings

Errors

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

InvalidConfigurationRequest

The requested configuration change is not valid.

HTTP Status Code: 409

LoadBalancerNotFound

The specified load balancer does not exist.

HTTP Status Code: 400

Examples

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: