azure_mgmt_cdn 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_cdn.rb +16 -20
- data/lib/generated/azure_mgmt_cdn/cdn_management_client.rb +362 -11
- data/lib/generated/azure_mgmt_cdn/custom_domains.rb +240 -234
- data/lib/generated/azure_mgmt_cdn/endpoints.rb +735 -572
- data/lib/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +4 -4
- data/lib/generated/azure_mgmt_cdn/models/custom_domain.rb +42 -10
- data/lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +45 -2
- data/lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +3 -2
- data/lib/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb +10 -2
- data/lib/generated/azure_mgmt_cdn/models/endpoint.rb +70 -42
- data/lib/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +45 -2
- data/lib/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +44 -15
- data/lib/generated/azure_mgmt_cdn/models/error_response.rb +4 -3
- data/lib/generated/azure_mgmt_cdn/models/geo_filter.rb +75 -0
- data/lib/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
- data/lib/generated/azure_mgmt_cdn/models/load_parameters.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/operation.rb +2 -2
- data/lib/generated/azure_mgmt_cdn/models/operation_display.rb +4 -4
- data/lib/generated/azure_mgmt_cdn/models/operation_list_result.rb +45 -2
- data/lib/generated/azure_mgmt_cdn/models/origin.rb +38 -11
- data/lib/generated/azure_mgmt_cdn/models/origin_list_result.rb +45 -2
- data/lib/generated/azure_mgmt_cdn/models/origin_resource_state.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/{origin_parameters.rb → origin_update_parameters.rb} +14 -6
- data/lib/generated/azure_mgmt_cdn/models/profile.rb +13 -15
- data/lib/generated/azure_mgmt_cdn/models/profile_list_result.rb +45 -2
- data/lib/generated/azure_mgmt_cdn/models/profile_resource_state.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/resource_type.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/sku.rb +3 -4
- data/lib/generated/azure_mgmt_cdn/models/sku_name.rb +2 -1
- data/lib/generated/azure_mgmt_cdn/models/sso_uri.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/origins.rb +154 -387
- data/lib/generated/azure_mgmt_cdn/profiles.rb +480 -257
- data/lib/generated/azure_mgmt_cdn/version.rb +2 -2
- metadata +7 -11
- data/lib/generated/azure_mgmt_cdn/models/endpoint_create_parameters.rb +0 -173
- data/lib/generated/azure_mgmt_cdn/models/profile_create_parameters.rb +0 -72
- data/lib/generated/azure_mgmt_cdn/models/provisioning_state.rb +0 -17
- data/lib/generated/azure_mgmt_cdn/models/tracked_resource.rb +0 -85
- data/lib/generated/azure_mgmt_cdn/name_availability.rb +0 -133
- data/lib/generated/azure_mgmt_cdn/operations.rb +0 -111
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38db031ac2d395151a09bec19793f2b981beeb5a
|
4
|
+
data.tar.gz: 7752084d80cbd4db22cd025ff556cfa2f8d89edc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da767cb9e1edb34b34f411f94283bed723ad8a41793237a6273fed5c072c722af5d83647678a66b04346087379ac90ee51e5f034c09e4e708acfbfedf14d4190
|
7
|
+
data.tar.gz: 2a386b847c7067206733c7d4d4a20b83f6f446006daf20fd3f9ecd7c33e807316b28582f0ad6a9222785d1f328f4588a626d3f43ccb052dab59b154da6349e0c
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -24,44 +24,40 @@ module Azure::ARM::CDN
|
|
24
24
|
autoload :Endpoints, 'generated/azure_mgmt_cdn/endpoints.rb'
|
25
25
|
autoload :Origins, 'generated/azure_mgmt_cdn/origins.rb'
|
26
26
|
autoload :CustomDomains, 'generated/azure_mgmt_cdn/custom_domains.rb'
|
27
|
-
autoload :NameAvailability, 'generated/azure_mgmt_cdn/name_availability.rb'
|
28
|
-
autoload :Operations, 'generated/azure_mgmt_cdn/operations.rb'
|
29
27
|
autoload :CdnManagementClient, 'generated/azure_mgmt_cdn/cdn_management_client.rb'
|
30
28
|
|
31
29
|
module Models
|
30
|
+
autoload :OriginUpdateParameters, 'generated/azure_mgmt_cdn/models/origin_update_parameters.rb'
|
31
|
+
autoload :OriginListResult, 'generated/azure_mgmt_cdn/models/origin_list_result.rb'
|
32
32
|
autoload :Sku, 'generated/azure_mgmt_cdn/models/sku.rb'
|
33
33
|
autoload :ProfileListResult, 'generated/azure_mgmt_cdn/models/profile_list_result.rb'
|
34
|
-
autoload :ProfileCreateParameters, 'generated/azure_mgmt_cdn/models/profile_create_parameters.rb'
|
35
|
-
autoload :ProfileUpdateParameters, 'generated/azure_mgmt_cdn/models/profile_update_parameters.rb'
|
36
34
|
autoload :SsoUri, 'generated/azure_mgmt_cdn/models/sso_uri.rb'
|
37
|
-
autoload :DeepCreatedOrigin, 'generated/azure_mgmt_cdn/models/deep_created_origin.rb'
|
38
|
-
autoload :EndpointListResult, 'generated/azure_mgmt_cdn/models/endpoint_list_result.rb'
|
39
|
-
autoload :EndpointCreateParameters, 'generated/azure_mgmt_cdn/models/endpoint_create_parameters.rb'
|
40
|
-
autoload :EndpointUpdateParameters, 'generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb'
|
41
|
-
autoload :PurgeParameters, 'generated/azure_mgmt_cdn/models/purge_parameters.rb'
|
42
|
-
autoload :LoadParameters, 'generated/azure_mgmt_cdn/models/load_parameters.rb'
|
43
|
-
autoload :OriginParameters, 'generated/azure_mgmt_cdn/models/origin_parameters.rb'
|
44
|
-
autoload :OriginListResult, 'generated/azure_mgmt_cdn/models/origin_list_result.rb'
|
45
35
|
autoload :CustomDomainParameters, 'generated/azure_mgmt_cdn/models/custom_domain_parameters.rb'
|
36
|
+
autoload :DeepCreatedOrigin, 'generated/azure_mgmt_cdn/models/deep_created_origin.rb'
|
46
37
|
autoload :CustomDomainListResult, 'generated/azure_mgmt_cdn/models/custom_domain_list_result.rb'
|
38
|
+
autoload :EndpointUpdateParameters, 'generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb'
|
47
39
|
autoload :ValidateCustomDomainInput, 'generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb'
|
40
|
+
autoload :PurgeParameters, 'generated/azure_mgmt_cdn/models/purge_parameters.rb'
|
48
41
|
autoload :ValidateCustomDomainOutput, 'generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb'
|
42
|
+
autoload :ErrorResponse, 'generated/azure_mgmt_cdn/models/error_response.rb'
|
43
|
+
autoload :LoadParameters, 'generated/azure_mgmt_cdn/models/load_parameters.rb'
|
44
|
+
autoload :OperationListResult, 'generated/azure_mgmt_cdn/models/operation_list_result.rb'
|
49
45
|
autoload :CheckNameAvailabilityInput, 'generated/azure_mgmt_cdn/models/check_name_availability_input.rb'
|
46
|
+
autoload :GeoFilter, 'generated/azure_mgmt_cdn/models/geo_filter.rb'
|
50
47
|
autoload :CheckNameAvailabilityOutput, 'generated/azure_mgmt_cdn/models/check_name_availability_output.rb'
|
48
|
+
autoload :EndpointListResult, 'generated/azure_mgmt_cdn/models/endpoint_list_result.rb'
|
51
49
|
autoload :Operation, 'generated/azure_mgmt_cdn/models/operation.rb'
|
50
|
+
autoload :ProfileUpdateParameters, 'generated/azure_mgmt_cdn/models/profile_update_parameters.rb'
|
52
51
|
autoload :OperationDisplay, 'generated/azure_mgmt_cdn/models/operation_display.rb'
|
53
|
-
autoload :OperationListResult, 'generated/azure_mgmt_cdn/models/operation_list_result.rb'
|
54
|
-
autoload :ErrorResponse, 'generated/azure_mgmt_cdn/models/error_response.rb'
|
55
|
-
autoload :Origin, 'generated/azure_mgmt_cdn/models/origin.rb'
|
56
|
-
autoload :CustomDomain, 'generated/azure_mgmt_cdn/models/custom_domain.rb'
|
57
|
-
autoload :TrackedResource, 'generated/azure_mgmt_cdn/models/tracked_resource.rb'
|
58
52
|
autoload :Profile, 'generated/azure_mgmt_cdn/models/profile.rb'
|
59
53
|
autoload :Endpoint, 'generated/azure_mgmt_cdn/models/endpoint.rb'
|
54
|
+
autoload :Origin, 'generated/azure_mgmt_cdn/models/origin.rb'
|
55
|
+
autoload :CustomDomain, 'generated/azure_mgmt_cdn/models/custom_domain.rb'
|
60
56
|
autoload :SkuName, 'generated/azure_mgmt_cdn/models/sku_name.rb'
|
61
57
|
autoload :ProfileResourceState, 'generated/azure_mgmt_cdn/models/profile_resource_state.rb'
|
62
|
-
autoload :ProvisioningState, 'generated/azure_mgmt_cdn/models/provisioning_state.rb'
|
63
|
-
autoload :QueryStringCachingBehavior, 'generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb'
|
64
58
|
autoload :EndpointResourceState, 'generated/azure_mgmt_cdn/models/endpoint_resource_state.rb'
|
59
|
+
autoload :QueryStringCachingBehavior, 'generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb'
|
60
|
+
autoload :GeoFilterActions, 'generated/azure_mgmt_cdn/models/geo_filter_actions.rb'
|
65
61
|
autoload :OriginResourceState, 'generated/azure_mgmt_cdn/models/origin_resource_state.rb'
|
66
62
|
autoload :CustomDomainResourceState, 'generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb'
|
67
63
|
autoload :ResourceType, 'generated/azure_mgmt_cdn/models/resource_type.rb'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -21,7 +21,7 @@ module Azure::ARM::CDN
|
|
21
21
|
attr_accessor :subscription_id
|
22
22
|
|
23
23
|
# @return [String] Version of the API to be used with the client request.
|
24
|
-
# Current version is 2016-
|
24
|
+
# Current version is 2016-10-02.
|
25
25
|
attr_reader :api_version
|
26
26
|
|
27
27
|
# @return [String] Gets or sets the preferred language for the response.
|
@@ -47,12 +47,6 @@ module Azure::ARM::CDN
|
|
47
47
|
# @return [CustomDomains] custom_domains
|
48
48
|
attr_reader :custom_domains
|
49
49
|
|
50
|
-
# @return [NameAvailability] name_availability
|
51
|
-
attr_reader :name_availability
|
52
|
-
|
53
|
-
# @return [Operations] operations
|
54
|
-
attr_reader :operations
|
55
|
-
|
56
50
|
#
|
57
51
|
# Creates initializes a new instance of the CdnManagementClient class.
|
58
52
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
@@ -71,12 +65,11 @@ module Azure::ARM::CDN
|
|
71
65
|
@endpoints = Endpoints.new(self)
|
72
66
|
@origins = Origins.new(self)
|
73
67
|
@custom_domains = CustomDomains.new(self)
|
74
|
-
@
|
75
|
-
@operations = Operations.new(self)
|
76
|
-
@api_version = '2016-04-02'
|
68
|
+
@api_version = '2016-10-02'
|
77
69
|
@accept_language = 'en-US'
|
78
70
|
@long_running_operation_retry_timeout = 30
|
79
71
|
@generate_client_request_id = true
|
72
|
+
add_telemetry
|
80
73
|
end
|
81
74
|
|
82
75
|
#
|
@@ -134,5 +127,363 @@ module Azure::ARM::CDN
|
|
134
127
|
super(request_url, method, path, options)
|
135
128
|
end
|
136
129
|
|
130
|
+
#
|
131
|
+
# Check the availability of a resource name without creating the resource. This
|
132
|
+
# is needed for resources where name is globally unique, such as a CDN
|
133
|
+
# endpoint.
|
134
|
+
#
|
135
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
136
|
+
# check.
|
137
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
138
|
+
# will be added to the HTTP request.
|
139
|
+
#
|
140
|
+
# @return [CheckNameAvailabilityOutput] operation results.
|
141
|
+
#
|
142
|
+
def check_name_availability(check_name_availability_input, custom_headers = nil)
|
143
|
+
response = check_name_availability_async(check_name_availability_input, custom_headers).value!
|
144
|
+
response.body unless response.nil?
|
145
|
+
end
|
146
|
+
|
147
|
+
#
|
148
|
+
# Check the availability of a resource name without creating the resource. This
|
149
|
+
# is needed for resources where name is globally unique, such as a CDN
|
150
|
+
# endpoint.
|
151
|
+
#
|
152
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
153
|
+
# check.
|
154
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
155
|
+
# will be added to the HTTP request.
|
156
|
+
#
|
157
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
158
|
+
#
|
159
|
+
def check_name_availability_with_http_info(check_name_availability_input, custom_headers = nil)
|
160
|
+
check_name_availability_async(check_name_availability_input, custom_headers).value!
|
161
|
+
end
|
162
|
+
|
163
|
+
#
|
164
|
+
# Check the availability of a resource name without creating the resource. This
|
165
|
+
# is needed for resources where name is globally unique, such as a CDN
|
166
|
+
# endpoint.
|
167
|
+
#
|
168
|
+
# @param check_name_availability_input [CheckNameAvailabilityInput] Input to
|
169
|
+
# check.
|
170
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
171
|
+
# to the HTTP request.
|
172
|
+
#
|
173
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
174
|
+
#
|
175
|
+
def check_name_availability_async(check_name_availability_input, custom_headers = nil)
|
176
|
+
fail ArgumentError, 'check_name_availability_input is nil' if check_name_availability_input.nil?
|
177
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
178
|
+
|
179
|
+
|
180
|
+
request_headers = {}
|
181
|
+
|
182
|
+
# Set Headers
|
183
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
184
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
185
|
+
|
186
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
187
|
+
|
188
|
+
# Serialize Request
|
189
|
+
request_mapper = CheckNameAvailabilityInput.mapper()
|
190
|
+
request_content = self.serialize(request_mapper, check_name_availability_input, 'check_name_availability_input')
|
191
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
192
|
+
|
193
|
+
path_template = '/providers/Microsoft.Cdn/checkNameAvailability'
|
194
|
+
|
195
|
+
request_url = @base_url || self.base_url
|
196
|
+
|
197
|
+
options = {
|
198
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
199
|
+
query_params: {'api-version' => api_version},
|
200
|
+
body: request_content,
|
201
|
+
headers: request_headers.merge(custom_headers || {}),
|
202
|
+
base_url: request_url
|
203
|
+
}
|
204
|
+
promise = self.make_request_async(:post, path_template, options)
|
205
|
+
|
206
|
+
promise = promise.then do |result|
|
207
|
+
http_response = result.response
|
208
|
+
status_code = http_response.status
|
209
|
+
response_content = http_response.body
|
210
|
+
unless status_code == 200
|
211
|
+
error_model = JSON.load(response_content)
|
212
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
213
|
+
end
|
214
|
+
|
215
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
216
|
+
# Deserialize Response
|
217
|
+
if status_code == 200
|
218
|
+
begin
|
219
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
220
|
+
result_mapper = CheckNameAvailabilityOutput.mapper()
|
221
|
+
result.body = self.deserialize(result_mapper, parsed_response, 'result.body')
|
222
|
+
rescue Exception => e
|
223
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
result
|
228
|
+
end
|
229
|
+
|
230
|
+
promise.execute
|
231
|
+
end
|
232
|
+
|
233
|
+
#
|
234
|
+
# Lists all of the available CDN REST API operations.
|
235
|
+
#
|
236
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
237
|
+
# will be added to the HTTP request.
|
238
|
+
#
|
239
|
+
# @return [Array<Operation>] operation results.
|
240
|
+
#
|
241
|
+
def list_operations(custom_headers = nil)
|
242
|
+
first_page = list_operations_as_lazy(custom_headers)
|
243
|
+
first_page.get_all_items
|
244
|
+
end
|
245
|
+
|
246
|
+
#
|
247
|
+
# Lists all of the available CDN REST API operations.
|
248
|
+
#
|
249
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
250
|
+
# will be added to the HTTP request.
|
251
|
+
#
|
252
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
253
|
+
#
|
254
|
+
def list_operations_with_http_info(custom_headers = nil)
|
255
|
+
list_operations_async(custom_headers).value!
|
256
|
+
end
|
257
|
+
|
258
|
+
#
|
259
|
+
# Lists all of the available CDN REST API operations.
|
260
|
+
#
|
261
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
262
|
+
# to the HTTP request.
|
263
|
+
#
|
264
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
265
|
+
#
|
266
|
+
def list_operations_async(custom_headers = nil)
|
267
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
268
|
+
|
269
|
+
|
270
|
+
request_headers = {}
|
271
|
+
|
272
|
+
# Set Headers
|
273
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
274
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
275
|
+
path_template = '/providers/Microsoft.Cdn/operations'
|
276
|
+
|
277
|
+
request_url = @base_url || self.base_url
|
278
|
+
|
279
|
+
options = {
|
280
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
281
|
+
query_params: {'api-version' => api_version},
|
282
|
+
headers: request_headers.merge(custom_headers || {}),
|
283
|
+
base_url: request_url
|
284
|
+
}
|
285
|
+
promise = self.make_request_async(:get, path_template, options)
|
286
|
+
|
287
|
+
promise = promise.then do |result|
|
288
|
+
http_response = result.response
|
289
|
+
status_code = http_response.status
|
290
|
+
response_content = http_response.body
|
291
|
+
unless status_code == 200
|
292
|
+
error_model = JSON.load(response_content)
|
293
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
294
|
+
end
|
295
|
+
|
296
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
297
|
+
# Deserialize Response
|
298
|
+
if status_code == 200
|
299
|
+
begin
|
300
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
301
|
+
result_mapper = OperationListResult.mapper()
|
302
|
+
result.body = self.deserialize(result_mapper, parsed_response, 'result.body')
|
303
|
+
rescue Exception => e
|
304
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
result
|
309
|
+
end
|
310
|
+
|
311
|
+
promise.execute
|
312
|
+
end
|
313
|
+
|
314
|
+
#
|
315
|
+
# Lists all of the available CDN REST API operations.
|
316
|
+
#
|
317
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
318
|
+
# to List operation.
|
319
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
320
|
+
# will be added to the HTTP request.
|
321
|
+
#
|
322
|
+
# @return [OperationListResult] operation results.
|
323
|
+
#
|
324
|
+
def list_operations_next(next_page_link, custom_headers = nil)
|
325
|
+
response = list_operations_next_async(next_page_link, custom_headers).value!
|
326
|
+
response.body unless response.nil?
|
327
|
+
end
|
328
|
+
|
329
|
+
#
|
330
|
+
# Lists all of the available CDN REST API operations.
|
331
|
+
#
|
332
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
333
|
+
# to List operation.
|
334
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
335
|
+
# will be added to the HTTP request.
|
336
|
+
#
|
337
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
338
|
+
#
|
339
|
+
def list_operations_next_with_http_info(next_page_link, custom_headers = nil)
|
340
|
+
list_operations_next_async(next_page_link, custom_headers).value!
|
341
|
+
end
|
342
|
+
|
343
|
+
#
|
344
|
+
# Lists all of the available CDN REST API operations.
|
345
|
+
#
|
346
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
347
|
+
# to List operation.
|
348
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
349
|
+
# to the HTTP request.
|
350
|
+
#
|
351
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
352
|
+
#
|
353
|
+
def list_operations_next_async(next_page_link, custom_headers = nil)
|
354
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
355
|
+
|
356
|
+
|
357
|
+
request_headers = {}
|
358
|
+
|
359
|
+
# Set Headers
|
360
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
361
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
362
|
+
path_template = '{nextLink}'
|
363
|
+
|
364
|
+
request_url = @base_url || self.base_url
|
365
|
+
|
366
|
+
options = {
|
367
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
368
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
369
|
+
headers: request_headers.merge(custom_headers || {}),
|
370
|
+
base_url: request_url
|
371
|
+
}
|
372
|
+
promise = self.make_request_async(:get, path_template, options)
|
373
|
+
|
374
|
+
promise = promise.then do |result|
|
375
|
+
http_response = result.response
|
376
|
+
status_code = http_response.status
|
377
|
+
response_content = http_response.body
|
378
|
+
unless status_code == 200
|
379
|
+
error_model = JSON.load(response_content)
|
380
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
381
|
+
end
|
382
|
+
|
383
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
384
|
+
# Deserialize Response
|
385
|
+
if status_code == 200
|
386
|
+
begin
|
387
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
388
|
+
result_mapper = OperationListResult.mapper()
|
389
|
+
result.body = self.deserialize(result_mapper, parsed_response, 'result.body')
|
390
|
+
rescue Exception => e
|
391
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
result
|
396
|
+
end
|
397
|
+
|
398
|
+
promise.execute
|
399
|
+
end
|
400
|
+
|
401
|
+
#
|
402
|
+
# Lists all of the available CDN REST API operations.
|
403
|
+
#
|
404
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
405
|
+
# will be added to the HTTP request.
|
406
|
+
#
|
407
|
+
# @return [OperationListResult] operation results.
|
408
|
+
#
|
409
|
+
def list_operations_as_lazy(custom_headers = nil)
|
410
|
+
first_page = list_operations_as_lazy_as_lazy(custom_headers)
|
411
|
+
first_page.get_all_items
|
412
|
+
end
|
413
|
+
|
414
|
+
#
|
415
|
+
# Lists all of the available CDN REST API operations.
|
416
|
+
#
|
417
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
418
|
+
# will be added to the HTTP request.
|
419
|
+
#
|
420
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
421
|
+
#
|
422
|
+
def list_operations_as_lazy_with_http_info(custom_headers = nil)
|
423
|
+
list_operations_as_lazy_async(custom_headers).value!
|
424
|
+
end
|
425
|
+
|
426
|
+
#
|
427
|
+
# Lists all of the available CDN REST API operations.
|
428
|
+
#
|
429
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
430
|
+
# to the HTTP request.
|
431
|
+
#
|
432
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
433
|
+
#
|
434
|
+
def list_operations_as_lazy_async(custom_headers = nil)
|
435
|
+
|
436
|
+
|
437
|
+
request_headers = {}
|
438
|
+
path_template = '/providers/Microsoft.Cdn/operations'
|
439
|
+
|
440
|
+
request_url = @base_url || self.base_url
|
441
|
+
|
442
|
+
options = {
|
443
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
444
|
+
headers: request_headers.merge(custom_headers || {}),
|
445
|
+
base_url: request_url
|
446
|
+
}
|
447
|
+
promise = self.make_request_async(:get, path_template, options)
|
448
|
+
|
449
|
+
promise = promise.then do |result|
|
450
|
+
http_response = result.response
|
451
|
+
status_code = http_response.status
|
452
|
+
response_content = http_response.body
|
453
|
+
unless status_code == 200
|
454
|
+
error_model = JSON.load(response_content)
|
455
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
456
|
+
end
|
457
|
+
|
458
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
459
|
+
# Deserialize Response
|
460
|
+
if status_code == 200
|
461
|
+
begin
|
462
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
463
|
+
result_mapper = OperationListResult.mapper()
|
464
|
+
result.body = self.deserialize(result_mapper, parsed_response, 'result.body')
|
465
|
+
rescue Exception => e
|
466
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
467
|
+
end
|
468
|
+
end
|
469
|
+
|
470
|
+
result
|
471
|
+
end
|
472
|
+
|
473
|
+
promise.execute
|
474
|
+
end
|
475
|
+
|
476
|
+
|
477
|
+
private
|
478
|
+
#
|
479
|
+
# Adds telemetry information.
|
480
|
+
#
|
481
|
+
def add_telemetry
|
482
|
+
sdk_information = 'azure_mgmt_cdn'
|
483
|
+
if defined? Azure::ARM::CDN::VERSION
|
484
|
+
sdk_information = "#{sdk_information}/#{Azure::ARM::CDN::VERSION}"
|
485
|
+
end
|
486
|
+
add_user_agent_information(sdk_information)
|
487
|
+
end
|
137
488
|
end
|
138
489
|
end
|