Sha256: b9d0ae5199b7c6d23328342e648e56dcf3904082ceb4f44506e285887b858036

Contents?: true

Size: 897 Bytes

Versions: 10

Compression:

Stored size: 897 Bytes

Contents

module Awspec::Helper
  module Finder
    module Route53
      def find_hosted_zone(id)
        res = route53_client.list_hosted_zones
        loop do
          res.hosted_zones.each do |hosted_zone|
            if hosted_zone[:name] == id || hosted_zone[:id] == '/hostedzone/' + id || hosted_zone[:id] == id
              return hosted_zone
            end
          end
          (res.next_page? && res = res.next_page) || break
        end
      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

10 entries across 10 versions & 1 rubygems

Version Path
awspec-0.33.0 lib/awspec/helper/finder/route53.rb
awspec-0.32.0 lib/awspec/helper/finder/route53.rb
awspec-0.31.0 lib/awspec/helper/finder/route53.rb
awspec-0.30.0 lib/awspec/helper/finder/route53.rb
awspec-0.29.0 lib/awspec/helper/finder/route53.rb
awspec-0.28.1 lib/awspec/helper/finder/route53.rb
awspec-0.28.0 lib/awspec/helper/finder/route53.rb
awspec-0.27.2 lib/awspec/helper/finder/route53.rb
awspec-0.27.1 lib/awspec/helper/finder/route53.rb
awspec-0.27.0 lib/awspec/helper/finder/route53.rb