azure_mgmt_cdn 0.15.2 → 0.16.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-06-01/generated/azure_mgmt_cdn/cdn_management_client.rb +4 -1
- data/lib/2015-06-01/generated/azure_mgmt_cdn/custom_domains.rb +38 -37
- data/lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb +88 -88
- data/lib/2015-06-01/generated/azure_mgmt_cdn/name_availability.rb +6 -7
- data/lib/2015-06-01/generated/azure_mgmt_cdn/operations.rb +6 -5
- data/lib/2015-06-01/generated/azure_mgmt_cdn/origins.rb +42 -41
- data/lib/2015-06-01/generated/azure_mgmt_cdn/profiles.rb +54 -51
- data/lib/2016-04-02/generated/azure_mgmt_cdn.rb +70 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +151 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/custom_domains.rb +719 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb +1456 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +69 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain.rb +103 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +57 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +47 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/deep_created_origin.rb +82 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint.rb +249 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_create_parameters.rb +185 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +56 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +152 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/error_response.rb +58 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation.rb +58 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation_display.rb +70 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation_list_result.rb +57 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin.rb +128 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_list_result.rb +56 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_parameters.rb +71 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile.rb +128 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_create_parameters.rb +77 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_list_result.rb +56 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/resource.rb +72 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sku.rb +49 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sku_name.rb +18 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sso_uri.rb +46 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +70 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/module_definition.rb +9 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/name_availability.rb +130 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/operations.rb +110 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/origins.rb +778 -0
- data/lib/2016-04-02/generated/azure_mgmt_cdn/profiles.rb +899 -0
- data/lib/2016-10-02/generated/azure_mgmt_cdn/cdn_management_client.rb +46 -38
- data/lib/2016-10-02/generated/azure_mgmt_cdn/custom_domains.rb +53 -48
- data/lib/2016-10-02/generated/azure_mgmt_cdn/edge_nodes.rb +15 -13
- data/lib/2016-10-02/generated/azure_mgmt_cdn/endpoints.rb +112 -109
- data/lib/2016-10-02/generated/azure_mgmt_cdn/origins.rb +31 -29
- data/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb +93 -85
- data/lib/2017-04-02/generated/azure_mgmt_cdn.rb +18 -16
- data/lib/2017-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +16 -15
- data/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb +53 -48
- data/lib/2017-04-02/generated/azure_mgmt_cdn/edge_nodes.rb +15 -13
- data/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb +136 -113
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_domain.rb +1 -25
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/edge_node.rb +1 -25
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint.rb +6 -3
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +5 -2
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/origin.rb +1 -1
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile.rb +1 -1
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +1 -1
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/proxy_resource.rb +63 -0
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/resource.rb +1 -31
- data/lib/2017-04-02/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
- data/lib/2017-04-02/generated/azure_mgmt_cdn/operations.rb +15 -13
- data/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb +31 -29
- data/lib/2017-04-02/generated/azure_mgmt_cdn/profiles.rb +93 -85
- data/lib/2017-04-02/generated/azure_mgmt_cdn/resource_usage_operations.rb +15 -13
- data/lib/2017-10-12/generated/azure_mgmt_cdn.rb +93 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb +358 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/custom_domains.rb +970 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/edge_nodes.rb +223 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/endpoints.rb +1922 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/cache_expiration_action_parameters.rb +89 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +72 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain.rb +148 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +102 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb +24 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/deep_created_origin.rb +91 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule.rb +96 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_action.rb +46 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_cache_expiration_action.rb +64 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_condition.rb +47 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_url_file_extension_condition.rb +64 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_url_path_condition.rb +64 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/edge_node.rb +83 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/edgenode_result.rb +101 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint.rb +318 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +101 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_delivery_policy.rb +67 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +223 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/error_response.rb +60 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operation.rb +59 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operation_display.rb +72 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operations_list_result.rb +102 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin.rb +158 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_list_result.rb +101 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +79 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile.rb +125 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_list_result.rb +101 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/proxy_resource.rb +63 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource.rb +71 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_usage.rb +83 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +100 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sku.rb +49 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sku_name.rb +19 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sso_uri.rb +48 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb +56 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/url_file_extension_condition_parameters.rb +70 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/url_path_condition_parameters.rb +72 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +72 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_probe_input.rb +46 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_probe_output.rb +73 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/module_definition.rb +9 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/operations.rb +217 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/origins.rb +556 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/profiles.rb +1460 -0
- data/lib/2017-10-12/generated/azure_mgmt_cdn/resource_usage_operations.rb +226 -0
- data/lib/azure_mgmt_cdn.rb +2 -0
- data/lib/profiles/latest/cdn_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/cdn_module_definition.rb +0 -1
- data/lib/profiles/latest/modules/cdn_profile_module.rb +277 -210
- data/lib/version.rb +1 -1
- metadata +119 -2
@@ -32,8 +32,8 @@ module Azure::CDN::Mgmt::V2017_04_02
|
|
32
32
|
#
|
33
33
|
# @return [Array<ResourceUsage>] operation results.
|
34
34
|
#
|
35
|
-
def list(custom_headers
|
36
|
-
first_page = list_as_lazy(custom_headers)
|
35
|
+
def list(custom_headers:nil)
|
36
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
37
37
|
first_page.get_all_items
|
38
38
|
end
|
39
39
|
|
@@ -46,8 +46,8 @@ module Azure::CDN::Mgmt::V2017_04_02
|
|
46
46
|
#
|
47
47
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
48
|
#
|
49
|
-
def list_with_http_info(custom_headers
|
50
|
-
list_async(custom_headers).value!
|
49
|
+
def list_with_http_info(custom_headers:nil)
|
50
|
+
list_async(custom_headers:custom_headers).value!
|
51
51
|
end
|
52
52
|
|
53
53
|
#
|
@@ -59,12 +59,13 @@ module Azure::CDN::Mgmt::V2017_04_02
|
|
59
59
|
#
|
60
60
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
61
61
|
#
|
62
|
-
def list_async(custom_headers
|
62
|
+
def list_async(custom_headers:nil)
|
63
63
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
64
64
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
65
65
|
|
66
66
|
|
67
67
|
request_headers = {}
|
68
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
68
69
|
|
69
70
|
# Set Headers
|
70
71
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -120,8 +121,8 @@ module Azure::CDN::Mgmt::V2017_04_02
|
|
120
121
|
#
|
121
122
|
# @return [ResourceUsageListResult] operation results.
|
122
123
|
#
|
123
|
-
def list_next(next_page_link, custom_headers
|
124
|
-
response = list_next_async(next_page_link, custom_headers).value!
|
124
|
+
def list_next(next_page_link, custom_headers:nil)
|
125
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
125
126
|
response.body unless response.nil?
|
126
127
|
end
|
127
128
|
|
@@ -136,8 +137,8 @@ module Azure::CDN::Mgmt::V2017_04_02
|
|
136
137
|
#
|
137
138
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
138
139
|
#
|
139
|
-
def list_next_with_http_info(next_page_link, custom_headers
|
140
|
-
list_next_async(next_page_link, custom_headers).value!
|
140
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
141
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
141
142
|
end
|
142
143
|
|
143
144
|
#
|
@@ -151,11 +152,12 @@ module Azure::CDN::Mgmt::V2017_04_02
|
|
151
152
|
#
|
152
153
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
153
154
|
#
|
154
|
-
def list_next_async(next_page_link, custom_headers
|
155
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
155
156
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
156
157
|
|
157
158
|
|
158
159
|
request_headers = {}
|
160
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
159
161
|
|
160
162
|
# Set Headers
|
161
163
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -209,12 +211,12 @@ module Azure::CDN::Mgmt::V2017_04_02
|
|
209
211
|
# @return [ResourceUsageListResult] which provide lazy access to pages of the
|
210
212
|
# response.
|
211
213
|
#
|
212
|
-
def list_as_lazy(custom_headers
|
213
|
-
response = list_async(custom_headers).value!
|
214
|
+
def list_as_lazy(custom_headers:nil)
|
215
|
+
response = list_async(custom_headers:custom_headers).value!
|
214
216
|
unless response.nil?
|
215
217
|
page = response.body
|
216
218
|
page.next_method = Proc.new do |next_page_link|
|
217
|
-
list_next_async(next_page_link, custom_headers)
|
219
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
218
220
|
end
|
219
221
|
page
|
220
222
|
end
|
@@ -0,0 +1,93 @@
|
|
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 '2017-10-12/generated/azure_mgmt_cdn/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::CDN::Mgmt::V2017_10_12
|
23
|
+
autoload :Profiles, '2017-10-12/generated/azure_mgmt_cdn/profiles.rb'
|
24
|
+
autoload :Endpoints, '2017-10-12/generated/azure_mgmt_cdn/endpoints.rb'
|
25
|
+
autoload :Origins, '2017-10-12/generated/azure_mgmt_cdn/origins.rb'
|
26
|
+
autoload :CustomDomains, '2017-10-12/generated/azure_mgmt_cdn/custom_domains.rb'
|
27
|
+
autoload :ResourceUsageOperations, '2017-10-12/generated/azure_mgmt_cdn/resource_usage_operations.rb'
|
28
|
+
autoload :Operations, '2017-10-12/generated/azure_mgmt_cdn/operations.rb'
|
29
|
+
autoload :EdgeNodes, '2017-10-12/generated/azure_mgmt_cdn/edge_nodes.rb'
|
30
|
+
autoload :CdnManagementClient, '2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb'
|
31
|
+
|
32
|
+
module Models
|
33
|
+
autoload :OriginUpdateParameters, '2017-10-12/generated/azure_mgmt_cdn/models/origin_update_parameters.rb'
|
34
|
+
autoload :Sku, '2017-10-12/generated/azure_mgmt_cdn/models/sku.rb'
|
35
|
+
autoload :OriginListResult, '2017-10-12/generated/azure_mgmt_cdn/models/origin_list_result.rb'
|
36
|
+
autoload :ProfileListResult, '2017-10-12/generated/azure_mgmt_cdn/models/profile_list_result.rb'
|
37
|
+
autoload :PurgeParameters, '2017-10-12/generated/azure_mgmt_cdn/models/purge_parameters.rb'
|
38
|
+
autoload :SsoUri, '2017-10-12/generated/azure_mgmt_cdn/models/sso_uri.rb'
|
39
|
+
autoload :LoadParameters, '2017-10-12/generated/azure_mgmt_cdn/models/load_parameters.rb'
|
40
|
+
autoload :DeepCreatedOrigin, '2017-10-12/generated/azure_mgmt_cdn/models/deep_created_origin.rb'
|
41
|
+
autoload :CidrIpAddress, '2017-10-12/generated/azure_mgmt_cdn/models/cidr_ip_address.rb'
|
42
|
+
autoload :EndpointListResult, '2017-10-12/generated/azure_mgmt_cdn/models/endpoint_list_result.rb'
|
43
|
+
autoload :OperationsListResult, '2017-10-12/generated/azure_mgmt_cdn/models/operations_list_result.rb'
|
44
|
+
autoload :DeliveryRuleAction, '2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_action.rb'
|
45
|
+
autoload :ProfileUpdateParameters, '2017-10-12/generated/azure_mgmt_cdn/models/profile_update_parameters.rb'
|
46
|
+
autoload :DeliveryRule, '2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule.rb'
|
47
|
+
autoload :EndpointUpdateParameters, '2017-10-12/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb'
|
48
|
+
autoload :CustomDomainParameters, '2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb'
|
49
|
+
autoload :EdgenodeResult, '2017-10-12/generated/azure_mgmt_cdn/models/edgenode_result.rb'
|
50
|
+
autoload :CustomDomainListResult, '2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb'
|
51
|
+
autoload :ErrorResponse, '2017-10-12/generated/azure_mgmt_cdn/models/error_response.rb'
|
52
|
+
autoload :ValidateCustomDomainInput, '2017-10-12/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb'
|
53
|
+
autoload :IpAddressGroup, '2017-10-12/generated/azure_mgmt_cdn/models/ip_address_group.rb'
|
54
|
+
autoload :ValidateCustomDomainOutput, '2017-10-12/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb'
|
55
|
+
autoload :Resource, '2017-10-12/generated/azure_mgmt_cdn/models/resource.rb'
|
56
|
+
autoload :CheckNameAvailabilityInput, '2017-10-12/generated/azure_mgmt_cdn/models/check_name_availability_input.rb'
|
57
|
+
autoload :DeliveryRuleCondition, '2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_condition.rb'
|
58
|
+
autoload :CheckNameAvailabilityOutput, '2017-10-12/generated/azure_mgmt_cdn/models/check_name_availability_output.rb'
|
59
|
+
autoload :UrlPathConditionParameters, '2017-10-12/generated/azure_mgmt_cdn/models/url_path_condition_parameters.rb'
|
60
|
+
autoload :ValidateProbeInput, '2017-10-12/generated/azure_mgmt_cdn/models/validate_probe_input.rb'
|
61
|
+
autoload :CacheExpirationActionParameters, '2017-10-12/generated/azure_mgmt_cdn/models/cache_expiration_action_parameters.rb'
|
62
|
+
autoload :ValidateProbeOutput, '2017-10-12/generated/azure_mgmt_cdn/models/validate_probe_output.rb'
|
63
|
+
autoload :GeoFilter, '2017-10-12/generated/azure_mgmt_cdn/models/geo_filter.rb'
|
64
|
+
autoload :ResourceUsage, '2017-10-12/generated/azure_mgmt_cdn/models/resource_usage.rb'
|
65
|
+
autoload :UrlFileExtensionConditionParameters, '2017-10-12/generated/azure_mgmt_cdn/models/url_file_extension_condition_parameters.rb'
|
66
|
+
autoload :ResourceUsageListResult, '2017-10-12/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb'
|
67
|
+
autoload :EndpointPropertiesUpdateParametersDeliveryPolicy, '2017-10-12/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_delivery_policy.rb'
|
68
|
+
autoload :OperationDisplay, '2017-10-12/generated/azure_mgmt_cdn/models/operation_display.rb'
|
69
|
+
autoload :SupportedOptimizationTypesListResult, '2017-10-12/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb'
|
70
|
+
autoload :Operation, '2017-10-12/generated/azure_mgmt_cdn/models/operation.rb'
|
71
|
+
autoload :Profile, '2017-10-12/generated/azure_mgmt_cdn/models/profile.rb'
|
72
|
+
autoload :Endpoint, '2017-10-12/generated/azure_mgmt_cdn/models/endpoint.rb'
|
73
|
+
autoload :DeliveryRuleUrlPathCondition, '2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_url_path_condition.rb'
|
74
|
+
autoload :DeliveryRuleUrlFileExtensionCondition, '2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_url_file_extension_condition.rb'
|
75
|
+
autoload :DeliveryRuleCacheExpirationAction, '2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_cache_expiration_action.rb'
|
76
|
+
autoload :Origin, '2017-10-12/generated/azure_mgmt_cdn/models/origin.rb'
|
77
|
+
autoload :ProxyResource, '2017-10-12/generated/azure_mgmt_cdn/models/proxy_resource.rb'
|
78
|
+
autoload :CustomDomain, '2017-10-12/generated/azure_mgmt_cdn/models/custom_domain.rb'
|
79
|
+
autoload :EdgeNode, '2017-10-12/generated/azure_mgmt_cdn/models/edge_node.rb'
|
80
|
+
autoload :TrackedResource, '2017-10-12/generated/azure_mgmt_cdn/models/tracked_resource.rb'
|
81
|
+
autoload :SkuName, '2017-10-12/generated/azure_mgmt_cdn/models/sku_name.rb'
|
82
|
+
autoload :ProfileResourceState, '2017-10-12/generated/azure_mgmt_cdn/models/profile_resource_state.rb'
|
83
|
+
autoload :OptimizationType, '2017-10-12/generated/azure_mgmt_cdn/models/optimization_type.rb'
|
84
|
+
autoload :EndpointResourceState, '2017-10-12/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb'
|
85
|
+
autoload :QueryStringCachingBehavior, '2017-10-12/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb'
|
86
|
+
autoload :GeoFilterActions, '2017-10-12/generated/azure_mgmt_cdn/models/geo_filter_actions.rb'
|
87
|
+
autoload :OriginResourceState, '2017-10-12/generated/azure_mgmt_cdn/models/origin_resource_state.rb'
|
88
|
+
autoload :CustomDomainResourceState, '2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb'
|
89
|
+
autoload :CustomHttpsProvisioningState, '2017-10-12/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb'
|
90
|
+
autoload :CustomHttpsProvisioningSubstate, '2017-10-12/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb'
|
91
|
+
autoload :ResourceType, '2017-10-12/generated/azure_mgmt_cdn/models/resource_type.rb'
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,358 @@
|
|
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::CDN::Mgmt::V2017_10_12
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class CdnManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Azure Subscription ID.
|
21
|
+
attr_accessor :subscription_id
|
22
|
+
|
23
|
+
# @return [String] Version of the API to be used with the client request.
|
24
|
+
# Current version is 2017-04-02.
|
25
|
+
attr_reader :api_version
|
26
|
+
|
27
|
+
# @return [String] Gets or sets the preferred language for the response.
|
28
|
+
attr_accessor :accept_language
|
29
|
+
|
30
|
+
# @return [Integer] Gets or sets the retry timeout in seconds for Long
|
31
|
+
# Running Operations. Default value is 30.
|
32
|
+
attr_accessor :long_running_operation_retry_timeout
|
33
|
+
|
34
|
+
# @return [Boolean] When set to true a unique x-ms-client-request-id value
|
35
|
+
# is generated and included in each request. Default is true.
|
36
|
+
attr_accessor :generate_client_request_id
|
37
|
+
|
38
|
+
# @return [Profiles] profiles
|
39
|
+
attr_reader :profiles
|
40
|
+
|
41
|
+
# @return [Endpoints] endpoints
|
42
|
+
attr_reader :endpoints
|
43
|
+
|
44
|
+
# @return [Origins] origins
|
45
|
+
attr_reader :origins
|
46
|
+
|
47
|
+
# @return [CustomDomains] custom_domains
|
48
|
+
attr_reader :custom_domains
|
49
|
+
|
50
|
+
# @return [ResourceUsageOperations] resource_usage_operations
|
51
|
+
attr_reader :resource_usage_operations
|
52
|
+
|
53
|
+
# @return [Operations] operations
|
54
|
+
attr_reader :operations
|
55
|
+
|
56
|
+
# @return [EdgeNodes] edge_nodes
|
57
|
+
attr_reader :edge_nodes
|
58
|
+
|
59
|
+
#
|
60
|
+
# Creates initializes a new instance of the CdnManagementClient class.
|
61
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
62
|
+
# @param base_url [String] the base URI of the service.
|
63
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
64
|
+
#
|
65
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
66
|
+
super(credentials, options)
|
67
|
+
@base_url = base_url || 'https://management.azure.com'
|
68
|
+
|
69
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
70
|
+
@credentials = credentials
|
71
|
+
|
72
|
+
@profiles = Profiles.new(self)
|
73
|
+
@endpoints = Endpoints.new(self)
|
74
|
+
@origins = Origins.new(self)
|
75
|
+
@custom_domains = CustomDomains.new(self)
|
76
|
+
@resource_usage_operations = ResourceUsageOperations.new(self)
|
77
|
+
@operations = Operations.new(self)
|
78
|
+
@edge_nodes = EdgeNodes.new(self)
|
79
|
+
@api_version = '2017-10-12'
|
80
|
+
@accept_language = 'en-US'
|
81
|
+
@long_running_operation_retry_timeout = 30
|
82
|
+
@generate_client_request_id = true
|
83
|
+
add_telemetry
|
84
|
+
end
|
85
|
+
|
86
|
+
#
|
87
|
+
# Makes a request and returns the body of the response.
|
88
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
89
|
+
# @param path [String] the path, relative to {base_url}.
|
90
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
91
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
92
|
+
# Example:
|
93
|
+
#
|
94
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
95
|
+
# path = "/path"
|
96
|
+
# options = {
|
97
|
+
# body: request_content,
|
98
|
+
# query_params: {'api-version' => '2016-02-01'}
|
99
|
+
# }
|
100
|
+
# result = @client.make_request(:put, path, options)
|
101
|
+
#
|
102
|
+
def make_request(method, path, options = {})
|
103
|
+
result = make_request_with_http_info(method, path, options)
|
104
|
+
result.body unless result.nil?
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
# Makes a request and returns the operation response.
|
109
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
110
|
+
# @param path [String] the path, relative to {base_url}.
|
111
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
112
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
113
|
+
#
|
114
|
+
def make_request_with_http_info(method, path, options = {})
|
115
|
+
result = make_request_async(method, path, options).value!
|
116
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
#
|
121
|
+
# Makes a request asynchronously.
|
122
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
123
|
+
# @param path [String] the path, relative to {base_url}.
|
124
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
125
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
126
|
+
#
|
127
|
+
def make_request_async(method, path, options = {})
|
128
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
129
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
130
|
+
|
131
|
+
request_url = options[:base_url] || @base_url
|
132
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
133
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
134
|
+
end
|
135
|
+
|
136
|
+
request_headers = @request_headers
|
137
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
138
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
139
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
140
|
+
|
141
|
+
super(request_url, method, path, options)
|
142
|
+
end
|
143
|
+
|
144
|
+
#
|
145
|
+
# Check the availability of a resource name. This is needed for resources where
|
146
|
+
# name is globally unique, such as a CDN endpoint.
|
147
|
+
#
|
148
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
149
|
+
# check.
|
150
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
151
|
+
# will be added to the HTTP request.
|
152
|
+
#
|
153
|
+
# @return [CheckNameAvailabilityOutput] operation results.
|
154
|
+
#
|
155
|
+
def check_name_availability(check_name_availability_input, custom_headers:nil)
|
156
|
+
response = check_name_availability_async(check_name_availability_input, custom_headers:custom_headers).value!
|
157
|
+
response.body unless response.nil?
|
158
|
+
end
|
159
|
+
|
160
|
+
#
|
161
|
+
# Check the availability of a resource name. This is needed for resources where
|
162
|
+
# name is globally unique, such as a CDN endpoint.
|
163
|
+
#
|
164
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
165
|
+
# check.
|
166
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
167
|
+
# will be added to the HTTP request.
|
168
|
+
#
|
169
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
170
|
+
#
|
171
|
+
def check_name_availability_with_http_info(check_name_availability_input, custom_headers:nil)
|
172
|
+
check_name_availability_async(check_name_availability_input, custom_headers:custom_headers).value!
|
173
|
+
end
|
174
|
+
|
175
|
+
#
|
176
|
+
# Check the availability of a resource name. This is needed for resources where
|
177
|
+
# name is globally unique, such as a CDN endpoint.
|
178
|
+
#
|
179
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
180
|
+
# check.
|
181
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
182
|
+
# to the HTTP request.
|
183
|
+
#
|
184
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
185
|
+
#
|
186
|
+
def check_name_availability_async(check_name_availability_input, custom_headers:nil)
|
187
|
+
fail ArgumentError, 'check_name_availability_input is nil' if check_name_availability_input.nil?
|
188
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
189
|
+
|
190
|
+
|
191
|
+
request_headers = {}
|
192
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
193
|
+
|
194
|
+
# Set Headers
|
195
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
196
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
197
|
+
|
198
|
+
# Serialize Request
|
199
|
+
request_mapper = Azure::CDN::Mgmt::V2017_10_12::Models::CheckNameAvailabilityInput.mapper()
|
200
|
+
request_content = self.serialize(request_mapper, check_name_availability_input)
|
201
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
202
|
+
|
203
|
+
path_template = 'providers/Microsoft.Cdn/checkNameAvailability'
|
204
|
+
|
205
|
+
request_url = @base_url || self.base_url
|
206
|
+
|
207
|
+
options = {
|
208
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
209
|
+
query_params: {'api-version' => api_version},
|
210
|
+
body: request_content,
|
211
|
+
headers: request_headers.merge(custom_headers || {}),
|
212
|
+
base_url: request_url
|
213
|
+
}
|
214
|
+
promise = self.make_request_async(:post, path_template, options)
|
215
|
+
|
216
|
+
promise = promise.then do |result|
|
217
|
+
http_response = result.response
|
218
|
+
status_code = http_response.status
|
219
|
+
response_content = http_response.body
|
220
|
+
unless status_code == 200
|
221
|
+
error_model = JSON.load(response_content)
|
222
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
223
|
+
end
|
224
|
+
|
225
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
226
|
+
# Deserialize Response
|
227
|
+
if status_code == 200
|
228
|
+
begin
|
229
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
230
|
+
result_mapper = Azure::CDN::Mgmt::V2017_10_12::Models::CheckNameAvailabilityOutput.mapper()
|
231
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
232
|
+
rescue Exception => e
|
233
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
result
|
238
|
+
end
|
239
|
+
|
240
|
+
promise.execute
|
241
|
+
end
|
242
|
+
|
243
|
+
#
|
244
|
+
# Check if the probe path is a valid path and the file can be accessed. Probe
|
245
|
+
# path is the path to a file hosted on the origin server to help accelerate the
|
246
|
+
# delivery of dynamic content via the CDN endpoint. This path is relative to
|
247
|
+
# the origin path specified in the endpoint configuration.
|
248
|
+
#
|
249
|
+
# @param validate_probe_input [ValidateProbeInput] Input to check.
|
250
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
251
|
+
# will be added to the HTTP request.
|
252
|
+
#
|
253
|
+
# @return [ValidateProbeOutput] operation results.
|
254
|
+
#
|
255
|
+
def validate_probe(validate_probe_input, custom_headers:nil)
|
256
|
+
response = validate_probe_async(validate_probe_input, custom_headers:custom_headers).value!
|
257
|
+
response.body unless response.nil?
|
258
|
+
end
|
259
|
+
|
260
|
+
#
|
261
|
+
# Check if the probe path is a valid path and the file can be accessed. Probe
|
262
|
+
# path is the path to a file hosted on the origin server to help accelerate the
|
263
|
+
# delivery of dynamic content via the CDN endpoint. This path is relative to
|
264
|
+
# the origin path specified in the endpoint configuration.
|
265
|
+
#
|
266
|
+
# @param validate_probe_input [ValidateProbeInput] Input to check.
|
267
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
268
|
+
# will be added to the HTTP request.
|
269
|
+
#
|
270
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
271
|
+
#
|
272
|
+
def validate_probe_with_http_info(validate_probe_input, custom_headers:nil)
|
273
|
+
validate_probe_async(validate_probe_input, custom_headers:custom_headers).value!
|
274
|
+
end
|
275
|
+
|
276
|
+
#
|
277
|
+
# Check if the probe path is a valid path and the file can be accessed. Probe
|
278
|
+
# path is the path to a file hosted on the origin server to help accelerate the
|
279
|
+
# delivery of dynamic content via the CDN endpoint. This path is relative to
|
280
|
+
# the origin path specified in the endpoint configuration.
|
281
|
+
#
|
282
|
+
# @param validate_probe_input [ValidateProbeInput] Input to check.
|
283
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
284
|
+
# to the HTTP request.
|
285
|
+
#
|
286
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
287
|
+
#
|
288
|
+
def validate_probe_async(validate_probe_input, custom_headers:nil)
|
289
|
+
fail ArgumentError, 'validate_probe_input is nil' if validate_probe_input.nil?
|
290
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
291
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
292
|
+
|
293
|
+
|
294
|
+
request_headers = {}
|
295
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
296
|
+
|
297
|
+
# Set Headers
|
298
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
299
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
300
|
+
|
301
|
+
# Serialize Request
|
302
|
+
request_mapper = Azure::CDN::Mgmt::V2017_10_12::Models::ValidateProbeInput.mapper()
|
303
|
+
request_content = self.serialize(request_mapper, validate_probe_input)
|
304
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
305
|
+
|
306
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe'
|
307
|
+
|
308
|
+
request_url = @base_url || self.base_url
|
309
|
+
|
310
|
+
options = {
|
311
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
312
|
+
path_params: {'subscriptionId' => subscription_id},
|
313
|
+
query_params: {'api-version' => api_version},
|
314
|
+
body: request_content,
|
315
|
+
headers: request_headers.merge(custom_headers || {}),
|
316
|
+
base_url: request_url
|
317
|
+
}
|
318
|
+
promise = self.make_request_async(:post, path_template, options)
|
319
|
+
|
320
|
+
promise = promise.then do |result|
|
321
|
+
http_response = result.response
|
322
|
+
status_code = http_response.status
|
323
|
+
response_content = http_response.body
|
324
|
+
unless status_code == 200
|
325
|
+
error_model = JSON.load(response_content)
|
326
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
327
|
+
end
|
328
|
+
|
329
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
330
|
+
# Deserialize Response
|
331
|
+
if status_code == 200
|
332
|
+
begin
|
333
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
334
|
+
result_mapper = Azure::CDN::Mgmt::V2017_10_12::Models::ValidateProbeOutput.mapper()
|
335
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
336
|
+
rescue Exception => e
|
337
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
result
|
342
|
+
end
|
343
|
+
|
344
|
+
promise.execute
|
345
|
+
end
|
346
|
+
|
347
|
+
|
348
|
+
private
|
349
|
+
#
|
350
|
+
# Adds telemetry information.
|
351
|
+
#
|
352
|
+
def add_telemetry
|
353
|
+
sdk_information = 'azure_mgmt_cdn'
|
354
|
+
sdk_information = "#{sdk_information}/0.16.0"
|
355
|
+
add_user_agent_information(sdk_information)
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|