module Awspec::Helper::Finder::Elb

Public Instance Methods

find_elb(id) click to toggle source
# File lib/awspec/helper/finder/elb.rb, line 4
def find_elb(id)
  res = elb_client.describe_load_balancers({
                                             load_balancer_names: [id]
                                           })
  res.load_balancer_descriptions.single_resource(id)
rescue
  return nil
end
select_elb_by_vpc_id(vpc_id) click to toggle source
# File lib/awspec/helper/finder/elb.rb, line 13
def select_elb_by_vpc_id(vpc_id)
  res = elb_client.describe_load_balancers
  res.load_balancer_descriptions.select do |lb|
    lb.vpc_id == vpc_id
  end
end