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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a51b9521e93c9812d427a81bba7698ad5d41f417
|
4
|
+
data.tar.gz: 543841d921b3015d3d8ed77f9e5700d94a3ae45c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e03a8291abe168a2974090749a68d029d696ec8b846ba9456c00e33b53a34cf39f9e83f29e321dc503c413d1f98f3caeff9bed36f9f16b439a06f4d7f069fdf
|
7
|
+
data.tar.gz: 06de4b4a45306a29973742906a89a51a04f071e74925389877cbd5f2eba5d30e3c31b3c7177ace6b664b9b6fdf2094b8801625bee01bd2f3b91e0ee13ecb27b8
|
data/lib/2015-11-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb
CHANGED
@@ -25,15 +25,16 @@ module Azure::TrafficManager::Mgmt::V2015_11_01
|
|
25
25
|
# @return [String] Client Api Version.
|
26
26
|
attr_reader :api_version
|
27
27
|
|
28
|
-
# @return [String]
|
28
|
+
# @return [String] The preferred language for the response.
|
29
29
|
attr_accessor :accept_language
|
30
30
|
|
31
|
-
# @return [Integer]
|
32
|
-
#
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
33
|
attr_accessor :long_running_operation_retry_timeout
|
34
34
|
|
35
|
-
# @return [Boolean]
|
36
|
-
#
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
37
38
|
attr_accessor :generate_client_request_id
|
38
39
|
|
39
40
|
# @return [Endpoints] endpoints
|
data/lib/2017-03-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb
CHANGED
@@ -25,15 +25,16 @@ module Azure::TrafficManager::Mgmt::V2017_03_01
|
|
25
25
|
# @return [String] Client Api Version.
|
26
26
|
attr_reader :api_version
|
27
27
|
|
28
|
-
# @return [String]
|
28
|
+
# @return [String] The preferred language for the response.
|
29
29
|
attr_accessor :accept_language
|
30
30
|
|
31
|
-
# @return [Integer]
|
32
|
-
#
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
33
|
attr_accessor :long_running_operation_retry_timeout
|
34
34
|
|
35
|
-
# @return [Boolean]
|
36
|
-
#
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
37
38
|
attr_accessor :generate_client_request_id
|
38
39
|
|
39
40
|
# @return [Endpoints] endpoints
|
data/lib/2017-05-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb
CHANGED
@@ -25,15 +25,16 @@ module Azure::TrafficManager::Mgmt::V2017_05_01
|
|
25
25
|
# @return [String] Client Api Version.
|
26
26
|
attr_reader :api_version
|
27
27
|
|
28
|
-
# @return [String]
|
28
|
+
# @return [String] The preferred language for the response.
|
29
29
|
attr_accessor :accept_language
|
30
30
|
|
31
|
-
# @return [Integer]
|
32
|
-
#
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
33
|
attr_accessor :long_running_operation_retry_timeout
|
34
34
|
|
35
|
-
# @return [Boolean]
|
36
|
-
#
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
37
38
|
attr_accessor :generate_client_request_id
|
38
39
|
|
39
40
|
# @return [Endpoints] endpoints
|
@@ -25,15 +25,16 @@ module Azure::TrafficManager::Mgmt::V2017_09_01_preview
|
|
25
25
|
# @return [String] Client Api Version.
|
26
26
|
attr_reader :api_version
|
27
27
|
|
28
|
-
# @return [String]
|
28
|
+
# @return [String] The preferred language for the response.
|
29
29
|
attr_accessor :accept_language
|
30
30
|
|
31
|
-
# @return [Integer]
|
32
|
-
#
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
33
|
attr_accessor :long_running_operation_retry_timeout
|
34
34
|
|
35
|
-
# @return [Boolean]
|
36
|
-
#
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
37
38
|
attr_accessor :generate_client_request_id
|
38
39
|
|
39
40
|
# @return [HeatMap] heat_map
|
@@ -0,0 +1,50 @@
|
|
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
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2018-02-01/generated/azure_mgmt_traffic_manager/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::TrafficManager::Mgmt::V2018_02_01
|
23
|
+
autoload :Endpoints, '2018-02-01/generated/azure_mgmt_traffic_manager/endpoints.rb'
|
24
|
+
autoload :Profiles, '2018-02-01/generated/azure_mgmt_traffic_manager/profiles.rb'
|
25
|
+
autoload :GeographicHierarchies, '2018-02-01/generated/azure_mgmt_traffic_manager/geographic_hierarchies.rb'
|
26
|
+
autoload :TrafficManagerManagementClient, '2018-02-01/generated/azure_mgmt_traffic_manager/traffic_manager_management_client.rb'
|
27
|
+
|
28
|
+
module Models
|
29
|
+
autoload :TrafficManagerNameAvailability, '2018-02-01/generated/azure_mgmt_traffic_manager/models/traffic_manager_name_availability.rb'
|
30
|
+
autoload :DeleteOperationResult, '2018-02-01/generated/azure_mgmt_traffic_manager/models/delete_operation_result.rb'
|
31
|
+
autoload :Region, '2018-02-01/generated/azure_mgmt_traffic_manager/models/region.rb'
|
32
|
+
autoload :CheckTrafficManagerRelativeDnsNameAvailabilityParameters, '2018-02-01/generated/azure_mgmt_traffic_manager/models/check_traffic_manager_relative_dns_name_availability_parameters.rb'
|
33
|
+
autoload :DnsConfig, '2018-02-01/generated/azure_mgmt_traffic_manager/models/dns_config.rb'
|
34
|
+
autoload :MonitorConfig, '2018-02-01/generated/azure_mgmt_traffic_manager/models/monitor_config.rb'
|
35
|
+
autoload :ProfileListResult, '2018-02-01/generated/azure_mgmt_traffic_manager/models/profile_list_result.rb'
|
36
|
+
autoload :Resource, '2018-02-01/generated/azure_mgmt_traffic_manager/models/resource.rb'
|
37
|
+
autoload :Endpoint, '2018-02-01/generated/azure_mgmt_traffic_manager/models/endpoint.rb'
|
38
|
+
autoload :Profile, '2018-02-01/generated/azure_mgmt_traffic_manager/models/profile.rb'
|
39
|
+
autoload :ProxyResource, '2018-02-01/generated/azure_mgmt_traffic_manager/models/proxy_resource.rb'
|
40
|
+
autoload :TrafficManagerGeographicHierarchy, '2018-02-01/generated/azure_mgmt_traffic_manager/models/traffic_manager_geographic_hierarchy.rb'
|
41
|
+
autoload :TrackedResource, '2018-02-01/generated/azure_mgmt_traffic_manager/models/tracked_resource.rb'
|
42
|
+
autoload :EndpointStatus, '2018-02-01/generated/azure_mgmt_traffic_manager/models/endpoint_status.rb'
|
43
|
+
autoload :EndpointMonitorStatus, '2018-02-01/generated/azure_mgmt_traffic_manager/models/endpoint_monitor_status.rb'
|
44
|
+
autoload :ProfileMonitorStatus, '2018-02-01/generated/azure_mgmt_traffic_manager/models/profile_monitor_status.rb'
|
45
|
+
autoload :MonitorProtocol, '2018-02-01/generated/azure_mgmt_traffic_manager/models/monitor_protocol.rb'
|
46
|
+
autoload :ProfileStatus, '2018-02-01/generated/azure_mgmt_traffic_manager/models/profile_status.rb'
|
47
|
+
autoload :TrafficRoutingMethod, '2018-02-01/generated/azure_mgmt_traffic_manager/models/traffic_routing_method.rb'
|
48
|
+
autoload :TrafficViewEnrollmentStatus, '2018-02-01/generated/azure_mgmt_traffic_manager/models/traffic_view_enrollment_status.rb'
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,493 @@
|
|
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_02_01
|
7
|
+
#
|
8
|
+
# Endpoints
|
9
|
+
#
|
10
|
+
class Endpoints
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Endpoints 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
|
+
# Update a Traffic Manager endpoint.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group containing
|
28
|
+
# the Traffic Manager endpoint to be updated.
|
29
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
30
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
31
|
+
# updated.
|
32
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
33
|
+
# updated.
|
34
|
+
# @param parameters [Endpoint] The Traffic Manager endpoint parameters supplied
|
35
|
+
# to the Update operation.
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
|
+
# will be added to the HTTP request.
|
38
|
+
#
|
39
|
+
# @return [Endpoint] operation results.
|
40
|
+
#
|
41
|
+
def update(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:nil)
|
42
|
+
response = update_async(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:custom_headers).value!
|
43
|
+
response.body unless response.nil?
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# Update a Traffic Manager endpoint.
|
48
|
+
#
|
49
|
+
# @param resource_group_name [String] The name of the resource group containing
|
50
|
+
# the Traffic Manager endpoint to be updated.
|
51
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
52
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
53
|
+
# updated.
|
54
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
55
|
+
# updated.
|
56
|
+
# @param parameters [Endpoint] The Traffic Manager endpoint parameters supplied
|
57
|
+
# to the Update operation.
|
58
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
59
|
+
# will be added to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
62
|
+
#
|
63
|
+
def update_with_http_info(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:nil)
|
64
|
+
update_async(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:custom_headers).value!
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# Update a Traffic Manager endpoint.
|
69
|
+
#
|
70
|
+
# @param resource_group_name [String] The name of the resource group containing
|
71
|
+
# the Traffic Manager endpoint to be updated.
|
72
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
73
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
74
|
+
# updated.
|
75
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
76
|
+
# updated.
|
77
|
+
# @param parameters [Endpoint] The Traffic Manager endpoint parameters supplied
|
78
|
+
# to the Update operation.
|
79
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
80
|
+
# to the HTTP request.
|
81
|
+
#
|
82
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
83
|
+
#
|
84
|
+
def update_async(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:nil)
|
85
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
86
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
87
|
+
fail ArgumentError, 'endpoint_type is nil' if endpoint_type.nil?
|
88
|
+
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
89
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
90
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
91
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
92
|
+
|
93
|
+
|
94
|
+
request_headers = {}
|
95
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
96
|
+
|
97
|
+
# Set Headers
|
98
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
99
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
100
|
+
|
101
|
+
# Serialize Request
|
102
|
+
request_mapper = Azure::TrafficManager::Mgmt::V2018_02_01::Models::Endpoint.mapper()
|
103
|
+
request_content = @client.serialize(request_mapper, parameters)
|
104
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
105
|
+
|
106
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'
|
107
|
+
|
108
|
+
request_url = @base_url || @client.base_url
|
109
|
+
|
110
|
+
options = {
|
111
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
112
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
|
113
|
+
query_params: {'api-version' => @client.api_version},
|
114
|
+
body: request_content,
|
115
|
+
headers: request_headers.merge(custom_headers || {}),
|
116
|
+
base_url: request_url
|
117
|
+
}
|
118
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
119
|
+
|
120
|
+
promise = promise.then do |result|
|
121
|
+
http_response = result.response
|
122
|
+
status_code = http_response.status
|
123
|
+
response_content = http_response.body
|
124
|
+
unless status_code == 200
|
125
|
+
error_model = JSON.load(response_content)
|
126
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
127
|
+
end
|
128
|
+
|
129
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
130
|
+
# Deserialize Response
|
131
|
+
if status_code == 200
|
132
|
+
begin
|
133
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
134
|
+
result_mapper = Azure::TrafficManager::Mgmt::V2018_02_01::Models::Endpoint.mapper()
|
135
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
136
|
+
rescue Exception => e
|
137
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
result
|
142
|
+
end
|
143
|
+
|
144
|
+
promise.execute
|
145
|
+
end
|
146
|
+
|
147
|
+
#
|
148
|
+
# Gets a Traffic Manager endpoint.
|
149
|
+
#
|
150
|
+
# @param resource_group_name [String] The name of the resource group containing
|
151
|
+
# the Traffic Manager endpoint.
|
152
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
153
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint.
|
154
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint.
|
155
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
156
|
+
# will be added to the HTTP request.
|
157
|
+
#
|
158
|
+
# @return [Endpoint] operation results.
|
159
|
+
#
|
160
|
+
def get(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:nil)
|
161
|
+
response = get_async(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:custom_headers).value!
|
162
|
+
response.body unless response.nil?
|
163
|
+
end
|
164
|
+
|
165
|
+
#
|
166
|
+
# Gets a Traffic Manager endpoint.
|
167
|
+
#
|
168
|
+
# @param resource_group_name [String] The name of the resource group containing
|
169
|
+
# the Traffic Manager endpoint.
|
170
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
171
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint.
|
172
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint.
|
173
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
174
|
+
# will be added to the HTTP request.
|
175
|
+
#
|
176
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
177
|
+
#
|
178
|
+
def get_with_http_info(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:nil)
|
179
|
+
get_async(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:custom_headers).value!
|
180
|
+
end
|
181
|
+
|
182
|
+
#
|
183
|
+
# Gets a Traffic Manager endpoint.
|
184
|
+
#
|
185
|
+
# @param resource_group_name [String] The name of the resource group containing
|
186
|
+
# the Traffic Manager endpoint.
|
187
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
188
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint.
|
189
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint.
|
190
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
191
|
+
# to the HTTP request.
|
192
|
+
#
|
193
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
194
|
+
#
|
195
|
+
def get_async(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:nil)
|
196
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
197
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
198
|
+
fail ArgumentError, 'endpoint_type is nil' if endpoint_type.nil?
|
199
|
+
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
200
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
201
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
202
|
+
|
203
|
+
|
204
|
+
request_headers = {}
|
205
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
206
|
+
|
207
|
+
# Set Headers
|
208
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
209
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
210
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'
|
211
|
+
|
212
|
+
request_url = @base_url || @client.base_url
|
213
|
+
|
214
|
+
options = {
|
215
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
216
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
|
217
|
+
query_params: {'api-version' => @client.api_version},
|
218
|
+
headers: request_headers.merge(custom_headers || {}),
|
219
|
+
base_url: request_url
|
220
|
+
}
|
221
|
+
promise = @client.make_request_async(:get, path_template, options)
|
222
|
+
|
223
|
+
promise = promise.then do |result|
|
224
|
+
http_response = result.response
|
225
|
+
status_code = http_response.status
|
226
|
+
response_content = http_response.body
|
227
|
+
unless status_code == 200
|
228
|
+
error_model = JSON.load(response_content)
|
229
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
230
|
+
end
|
231
|
+
|
232
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
233
|
+
# Deserialize Response
|
234
|
+
if status_code == 200
|
235
|
+
begin
|
236
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
237
|
+
result_mapper = Azure::TrafficManager::Mgmt::V2018_02_01::Models::Endpoint.mapper()
|
238
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
239
|
+
rescue Exception => e
|
240
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
result
|
245
|
+
end
|
246
|
+
|
247
|
+
promise.execute
|
248
|
+
end
|
249
|
+
|
250
|
+
#
|
251
|
+
# Create or update a Traffic Manager endpoint.
|
252
|
+
#
|
253
|
+
# @param resource_group_name [String] The name of the resource group containing
|
254
|
+
# the Traffic Manager endpoint to be created or updated.
|
255
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
256
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
257
|
+
# created or updated.
|
258
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
259
|
+
# created or updated.
|
260
|
+
# @param parameters [Endpoint] The Traffic Manager endpoint parameters supplied
|
261
|
+
# to the CreateOrUpdate operation.
|
262
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
263
|
+
# will be added to the HTTP request.
|
264
|
+
#
|
265
|
+
# @return [Endpoint] operation results.
|
266
|
+
#
|
267
|
+
def create_or_update(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:nil)
|
268
|
+
response = create_or_update_async(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:custom_headers).value!
|
269
|
+
response.body unless response.nil?
|
270
|
+
end
|
271
|
+
|
272
|
+
#
|
273
|
+
# Create or update a Traffic Manager endpoint.
|
274
|
+
#
|
275
|
+
# @param resource_group_name [String] The name of the resource group containing
|
276
|
+
# the Traffic Manager endpoint to be created or updated.
|
277
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
278
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
279
|
+
# created or updated.
|
280
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
281
|
+
# created or updated.
|
282
|
+
# @param parameters [Endpoint] The Traffic Manager endpoint parameters supplied
|
283
|
+
# to the CreateOrUpdate operation.
|
284
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
285
|
+
# will be added to the HTTP request.
|
286
|
+
#
|
287
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
288
|
+
#
|
289
|
+
def create_or_update_with_http_info(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:nil)
|
290
|
+
create_or_update_async(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:custom_headers).value!
|
291
|
+
end
|
292
|
+
|
293
|
+
#
|
294
|
+
# Create or update a Traffic Manager endpoint.
|
295
|
+
#
|
296
|
+
# @param resource_group_name [String] The name of the resource group containing
|
297
|
+
# the Traffic Manager endpoint to be created or updated.
|
298
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
299
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
300
|
+
# created or updated.
|
301
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
302
|
+
# created or updated.
|
303
|
+
# @param parameters [Endpoint] The Traffic Manager endpoint parameters supplied
|
304
|
+
# to the CreateOrUpdate operation.
|
305
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
306
|
+
# to the HTTP request.
|
307
|
+
#
|
308
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
309
|
+
#
|
310
|
+
def create_or_update_async(resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers:nil)
|
311
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
312
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
313
|
+
fail ArgumentError, 'endpoint_type is nil' if endpoint_type.nil?
|
314
|
+
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
315
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
316
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
317
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
318
|
+
|
319
|
+
|
320
|
+
request_headers = {}
|
321
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
322
|
+
|
323
|
+
# Set Headers
|
324
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
325
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
326
|
+
|
327
|
+
# Serialize Request
|
328
|
+
request_mapper = Azure::TrafficManager::Mgmt::V2018_02_01::Models::Endpoint.mapper()
|
329
|
+
request_content = @client.serialize(request_mapper, parameters)
|
330
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
331
|
+
|
332
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'
|
333
|
+
|
334
|
+
request_url = @base_url || @client.base_url
|
335
|
+
|
336
|
+
options = {
|
337
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
338
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
|
339
|
+
query_params: {'api-version' => @client.api_version},
|
340
|
+
body: request_content,
|
341
|
+
headers: request_headers.merge(custom_headers || {}),
|
342
|
+
base_url: request_url
|
343
|
+
}
|
344
|
+
promise = @client.make_request_async(:put, path_template, options)
|
345
|
+
|
346
|
+
promise = promise.then do |result|
|
347
|
+
http_response = result.response
|
348
|
+
status_code = http_response.status
|
349
|
+
response_content = http_response.body
|
350
|
+
unless status_code == 200 || status_code == 201
|
351
|
+
error_model = JSON.load(response_content)
|
352
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
353
|
+
end
|
354
|
+
|
355
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
356
|
+
# Deserialize Response
|
357
|
+
if status_code == 200
|
358
|
+
begin
|
359
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
360
|
+
result_mapper = Azure::TrafficManager::Mgmt::V2018_02_01::Models::Endpoint.mapper()
|
361
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
362
|
+
rescue Exception => e
|
363
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
364
|
+
end
|
365
|
+
end
|
366
|
+
# Deserialize Response
|
367
|
+
if status_code == 201
|
368
|
+
begin
|
369
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
370
|
+
result_mapper = Azure::TrafficManager::Mgmt::V2018_02_01::Models::Endpoint.mapper()
|
371
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
372
|
+
rescue Exception => e
|
373
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
result
|
378
|
+
end
|
379
|
+
|
380
|
+
promise.execute
|
381
|
+
end
|
382
|
+
|
383
|
+
#
|
384
|
+
# Deletes a Traffic Manager endpoint.
|
385
|
+
#
|
386
|
+
# @param resource_group_name [String] The name of the resource group containing
|
387
|
+
# the Traffic Manager endpoint to be deleted.
|
388
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
389
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
390
|
+
# deleted.
|
391
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
392
|
+
# deleted.
|
393
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
394
|
+
# will be added to the HTTP request.
|
395
|
+
#
|
396
|
+
# @return [DeleteOperationResult] operation results.
|
397
|
+
#
|
398
|
+
def delete(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:nil)
|
399
|
+
response = delete_async(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:custom_headers).value!
|
400
|
+
response.body unless response.nil?
|
401
|
+
end
|
402
|
+
|
403
|
+
#
|
404
|
+
# Deletes a Traffic Manager endpoint.
|
405
|
+
#
|
406
|
+
# @param resource_group_name [String] The name of the resource group containing
|
407
|
+
# the Traffic Manager endpoint to be deleted.
|
408
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
409
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
410
|
+
# deleted.
|
411
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
412
|
+
# deleted.
|
413
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
414
|
+
# will be added to the HTTP request.
|
415
|
+
#
|
416
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
417
|
+
#
|
418
|
+
def delete_with_http_info(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:nil)
|
419
|
+
delete_async(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:custom_headers).value!
|
420
|
+
end
|
421
|
+
|
422
|
+
#
|
423
|
+
# Deletes a Traffic Manager endpoint.
|
424
|
+
#
|
425
|
+
# @param resource_group_name [String] The name of the resource group containing
|
426
|
+
# the Traffic Manager endpoint to be deleted.
|
427
|
+
# @param profile_name [String] The name of the Traffic Manager profile.
|
428
|
+
# @param endpoint_type [String] The type of the Traffic Manager endpoint to be
|
429
|
+
# deleted.
|
430
|
+
# @param endpoint_name [String] The name of the Traffic Manager endpoint to be
|
431
|
+
# deleted.
|
432
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
433
|
+
# to the HTTP request.
|
434
|
+
#
|
435
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
436
|
+
#
|
437
|
+
def delete_async(resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers:nil)
|
438
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
439
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
440
|
+
fail ArgumentError, 'endpoint_type is nil' if endpoint_type.nil?
|
441
|
+
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
442
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
443
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
444
|
+
|
445
|
+
|
446
|
+
request_headers = {}
|
447
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
448
|
+
|
449
|
+
# Set Headers
|
450
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
451
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
452
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'
|
453
|
+
|
454
|
+
request_url = @base_url || @client.base_url
|
455
|
+
|
456
|
+
options = {
|
457
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
458
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointType' => endpoint_type,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
|
459
|
+
query_params: {'api-version' => @client.api_version},
|
460
|
+
headers: request_headers.merge(custom_headers || {}),
|
461
|
+
base_url: request_url
|
462
|
+
}
|
463
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
464
|
+
|
465
|
+
promise = promise.then do |result|
|
466
|
+
http_response = result.response
|
467
|
+
status_code = http_response.status
|
468
|
+
response_content = http_response.body
|
469
|
+
unless status_code == 200 || status_code == 204
|
470
|
+
error_model = JSON.load(response_content)
|
471
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
472
|
+
end
|
473
|
+
|
474
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
475
|
+
# Deserialize Response
|
476
|
+
if status_code == 200
|
477
|
+
begin
|
478
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
479
|
+
result_mapper = Azure::TrafficManager::Mgmt::V2018_02_01::Models::DeleteOperationResult.mapper()
|
480
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
481
|
+
rescue Exception => e
|
482
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
486
|
+
result
|
487
|
+
end
|
488
|
+
|
489
|
+
promise.execute
|
490
|
+
end
|
491
|
+
|
492
|
+
end
|
493
|
+
end
|