Method: Fog::TrafficManager::AzureRM::Real#get_traffic_manager_profile

Defined in:
lib/fog/azurerm/requests/traffic_manager/get_traffic_manager_profile.rb

#get_traffic_manager_profile(resource_group, traffic_manager_profile_name) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/fog/azurerm/requests/traffic_manager/get_traffic_manager_profile.rb', line 6

def get_traffic_manager_profile(resource_group, traffic_manager_profile_name)
  msg = "Getting Traffic Manager Profile: #{traffic_manager_profile_name} in Resource Group: #{resource_group}..."
  Fog::Logger.debug msg
  begin
    profile = @traffic_mgmt_client.profiles.get(resource_group, traffic_manager_profile_name)
  rescue MsRestAzure::AzureOperationError => e
    raise_azure_exception(e, msg)
  end
  Fog::Logger.debug "Traffic Manager Profile fetched successfully in Resource Group: #{resource_group}"
  profile
end