Class: Fog::Network::AzureRM::ExpressRouteCircuitAuthorization

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

Overview

Express Route Circuit Authorization model class for Network Service

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parse(circuit_authorization) ⇒ Object



16
17
18
19
20
21
# File 'lib/fog/azurerm/models/network/express_route_circuit_authorization.rb', line 16

def self.parse(circuit_authorization)
  circuit_auth_hash = get_hash_from_object(circuit_authorization)
  circuit_auth_hash['resource_group'] = get_resource_group_from_id(circuit_authorization.id)
  circuit_auth_hash['circuit_name'] = get_circuit_name_from_id(circuit_authorization.id)
  circuit_auth_hash
end

Instance Method Details

#destroyObject



29
30
31
# File 'lib/fog/azurerm/models/network/express_route_circuit_authorization.rb', line 29

def destroy
  service.delete_express_route_circuit_authorization(resource_group, circuit_name, name)
end

#saveObject



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

def save
  requires :name, :resource_group, :circuit_name
  circuit_authorization = service.create_or_update_express_route_circuit_authorization(express_route_circuit_authorization_params)
  merge_attributes(Fog::Network::AzureRM::ExpressRouteCircuitAuthorization.parse(circuit_authorization))
end