Class: Fog::DNS::Google::Zones
- Inherits:
-
Collection
- Object
- Collection
- Fog::DNS::Google::Zones
- Defined in:
- lib/fog/google/models/dns/zones.rb
Instance Method Summary collapse
-
#all ⇒ Array<Fog::DNS::Google::Zone>
Enumerates Managed Zones that have been created but not yet deleted.
-
#get(name_or_id) ⇒ Fog::DNS::Google::Zone
Fetches the representation of an existing Managed Zone.
Instance Method Details
#all ⇒ Array<Fog::DNS::Google::Zone>
Enumerates Managed Zones that have been created but not yet deleted
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
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 |