EnableAvailabilityZonesForLoadBalancer - Elastic Load Balancing

EnableAvailabilityZonesForLoadBalancer

Adds the specified Availability Zones to 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 AttachLoadBalancerToSubnets.

The load balancer evenly distributes requests across all its registered Availability Zones that contain instances.

Request Parameters

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

AvailabilityZones.member.N

The Availability Zones. These must be in the same region as the load balancer.

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 updated list of 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.

LoadBalancerNotFound

The specified load balancer does not exist.

HTTP Status Code: 400

Examples

Enable Availability Zones

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

Sample Request

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

Sample Response

<EnableAvailabilityZonesForLoadBalancerResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/"> <EnableAvailabilityZonesForLoadBalancerResult> <AvailabilityZones> <member>us-east-1a</member> <member>us-east-1c</member> </AvailabilityZones> </EnableAvailabilityZonesForLoadBalancerResult> <ResponseMetadata> <RequestId>83c88b9d-12b7-11e3-8b82-87b12EXAMPLE</RequestId> </ResponseMetadata> </EnableAvailabilityZonesForLoadBalancerResponse>

See Also

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