class AWS::ELB::LoadBalancerPolicy

def attributes

Returns:
  • (Hash) - Returns a hash of policy attributes. Keys are
def attributes
  attributes = {}
  policy_attribute_descriptions.each do |desc|
    attributes[desc.attribute_name] ||= []
    attributes[desc.attribute_name] << desc.attribute_value
  end
  attributes
end

def delete

Returns:
  • (nil) -
def delete
  client.delete_load_balancer_policy(
    :load_balancer_name => load_balancer.name,
    :policy_name => name)
  nil
end

def exists?

Returns:
  • (Boolean) - Returns true this policy's load balancer has a
def exists?
  r = get_resource
  r.policy_descriptions.find{|d| d.policy_name == name } ? true : false
rescue AWS::ELB::Errors::LoadBalancerNotFound
  false
end

def get_resource attr_name = nil

def get_resource attr_name = nil
  client.describe_load_balancer_policies(
    :load_balancer_name => load_balancer.name)
end

def initialize load_balancer, name, options = {}

Other tags:
    Private: -
def initialize load_balancer, name, options = {}
  @load_balancer = load_balancer
  super(load_balancer, options.merge(:name => name.to_s))
end

def resource_identifiers

def resource_identifiers
  [[:load_balancer_name, load_balancer.name],[:policy_name, name]]
end