Class: Fog::DNS::AzureRM::RecordSets

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/azurerm/models/dns/record_sets.rb

Overview

This class is giving implementation of all/get for RecordSets.

Instance Method Summary collapse

Instance Method Details

#allObject



13
14
15
16
17
18
19
20
# File 'lib/fog/azurerm/models/dns/record_sets.rb', line 13

def all
  requires :resource_group, :zone_name
  record_sets = []
  service.list_record_sets(resource_group, zone_name).each do |r|
    record_sets << Fog::DNS::AzureRM::RecordSet.parse(r)
  end
  load(record_sets)
end

#check_record_set_exists(resource_group, name, zone_name, record_type) ⇒ Object



28
29
30
# File 'lib/fog/azurerm/models/dns/record_sets.rb', line 28

def check_record_set_exists(resource_group, name, zone_name, record_type)
  service.check_record_set_exists(resource_group, name, zone_name, record_type)
end

#get(resource_group, name, zone_name, record_type) ⇒ Object



22
23
24
25
26
# File 'lib/fog/azurerm/models/dns/record_sets.rb', line 22

def get(resource_group, name, zone_name, record_type)
  record_set = service.get_record_set(resource_group, name, zone_name, record_type)
  record_set_fog = Fog::DNS::AzureRM::RecordSet.new(service: service)
  record_set_fog.merge_attributes(Fog::DNS::AzureRM::RecordSet.parse(record_set))
end