Class: Fog::AWS::DNS::Zone

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/aws/models/dns/zone.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



15
16
17
18
19
# File 'lib/fog/aws/models/dns/zone.rb', line 15

def destroy
  requires :identity
  service.delete_hosted_zone(identity)
  true
end

#recordsObject



21
22
23
24
25
26
27
28
# File 'lib/fog/aws/models/dns/zone.rb', line 21

def records
  @records ||= begin
    Fog::AWS::DNS::Records.new(
      :zone       => self,
      :service => service
    )
  end
end

#saveObject



30
31
32
33
34
35
36
37
38
# File 'lib/fog/aws/models/dns/zone.rb', line 30

def save
  requires :domain
  options = {}
  options[:caller_ref]  = caller_reference if caller_reference
  options[:comment]     = description if description
  data = service.create_hosted_zone(domain, options).body
  merge_attributes(data)
  true
end