class Fog::DNS::Google::Record
Resource Record Sets resource
Attributes
Public Instance Methods
destroy(async = true)
click to toggle source
Deletes a previously created Resource Record Sets resource
@param [Boolean] async If the operation must be asyncronous (true by default) @return [Boolean] If the Resource Record Set has been deleted
# File lib/fog/dns/google/models/record.rb, line 21 def destroy(async = true) requires :name, :type, :ttl, :rrdatas data = service.create_change(zone.id, [], [resource_record_set_format]) change = Fog::DNS::Google::Changes .new(:service => service, :zone => zone) .get(data.id) change.wait_for { ready? } unless async true end
modify(new_attributes)
click to toggle source
Modifies a previously created Resource Record Sets resource
@param [Hash] new_attributes Resource Record Set new attributes @return [Fog::DNS::Google::Record] Resource Record Sets resource
# File lib/fog/dns/google/models/record.rb, line 37 def modify(new_attributes) requires :name, :type, :ttl, :rrdatas deletions = resource_record_set_format merge_attributes(new_attributes) data = service.create_change(zone.id, [resource_record_set_format], [deletions]) change = Fog::DNS::Google::Changes .new(:service => service, :zone => zone) .get(data.id) new_attributes.key?(:async) ? async = new_attributes[:async] : async = true change.wait_for { ready? } unless async self end
reload()
click to toggle source
save()
click to toggle source
Creates a new Resource Record Sets resource
@return [Fog::DNS::Google::Record] Resource Record Sets resource
# File lib/fog/dns/google/models/record.rb, line 68 def save requires :name, :type, :ttl, :rrdatas data = service.create_change(zone.id, [resource_record_set_format], []) change = Fog::DNS::Google::Changes .new(:service => service, :zone => zone) .get(data.id) change.wait_for { ready? } self end
Private Instance Methods
resource_record_set_format()
click to toggle source
Resource Record Sets resource representation
# File lib/fog/dns/google/models/record.rb, line 96 def resource_record_set_format { :kind => "dns#resourceRecordSet", :name => name, :type => type, :ttl => ttl, :rrdatas => rrdatas } end