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.74.0 lib/awspec/helper/finder/alb.rb