Sha256: c34f49355992c4675bcdcf7b0fdc01254da2afa0c73edbc197384f9f151a7235

Contents?: true

Size: 618 Bytes

Versions: 40

Compression:

Stored size: 618 Bytes

Contents

module Awspec::Helper
  module Finder
    module Elb
      def find_elb(id)
        res = @elb_client.describe_load_balancers({
                                                    load_balancer_names: [id]
                                                  })
        return res[:load_balancer_descriptions].first if res[:load_balancer_descriptions].count == 1
      rescue
        return nil
      end

      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
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
awspec-0.26.2 lib/awspec/helper/finder/elb.rb
awspec-0.26.1 lib/awspec/helper/finder/elb.rb
awspec-0.26.0 lib/awspec/helper/finder/elb.rb
awspec-0.25.3 lib/awspec/helper/finder/elb.rb
awspec-0.25.2 lib/awspec/helper/finder/elb.rb
awspec-0.25.1 lib/awspec/helper/finder/elb.rb
awspec-0.25.0 lib/awspec/helper/finder/elb.rb
awspec-0.24.2 lib/awspec/helper/finder/elb.rb
awspec-0.24.1 lib/awspec/helper/finder/elb.rb
awspec-0.24.0 lib/awspec/helper/finder/elb.rb
awspec-0.23.0 lib/awspec/helper/finder/elb.rb
awspec-0.22.1 lib/awspec/helper/finder/elb.rb
awspec-0.22.0 lib/awspec/helper/finder/elb.rb
awspec-0.21.6 lib/awspec/helper/finder/elb.rb
awspec-0.21.5 lib/awspec/helper/finder/elb.rb
awspec-0.21.4 lib/awspec/helper/finder/elb.rb
awspec-0.21.3 lib/awspec/helper/finder/elb.rb
awspec-0.21.2 lib/awspec/helper/finder/elb.rb
awspec-0.21.1 lib/awspec/helper/finder/elb.rb
awspec-0.21.0 lib/awspec/helper/finder/elb.rb