Sha256: 7bb716d8d34360ffb4de49aa8a6daf9adb6a10c3dfdb8c4047840c8153e70992

Contents?: true

Size: 436 Bytes

Versions: 21

Compression:

Stored size: 436 Bytes

Contents

module Awspec::Helper
  module Finder
    module Alb
      def find_alb(id)
        res = elbv2_client.describe_load_balancers({ names: [id] })
        res.load_balancers.single_resource(id)
      rescue
        return nil
      end

      def select_alb_by_vpc_id(vpc_id)
        res = elbv2_client.describe_load_balancers
        res.load_balancers.select do |lb|
          lb.vpc_id == vpc_id
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
awspec-0.82.3 lib/awspec/helper/finder/alb.rb
awspec-0.82.2 lib/awspec/helper/finder/alb.rb
awspec-0.82.1 lib/awspec/helper/finder/alb.rb
awspec-0.82.0 lib/awspec/helper/finder/alb.rb
awspec-0.81.1 lib/awspec/helper/finder/alb.rb
awspec-0.81.0 lib/awspec/helper/finder/alb.rb
awspec-0.80.1 lib/awspec/helper/finder/alb.rb
awspec-0.80.0 lib/awspec/helper/finder/alb.rb
awspec-0.79.2 lib/awspec/helper/finder/alb.rb
awspec-0.79.1 lib/awspec/helper/finder/alb.rb
awspec-0.79.0 lib/awspec/helper/finder/alb.rb
awspec-0.78.1 lib/awspec/helper/finder/alb.rb
awspec-0.77.1 lib/awspec/helper/finder/alb.rb
awspec-0.77.0 lib/awspec/helper/finder/alb.rb
awspec-0.76.1 lib/awspec/helper/finder/alb.rb
awspec-0.76.0 lib/awspec/helper/finder/alb.rb
awspec-0.75.2 lib/awspec/helper/finder/alb.rb
awspec-0.75.1 lib/awspec/helper/finder/alb.rb
awspec-0.75.0 lib/awspec/helper/finder/alb.rb
awspec-0.74.1 lib/awspec/helper/finder/alb.rb