attach_load_balancer_to_subnets ( $load_balancer_name, $subnets, $opt )

Adds one or more subnets to the set of configured subnets in the VPC for the LoadBalancer.

The Loadbalancers evenly distribute requests across all of the registered subnets.

Access

public

Parameters

Parameter

Type

Required

Description

$load_balancer_name

string

Required

The name associated with the LoadBalancer. The name must be unique within the client AWS account.

$subnets

string
array

Required

A list of subnet IDs to add for the LoadBalancer. Pass a string for a single value, or an indexed array for multiple values.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Source

Method defined in services/elb.class.php | Toggle source view (12 lines) | View on GitHub

public function attach_load_balancer_to_subnets($load_balancer_name, $subnets, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['LoadBalancerName'] = $load_balancer_name;
    
    // Required list (non-map)
    $opt = array_merge($opt, CFComplexType::map(array(
        'Subnets' => (is_array($subnets) ? $subnets : array($subnets))
    ), 'member'));

    return $this->authenticate('AttachLoadBalancerToSubnets', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback