Sha256: 82a944a320b6db997712be57c6d4bde232add882c543753493c461ca35e5e88a

Contents?: true

Size: 964 Bytes

Versions: 150

Compression:

Stored size: 964 Bytes

Contents

module Awspec::Helper
  module Finder
    module Route53
      def find_hosted_zone(id)
        res = route53_client.list_hosted_zones
        selected = []
        loop do
          res.hosted_zones.each do |hosted_zone|
            if hosted_zone[:name] == id || hosted_zone[:id] == '/hostedzone/' + id || hosted_zone[:id] == id
              selected.push(hosted_zone)
            end
          end
          (res.next_page? && res = res.next_page) || break
        end
        selected.single_resource(id)
      end

      def select_record_sets_by_hosted_zone_id(id)
        selected = []
        res = route53_client.list_resource_record_sets({
                                                         hosted_zone_id: id
                                                       })
        loop do
          selected += res.resource_record_sets
          (res.next_page? && res = res.next_page) || break
        end
        selected
      end
    end
  end
end

Version data entries

150 entries across 150 versions & 2 rubygems

Version Path
awspec-1.18.2 lib/awspec/helper/finder/route53.rb
awspec-1.18.1 lib/awspec/helper/finder/route53.rb
awspec-1.18.0 lib/awspec/helper/finder/route53.rb
awspec-1.17.4 lib/awspec/helper/finder/route53.rb
awspec-1.17.3 lib/awspec/helper/finder/route53.rb
awspec-1.17.2 lib/awspec/helper/finder/route53.rb
awspec-1.17.1 lib/awspec/helper/finder/route53.rb
awspec-1.17.0 lib/awspec/helper/finder/route53.rb
awspec-1.16.1 lib/awspec/helper/finder/route53.rb
awspec-1.16.0 lib/awspec/helper/finder/route53.rb
awspec-1.15.3 lib/awspec/helper/finder/route53.rb
awspec-1.15.2 lib/awspec/helper/finder/route53.rb
awspec-1.15.1 lib/awspec/helper/finder/route53.rb
awspec-1.15.0 lib/awspec/helper/finder/route53.rb
awspec-1.14.1 lib/awspec/helper/finder/route53.rb
awspec-1.14.0 lib/awspec/helper/finder/route53.rb
awspec-1.13.0 lib/awspec/helper/finder/route53.rb
awspec-1.12.7 lib/awspec/helper/finder/route53.rb
awspec-1.12.6 lib/awspec/helper/finder/route53.rb
awspec-1.12.5 lib/awspec/helper/finder/route53.rb