Class: Fog::DNS::Google::Zone
- Inherits:
-
Model
- Object
- Model
- Fog::DNS::Google::Zone
- Defined in:
- lib/fog/google/models/dns/zone.rb
Overview
Managed Zone resource
Instance Method Summary collapse
-
#changes ⇒ Object
Enumerates the list of Changes for the Managed Zone.
-
#destroy ⇒ Boolean
Deletes a previously created Managed Zone.
-
#records ⇒ Object
Enumerates the list of Resource Record Sets for the Managed Zone.
-
#save ⇒ Fog::DNS::Google::Zone
Creates a new Managed Zone.
Instance Method Details
#changes ⇒ Object
Enumerates the list of Changes for the Managed Zone
24 25 26 27 28 29 30 31 |
# File 'lib/fog/google/models/dns/zone.rb', line 24 def changes @changes = begin Fog::DNS::Google::Changes.new( :service => service, :zone => self ) end end |
#destroy ⇒ Boolean
Deletes a previously created Managed Zone
37 38 39 40 41 42 |
# File 'lib/fog/google/models/dns/zone.rb', line 37 def destroy requires :identity service.delete_managed_zone(self.identity) true end |
#records ⇒ Object
Enumerates the list of Resource Record Sets for the Managed Zone
48 49 50 51 52 53 54 55 |
# File 'lib/fog/google/models/dns/zone.rb', line 48 def records @records = begin Fog::DNS::Google::Records.new( :service => service, :zone => self ) end end |
#save ⇒ Fog::DNS::Google::Zone
Creates a new Managed Zone
62 63 64 65 66 67 68 69 70 |
# File 'lib/fog/google/models/dns/zone.rb', line 62 def save requires :name, :domain, :description raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted? data = service.create_managed_zone(self.name, self.domain, self.description) merge_attributes(data.body) self end |