Class: Fog::DNS::Google::Zones

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

Instance Method Summary collapse

Instance Method Details

#allArray<Fog::DNS::Google::Zone>

Enumerates Managed Zones that have been created but not yet deleted

Returns:



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

def all
  data = service.list_managed_zones.body['managedZones'] || []
  load(data)
end

#get(name_or_id) ⇒ Fog::DNS::Google::Zone

Fetches the representation of an existing Managed Zone

Parameters:

  • name_or_id (String)

    Managed Zone name or identity

Returns:



24
25
26
27
28
29
30
# File 'lib/fog/google/models/dns/zones.rb', line 24

def get(name_or_id)
  if zone = service.get_managed_zone(name_or_id).body
    new(zone)
  end
rescue Fog::Errors::NotFound
  nil
end