Class: Fog::Google::DNS::Zones
- Inherits:
-
Collection
- Object
- Collection
- Fog::Google::DNS::Zones
- Defined in:
- lib/fog/google/dns/models/zones.rb
Instance Method Summary collapse
-
#all ⇒ Array<Fog::Google::DNS::Zone>
Enumerates Managed Zones that have been created but not yet deleted.
-
#get(name_or_id) ⇒ Fog::Google::DNS::Zone
Fetches the representation of an existing Managed Zone.
Instance Method Details
#all ⇒ Array<Fog::Google::DNS::Zone>
Enumerates Managed Zones that have been created but not yet deleted
11 12 13 14 |
# File 'lib/fog/google/dns/models/zones.rb', line 11 def all data = service.list_managed_zones.managed_zones.to_h || [] load(data) end |
#get(name_or_id) ⇒ Fog::Google::DNS::Zone
Fetches the representation of an existing Managed Zone
21 22 23 24 25 26 27 28 29 |
# File 'lib/fog/google/dns/models/zones.rb', line 21 def get(name_or_id) if zone = service.get_managed_zone(name_or_id).to_h new(zone) end rescue ::Google::Apis::ClientError => e raise e unless e.status_code == 404 nil end |