delete_load_balancer_policy ( $load_balancer_name, $policy_name, $opt )

Deletes a policy from the LoadBalancer. The specified policy must not be enabled for any listeners.

Access

public

Parameters

Parameter

Type

Required

Description

$load_balancer_name

string

Required

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

$policy_name

string

Required

The mnemonic name for the policy being deleted.

$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.

Examples

Delete a stickiness policy for a load balancer.

To assign a policy to a load balancer, you must:

  1. Create a policy using either create_app_cookie_stickiness_policy() or create_lb_cookie_stickiness_policy().
  2. Assign the policy to the load balancer with set_load_balancer_policies_of_listener().
  3. Remove them with delete_load_balancer_policy().
$elb = new AmazonELB();

$response = $elb->delete_load_balancer_policy('my-load-balancer', 'app-cookie-policy');

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

Related Methods

Source

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

public function delete_load_balancer_policy($load_balancer_name, $policy_name, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['LoadBalancerName'] = $load_balancer_name;
    $opt['PolicyName'] = $policy_name;
    
    return $this->authenticate('DeleteLoadBalancerPolicy', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback