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-0.84.1 lib/awspec/helper/finder/route53.rb
awspec-0.84.0 lib/awspec/helper/finder/route53.rb
awspec-0.83.0 lib/awspec/helper/finder/route53.rb
awspec-0.82.3 lib/awspec/helper/finder/route53.rb
awspec-0.82.2 lib/awspec/helper/finder/route53.rb
awspec-0.82.1 lib/awspec/helper/finder/route53.rb
awspec-0.82.0 lib/awspec/helper/finder/route53.rb
awspec-0.81.1 lib/awspec/helper/finder/route53.rb
awspec-0.81.0 lib/awspec/helper/finder/route53.rb
awspec-0.80.1 lib/awspec/helper/finder/route53.rb
awspec-0.80.0 lib/awspec/helper/finder/route53.rb
awspec-0.79.2 lib/awspec/helper/finder/route53.rb
awspec-0.79.1 lib/awspec/helper/finder/route53.rb
awspec-0.79.0 lib/awspec/helper/finder/route53.rb
awspec-0.78.1 lib/awspec/helper/finder/route53.rb
awspec-0.77.1 lib/awspec/helper/finder/route53.rb
awspec-0.77.0 lib/awspec/helper/finder/route53.rb
awspec-0.76.1 lib/awspec/helper/finder/route53.rb
awspec-0.76.0 lib/awspec/helper/finder/route53.rb
awspec-0.75.2 lib/awspec/helper/finder/route53.rb