Class: AWS::Route53::HostedZoneCollection
- Inherits:
-
Object
- Object
- AWS::Route53::HostedZoneCollection
- Includes:
- Core::Collection::WithLimitAndNextToken
- Defined in:
- lib/aws/route_53/hosted_zone_collection.rb
Overview
Instance Method Summary collapse
-
#[](hosted_zone_id) ⇒ HostedZone
Find hosted zone by id.
- #create(name, options = {}) ⇒ HostedZone
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Instance Method Details
#[](hosted_zone_id) ⇒ HostedZone
Find hosted zone by id.
42 43 44 |
# File 'lib/aws/route_53/hosted_zone_collection.rb', line 42 def [] hosted_zone_id HostedZone.new(hosted_zone_id, :config => config) end |
#create(name, options = {}) ⇒ HostedZone
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/aws/route_53/hosted_zone_collection.rb', line 50 def create name, = {} [:name] = name unless [:caller_reference] [:caller_reference] = "CreateHostedZone, #{name}, #{Time.now.httpdate}" end if [:comment] [:hosted_zone_config] ||= {} [:hosted_zone_config][:comment] = [:comment] end resp = client.create_hosted_zone() change_info = ChangeInfo.new_from(:create_hosted_zone, resp, resp[:change_info][:id], :config => config) HostedZone.new_from(:create_hosted_zone, resp, resp[:hosted_zone][:id], :change_info => change_info, :config => config) end |