azure_mgmt_traffic_manager 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-11-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb +6 -5
- data/lib/2017-03-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb +6 -5
- data/lib/2017-05-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb +6 -5
- data/lib/2017-09-01-preview/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb +6 -5
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager.rb +50 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/endpoints.rb +493 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb +110 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb +58 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb +47 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/dns_config.rb +76 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/endpoint.rb +188 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb +20 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/endpoint_status.rb +16 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/monitor_config.rb +124 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/monitor_protocol.rb +17 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/profile.rb +172 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/profile_list_result.rb +55 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb +19 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/profile_status.rb +16 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/proxy_resource.rb +63 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/region.rb +79 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/resource.rb +73 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/tracked_resource.rb +92 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb +76 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb +93 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/traffic_routing_method.rb +18 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/models/traffic_view_enrollment_status.rb +16 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/module_definition.rb +9 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/profiles.rb +720 -0
- data/lib/2018-02-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb +141 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager.rb +58 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/endpoints.rb +493 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb +110 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/heat_map.rb +137 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb +58 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb +47 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/dns_config.rb +76 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/endpoint.rb +206 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb +20 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/endpoint_properties_custom_headers_item.rb +57 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/endpoint_status.rb +16 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/heat_map_endpoint.rb +58 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/heat_map_model.rb +125 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/monitor_config.rb +165 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/monitor_config_custom_headers_item.rb +57 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/monitor_config_expected_status_code_ranges_item.rb +58 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/monitor_protocol.rb +17 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/profile.rb +169 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/profile_list_result.rb +55 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb +19 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/profile_status.rb +16 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/proxy_resource.rb +60 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/query_experience.rb +70 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/region.rb +79 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/resource.rb +70 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/tracked_resource.rb +89 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/traffic_flow.rb +92 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb +73 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb +93 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/traffic_routing_method.rb +18 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/models/traffic_view_enrollment_status.rb +16 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/module_definition.rb +9 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/profiles.rb +720 -0
- data/lib/2018-03-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb +145 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager.rb +61 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/endpoints.rb +493 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb +110 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/heat_map.rb +137 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb +58 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb +47 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/dns_config.rb +76 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/endpoint.rb +232 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb +20 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/endpoint_properties_custom_headers_item.rb +57 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/endpoint_properties_subnets_item.rb +69 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/endpoint_status.rb +16 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/heat_map_endpoint.rb +58 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/heat_map_model.rb +128 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/monitor_config.rb +165 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/monitor_config_custom_headers_item.rb +57 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/monitor_config_expected_status_code_ranges_item.rb +58 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/monitor_protocol.rb +17 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/profile.rb +184 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/profile_list_result.rb +55 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb +19 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/profile_status.rb +16 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/proxy_resource.rb +63 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/query_experience.rb +70 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/region.rb +79 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/resource.rb +73 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/tracked_resource.rb +92 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/traffic_flow.rb +92 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb +76 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb +93 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/traffic_routing_method.rb +20 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/traffic_view_enrollment_status.rb +16 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/models/user_metrics_model.rb +73 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/module_definition.rb +9 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/profiles.rb +720 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb +149 -0
- data/lib/2018-04-01/generated/azure_mgmt_traffic_manager/traffic_manager_user_metrics_keys.rb +280 -0
- data/lib/azure_mgmt_traffic_manager.rb +4 -1
- data/lib/profiles/latest/modules/trafficmanager_profile_module.rb +98 -86
- data/lib/version.rb +1 -1
- metadata +102 -5
@@ -0,0 +1,110 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::TrafficManager::Mgmt::V2018_03_01
|
7
|
+
#
|
8
|
+
# GeographicHierarchies
|
9
|
+
#
|
10
|
+
class GeographicHierarchies
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the GeographicHierarchies class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [TrafficManagerManagementClient] reference to the TrafficManagerManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets the default Geographic Hierarchy used by the Geographic traffic routing
|
26
|
+
# method.
|
27
|
+
#
|
28
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
29
|
+
# will be added to the HTTP request.
|
30
|
+
#
|
31
|
+
# @return [TrafficManagerGeographicHierarchy] operation results.
|
32
|
+
#
|
33
|
+
def get_default(custom_headers:nil)
|
34
|
+
response = get_default_async(custom_headers:custom_headers).value!
|
35
|
+
response.body unless response.nil?
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Gets the default Geographic Hierarchy used by the Geographic traffic routing
|
40
|
+
# method.
|
41
|
+
#
|
42
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
43
|
+
# will be added to the HTTP request.
|
44
|
+
#
|
45
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
46
|
+
#
|
47
|
+
def get_default_with_http_info(custom_headers:nil)
|
48
|
+
get_default_async(custom_headers:custom_headers).value!
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Gets the default Geographic Hierarchy used by the Geographic traffic routing
|
53
|
+
# method.
|
54
|
+
#
|
55
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
56
|
+
# to the HTTP request.
|
57
|
+
#
|
58
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
59
|
+
#
|
60
|
+
def get_default_async(custom_headers:nil)
|
61
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
62
|
+
|
63
|
+
|
64
|
+
request_headers = {}
|
65
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
66
|
+
|
67
|
+
# Set Headers
|
68
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
69
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
70
|
+
path_template = 'providers/Microsoft.Network/trafficManagerGeographicHierarchies/default'
|
71
|
+
|
72
|
+
request_url = @base_url || @client.base_url
|
73
|
+
|
74
|
+
options = {
|
75
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
76
|
+
query_params: {'api-version' => @client.api_version},
|
77
|
+
headers: request_headers.merge(custom_headers || {}),
|
78
|
+
base_url: request_url
|
79
|
+
}
|
80
|
+
promise = @client.make_request_async(:get, path_template, options)
|
81
|
+
|
82
|
+
promise = promise.then do |result|
|
83
|
+
http_response = result.response
|
84
|
+
status_code = http_response.status
|
85
|
+
response_content = http_response.body
|
86
|
+
unless status_code == 200
|
87
|
+
error_model = JSON.load(response_content)
|
88
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
89
|
+
end
|
90
|
+
|
91
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
92
|
+
# Deserialize Response
|
93
|
+
if status_code == 200
|
94
|
+
begin
|
95
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
96
|
+
result_mapper = Azure::TrafficManager::Mgmt::V2018_03_01::Models::TrafficManagerGeographicHierarchy.mapper()
|
97
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
98
|
+
rescue Exception => e
|
99
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
result
|
104
|
+
end
|
105
|
+
|
106
|
+
promise.execute
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::TrafficManager::Mgmt::V2018_03_01
|
7
|
+
#
|
8
|
+
# HeatMap
|
9
|
+
#
|
10
|
+
class HeatMap
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the HeatMap class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [TrafficManagerManagementClient] reference to the TrafficManagerManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets latest heatmap for Traffic Manager profile.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group containing
|
28
|
+
# the Traffic Manager endpoint.
|
29
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
30
|
+
# @param top_left [Array<Float>] The top left latitude,longitude pair of the
|
31
|
+
# rectangular viewport to query for.
|
32
|
+
# @param bot_right [Array<Float>] The bottom right latitude,longitude pair of
|
33
|
+
# the rectangular viewport to query for.
|
34
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
35
|
+
# will be added to the HTTP request.
|
36
|
+
#
|
37
|
+
# @return [HeatMapModel] operation results.
|
38
|
+
#
|
39
|
+
def get(resource_group_name, profile_name, top_left:nil, bot_right:nil, custom_headers:nil)
|
40
|
+
response = get_async(resource_group_name, profile_name, top_left:top_left, bot_right:bot_right, custom_headers:custom_headers).value!
|
41
|
+
response.body unless response.nil?
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# Gets latest heatmap for Traffic Manager profile.
|
46
|
+
#
|
47
|
+
# @param resource_group_name [String] The name of the resource group containing
|
48
|
+
# the Traffic Manager endpoint.
|
49
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
50
|
+
# @param top_left [Array<Float>] The top left latitude,longitude pair of the
|
51
|
+
# rectangular viewport to query for.
|
52
|
+
# @param bot_right [Array<Float>] The bottom right latitude,longitude pair of
|
53
|
+
# the rectangular viewport to query for.
|
54
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
55
|
+
# will be added to the HTTP request.
|
56
|
+
#
|
57
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
58
|
+
#
|
59
|
+
def get_with_http_info(resource_group_name, profile_name, top_left:nil, bot_right:nil, custom_headers:nil)
|
60
|
+
get_async(resource_group_name, profile_name, top_left:top_left, bot_right:bot_right, custom_headers:custom_headers).value!
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# Gets latest heatmap for Traffic Manager profile.
|
65
|
+
#
|
66
|
+
# @param resource_group_name [String] The name of the resource group containing
|
67
|
+
# the Traffic Manager endpoint.
|
68
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
69
|
+
# @param top_left [Array<Float>] The top left latitude,longitude pair of the
|
70
|
+
# rectangular viewport to query for.
|
71
|
+
# @param bot_right [Array<Float>] The bottom right latitude,longitude pair of
|
72
|
+
# the rectangular viewport to query for.
|
73
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
74
|
+
# to the HTTP request.
|
75
|
+
#
|
76
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
77
|
+
#
|
78
|
+
def get_async(resource_group_name, profile_name, top_left:nil, bot_right:nil, custom_headers:nil)
|
79
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
80
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
81
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
82
|
+
heat_map_type = 'default'
|
83
|
+
fail ArgumentError, "'top_left' should satisfy the constraint - 'MaxItems': '2'" if !top_left.nil? && top_left.length > 2
|
84
|
+
fail ArgumentError, "'top_left' should satisfy the constraint - 'MinItems': '2'" if !top_left.nil? && top_left.length < 2
|
85
|
+
fail ArgumentError, "'bot_right' should satisfy the constraint - 'MaxItems': '2'" if !bot_right.nil? && bot_right.length > 2
|
86
|
+
fail ArgumentError, "'bot_right' should satisfy the constraint - 'MinItems': '2'" if !bot_right.nil? && bot_right.length < 2
|
87
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
88
|
+
|
89
|
+
|
90
|
+
request_headers = {}
|
91
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
92
|
+
|
93
|
+
# Set Headers
|
94
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
95
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
96
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}'
|
97
|
+
|
98
|
+
request_url = @base_url || @client.base_url
|
99
|
+
|
100
|
+
options = {
|
101
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
102
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'profileName' => profile_name,'heatMapType' => heat_map_type},
|
103
|
+
query_params: {'topLeft' => top_left.nil? ? nil : top_left.join(','),'botRight' => bot_right.nil? ? nil : bot_right.join(','),'api-version' => @client.api_version},
|
104
|
+
headers: request_headers.merge(custom_headers || {}),
|
105
|
+
base_url: request_url
|
106
|
+
}
|
107
|
+
promise = @client.make_request_async(:get, path_template, options)
|
108
|
+
|
109
|
+
promise = promise.then do |result|
|
110
|
+
http_response = result.response
|
111
|
+
status_code = http_response.status
|
112
|
+
response_content = http_response.body
|
113
|
+
unless status_code == 200
|
114
|
+
error_model = JSON.load(response_content)
|
115
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
116
|
+
end
|
117
|
+
|
118
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
119
|
+
# Deserialize Response
|
120
|
+
if status_code == 200
|
121
|
+
begin
|
122
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
123
|
+
result_mapper = Azure::TrafficManager::Mgmt::V2018_03_01::Models::HeatMapModel.mapper()
|
124
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
125
|
+
rescue Exception => e
|
126
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
result
|
131
|
+
end
|
132
|
+
|
133
|
+
promise.execute
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::TrafficManager::Mgmt::V2018_03_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Parameters supplied to check Traffic Manager name operation.
|
10
|
+
#
|
11
|
+
class CheckTrafficManagerRelativeDnsNameAvailabilityParameters
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The name of the resource.
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [String] The type of the resource.
|
19
|
+
attr_accessor :type
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for CheckTrafficManagerRelativeDnsNameAvailabilityParameters
|
24
|
+
# class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
client_side_validation: true,
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'CheckTrafficManagerRelativeDnsNameAvailabilityParameters',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'CheckTrafficManagerRelativeDnsNameAvailabilityParameters',
|
35
|
+
model_properties: {
|
36
|
+
name: {
|
37
|
+
client_side_validation: true,
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'name',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
type: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
serialized_name: 'type',
|
48
|
+
type: {
|
49
|
+
name: 'String'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::TrafficManager::Mgmt::V2018_03_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The result of the request or operation.
|
10
|
+
#
|
11
|
+
class DeleteOperationResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Boolean] The result of the operation or request.
|
16
|
+
attr_accessor :operation_result
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for DeleteOperationResult class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
client_side_validation: true,
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'DeleteOperationResult',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'DeleteOperationResult',
|
31
|
+
model_properties: {
|
32
|
+
operation_result: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
read_only: true,
|
36
|
+
serialized_name: 'boolean',
|
37
|
+
type: {
|
38
|
+
name: 'Boolean'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::TrafficManager::Mgmt::V2018_03_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Class containing DNS settings in a Traffic Manager profile.
|
10
|
+
#
|
11
|
+
class DnsConfig
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The relative DNS name provided by this Traffic Manager
|
16
|
+
# profile. This value is combined with the DNS domain name used by Azure
|
17
|
+
# Traffic Manager to form the fully-qualified domain name (FQDN) of the
|
18
|
+
# profile.
|
19
|
+
attr_accessor :relative_name
|
20
|
+
|
21
|
+
# @return [String] The fully-qualified domain name (FQDN) of the Traffic
|
22
|
+
# Manager profile. This is formed from the concatenation of the
|
23
|
+
# RelativeName with the DNS domain used by Azure Traffic Manager.
|
24
|
+
attr_accessor :fqdn
|
25
|
+
|
26
|
+
# @return [Integer] The DNS Time-To-Live (TTL), in seconds. This informs
|
27
|
+
# the local DNS resolvers and DNS clients how long to cache DNS responses
|
28
|
+
# provided by this Traffic Manager profile.
|
29
|
+
attr_accessor :ttl
|
30
|
+
|
31
|
+
|
32
|
+
#
|
33
|
+
# Mapper for DnsConfig class as Ruby Hash.
|
34
|
+
# This will be used for serialization/deserialization.
|
35
|
+
#
|
36
|
+
def self.mapper()
|
37
|
+
{
|
38
|
+
client_side_validation: true,
|
39
|
+
required: false,
|
40
|
+
serialized_name: 'DnsConfig',
|
41
|
+
type: {
|
42
|
+
name: 'Composite',
|
43
|
+
class_name: 'DnsConfig',
|
44
|
+
model_properties: {
|
45
|
+
relative_name: {
|
46
|
+
client_side_validation: true,
|
47
|
+
required: false,
|
48
|
+
serialized_name: 'relativeName',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
fqdn: {
|
54
|
+
client_side_validation: true,
|
55
|
+
required: false,
|
56
|
+
read_only: true,
|
57
|
+
serialized_name: 'fqdn',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
ttl: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
serialized_name: 'ttl',
|
66
|
+
type: {
|
67
|
+
name: 'Number'
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,206 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::TrafficManager::Mgmt::V2018_03_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Class representing a Traffic Manager endpoint.
|
10
|
+
#
|
11
|
+
class Endpoint < ProxyResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The Azure Resource URI of the of the endpoint. Not
|
16
|
+
# applicable to endpoints of type 'ExternalEndpoints'.
|
17
|
+
attr_accessor :target_resource_id
|
18
|
+
|
19
|
+
# @return [String] The fully-qualified DNS name or IP address of the
|
20
|
+
# endpoint. Traffic Manager returns this value in DNS responses to direct
|
21
|
+
# traffic to this endpoint.
|
22
|
+
attr_accessor :target
|
23
|
+
|
24
|
+
# @return [EndpointStatus] The status of the endpoint. If the endpoint is
|
25
|
+
# Enabled, it is probed for endpoint health and is included in the
|
26
|
+
# traffic routing method. Possible values include: 'Enabled', 'Disabled'
|
27
|
+
attr_accessor :endpoint_status
|
28
|
+
|
29
|
+
# @return [Integer] The weight of this endpoint when using the 'Weighted'
|
30
|
+
# traffic routing method. Possible values are from 1 to 1000.
|
31
|
+
attr_accessor :weight
|
32
|
+
|
33
|
+
# @return [Integer] The priority of this endpoint when using the
|
34
|
+
# ‘Priority’ traffic routing method. Possible values are from 1 to 1000,
|
35
|
+
# lower values represent higher priority. This is an optional parameter.
|
36
|
+
# If specified, it must be specified on all endpoints, and no two
|
37
|
+
# endpoints can share the same priority value.
|
38
|
+
attr_accessor :priority
|
39
|
+
|
40
|
+
# @return [String] Specifies the location of the external or nested
|
41
|
+
# endpoints when using the ‘Performance’ traffic routing method.
|
42
|
+
attr_accessor :endpoint_location
|
43
|
+
|
44
|
+
# @return [EndpointMonitorStatus] The monitoring status of the endpoint.
|
45
|
+
# Possible values include: 'CheckingEndpoint', 'Online', 'Degraded',
|
46
|
+
# 'Disabled', 'Inactive', 'Stopped'
|
47
|
+
attr_accessor :endpoint_monitor_status
|
48
|
+
|
49
|
+
# @return [Integer] The minimum number of endpoints that must be
|
50
|
+
# available in the child profile in order for the parent profile to be
|
51
|
+
# considered available. Only applicable to endpoint of type
|
52
|
+
# 'NestedEndpoints'.
|
53
|
+
attr_accessor :min_child_endpoints
|
54
|
+
|
55
|
+
# @return [Array<String>] The list of countries/regions mapped to this
|
56
|
+
# endpoint when using the ‘Geographic’ traffic routing method. Please
|
57
|
+
# consult Traffic Manager Geographic documentation for a full list of
|
58
|
+
# accepted values.
|
59
|
+
attr_accessor :geo_mapping
|
60
|
+
|
61
|
+
# @return [Array<EndpointPropertiesCustomHeadersItem>] List of custom
|
62
|
+
# headers.
|
63
|
+
attr_accessor :custom_headers
|
64
|
+
|
65
|
+
|
66
|
+
#
|
67
|
+
# Mapper for Endpoint class as Ruby Hash.
|
68
|
+
# This will be used for serialization/deserialization.
|
69
|
+
#
|
70
|
+
def self.mapper()
|
71
|
+
{
|
72
|
+
client_side_validation: true,
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'Endpoint',
|
75
|
+
type: {
|
76
|
+
name: 'Composite',
|
77
|
+
class_name: 'Endpoint',
|
78
|
+
model_properties: {
|
79
|
+
id: {
|
80
|
+
client_side_validation: true,
|
81
|
+
required: false,
|
82
|
+
serialized_name: 'id',
|
83
|
+
type: {
|
84
|
+
name: 'String'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
name: {
|
88
|
+
client_side_validation: true,
|
89
|
+
required: false,
|
90
|
+
serialized_name: 'name',
|
91
|
+
type: {
|
92
|
+
name: 'String'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
type: {
|
96
|
+
client_side_validation: true,
|
97
|
+
required: false,
|
98
|
+
serialized_name: 'type',
|
99
|
+
type: {
|
100
|
+
name: 'String'
|
101
|
+
}
|
102
|
+
},
|
103
|
+
target_resource_id: {
|
104
|
+
client_side_validation: true,
|
105
|
+
required: false,
|
106
|
+
serialized_name: 'properties.targetResourceId',
|
107
|
+
type: {
|
108
|
+
name: 'String'
|
109
|
+
}
|
110
|
+
},
|
111
|
+
target: {
|
112
|
+
client_side_validation: true,
|
113
|
+
required: false,
|
114
|
+
serialized_name: 'properties.target',
|
115
|
+
type: {
|
116
|
+
name: 'String'
|
117
|
+
}
|
118
|
+
},
|
119
|
+
endpoint_status: {
|
120
|
+
client_side_validation: true,
|
121
|
+
required: false,
|
122
|
+
serialized_name: 'properties.endpointStatus',
|
123
|
+
type: {
|
124
|
+
name: 'String'
|
125
|
+
}
|
126
|
+
},
|
127
|
+
weight: {
|
128
|
+
client_side_validation: true,
|
129
|
+
required: false,
|
130
|
+
serialized_name: 'properties.weight',
|
131
|
+
type: {
|
132
|
+
name: 'Number'
|
133
|
+
}
|
134
|
+
},
|
135
|
+
priority: {
|
136
|
+
client_side_validation: true,
|
137
|
+
required: false,
|
138
|
+
serialized_name: 'properties.priority',
|
139
|
+
type: {
|
140
|
+
name: 'Number'
|
141
|
+
}
|
142
|
+
},
|
143
|
+
endpoint_location: {
|
144
|
+
client_side_validation: true,
|
145
|
+
required: false,
|
146
|
+
serialized_name: 'properties.endpointLocation',
|
147
|
+
type: {
|
148
|
+
name: 'String'
|
149
|
+
}
|
150
|
+
},
|
151
|
+
endpoint_monitor_status: {
|
152
|
+
client_side_validation: true,
|
153
|
+
required: false,
|
154
|
+
serialized_name: 'properties.endpointMonitorStatus',
|
155
|
+
type: {
|
156
|
+
name: 'String'
|
157
|
+
}
|
158
|
+
},
|
159
|
+
min_child_endpoints: {
|
160
|
+
client_side_validation: true,
|
161
|
+
required: false,
|
162
|
+
serialized_name: 'properties.minChildEndpoints',
|
163
|
+
type: {
|
164
|
+
name: 'Number'
|
165
|
+
}
|
166
|
+
},
|
167
|
+
geo_mapping: {
|
168
|
+
client_side_validation: true,
|
169
|
+
required: false,
|
170
|
+
serialized_name: 'properties.geoMapping',
|
171
|
+
type: {
|
172
|
+
name: 'Sequence',
|
173
|
+
element: {
|
174
|
+
client_side_validation: true,
|
175
|
+
required: false,
|
176
|
+
serialized_name: 'StringElementType',
|
177
|
+
type: {
|
178
|
+
name: 'String'
|
179
|
+
}
|
180
|
+
}
|
181
|
+
}
|
182
|
+
},
|
183
|
+
custom_headers: {
|
184
|
+
client_side_validation: true,
|
185
|
+
required: false,
|
186
|
+
serialized_name: 'properties.customHeaders',
|
187
|
+
type: {
|
188
|
+
name: 'Sequence',
|
189
|
+
element: {
|
190
|
+
client_side_validation: true,
|
191
|
+
required: false,
|
192
|
+
serialized_name: 'EndpointPropertiesCustomHeadersItemElementType',
|
193
|
+
type: {
|
194
|
+
name: 'Composite',
|
195
|
+
class_name: 'EndpointPropertiesCustomHeadersItem'
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}
|
202
|
+
}
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|