class Awspec::Type::Route53HostedZone
Public Instance Methods
has_record_set?(name, type, value, options = {})
click to toggle source
# File lib/awspec/type/route53_hosted_zone.rb, line 15 def has_record_set?(name, type, value, options = {}) name.gsub!(/\*/, '\\\052') # wildcard support ret = resource_via_client_record_sets.find do |record_set| # next if record_set.type != type.upcase next unless record_set.type.casecmp(type) == 0 if !record_set.resource_records.empty? sorted = record_set.resource_records.map { |r| r.value }.sort.join("\n") ttl = options[:ttl] || record_set[:ttl] record_set.name == name && \ value.split("\n").sort.join("\n") == sorted && \ record_set.ttl == ttl else # ALIAS record_set.name == name && \ record_set.alias_target.dns_name == options[:alias_dns_name] && \ record_set.alias_target.hosted_zone_id == options[:alias_hosted_zone_id] end end end
id()
click to toggle source
# File lib/awspec/type/route53_hosted_zone.rb, line 7 def id @id ||= resource_via_client.id if resource_via_client end
resource_via_client()
click to toggle source
# File lib/awspec/type/route53_hosted_zone.rb, line 3 def resource_via_client @resource_via_client ||= find_hosted_zone(@display_name) end
resource_via_client_record_sets()
click to toggle source
# File lib/awspec/type/route53_hosted_zone.rb, line 11 def resource_via_client_record_sets @resource_via_client_record_sets ||= select_record_sets_by_hosted_zone_id(id) end