You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.
Class: AWS::Route53::HostedZone
- Inherits:
-
Core::Resource
- Object
- Core::Resource
- AWS::Route53::HostedZone
- Defined in:
- lib/aws/route_53/hosted_zone.rb
Overview
Delete existing hosted zone
hosted_zone = AWS::Route53::HostedZone.new(hosted_zone_id)
hosted_zone.delete
Constant Summary
- S3_HOSTED_ZONE_IDS =
{ 'us-east-1' => 'Z3AQBSTGFYJSTF', 'us-west-2' => 'Z3BJ6K6RIION7M', 'us-west-1' => 'Z2F56UZL2M1ACD', 'eu-west-1' => 'Z1BKCTXD74EZPE', 'ap-southeast-1' => 'Z3O0J2DXBE1FTB', 'ap-southeast-2' => 'Z1WCIGYICN2BYD', 'ap-northeast-1' => 'Z2M4EHUR26P7ZW', 'sa-east-1' => 'Z7KQH4QJS55SO', 'us-gov-west-1' => 'Z31GFT0UA1I2HV' }
Instance Attribute Summary collapse
-
#change_info ⇒ ChangeInfo
readonly
Change info for the newly created HostedZone instance.
-
#delegation_set ⇒ Array<String>
readonly
The current value of delegation_set.
-
#id ⇒ String
readonly
The hosted zone ID.
-
#name ⇒ String
readonly
The hosted zone name.
-
#resource_record_set_count ⇒ Integer
readonly
The resource record set count.
Instance Method Summary collapse
-
#associate_vpc(vpc) ⇒ ChangeInfo
Associates an additional VPC with a private hosted zone.
-
#delete ⇒ ChangeInfo
Deletes the hosted zone.
-
#disassociate_vpc(vpc) ⇒ ChangeInfo
Disassociates an VPC from an private hosted zone.
-
#exists? ⇒ Boolean
Returns
true
if this hosted zone exists. -
#path ⇒ String
The Hosted zone path.
-
#resource_record_sets ⇒ ResourceRecordSetCollection
(also: #rrsets)
Returns resource record sets.
Instance Attribute Details
#change_info ⇒ ChangeInfo (readonly)
Returns Change info for the newly created HostedZone instance.
55 56 57 |
# File 'lib/aws/route_53/hosted_zone.rb', line 55 def change_info @change_info end |
#delegation_set ⇒ Array<String> (readonly)
Returns the current value of delegation_set
29 30 31 |
# File 'lib/aws/route_53/hosted_zone.rb', line 29 def delegation_set @delegation_set end |
#id ⇒ String (readonly)
Returns The hosted zone ID.
51 52 53 |
# File 'lib/aws/route_53/hosted_zone.rb', line 51 def id @id end |
#name ⇒ String (readonly)
The hosted zone name.
29 30 31 |
# File 'lib/aws/route_53/hosted_zone.rb', line 29 def name @name end |
#resource_record_set_count ⇒ Integer (readonly)
The resource record set count.
29 30 31 |
# File 'lib/aws/route_53/hosted_zone.rb', line 29 def resource_record_set_count @resource_record_set_count end |
Instance Method Details
#associate_vpc(vpc) ⇒ ChangeInfo
Associates an additional VPC with a private hosted zone.
127 128 129 130 131 132 133 134 |
# File 'lib/aws/route_53/hosted_zone.rb', line 127 def associate_vpc vpc resp = client.associate_vpc_with_hosted_zone(:hosted_zone_id => id, :vpc => vpc) if resp[:change_info][:id] ChangeInfo.new_from(:associate_vpc_with_hosted_zone, resp[:change_info], resp[:change_info][:id]) end end |
#delete ⇒ ChangeInfo
Deletes the hosted zone.
100 101 102 103 104 105 106 107 108 |
# File 'lib/aws/route_53/hosted_zone.rb', line 100 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 |
#disassociate_vpc(vpc) ⇒ ChangeInfo
Disassociates an VPC from an private hosted zone.
138 139 140 141 142 143 144 145 |
# File 'lib/aws/route_53/hosted_zone.rb', line 138 def disassociate_vpc vpc resp = client.disassociate_vpc_from_hosted_zone(:hosted_zone_id => id, :vpc => vpc) if resp[:change_info][:id] ChangeInfo.new_from(:disassociate_vpc_from_hosted_zone, resp[:change_info], resp[:change_info][:id]) end end |
#exists? ⇒ Boolean
Returns true
if this hosted zone exists.
111 112 113 114 115 116 |
# File 'lib/aws/route_53/hosted_zone.rb', line 111 def exists? get_resource true rescue Errors::NoSuchHostedZone false end |
#path ⇒ String
The Hosted zone path.
59 60 61 |
# File 'lib/aws/route_53/hosted_zone.rb', line 59 def path "/hostedzone/#{id}" end |
#resource_record_sets ⇒ ResourceRecordSetCollection Also known as: rrsets
Returns resource record sets.
120 121 122 |
# File 'lib/aws/route_53/hosted_zone.rb', line 120 def resource_record_sets ResourceRecordSetCollection.new(id, :config => config) end |