Class: Fog::AWS::DNS::Zones

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



12
13
14
15
16
17
# File 'lib/fog/aws/models/dns/zones.rb', line 12

def all(options = {})
  options[:marker]   ||= marker unless marker.nil?
  options[:maxitems] ||= max_items unless max_items.nil?
  data = service.list_hosted_zones(options).body['HostedZones']
  load(data)
end

#get(zone_id) ⇒ Object



19
20
21
22
23
24
# File 'lib/fog/aws/models/dns/zones.rb', line 19

def get(zone_id)
  data = service.get_hosted_zone(zone_id).body
  new(data)
rescue Fog::AWS::DNS::NotFound
  nil
end