Class: Fog::TrafficManager::AzureRM::TrafficManagerEndPoints

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

Overview

Traffic Manager End Point Collection for TrafficManager Service

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
14
15
16
# File 'lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb', line 10

def all
  requires :resource_group, :traffic_manager_profile_name

  end_points = service.get_traffic_manager_profile(resource_group, traffic_manager_profile_name).endpoints
  traffic_manager_endpoints = end_points.map { |endpoint| Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint) }
  load(traffic_manager_endpoints)
end

#check_traffic_manager_endpoint_exists(resource_group, traffic_manager_profile_name, end_point_name, type) ⇒ Object



24
25
26
# File 'lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb', line 24

def check_traffic_manager_endpoint_exists(resource_group, traffic_manager_profile_name, end_point_name, type)
  service.check_traffic_manager_endpoint_exists(resource_group, traffic_manager_profile_name, end_point_name, type)
end

#get(resource_group, traffic_manager_profile_name, end_point_name, type) ⇒ Object



18
19
20
21
22
# File 'lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb', line 18

def get(resource_group, traffic_manager_profile_name, end_point_name, type)
  endpoint = service.get_traffic_manager_end_point(resource_group, traffic_manager_profile_name, end_point_name, type)
  endpoint_fog = Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.new(service: service)
  endpoint_fog.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint))
end