describe_load_balancers ( $opt )

Returns detailed configuration information for the specified LoadBalancers. If no LoadBalancers are specified, the operation returns configuration information for all LoadBalancers created by the caller.

The client must have created the specified input LoadBalancers in order to retrieve this information; the client must provide the same account credentials as those that were used to create the LoadBalancer.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

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

  • LoadBalancerNames - string|array - Optional - A list of names associated with the LoadBalancers at creation time. Pass a string for a single value, or an indexed array for multiple values.
  • Marker - string - Optional - An optional parameter reserved for future use.
  • 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.

Examples

Describe load balancers.

$elb = new AmazonELB();

$response = $elb->describe_load_balancers();

// Success?
var_dump($response->isOK());
Result:
bool(true)

Describe a specific load balancer.

$elb = new AmazonELB();

$response = $elb->describe_load_balancers(array(
	'LoadBalancerNames' => 'my-load-balancer'
));

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

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

public function describe_load_balancers($opt = null)
{
    if (!$opt) $opt = array();
            
    // Optional list (non-map)
    if (isset($opt['LoadBalancerNames']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'LoadBalancerNames' => (is_array($opt['LoadBalancerNames']) ? $opt['LoadBalancerNames'] : array($opt['LoadBalancerNames']))
        ), 'member'));
        unset($opt['LoadBalancerNames']);
    }

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback