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
@@ -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
|
|
@@ -7,9 +7,7 @@ module Azure::ARM::CDN
|
|
7
7
|
#
|
8
8
|
# Use these APIs to manage Azure CDN resources through the Azure Resource
|
9
9
|
# Manager. You must make sure that requests made to these resources are
|
10
|
-
# secure.
|
11
|
-
# href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
|
12
|
-
# Azure Resource Manager requests.</a>
|
10
|
+
# secure.
|
13
11
|
#
|
14
12
|
class Profiles
|
15
13
|
include Azure::ARM::CDN::Models
|
@@ -27,39 +25,39 @@ module Azure::ARM::CDN
|
|
27
25
|
attr_reader :client
|
28
26
|
|
29
27
|
#
|
30
|
-
# Lists the CDN profiles within an Azure
|
28
|
+
# Lists all the CDN profiles within an Azure subscription.
|
31
29
|
#
|
32
30
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
31
|
# will be added to the HTTP request.
|
34
32
|
#
|
35
|
-
# @return [
|
33
|
+
# @return [Array<Profile>] operation results.
|
36
34
|
#
|
37
|
-
def
|
38
|
-
|
39
|
-
|
35
|
+
def list(custom_headers = nil)
|
36
|
+
first_page = list_as_lazy(custom_headers)
|
37
|
+
first_page.get_all_items
|
40
38
|
end
|
41
39
|
|
42
40
|
#
|
43
|
-
# Lists the CDN profiles within an Azure
|
41
|
+
# Lists all the CDN profiles within an Azure subscription.
|
44
42
|
#
|
45
43
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
46
44
|
# will be added to the HTTP request.
|
47
45
|
#
|
48
46
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
49
47
|
#
|
50
|
-
def
|
51
|
-
|
48
|
+
def list_with_http_info(custom_headers = nil)
|
49
|
+
list_async(custom_headers).value!
|
52
50
|
end
|
53
51
|
|
54
52
|
#
|
55
|
-
# Lists the CDN profiles within an Azure
|
53
|
+
# Lists all the CDN profiles within an Azure subscription.
|
56
54
|
#
|
57
55
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
58
56
|
# to the HTTP request.
|
59
57
|
#
|
60
58
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
61
59
|
#
|
62
|
-
def
|
60
|
+
def list_async(custom_headers = nil)
|
63
61
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
64
62
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
65
63
|
|
@@ -110,24 +108,24 @@ module Azure::ARM::CDN
|
|
110
108
|
end
|
111
109
|
|
112
110
|
#
|
113
|
-
# Lists the CDN profiles within a resource group.
|
111
|
+
# Lists all the CDN profiles within a resource group.
|
114
112
|
#
|
115
|
-
# @param resource_group_name [String] Name of the
|
113
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
116
114
|
# Azure subscription.
|
117
115
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
118
116
|
# will be added to the HTTP request.
|
119
117
|
#
|
120
|
-
# @return [
|
118
|
+
# @return [Array<Profile>] operation results.
|
121
119
|
#
|
122
120
|
def list_by_resource_group(resource_group_name, custom_headers = nil)
|
123
|
-
|
124
|
-
|
121
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
|
122
|
+
first_page.get_all_items
|
125
123
|
end
|
126
124
|
|
127
125
|
#
|
128
|
-
# Lists the CDN profiles within a resource group.
|
126
|
+
# Lists all the CDN profiles within a resource group.
|
129
127
|
#
|
130
|
-
# @param resource_group_name [String] Name of the
|
128
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
131
129
|
# Azure subscription.
|
132
130
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
133
131
|
# will be added to the HTTP request.
|
@@ -139,9 +137,9 @@ module Azure::ARM::CDN
|
|
139
137
|
end
|
140
138
|
|
141
139
|
#
|
142
|
-
# Lists the CDN profiles within a resource group.
|
140
|
+
# Lists all the CDN profiles within a resource group.
|
143
141
|
#
|
144
|
-
# @param resource_group_name [String] Name of the
|
142
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
145
143
|
# Azure subscription.
|
146
144
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
147
145
|
# to the HTTP request.
|
@@ -200,53 +198,56 @@ module Azure::ARM::CDN
|
|
200
198
|
end
|
201
199
|
|
202
200
|
#
|
203
|
-
# Gets a CDN profile with the specified
|
201
|
+
# Gets a CDN profile with the specified profile name under the specified
|
202
|
+
# subscription and resource group.
|
204
203
|
#
|
205
|
-
# @param
|
206
|
-
# group.
|
207
|
-
# @param resource_group_name [String] Name of the resource group within the
|
204
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
208
205
|
# Azure subscription.
|
206
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
207
|
+
# the resource group.
|
209
208
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
210
209
|
# will be added to the HTTP request.
|
211
210
|
#
|
212
211
|
# @return [Profile] operation results.
|
213
212
|
#
|
214
|
-
def get(
|
215
|
-
response = get_async(
|
213
|
+
def get(resource_group_name, profile_name, custom_headers = nil)
|
214
|
+
response = get_async(resource_group_name, profile_name, custom_headers).value!
|
216
215
|
response.body unless response.nil?
|
217
216
|
end
|
218
217
|
|
219
218
|
#
|
220
|
-
# Gets a CDN profile with the specified
|
219
|
+
# Gets a CDN profile with the specified profile name under the specified
|
220
|
+
# subscription and resource group.
|
221
221
|
#
|
222
|
-
# @param
|
223
|
-
# group.
|
224
|
-
# @param resource_group_name [String] Name of the resource group within the
|
222
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
225
223
|
# Azure subscription.
|
224
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
225
|
+
# the resource group.
|
226
226
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
227
227
|
# will be added to the HTTP request.
|
228
228
|
#
|
229
229
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
230
230
|
#
|
231
|
-
def get_with_http_info(
|
232
|
-
get_async(
|
231
|
+
def get_with_http_info(resource_group_name, profile_name, custom_headers = nil)
|
232
|
+
get_async(resource_group_name, profile_name, custom_headers).value!
|
233
233
|
end
|
234
234
|
|
235
235
|
#
|
236
|
-
# Gets a CDN profile with the specified
|
236
|
+
# Gets a CDN profile with the specified profile name under the specified
|
237
|
+
# subscription and resource group.
|
237
238
|
#
|
238
|
-
# @param
|
239
|
-
# group.
|
240
|
-
# @param resource_group_name [String] Name of the resource group within the
|
239
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
241
240
|
# Azure subscription.
|
241
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
242
|
+
# the resource group.
|
242
243
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
243
244
|
# to the HTTP request.
|
244
245
|
#
|
245
246
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
246
247
|
#
|
247
|
-
def get_async(
|
248
|
-
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
248
|
+
def get_async(resource_group_name, profile_name, custom_headers = nil)
|
249
249
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
250
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
250
251
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
251
252
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
252
253
|
|
@@ -262,7 +263,7 @@ module Azure::ARM::CDN
|
|
262
263
|
|
263
264
|
options = {
|
264
265
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
265
|
-
path_params: {'
|
266
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
|
266
267
|
query_params: {'api-version' => @client.api_version},
|
267
268
|
headers: request_headers.merge(custom_headers || {}),
|
268
269
|
base_url: request_url
|
@@ -297,40 +298,39 @@ module Azure::ARM::CDN
|
|
297
298
|
end
|
298
299
|
|
299
300
|
#
|
300
|
-
# Creates a new CDN profile with the specified
|
301
|
+
# Creates a new CDN profile with a profile name under the specified
|
302
|
+
# subscription and resource group.
|
301
303
|
#
|
302
|
-
# @param
|
303
|
-
# group.
|
304
|
-
# @param profile_properties [ProfileCreateParameters] Profile properties
|
305
|
-
# needed for creation.
|
306
|
-
# @param resource_group_name [String] Name of the resource group within the
|
304
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
307
305
|
# Azure subscription.
|
306
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
307
|
+
# the resource group.
|
308
|
+
# @param profile [Profile] Profile properties needed to create a new profile.
|
308
309
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
309
310
|
# will be added to the HTTP request.
|
310
311
|
#
|
311
312
|
# @return [Profile] operation results.
|
312
313
|
#
|
313
|
-
def create(
|
314
|
-
response = create_async(
|
314
|
+
def create(resource_group_name, profile_name, profile, custom_headers = nil)
|
315
|
+
response = create_async(resource_group_name, profile_name, profile, custom_headers).value!
|
315
316
|
response.body unless response.nil?
|
316
317
|
end
|
317
318
|
|
318
319
|
#
|
319
|
-
# @param
|
320
|
-
# group.
|
321
|
-
# @param profile_properties [ProfileCreateParameters] Profile properties
|
322
|
-
# needed for creation.
|
323
|
-
# @param resource_group_name [String] Name of the resource group within the
|
320
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
324
321
|
# Azure subscription.
|
322
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
323
|
+
# the resource group.
|
324
|
+
# @param profile [Profile] Profile properties needed to create a new profile.
|
325
325
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
326
326
|
# will be added to the HTTP request.
|
327
327
|
#
|
328
328
|
# @return [Concurrent::Promise] promise which provides async access to http
|
329
329
|
# response.
|
330
330
|
#
|
331
|
-
def create_async(
|
331
|
+
def create_async(resource_group_name, profile_name, profile, custom_headers = nil)
|
332
332
|
# Send request
|
333
|
-
promise = begin_create_async(
|
333
|
+
promise = begin_create_async(resource_group_name, profile_name, profile, custom_headers)
|
334
334
|
|
335
335
|
promise = promise.then do |response|
|
336
336
|
# Defining deserialization method.
|
@@ -347,60 +347,264 @@ module Azure::ARM::CDN
|
|
347
347
|
end
|
348
348
|
|
349
349
|
#
|
350
|
-
#
|
350
|
+
# Updates an existing CDN profile with the specified profile name under the
|
351
|
+
# specified subscription and resource group.
|
351
352
|
#
|
352
|
-
# @param
|
353
|
-
# group.
|
354
|
-
# @param profile_properties [ProfileCreateParameters] Profile properties
|
355
|
-
# needed for creation.
|
356
|
-
# @param resource_group_name [String] Name of the resource group within the
|
353
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
357
354
|
# Azure subscription.
|
355
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
356
|
+
# the resource group.
|
357
|
+
# @param profile_update_parameters [ProfileUpdateParameters] Profile properties
|
358
|
+
# needed to update an existing profile.
|
358
359
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
359
360
|
# will be added to the HTTP request.
|
360
361
|
#
|
361
362
|
# @return [Profile] operation results.
|
362
363
|
#
|
363
|
-
def
|
364
|
-
response =
|
364
|
+
def update(resource_group_name, profile_name, profile_update_parameters, custom_headers = nil)
|
365
|
+
response = update_async(resource_group_name, profile_name, profile_update_parameters, custom_headers).value!
|
365
366
|
response.body unless response.nil?
|
366
367
|
end
|
367
368
|
|
368
369
|
#
|
369
|
-
#
|
370
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
371
|
+
# Azure subscription.
|
372
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
373
|
+
# the resource group.
|
374
|
+
# @param profile_update_parameters [ProfileUpdateParameters] Profile properties
|
375
|
+
# needed to update an existing profile.
|
376
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
377
|
+
# will be added to the HTTP request.
|
378
|
+
#
|
379
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
380
|
+
# response.
|
381
|
+
#
|
382
|
+
def update_async(resource_group_name, profile_name, profile_update_parameters, custom_headers = nil)
|
383
|
+
# Send request
|
384
|
+
promise = begin_update_async(resource_group_name, profile_name, profile_update_parameters, custom_headers)
|
385
|
+
|
386
|
+
promise = promise.then do |response|
|
387
|
+
# Defining deserialization method.
|
388
|
+
deserialize_method = lambda do |parsed_response|
|
389
|
+
result_mapper = Profile.mapper()
|
390
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
391
|
+
end
|
392
|
+
|
393
|
+
# Waiting for response.
|
394
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
395
|
+
end
|
396
|
+
|
397
|
+
promise
|
398
|
+
end
|
399
|
+
|
400
|
+
#
|
401
|
+
# Deletes an existing CDN profile with the specified parameters. Deleting a
|
402
|
+
# profile will result in the deletion of all subresources including endpoints,
|
403
|
+
# origins and custom domains.
|
404
|
+
#
|
405
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
406
|
+
# Azure subscription.
|
407
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
408
|
+
# the resource group.
|
409
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
410
|
+
# will be added to the HTTP request.
|
411
|
+
#
|
412
|
+
def delete(resource_group_name, profile_name, custom_headers = nil)
|
413
|
+
response = delete_async(resource_group_name, profile_name, custom_headers).value!
|
414
|
+
nil
|
415
|
+
end
|
416
|
+
|
370
417
|
#
|
371
|
-
# @param
|
372
|
-
# group.
|
373
|
-
# @param profile_properties [ProfileCreateParameters] Profile properties
|
374
|
-
# needed for creation.
|
375
|
-
# @param resource_group_name [String] Name of the resource group within the
|
418
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
376
419
|
# Azure subscription.
|
420
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
421
|
+
# the resource group.
|
422
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
423
|
+
# will be added to the HTTP request.
|
424
|
+
#
|
425
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
426
|
+
# response.
|
427
|
+
#
|
428
|
+
def delete_async(resource_group_name, profile_name, custom_headers = nil)
|
429
|
+
# Send request
|
430
|
+
promise = begin_delete_async(resource_group_name, profile_name, custom_headers)
|
431
|
+
|
432
|
+
promise = promise.then do |response|
|
433
|
+
# Defining deserialization method.
|
434
|
+
deserialize_method = lambda do |parsed_response|
|
435
|
+
end
|
436
|
+
|
437
|
+
# Waiting for response.
|
438
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
439
|
+
end
|
440
|
+
|
441
|
+
promise
|
442
|
+
end
|
443
|
+
|
444
|
+
#
|
445
|
+
# Generates a dynamic SSO URI used to sign in to the CDN supplemental portal.
|
446
|
+
# Supplemnetal portal is used to configure advanced feature capabilities that
|
447
|
+
# are not yet available in the Azure portal, such as core reports in a standard
|
448
|
+
# profile; rules engine, advanced HTTP reports, and real-time stats and alerts
|
449
|
+
# in a premium profile. The SSO URI changes approximately every 10 minutes.
|
450
|
+
#
|
451
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
452
|
+
# Azure subscription.
|
453
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
454
|
+
# the resource group.
|
455
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
456
|
+
# will be added to the HTTP request.
|
457
|
+
#
|
458
|
+
# @return [SsoUri] operation results.
|
459
|
+
#
|
460
|
+
def generate_sso_uri(resource_group_name, profile_name, custom_headers = nil)
|
461
|
+
response = generate_sso_uri_async(resource_group_name, profile_name, custom_headers).value!
|
462
|
+
response.body unless response.nil?
|
463
|
+
end
|
464
|
+
|
465
|
+
#
|
466
|
+
# Generates a dynamic SSO URI used to sign in to the CDN supplemental portal.
|
467
|
+
# Supplemnetal portal is used to configure advanced feature capabilities that
|
468
|
+
# are not yet available in the Azure portal, such as core reports in a standard
|
469
|
+
# profile; rules engine, advanced HTTP reports, and real-time stats and alerts
|
470
|
+
# in a premium profile. The SSO URI changes approximately every 10 minutes.
|
471
|
+
#
|
472
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
473
|
+
# Azure subscription.
|
474
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
475
|
+
# the resource group.
|
377
476
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
378
477
|
# will be added to the HTTP request.
|
379
478
|
#
|
380
479
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
381
480
|
#
|
382
|
-
def
|
383
|
-
|
481
|
+
def generate_sso_uri_with_http_info(resource_group_name, profile_name, custom_headers = nil)
|
482
|
+
generate_sso_uri_async(resource_group_name, profile_name, custom_headers).value!
|
384
483
|
end
|
385
484
|
|
386
485
|
#
|
387
|
-
#
|
486
|
+
# Generates a dynamic SSO URI used to sign in to the CDN supplemental portal.
|
487
|
+
# Supplemnetal portal is used to configure advanced feature capabilities that
|
488
|
+
# are not yet available in the Azure portal, such as core reports in a standard
|
489
|
+
# profile; rules engine, advanced HTTP reports, and real-time stats and alerts
|
490
|
+
# in a premium profile. The SSO URI changes approximately every 10 minutes.
|
388
491
|
#
|
389
|
-
# @param
|
390
|
-
# group.
|
391
|
-
# @param profile_properties [ProfileCreateParameters] Profile properties
|
392
|
-
# needed for creation.
|
393
|
-
# @param resource_group_name [String] Name of the resource group within the
|
492
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
394
493
|
# Azure subscription.
|
494
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
495
|
+
# the resource group.
|
395
496
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
396
497
|
# to the HTTP request.
|
397
498
|
#
|
398
499
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
399
500
|
#
|
400
|
-
def
|
501
|
+
def generate_sso_uri_async(resource_group_name, profile_name, custom_headers = nil)
|
502
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
401
503
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
402
|
-
fail ArgumentError, '
|
504
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
505
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
506
|
+
|
507
|
+
|
508
|
+
request_headers = {}
|
509
|
+
|
510
|
+
# Set Headers
|
511
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
512
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
513
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri'
|
514
|
+
|
515
|
+
request_url = @base_url || @client.base_url
|
516
|
+
|
517
|
+
options = {
|
518
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
519
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
|
520
|
+
query_params: {'api-version' => @client.api_version},
|
521
|
+
headers: request_headers.merge(custom_headers || {}),
|
522
|
+
base_url: request_url
|
523
|
+
}
|
524
|
+
promise = @client.make_request_async(:post, path_template, options)
|
525
|
+
|
526
|
+
promise = promise.then do |result|
|
527
|
+
http_response = result.response
|
528
|
+
status_code = http_response.status
|
529
|
+
response_content = http_response.body
|
530
|
+
unless status_code == 200
|
531
|
+
error_model = JSON.load(response_content)
|
532
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
533
|
+
end
|
534
|
+
|
535
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
536
|
+
# Deserialize Response
|
537
|
+
if status_code == 200
|
538
|
+
begin
|
539
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
540
|
+
result_mapper = SsoUri.mapper()
|
541
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
542
|
+
rescue Exception => e
|
543
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
result
|
548
|
+
end
|
549
|
+
|
550
|
+
promise.execute
|
551
|
+
end
|
552
|
+
|
553
|
+
#
|
554
|
+
# Creates a new CDN profile with a profile name under the specified
|
555
|
+
# subscription and resource group.
|
556
|
+
#
|
557
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
558
|
+
# Azure subscription.
|
559
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
560
|
+
# the resource group.
|
561
|
+
# @param profile [Profile] Profile properties needed to create a new profile.
|
562
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
563
|
+
# will be added to the HTTP request.
|
564
|
+
#
|
565
|
+
# @return [Profile] operation results.
|
566
|
+
#
|
567
|
+
def begin_create(resource_group_name, profile_name, profile, custom_headers = nil)
|
568
|
+
response = begin_create_async(resource_group_name, profile_name, profile, custom_headers).value!
|
569
|
+
response.body unless response.nil?
|
570
|
+
end
|
571
|
+
|
572
|
+
#
|
573
|
+
# Creates a new CDN profile with a profile name under the specified
|
574
|
+
# subscription and resource group.
|
575
|
+
#
|
576
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
577
|
+
# Azure subscription.
|
578
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
579
|
+
# the resource group.
|
580
|
+
# @param profile [Profile] Profile properties needed to create a new profile.
|
581
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
582
|
+
# will be added to the HTTP request.
|
583
|
+
#
|
584
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
585
|
+
#
|
586
|
+
def begin_create_with_http_info(resource_group_name, profile_name, profile, custom_headers = nil)
|
587
|
+
begin_create_async(resource_group_name, profile_name, profile, custom_headers).value!
|
588
|
+
end
|
589
|
+
|
590
|
+
#
|
591
|
+
# Creates a new CDN profile with a profile name under the specified
|
592
|
+
# subscription and resource group.
|
593
|
+
#
|
594
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
595
|
+
# Azure subscription.
|
596
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
597
|
+
# the resource group.
|
598
|
+
# @param profile [Profile] Profile properties needed to create a new profile.
|
599
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
600
|
+
# to the HTTP request.
|
601
|
+
#
|
602
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
603
|
+
#
|
604
|
+
def begin_create_async(resource_group_name, profile_name, profile, custom_headers = nil)
|
403
605
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
606
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
607
|
+
fail ArgumentError, 'profile is nil' if profile.nil?
|
404
608
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
405
609
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
406
610
|
|
@@ -414,8 +618,8 @@ module Azure::ARM::CDN
|
|
414
618
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
415
619
|
|
416
620
|
# Serialize Request
|
417
|
-
request_mapper =
|
418
|
-
request_content = @client.serialize(request_mapper,
|
621
|
+
request_mapper = Profile.mapper()
|
622
|
+
request_content = @client.serialize(request_mapper, profile, 'profile')
|
419
623
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
420
624
|
|
421
625
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'
|
@@ -424,7 +628,7 @@ module Azure::ARM::CDN
|
|
424
628
|
|
425
629
|
options = {
|
426
630
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
427
|
-
path_params: {'
|
631
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
|
428
632
|
query_params: {'api-version' => @client.api_version},
|
429
633
|
body: request_content,
|
430
634
|
headers: request_headers.merge(custom_headers || {}),
|
@@ -480,110 +684,63 @@ module Azure::ARM::CDN
|
|
480
684
|
end
|
481
685
|
|
482
686
|
#
|
483
|
-
# Updates an existing CDN profile with the specified
|
687
|
+
# Updates an existing CDN profile with the specified profile name under the
|
688
|
+
# specified subscription and resource group.
|
484
689
|
#
|
485
|
-
# @param
|
486
|
-
# group.
|
487
|
-
# @param profile_properties [ProfileUpdateParameters] Profile properties
|
488
|
-
# needed for update.
|
489
|
-
# @param resource_group_name [String] Name of the resource group within the
|
690
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
490
691
|
# Azure subscription.
|
692
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
693
|
+
# the resource group.
|
694
|
+
# @param profile_update_parameters [ProfileUpdateParameters] Profile properties
|
695
|
+
# needed to update an existing profile.
|
491
696
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
492
697
|
# will be added to the HTTP request.
|
493
698
|
#
|
494
699
|
# @return [Profile] operation results.
|
495
700
|
#
|
496
|
-
def
|
497
|
-
response =
|
701
|
+
def begin_update(resource_group_name, profile_name, profile_update_parameters, custom_headers = nil)
|
702
|
+
response = begin_update_async(resource_group_name, profile_name, profile_update_parameters, custom_headers).value!
|
498
703
|
response.body unless response.nil?
|
499
704
|
end
|
500
705
|
|
501
706
|
#
|
502
|
-
#
|
503
|
-
# group.
|
504
|
-
# @param profile_properties [ProfileUpdateParameters] Profile properties
|
505
|
-
# needed for update.
|
506
|
-
# @param resource_group_name [String] Name of the resource group within the
|
507
|
-
# Azure subscription.
|
508
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
509
|
-
# will be added to the HTTP request.
|
707
|
+
# Updates an existing CDN profile with the specified profile name under the
|
708
|
+
# specified subscription and resource group.
|
510
709
|
#
|
511
|
-
# @
|
512
|
-
# response.
|
513
|
-
#
|
514
|
-
def update_async(profile_name, profile_properties, resource_group_name, custom_headers = nil)
|
515
|
-
# Send request
|
516
|
-
promise = begin_update_async(profile_name, profile_properties, resource_group_name, custom_headers)
|
517
|
-
|
518
|
-
promise = promise.then do |response|
|
519
|
-
# Defining deserialization method.
|
520
|
-
deserialize_method = lambda do |parsed_response|
|
521
|
-
result_mapper = Profile.mapper()
|
522
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
523
|
-
end
|
524
|
-
|
525
|
-
# Waiting for response.
|
526
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
527
|
-
end
|
528
|
-
|
529
|
-
promise
|
530
|
-
end
|
531
|
-
|
532
|
-
#
|
533
|
-
# Updates an existing CDN profile with the specified parameters.
|
534
|
-
#
|
535
|
-
# @param profile_name [String] Name of the CDN profile within the resource
|
536
|
-
# group.
|
537
|
-
# @param profile_properties [ProfileUpdateParameters] Profile properties
|
538
|
-
# needed for update.
|
539
|
-
# @param resource_group_name [String] Name of the resource group within the
|
540
|
-
# Azure subscription.
|
541
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
542
|
-
# will be added to the HTTP request.
|
543
|
-
#
|
544
|
-
# @return [Profile] operation results.
|
545
|
-
#
|
546
|
-
def begin_update(profile_name, profile_properties, resource_group_name, custom_headers = nil)
|
547
|
-
response = begin_update_async(profile_name, profile_properties, resource_group_name, custom_headers).value!
|
548
|
-
response.body unless response.nil?
|
549
|
-
end
|
550
|
-
|
551
|
-
#
|
552
|
-
# Updates an existing CDN profile with the specified parameters.
|
553
|
-
#
|
554
|
-
# @param profile_name [String] Name of the CDN profile within the resource
|
555
|
-
# group.
|
556
|
-
# @param profile_properties [ProfileUpdateParameters] Profile properties
|
557
|
-
# needed for update.
|
558
|
-
# @param resource_group_name [String] Name of the resource group within the
|
710
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
559
711
|
# Azure subscription.
|
712
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
713
|
+
# the resource group.
|
714
|
+
# @param profile_update_parameters [ProfileUpdateParameters] Profile properties
|
715
|
+
# needed to update an existing profile.
|
560
716
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
561
717
|
# will be added to the HTTP request.
|
562
718
|
#
|
563
719
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
564
720
|
#
|
565
|
-
def begin_update_with_http_info(
|
566
|
-
begin_update_async(
|
721
|
+
def begin_update_with_http_info(resource_group_name, profile_name, profile_update_parameters, custom_headers = nil)
|
722
|
+
begin_update_async(resource_group_name, profile_name, profile_update_parameters, custom_headers).value!
|
567
723
|
end
|
568
724
|
|
569
725
|
#
|
570
|
-
# Updates an existing CDN profile with the specified
|
726
|
+
# Updates an existing CDN profile with the specified profile name under the
|
727
|
+
# specified subscription and resource group.
|
571
728
|
#
|
572
|
-
# @param
|
573
|
-
# group.
|
574
|
-
# @param profile_properties [ProfileUpdateParameters] Profile properties
|
575
|
-
# needed for update.
|
576
|
-
# @param resource_group_name [String] Name of the resource group within the
|
729
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
577
730
|
# Azure subscription.
|
731
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
732
|
+
# the resource group.
|
733
|
+
# @param profile_update_parameters [ProfileUpdateParameters] Profile properties
|
734
|
+
# needed to update an existing profile.
|
578
735
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
579
736
|
# to the HTTP request.
|
580
737
|
#
|
581
738
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
582
739
|
#
|
583
|
-
def begin_update_async(
|
584
|
-
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
585
|
-
fail ArgumentError, 'profile_properties is nil' if profile_properties.nil?
|
740
|
+
def begin_update_async(resource_group_name, profile_name, profile_update_parameters, custom_headers = nil)
|
586
741
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
742
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
743
|
+
fail ArgumentError, 'profile_update_parameters is nil' if profile_update_parameters.nil?
|
587
744
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
588
745
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
589
746
|
|
@@ -598,7 +755,7 @@ module Azure::ARM::CDN
|
|
598
755
|
|
599
756
|
# Serialize Request
|
600
757
|
request_mapper = ProfileUpdateParameters.mapper()
|
601
|
-
request_content = @client.serialize(request_mapper,
|
758
|
+
request_content = @client.serialize(request_mapper, profile_update_parameters, 'profile_update_parameters')
|
602
759
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
603
760
|
|
604
761
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'
|
@@ -607,7 +764,7 @@ module Azure::ARM::CDN
|
|
607
764
|
|
608
765
|
options = {
|
609
766
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
610
|
-
path_params: {'
|
767
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
|
611
768
|
query_params: {'api-version' => @client.api_version},
|
612
769
|
body: request_content,
|
613
770
|
headers: request_headers.merge(custom_headers || {}),
|
@@ -654,103 +811,137 @@ module Azure::ARM::CDN
|
|
654
811
|
|
655
812
|
#
|
656
813
|
# Deletes an existing CDN profile with the specified parameters. Deleting a
|
657
|
-
# profile will result in the deletion of all subresources including
|
658
|
-
#
|
814
|
+
# profile will result in the deletion of all subresources including endpoints,
|
815
|
+
# origins and custom domains.
|
659
816
|
#
|
660
|
-
# @param
|
661
|
-
# group.
|
662
|
-
# @param resource_group_name [String] Name of the resource group within the
|
817
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
663
818
|
# Azure subscription.
|
819
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
820
|
+
# the resource group.
|
664
821
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
665
822
|
# will be added to the HTTP request.
|
666
823
|
#
|
667
|
-
|
668
|
-
|
824
|
+
#
|
825
|
+
def begin_delete(resource_group_name, profile_name, custom_headers = nil)
|
826
|
+
response = begin_delete_async(resource_group_name, profile_name, custom_headers).value!
|
669
827
|
nil
|
670
828
|
end
|
671
829
|
|
672
830
|
#
|
673
|
-
#
|
674
|
-
#
|
675
|
-
#
|
831
|
+
# Deletes an existing CDN profile with the specified parameters. Deleting a
|
832
|
+
# profile will result in the deletion of all subresources including endpoints,
|
833
|
+
# origins and custom domains.
|
834
|
+
#
|
835
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
676
836
|
# Azure subscription.
|
837
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
838
|
+
# the resource group.
|
677
839
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
678
840
|
# will be added to the HTTP request.
|
679
841
|
#
|
680
|
-
# @return [
|
681
|
-
# response.
|
842
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
682
843
|
#
|
683
|
-
def
|
684
|
-
|
685
|
-
|
844
|
+
def begin_delete_with_http_info(resource_group_name, profile_name, custom_headers = nil)
|
845
|
+
begin_delete_async(resource_group_name, profile_name, custom_headers).value!
|
846
|
+
end
|
686
847
|
|
687
|
-
|
688
|
-
|
689
|
-
|
848
|
+
#
|
849
|
+
# Deletes an existing CDN profile with the specified parameters. Deleting a
|
850
|
+
# profile will result in the deletion of all subresources including endpoints,
|
851
|
+
# origins and custom domains.
|
852
|
+
#
|
853
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
854
|
+
# Azure subscription.
|
855
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
856
|
+
# the resource group.
|
857
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
858
|
+
# to the HTTP request.
|
859
|
+
#
|
860
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
861
|
+
#
|
862
|
+
def begin_delete_async(resource_group_name, profile_name, custom_headers = nil)
|
863
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
864
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
865
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
866
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
867
|
+
|
868
|
+
|
869
|
+
request_headers = {}
|
870
|
+
|
871
|
+
# Set Headers
|
872
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
873
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
874
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'
|
875
|
+
|
876
|
+
request_url = @base_url || @client.base_url
|
877
|
+
|
878
|
+
options = {
|
879
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
880
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
|
881
|
+
query_params: {'api-version' => @client.api_version},
|
882
|
+
headers: request_headers.merge(custom_headers || {}),
|
883
|
+
base_url: request_url
|
884
|
+
}
|
885
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
886
|
+
|
887
|
+
promise = promise.then do |result|
|
888
|
+
http_response = result.response
|
889
|
+
status_code = http_response.status
|
890
|
+
response_content = http_response.body
|
891
|
+
unless status_code == 202 || status_code == 204
|
892
|
+
error_model = JSON.load(response_content)
|
893
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
690
894
|
end
|
691
895
|
|
692
|
-
|
693
|
-
|
896
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
897
|
+
|
898
|
+
result
|
694
899
|
end
|
695
900
|
|
696
|
-
promise
|
901
|
+
promise.execute
|
697
902
|
end
|
698
903
|
|
699
904
|
#
|
700
|
-
#
|
701
|
-
# profile will result in the deletion of all subresources including
|
702
|
-
# endpoints, origins and custom domains.
|
905
|
+
# Lists all the CDN profiles within an Azure subscription.
|
703
906
|
#
|
704
|
-
# @param
|
705
|
-
#
|
706
|
-
# @param resource_group_name [String] Name of the resource group within the
|
707
|
-
# Azure subscription.
|
907
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
908
|
+
# to List operation.
|
708
909
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
709
910
|
# will be added to the HTTP request.
|
710
911
|
#
|
912
|
+
# @return [ProfileListResult] operation results.
|
711
913
|
#
|
712
|
-
def
|
713
|
-
response =
|
714
|
-
nil
|
914
|
+
def list_next(next_page_link, custom_headers = nil)
|
915
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
916
|
+
response.body unless response.nil?
|
715
917
|
end
|
716
918
|
|
717
919
|
#
|
718
|
-
#
|
719
|
-
# profile will result in the deletion of all subresources including
|
720
|
-
# endpoints, origins and custom domains.
|
920
|
+
# Lists all the CDN profiles within an Azure subscription.
|
721
921
|
#
|
722
|
-
# @param
|
723
|
-
#
|
724
|
-
# @param resource_group_name [String] Name of the resource group within the
|
725
|
-
# Azure subscription.
|
922
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
923
|
+
# to List operation.
|
726
924
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
727
925
|
# will be added to the HTTP request.
|
728
926
|
#
|
729
927
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
730
928
|
#
|
731
|
-
def
|
732
|
-
|
929
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
930
|
+
list_next_async(next_page_link, custom_headers).value!
|
733
931
|
end
|
734
932
|
|
735
933
|
#
|
736
|
-
#
|
737
|
-
# profile will result in the deletion of all subresources including
|
738
|
-
# endpoints, origins and custom domains.
|
934
|
+
# Lists all the CDN profiles within an Azure subscription.
|
739
935
|
#
|
740
|
-
# @param
|
741
|
-
#
|
742
|
-
# @param resource_group_name [String] Name of the resource group within the
|
743
|
-
# Azure subscription.
|
936
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
937
|
+
# to List operation.
|
744
938
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
745
939
|
# to the HTTP request.
|
746
940
|
#
|
747
941
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
748
942
|
#
|
749
|
-
def
|
750
|
-
fail ArgumentError, '
|
751
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
752
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
753
|
-
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
943
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
944
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
754
945
|
|
755
946
|
|
756
947
|
request_headers = {}
|
@@ -758,29 +949,38 @@ module Azure::ARM::CDN
|
|
758
949
|
# Set Headers
|
759
950
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
760
951
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
761
|
-
path_template = '
|
952
|
+
path_template = '{nextLink}'
|
762
953
|
|
763
954
|
request_url = @base_url || @client.base_url
|
764
955
|
|
765
956
|
options = {
|
766
957
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
767
|
-
|
768
|
-
query_params: {'api-version' => @client.api_version},
|
958
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
769
959
|
headers: request_headers.merge(custom_headers || {}),
|
770
960
|
base_url: request_url
|
771
961
|
}
|
772
|
-
promise = @client.make_request_async(:
|
962
|
+
promise = @client.make_request_async(:get, path_template, options)
|
773
963
|
|
774
964
|
promise = promise.then do |result|
|
775
965
|
http_response = result.response
|
776
966
|
status_code = http_response.status
|
777
967
|
response_content = http_response.body
|
778
|
-
unless status_code ==
|
968
|
+
unless status_code == 200
|
779
969
|
error_model = JSON.load(response_content)
|
780
970
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
781
971
|
end
|
782
972
|
|
783
973
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
974
|
+
# Deserialize Response
|
975
|
+
if status_code == 200
|
976
|
+
begin
|
977
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
978
|
+
result_mapper = ProfileListResult.mapper()
|
979
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
980
|
+
rescue Exception => e
|
981
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
982
|
+
end
|
983
|
+
end
|
784
984
|
|
785
985
|
result
|
786
986
|
end
|
@@ -789,64 +989,46 @@ module Azure::ARM::CDN
|
|
789
989
|
end
|
790
990
|
|
791
991
|
#
|
792
|
-
#
|
793
|
-
# used for advanced management tasks, such as Country Filtering, Advanced
|
794
|
-
# HTTP Reports, and Real-time Stats and Alerts. The SSO URI changes
|
795
|
-
# approximately every 10 minutes.
|
992
|
+
# Lists all the CDN profiles within a resource group.
|
796
993
|
#
|
797
|
-
# @param
|
798
|
-
#
|
799
|
-
# @param resource_group_name [String] Name of the resource group within the
|
800
|
-
# Azure subscription.
|
994
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
995
|
+
# to List operation.
|
801
996
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
802
997
|
# will be added to the HTTP request.
|
803
998
|
#
|
804
|
-
# @return [
|
999
|
+
# @return [ProfileListResult] operation results.
|
805
1000
|
#
|
806
|
-
def
|
807
|
-
response =
|
1001
|
+
def list_by_resource_group_next(next_page_link, custom_headers = nil)
|
1002
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
808
1003
|
response.body unless response.nil?
|
809
1004
|
end
|
810
1005
|
|
811
1006
|
#
|
812
|
-
#
|
813
|
-
# used for advanced management tasks, such as Country Filtering, Advanced
|
814
|
-
# HTTP Reports, and Real-time Stats and Alerts. The SSO URI changes
|
815
|
-
# approximately every 10 minutes.
|
1007
|
+
# Lists all the CDN profiles within a resource group.
|
816
1008
|
#
|
817
|
-
# @param
|
818
|
-
#
|
819
|
-
# @param resource_group_name [String] Name of the resource group within the
|
820
|
-
# Azure subscription.
|
1009
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1010
|
+
# to List operation.
|
821
1011
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
822
1012
|
# will be added to the HTTP request.
|
823
1013
|
#
|
824
1014
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
825
1015
|
#
|
826
|
-
def
|
827
|
-
|
1016
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
|
1017
|
+
list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
828
1018
|
end
|
829
1019
|
|
830
1020
|
#
|
831
|
-
#
|
832
|
-
# used for advanced management tasks, such as Country Filtering, Advanced
|
833
|
-
# HTTP Reports, and Real-time Stats and Alerts. The SSO URI changes
|
834
|
-
# approximately every 10 minutes.
|
1021
|
+
# Lists all the CDN profiles within a resource group.
|
835
1022
|
#
|
836
|
-
# @param
|
837
|
-
#
|
838
|
-
# @param resource_group_name [String] Name of the resource group within the
|
839
|
-
# Azure subscription.
|
1023
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1024
|
+
# to List operation.
|
840
1025
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
841
1026
|
# to the HTTP request.
|
842
1027
|
#
|
843
1028
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
844
1029
|
#
|
845
|
-
def
|
846
|
-
fail ArgumentError, '
|
847
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
848
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
849
|
-
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1030
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
|
1031
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
850
1032
|
|
851
1033
|
|
852
1034
|
request_headers = {}
|
@@ -854,18 +1036,17 @@ module Azure::ARM::CDN
|
|
854
1036
|
# Set Headers
|
855
1037
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
856
1038
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
857
|
-
path_template = '
|
1039
|
+
path_template = '{nextLink}'
|
858
1040
|
|
859
1041
|
request_url = @base_url || @client.base_url
|
860
1042
|
|
861
1043
|
options = {
|
862
1044
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
863
|
-
|
864
|
-
query_params: {'api-version' => @client.api_version},
|
1045
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
865
1046
|
headers: request_headers.merge(custom_headers || {}),
|
866
1047
|
base_url: request_url
|
867
1048
|
}
|
868
|
-
promise = @client.make_request_async(:
|
1049
|
+
promise = @client.make_request_async(:get, path_template, options)
|
869
1050
|
|
870
1051
|
promise = promise.then do |result|
|
871
1052
|
http_response = result.response
|
@@ -881,7 +1062,7 @@ module Azure::ARM::CDN
|
|
881
1062
|
if status_code == 200
|
882
1063
|
begin
|
883
1064
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
884
|
-
result_mapper =
|
1065
|
+
result_mapper = ProfileListResult.mapper()
|
885
1066
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
886
1067
|
rescue Exception => e
|
887
1068
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -894,5 +1075,47 @@ module Azure::ARM::CDN
|
|
894
1075
|
promise.execute
|
895
1076
|
end
|
896
1077
|
|
1078
|
+
#
|
1079
|
+
# Lists all the CDN profiles within an Azure subscription.
|
1080
|
+
#
|
1081
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1082
|
+
# will be added to the HTTP request.
|
1083
|
+
#
|
1084
|
+
# @return [ProfileListResult] which provide lazy access to pages of the
|
1085
|
+
# response.
|
1086
|
+
#
|
1087
|
+
def list_as_lazy(custom_headers = nil)
|
1088
|
+
response = list_async(custom_headers).value!
|
1089
|
+
unless response.nil?
|
1090
|
+
page = response.body
|
1091
|
+
page.next_method = Proc.new do |next_page_link|
|
1092
|
+
list_next_async(next_page_link, custom_headers)
|
1093
|
+
end
|
1094
|
+
page
|
1095
|
+
end
|
1096
|
+
end
|
1097
|
+
|
1098
|
+
#
|
1099
|
+
# Lists all the CDN profiles within a resource group.
|
1100
|
+
#
|
1101
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1102
|
+
# Azure subscription.
|
1103
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1104
|
+
# will be added to the HTTP request.
|
1105
|
+
#
|
1106
|
+
# @return [ProfileListResult] which provide lazy access to pages of the
|
1107
|
+
# response.
|
1108
|
+
#
|
1109
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
1110
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers).value!
|
1111
|
+
unless response.nil?
|
1112
|
+
page = response.body
|
1113
|
+
page.next_method = Proc.new do |next_page_link|
|
1114
|
+
list_by_resource_group_next_async(next_page_link, custom_headers)
|
1115
|
+
end
|
1116
|
+
page
|
1117
|
+
end
|
1118
|
+
end
|
1119
|
+
|
897
1120
|
end
|
898
1121
|
end
|