Removes the specified EC2 Availability Zones from the set of configured Availability Zones for the LoadBalancer.
There must be at least one Availability Zone registered with a LoadBalancer at all times. A client cannot remove all the Availability Zones from a LoadBalancer. Once an Availability Zone is removed, all the instances registered with the LoadBalancer that are in the removed Availability Zone go into the OutOfService state. Upon Availability Zone removal, the LoadBalancer attempts to equally balance the traffic among its remaining usable Availability Zones. Trying to remove an Availability Zone that was not associated with the LoadBalancer does nothing.
In order for this call to be successful, the client must have created the LoadBalancer. The client must provide the same account credentials as those that were used to create the LoadBalancer.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The name associated with the LoadBalancer. The name must be unique within the client AWS account. |
|
|
Required |
A list of Availability Zones to be removed from the LoadBalancer. There must be at least one Availability Zone registered with a LoadBalancer at all times. The client cannot remove all the Availability Zones from a LoadBalancer. Specified Availability Zones must be in the same Region. Pass a string for a single value, or an indexed array for multiple values. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Disable availability zones for a load balancer.
$elb = new AmazonELB(); $response = $elb->disable_availability_zones_for_load_balancer('my-load-balancer', 'us-east-1b'); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/elb.class.php | Toggle source view (12 lines) | View on GitHub