class Fog::DNS::Google::Records
Public Instance Methods
all()
click to toggle source
Enumerates Resource Record
Sets that have been created but not yet deleted
@return [Array<Fog::DNS::Google::Record>] List of Resource Record
Sets resources
# File lib/fog/google/models/dns/records.rb, line 16 def all requires :zone data = service.list_resource_record_sets(zone.identity).body['rrsets'] || [] load(data) rescue Fog::Errors::NotFound [] end
get(name, type)
click to toggle source
Fetches the representation of an existing Resource Record
Set
@param [String] name Resource Record
Set name @param [String] type Resource Record
Set type @return [Fog::DNS::Google::Record] Resource Record
Set resource
# File lib/fog/google/models/dns/records.rb, line 31 def get(name, type) requires :zone records = service.list_resource_record_sets(zone.identity, { :name => name, :type => type }).body['rrsets'] || [] records.any? ? new(records.first) : nil rescue Fog::Errors::NotFound nil end
new(attributes = {})
click to toggle source