Class: Fog::Sql::AzureRM::FirewallRules

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

Overview

Sql Server Collection for Firewall Rules Service

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
14
15
16
17
18
# File 'lib/fog/azurerm/models/sql/firewall_rules.rb', line 10

def all
  requires :resource_group, :server_name

  firewall_rules = []
  service.list_firewall_rules(resource_group, server_name).each do |firewall_rule|
    firewall_rules << Fog::Sql::AzureRM::FirewallRule.parse(firewall_rule)
  end
  load(firewall_rules)
end

#check_firewall_rule_exists(resource_group, server_name, rule_name) ⇒ Object



26
27
28
# File 'lib/fog/azurerm/models/sql/firewall_rules.rb', line 26

def check_firewall_rule_exists(resource_group, server_name, rule_name)
  service.check_firewall_rule_exists(resource_group, server_name, rule_name)
end

#get(resource_group, server_name, rule_name) ⇒ Object



20
21
22
23
24
# File 'lib/fog/azurerm/models/sql/firewall_rules.rb', line 20

def get(resource_group, server_name, rule_name)
  firewall_rule = service.get_firewall_rule(resource_group, server_name, rule_name)
  firewall_rule_fog = Fog::Sql::AzureRM::FirewallRule.new(service: service)
  firewall_rule_fog.merge_attributes(Fog::Sql::AzureRM::FirewallRule.parse(firewall_rule))
end