Sha256: 79a4eed02c5cf8ee7c32dc395d0dd92ed3986449e80c84f0bbc02189eb385b33
Contents?: true
Size: 1.47 KB
Versions: 28
Compression:
Stored size: 1.47 KB
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 break unless res.is_truncated res = route53_client.list_hosted_zones({ marker: res.next_marker }) 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 break unless res.is_truncated res = route53_client.list_resource_record_sets({ hosted_zone_id: id, start_record_name: res.next_record_name, start_record_type: res.next_record_type }) end selected end end end end
Version data entries
28 entries across 28 versions & 3 rubygems