apply_security_groups_to_load_balancer ( $load_balancer_name, $security_groups, $opt )

Associates one or more security groups with your LoadBalancer in VPC. The provided security group IDs will override any currently applied security groups.

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.

$security_groups

string
array

Required

A list of security group IDs to associate with your LoadBalancer in VPC. The security group IDs must be provided as the ID and not the security group name (For example, sg-1234). 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 apply_security_groups_to_load_balancer($load_balancer_name, $security_groups, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['LoadBalancerName'] = $load_balancer_name;
    
    // Required list (non-map)
    $opt = array_merge($opt, CFComplexType::map(array(
        'SecurityGroups' => (is_array($security_groups) ? $security_groups : array($security_groups))
    ), 'member'));

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback