Class: Fog::Network::AzureRM::NetworkSecurityRules

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

Overview

collection class for Network Security Rule

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  requires :resource_group, :network_security_group_name
  network_security_rules = []
  service.list_network_security_rules(resource_group, network_security_group_name).each do |nsr|
    network_security_rules << Fog::Network::AzureRM::NetworkSecurityRule.parse(nsr)
  end
  load(network_security_rules)
end

#check_net_sec_rule_exists(resource_group, network_security_group_name, name) ⇒ Object



25
26
27
# File 'lib/fog/azurerm/models/network/network_security_rules.rb', line 25

def check_net_sec_rule_exists(resource_group, network_security_group_name, name)
  service.check_net_sec_rule_exists(resource_group, network_security_group_name, name)
end

#get(resource_group, network_security_group_name, name) ⇒ Object



19
20
21
22
23
# File 'lib/fog/azurerm/models/network/network_security_rules.rb', line 19

def get(resource_group, network_security_group_name, name)
  network_security_rule = service.get_network_security_rule(resource_group, network_security_group_name, name)
  network_security_rule_fog = Fog::Network::AzureRM::NetworkSecurityRule.new(service: service)
  network_security_rule_fog.merge_attributes(Fog::Network::AzureRM::NetworkSecurityRule.parse(network_security_rule))
end