class AWS::Route53::HostedZone
# Delete existing hosted zone
hosted_zone = AWS::Route53::HostedZone.new(hosted_zone_id) hosted_zone.delete
@attr_reader [String] name The hosted zone name.
@attr_reader [Integer] resource_record_set_count
The resource record set count.
@attr_reader [Array<String>] delegation_set
Attributes
change_info[R]
@return [ChangeInfo] Change info for the newly created HostedZone
instance.
id[R]
@return [String] The hosted zone ID.
Public Class Methods
new(id, options = {})
click to toggle source
@api private
Calls superclass method
AWS::Core::Resource.new
# File lib/aws/route_53/hosted_zone.rb, line 32 def initialize id, options = {} @id = id.sub(%r^/hostedzone/!, '') @change_info = options[:change_info] super end
Public Instance Methods
delete()
click to toggle source
Deletes the hosted zone. @return [ChangeInfo]
# File lib/aws/route_53/hosted_zone.rb, line 85 def delete resp = client.delete_hosted_zone(:id => id) if resp[:change_info][:id] ChangeInfo.new_from(:delete_hosted_zone, resp[:change_info], resp[:change_info][:id], :config => config) end end
exists?()
click to toggle source
@return [Boolean] Returns `true` if this hosted zone exists.
# File lib/aws/route_53/hosted_zone.rb, line 96 def exists? get_resource true rescue Errors::NoSuchHostedZone false end
path()
click to toggle source
The Hosted zone path. @return [String]
# File lib/aws/route_53/hosted_zone.rb, line 47 def path "/hostedzone/#{id}" end
resource_record_sets()
click to toggle source
Returns resource record sets. @return [ResourceRecordSetCollection]
# File lib/aws/route_53/hosted_zone.rb, line 105 def resource_record_sets ResourceRecordSetCollection.new(id, :config => config) end
Also aliased as: rrsets
Protected Instance Methods
get_resource(attr_name = nil)
click to toggle source
# File lib/aws/route_53/hosted_zone.rb, line 116 def get_resource attr_name = nil client.get_hosted_zone(:id => id) end
resource_identifiers()
click to toggle source
# File lib/aws/route_53/hosted_zone.rb, line 112 def resource_identifiers [[:id, id], [:name, name]] end