azure_mgmt_cdn 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/azure_mgmt_cdn.gemspec +4 -4
- data/lib/azure_mgmt_cdn.rb +3 -76
- data/lib/generated/azure_mgmt_cdn.rb +69 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/cdn_management_client.rb +8 -8
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/custom_domains.rb +87 -55
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/endpoints.rb +226 -109
- data/lib/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +56 -0
- data/lib/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +65 -0
- data/lib/generated/azure_mgmt_cdn/models/custom_domain.rb +96 -0
- data/lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +53 -0
- data/lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +45 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/models/custom_domain_resource_state.rb +0 -0
- data/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb +77 -0
- data/lib/generated/azure_mgmt_cdn/models/endpoint.rb +230 -0
- data/lib/generated/azure_mgmt_cdn/models/endpoint_create_parameters.rb +173 -0
- data/lib/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +52 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/models/endpoint_resource_state.rb +0 -0
- data/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +143 -0
- data/lib/generated/azure_mgmt_cdn/models/error_response.rb +54 -0
- data/lib/generated/azure_mgmt_cdn/models/load_parameters.rb +52 -0
- data/lib/generated/azure_mgmt_cdn/models/operation.rb +55 -0
- data/lib/generated/azure_mgmt_cdn/models/operation_display.rb +65 -0
- data/lib/generated/azure_mgmt_cdn/models/operation_list_result.rb +53 -0
- data/lib/generated/azure_mgmt_cdn/models/origin.rb +119 -0
- data/lib/generated/azure_mgmt_cdn/models/origin_list_result.rb +52 -0
- data/lib/generated/azure_mgmt_cdn/models/origin_parameters.rb +67 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/models/origin_resource_state.rb +0 -0
- data/lib/generated/azure_mgmt_cdn/models/profile.rb +118 -0
- data/lib/generated/azure_mgmt_cdn/models/profile_create_parameters.rb +72 -0
- data/lib/generated/azure_mgmt_cdn/models/profile_list_result.rb +52 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/models/profile_resource_state.rb +0 -0
- data/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +51 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/models/provisioning_state.rb +0 -0
- data/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb +52 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/models/query_string_caching_behavior.rb +0 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/models/resource_type.rb +0 -0
- data/lib/generated/azure_mgmt_cdn/models/sku.rb +47 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/models/sku_name.rb +0 -0
- data/lib/generated/azure_mgmt_cdn/models/sso_uri.rb +44 -0
- data/lib/generated/azure_mgmt_cdn/models/tracked_resource.rb +85 -0
- data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +45 -0
- data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +66 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/module_definition.rb +0 -0
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/name_availability.rb +10 -10
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/operations.rb +4 -4
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/origins.rb +112 -68
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/profiles.rb +107 -69
- data/lib/{azure_mgmt_cdn → generated/azure_mgmt_cdn}/version.rb +1 -1
- metadata +67 -80
- data/lib/azure_mgmt_cdn/models/check_name_availability_input.rb +0 -71
- data/lib/azure_mgmt_cdn/models/check_name_availability_output.rb +0 -75
- data/lib/azure_mgmt_cdn/models/custom_domain.rb +0 -82
- data/lib/azure_mgmt_cdn/models/custom_domain_list_result.rb +0 -77
- data/lib/azure_mgmt_cdn/models/custom_domain_parameters.rb +0 -62
- data/lib/azure_mgmt_cdn/models/custom_domain_properties.rb +0 -85
- data/lib/azure_mgmt_cdn/models/custom_domain_properties_parameters.rb +0 -57
- data/lib/azure_mgmt_cdn/models/deep_created_origin.rb +0 -72
- data/lib/azure_mgmt_cdn/models/deep_created_origin_properties.rb +0 -79
- data/lib/azure_mgmt_cdn/models/endpoint.rb +0 -95
- data/lib/azure_mgmt_cdn/models/endpoint_create_parameters.rb +0 -82
- data/lib/azure_mgmt_cdn/models/endpoint_list_result.rb +0 -76
- data/lib/azure_mgmt_cdn/models/endpoint_properties.rb +0 -197
- data/lib/azure_mgmt_cdn/models/endpoint_properties_create_parameters.rb +0 -161
- data/lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb +0 -128
- data/lib/azure_mgmt_cdn/models/endpoint_update_parameters.rb +0 -72
- data/lib/azure_mgmt_cdn/models/error_response.rb +0 -65
- data/lib/azure_mgmt_cdn/models/load_parameters.rb +0 -58
- data/lib/azure_mgmt_cdn/models/operation.rb +0 -71
- data/lib/azure_mgmt_cdn/models/operation_display.rb +0 -75
- data/lib/azure_mgmt_cdn/models/operation_list_result.rb +0 -77
- data/lib/azure_mgmt_cdn/models/origin.rb +0 -83
- data/lib/azure_mgmt_cdn/models/origin_list_result.rb +0 -76
- data/lib/azure_mgmt_cdn/models/origin_parameters.rb +0 -62
- data/lib/azure_mgmt_cdn/models/origin_properties.rb +0 -107
- data/lib/azure_mgmt_cdn/models/origin_properties_parameters.rb +0 -79
- data/lib/azure_mgmt_cdn/models/profile.rb +0 -111
- data/lib/azure_mgmt_cdn/models/profile_create_parameters.rb +0 -83
- data/lib/azure_mgmt_cdn/models/profile_list_result.rb +0 -76
- data/lib/azure_mgmt_cdn/models/profile_properties.rb +0 -74
- data/lib/azure_mgmt_cdn/models/profile_update_parameters.rb +0 -57
- data/lib/azure_mgmt_cdn/models/purge_parameters.rb +0 -58
- data/lib/azure_mgmt_cdn/models/sku.rb +0 -61
- data/lib/azure_mgmt_cdn/models/sso_uri.rb +0 -56
- data/lib/azure_mgmt_cdn/models/tracked_resource.rb +0 -85
- data/lib/azure_mgmt_cdn/models/validate_custom_domain_input.rb +0 -57
- data/lib/azure_mgmt_cdn/models/validate_custom_domain_output.rb +0 -76
@@ -76,6 +76,8 @@ module Azure::ARM::CDN
|
|
76
76
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
77
77
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
78
78
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
79
|
+
|
80
|
+
|
79
81
|
request_headers = {}
|
80
82
|
|
81
83
|
# Set Headers
|
@@ -111,10 +113,8 @@ module Azure::ARM::CDN
|
|
111
113
|
if status_code == 200
|
112
114
|
begin
|
113
115
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
114
|
-
|
115
|
-
|
116
|
-
end
|
117
|
-
result.body = parsed_response
|
116
|
+
result_mapper = EndpointListResult.mapper()
|
117
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
118
118
|
rescue Exception => e
|
119
119
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
120
120
|
end
|
@@ -180,6 +180,8 @@ module Azure::ARM::CDN
|
|
180
180
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
181
181
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
182
182
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
183
|
+
|
184
|
+
|
183
185
|
request_headers = {}
|
184
186
|
|
185
187
|
# Set Headers
|
@@ -215,10 +217,8 @@ module Azure::ARM::CDN
|
|
215
217
|
if status_code == 200
|
216
218
|
begin
|
217
219
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
218
|
-
|
219
|
-
|
220
|
-
end
|
221
|
-
result.body = parsed_response
|
220
|
+
result_mapper = Endpoint.mapper()
|
221
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
222
222
|
rescue Exception => e
|
223
223
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
224
224
|
end
|
@@ -239,25 +239,38 @@ module Azure::ARM::CDN
|
|
239
239
|
# group.
|
240
240
|
# @param resource_group_name [String] Name of the resource group within the
|
241
241
|
# Azure subscription.
|
242
|
-
# @param
|
243
|
-
#
|
244
|
-
#
|
245
|
-
# @
|
246
|
-
#
|
242
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
243
|
+
# will be added to the HTTP request.
|
244
|
+
#
|
245
|
+
# @return [Endpoint] operation results.
|
246
|
+
#
|
247
|
+
def create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
|
248
|
+
response = create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value!
|
249
|
+
response.body unless response.nil?
|
250
|
+
end
|
251
|
+
|
252
|
+
#
|
253
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
254
|
+
# @param endpoint_properties [EndpointCreateParameters] Endpoint properties
|
255
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
256
|
+
# group.
|
257
|
+
# @param resource_group_name [String] Name of the resource group within the
|
258
|
+
# Azure subscription.
|
259
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
260
|
+
# will be added to the HTTP request.
|
247
261
|
#
|
248
262
|
# @return [Concurrent::Promise] promise which provides async access to http
|
249
263
|
# response.
|
250
264
|
#
|
251
|
-
def
|
265
|
+
def create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
|
252
266
|
# Send request
|
253
267
|
promise = begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers)
|
254
268
|
|
255
269
|
promise = promise.then do |response|
|
256
270
|
# Defining deserialization method.
|
257
271
|
deserialize_method = lambda do |parsed_response|
|
258
|
-
|
259
|
-
|
260
|
-
end
|
272
|
+
result_mapper = Endpoint.mapper()
|
273
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
261
274
|
end
|
262
275
|
|
263
276
|
# Waiting for response.
|
@@ -321,23 +334,25 @@ module Azure::ARM::CDN
|
|
321
334
|
def begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
|
322
335
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
323
336
|
fail ArgumentError, 'endpoint_properties is nil' if endpoint_properties.nil?
|
324
|
-
endpoint_properties.validate unless endpoint_properties.nil?
|
325
337
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
326
338
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
327
339
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
328
340
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
341
|
+
|
342
|
+
|
329
343
|
request_headers = {}
|
330
344
|
|
331
345
|
# Set Headers
|
332
346
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
333
347
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
334
348
|
|
335
|
-
# Serialize Request
|
336
349
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
request_content =
|
350
|
+
|
351
|
+
# Serialize Request
|
352
|
+
request_mapper = EndpointCreateParameters.mapper()
|
353
|
+
request_content = @client.serialize(request_mapper, endpoint_properties, 'endpoint_properties')
|
354
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
355
|
+
|
341
356
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'
|
342
357
|
options = {
|
343
358
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -369,10 +384,8 @@ module Azure::ARM::CDN
|
|
369
384
|
if status_code == 200
|
370
385
|
begin
|
371
386
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
372
|
-
|
373
|
-
|
374
|
-
end
|
375
|
-
result.body = parsed_response
|
387
|
+
result_mapper = Endpoint.mapper()
|
388
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
376
389
|
rescue Exception => e
|
377
390
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
378
391
|
end
|
@@ -381,10 +394,8 @@ module Azure::ARM::CDN
|
|
381
394
|
if status_code == 201
|
382
395
|
begin
|
383
396
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
384
|
-
|
385
|
-
|
386
|
-
end
|
387
|
-
result.body = parsed_response
|
397
|
+
result_mapper = Endpoint.mapper()
|
398
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
388
399
|
rescue Exception => e
|
389
400
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
390
401
|
end
|
@@ -393,10 +404,8 @@ module Azure::ARM::CDN
|
|
393
404
|
if status_code == 202
|
394
405
|
begin
|
395
406
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
396
|
-
|
397
|
-
|
398
|
-
end
|
399
|
-
result.body = parsed_response
|
407
|
+
result_mapper = Endpoint.mapper()
|
408
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
400
409
|
rescue Exception => e
|
401
410
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
402
411
|
end
|
@@ -420,25 +429,38 @@ module Azure::ARM::CDN
|
|
420
429
|
# group.
|
421
430
|
# @param resource_group_name [String] Name of the resource group within the
|
422
431
|
# Azure subscription.
|
423
|
-
# @param
|
424
|
-
#
|
425
|
-
#
|
426
|
-
# @
|
427
|
-
#
|
432
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
433
|
+
# will be added to the HTTP request.
|
434
|
+
#
|
435
|
+
# @return [Endpoint] operation results.
|
436
|
+
#
|
437
|
+
def update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
|
438
|
+
response = update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value!
|
439
|
+
response.body unless response.nil?
|
440
|
+
end
|
441
|
+
|
442
|
+
#
|
443
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
444
|
+
# @param endpoint_properties [EndpointUpdateParameters] Endpoint properties
|
445
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
446
|
+
# group.
|
447
|
+
# @param resource_group_name [String] Name of the resource group within the
|
448
|
+
# Azure subscription.
|
449
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
450
|
+
# will be added to the HTTP request.
|
428
451
|
#
|
429
452
|
# @return [Concurrent::Promise] promise which provides async access to http
|
430
453
|
# response.
|
431
454
|
#
|
432
|
-
def
|
455
|
+
def update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
|
433
456
|
# Send request
|
434
457
|
promise = begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers)
|
435
458
|
|
436
459
|
promise = promise.then do |response|
|
437
460
|
# Defining deserialization method.
|
438
461
|
deserialize_method = lambda do |parsed_response|
|
439
|
-
|
440
|
-
|
441
|
-
end
|
462
|
+
result_mapper = Endpoint.mapper()
|
463
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
442
464
|
end
|
443
465
|
|
444
466
|
# Waiting for response.
|
@@ -511,23 +533,25 @@ module Azure::ARM::CDN
|
|
511
533
|
def begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
|
512
534
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
513
535
|
fail ArgumentError, 'endpoint_properties is nil' if endpoint_properties.nil?
|
514
|
-
endpoint_properties.validate unless endpoint_properties.nil?
|
515
536
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
516
537
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
517
538
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
518
539
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
540
|
+
|
541
|
+
|
519
542
|
request_headers = {}
|
520
543
|
|
521
544
|
# Set Headers
|
522
545
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
523
546
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
524
547
|
|
525
|
-
# Serialize Request
|
526
548
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
request_content =
|
549
|
+
|
550
|
+
# Serialize Request
|
551
|
+
request_mapper = EndpointUpdateParameters.mapper()
|
552
|
+
request_content = @client.serialize(request_mapper, endpoint_properties, 'endpoint_properties')
|
553
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
554
|
+
|
531
555
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'
|
532
556
|
options = {
|
533
557
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -559,10 +583,8 @@ module Azure::ARM::CDN
|
|
559
583
|
if status_code == 200
|
560
584
|
begin
|
561
585
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
562
|
-
|
563
|
-
|
564
|
-
end
|
565
|
-
result.body = parsed_response
|
586
|
+
result_mapper = Endpoint.mapper()
|
587
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
566
588
|
rescue Exception => e
|
567
589
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
568
590
|
end
|
@@ -571,10 +593,8 @@ module Azure::ARM::CDN
|
|
571
593
|
if status_code == 202
|
572
594
|
begin
|
573
595
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
574
|
-
|
575
|
-
|
576
|
-
end
|
577
|
-
result.body = parsed_response
|
596
|
+
result_mapper = Endpoint.mapper()
|
597
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
578
598
|
rescue Exception => e
|
579
599
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
580
600
|
end
|
@@ -594,10 +614,27 @@ module Azure::ARM::CDN
|
|
594
614
|
# group.
|
595
615
|
# @param resource_group_name [String] Name of the resource group within the
|
596
616
|
# Azure subscription.
|
617
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
618
|
+
# will be added to the HTTP request.
|
619
|
+
#
|
620
|
+
def delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
621
|
+
response = delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
622
|
+
nil
|
623
|
+
end
|
624
|
+
|
625
|
+
#
|
626
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
627
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
628
|
+
# group.
|
629
|
+
# @param resource_group_name [String] Name of the resource group within the
|
630
|
+
# Azure subscription.
|
631
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
632
|
+
# will be added to the HTTP request.
|
633
|
+
#
|
597
634
|
# @return [Concurrent::Promise] promise which provides async access to http
|
598
635
|
# response.
|
599
636
|
#
|
600
|
-
def
|
637
|
+
def delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
601
638
|
# Send request
|
602
639
|
promise = begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers)
|
603
640
|
|
@@ -606,8 +643,8 @@ module Azure::ARM::CDN
|
|
606
643
|
deserialize_method = lambda do |parsed_response|
|
607
644
|
end
|
608
645
|
|
609
|
-
|
610
|
-
|
646
|
+
# Waiting for response.
|
647
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
611
648
|
end
|
612
649
|
|
613
650
|
promise
|
@@ -666,6 +703,8 @@ module Azure::ARM::CDN
|
|
666
703
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
667
704
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
668
705
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
706
|
+
|
707
|
+
|
669
708
|
request_headers = {}
|
670
709
|
|
671
710
|
# Set Headers
|
@@ -712,23 +751,41 @@ module Azure::ARM::CDN
|
|
712
751
|
# group.
|
713
752
|
# @param resource_group_name [String] Name of the resource group within the
|
714
753
|
# Azure subscription.
|
754
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
755
|
+
# will be added to the HTTP request.
|
756
|
+
#
|
757
|
+
# @return [Endpoint] operation results.
|
758
|
+
#
|
759
|
+
def start(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
760
|
+
response = start_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
761
|
+
response.body unless response.nil?
|
762
|
+
end
|
763
|
+
|
764
|
+
#
|
765
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
766
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
767
|
+
# group.
|
768
|
+
# @param resource_group_name [String] Name of the resource group within the
|
769
|
+
# Azure subscription.
|
770
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
771
|
+
# will be added to the HTTP request.
|
772
|
+
#
|
715
773
|
# @return [Concurrent::Promise] promise which provides async access to http
|
716
774
|
# response.
|
717
775
|
#
|
718
|
-
def
|
776
|
+
def start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
719
777
|
# Send request
|
720
778
|
promise = begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers)
|
721
779
|
|
722
780
|
promise = promise.then do |response|
|
723
781
|
# Defining deserialization method.
|
724
782
|
deserialize_method = lambda do |parsed_response|
|
725
|
-
|
726
|
-
|
727
|
-
end
|
783
|
+
result_mapper = Endpoint.mapper()
|
784
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
728
785
|
end
|
729
786
|
|
730
|
-
|
731
|
-
|
787
|
+
# Waiting for response.
|
788
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
732
789
|
end
|
733
790
|
|
734
791
|
promise
|
@@ -788,6 +845,8 @@ module Azure::ARM::CDN
|
|
788
845
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
789
846
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
790
847
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
848
|
+
|
849
|
+
|
791
850
|
request_headers = {}
|
792
851
|
|
793
852
|
# Set Headers
|
@@ -823,10 +882,8 @@ module Azure::ARM::CDN
|
|
823
882
|
if status_code == 202
|
824
883
|
begin
|
825
884
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
826
|
-
|
827
|
-
|
828
|
-
end
|
829
|
-
result.body = parsed_response
|
885
|
+
result_mapper = Endpoint.mapper()
|
886
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
830
887
|
rescue Exception => e
|
831
888
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
832
889
|
end
|
@@ -846,23 +903,41 @@ module Azure::ARM::CDN
|
|
846
903
|
# group.
|
847
904
|
# @param resource_group_name [String] Name of the resource group within the
|
848
905
|
# Azure subscription.
|
906
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
907
|
+
# will be added to the HTTP request.
|
908
|
+
#
|
909
|
+
# @return [Endpoint] operation results.
|
910
|
+
#
|
911
|
+
def stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
912
|
+
response = stop_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
|
913
|
+
response.body unless response.nil?
|
914
|
+
end
|
915
|
+
|
916
|
+
#
|
917
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
918
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
919
|
+
# group.
|
920
|
+
# @param resource_group_name [String] Name of the resource group within the
|
921
|
+
# Azure subscription.
|
922
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
923
|
+
# will be added to the HTTP request.
|
924
|
+
#
|
849
925
|
# @return [Concurrent::Promise] promise which provides async access to http
|
850
926
|
# response.
|
851
927
|
#
|
852
|
-
def
|
928
|
+
def stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
|
853
929
|
# Send request
|
854
930
|
promise = begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers)
|
855
931
|
|
856
932
|
promise = promise.then do |response|
|
857
933
|
# Defining deserialization method.
|
858
934
|
deserialize_method = lambda do |parsed_response|
|
859
|
-
|
860
|
-
|
861
|
-
end
|
935
|
+
result_mapper = Endpoint.mapper()
|
936
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
862
937
|
end
|
863
938
|
|
864
|
-
|
865
|
-
|
939
|
+
# Waiting for response.
|
940
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
866
941
|
end
|
867
942
|
|
868
943
|
promise
|
@@ -922,6 +997,8 @@ module Azure::ARM::CDN
|
|
922
997
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
923
998
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
924
999
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1000
|
+
|
1001
|
+
|
925
1002
|
request_headers = {}
|
926
1003
|
|
927
1004
|
# Set Headers
|
@@ -957,10 +1034,8 @@ module Azure::ARM::CDN
|
|
957
1034
|
if status_code == 202
|
958
1035
|
begin
|
959
1036
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
960
|
-
|
961
|
-
|
962
|
-
end
|
963
|
-
result.body = parsed_response
|
1037
|
+
result_mapper = Endpoint.mapper()
|
1038
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
964
1039
|
rescue Exception => e
|
965
1040
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
966
1041
|
end
|
@@ -982,10 +1057,29 @@ module Azure::ARM::CDN
|
|
982
1057
|
# group.
|
983
1058
|
# @param resource_group_name [String] Name of the resource group within the
|
984
1059
|
# Azure subscription.
|
1060
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1061
|
+
# will be added to the HTTP request.
|
1062
|
+
#
|
1063
|
+
def purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
|
1064
|
+
response = purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value!
|
1065
|
+
nil
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
#
|
1069
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
1070
|
+
# @param content_file_paths [PurgeParameters] The path to the content to be
|
1071
|
+
# purged. Path can describe a file or directory.
|
1072
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
1073
|
+
# group.
|
1074
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1075
|
+
# Azure subscription.
|
1076
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1077
|
+
# will be added to the HTTP request.
|
1078
|
+
#
|
985
1079
|
# @return [Concurrent::Promise] promise which provides async access to http
|
986
1080
|
# response.
|
987
1081
|
#
|
988
|
-
def
|
1082
|
+
def purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
|
989
1083
|
# Send request
|
990
1084
|
promise = begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers)
|
991
1085
|
|
@@ -994,8 +1088,8 @@ module Azure::ARM::CDN
|
|
994
1088
|
deserialize_method = lambda do |parsed_response|
|
995
1089
|
end
|
996
1090
|
|
997
|
-
|
998
|
-
|
1091
|
+
# Waiting for response.
|
1092
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
999
1093
|
end
|
1000
1094
|
|
1001
1095
|
promise
|
@@ -1057,23 +1151,25 @@ module Azure::ARM::CDN
|
|
1057
1151
|
def begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
|
1058
1152
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
1059
1153
|
fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil?
|
1060
|
-
content_file_paths.validate unless content_file_paths.nil?
|
1061
1154
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
1062
1155
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1063
1156
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1064
1157
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1158
|
+
|
1159
|
+
|
1065
1160
|
request_headers = {}
|
1066
1161
|
|
1067
1162
|
# Set Headers
|
1068
1163
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1069
1164
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1070
1165
|
|
1071
|
-
# Serialize Request
|
1072
1166
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
request_content =
|
1167
|
+
|
1168
|
+
# Serialize Request
|
1169
|
+
request_mapper = PurgeParameters.mapper()
|
1170
|
+
request_content = @client.serialize(request_mapper, content_file_paths, 'content_file_paths')
|
1171
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1172
|
+
|
1077
1173
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge'
|
1078
1174
|
options = {
|
1079
1175
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1118,10 +1214,29 @@ module Azure::ARM::CDN
|
|
1118
1214
|
# group.
|
1119
1215
|
# @param resource_group_name [String] Name of the resource group within the
|
1120
1216
|
# Azure subscription.
|
1217
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1218
|
+
# will be added to the HTTP request.
|
1219
|
+
#
|
1220
|
+
def load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
|
1221
|
+
response = load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value!
|
1222
|
+
nil
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
#
|
1226
|
+
# @param endpoint_name [String] Name of the endpoint within the CDN profile.
|
1227
|
+
# @param content_file_paths [LoadParameters] The path to the content to be
|
1228
|
+
# loaded. Path should describe a file.
|
1229
|
+
# @param profile_name [String] Name of the CDN profile within the resource
|
1230
|
+
# group.
|
1231
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1232
|
+
# Azure subscription.
|
1233
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1234
|
+
# will be added to the HTTP request.
|
1235
|
+
#
|
1121
1236
|
# @return [Concurrent::Promise] promise which provides async access to http
|
1122
1237
|
# response.
|
1123
1238
|
#
|
1124
|
-
def
|
1239
|
+
def load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
|
1125
1240
|
# Send request
|
1126
1241
|
promise = begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers)
|
1127
1242
|
|
@@ -1130,8 +1245,8 @@ module Azure::ARM::CDN
|
|
1130
1245
|
deserialize_method = lambda do |parsed_response|
|
1131
1246
|
end
|
1132
1247
|
|
1133
|
-
|
1134
|
-
|
1248
|
+
# Waiting for response.
|
1249
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
1135
1250
|
end
|
1136
1251
|
|
1137
1252
|
promise
|
@@ -1193,23 +1308,25 @@ module Azure::ARM::CDN
|
|
1193
1308
|
def begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
|
1194
1309
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
1195
1310
|
fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil?
|
1196
|
-
content_file_paths.validate unless content_file_paths.nil?
|
1197
1311
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
1198
1312
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1199
1313
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1200
1314
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1315
|
+
|
1316
|
+
|
1201
1317
|
request_headers = {}
|
1202
1318
|
|
1203
1319
|
# Set Headers
|
1204
1320
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1205
1321
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1206
1322
|
|
1207
|
-
# Serialize Request
|
1208
1323
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
request_content =
|
1324
|
+
|
1325
|
+
# Serialize Request
|
1326
|
+
request_mapper = LoadParameters.mapper()
|
1327
|
+
request_content = @client.serialize(request_mapper, content_file_paths, 'content_file_paths')
|
1328
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1329
|
+
|
1213
1330
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load'
|
1214
1331
|
options = {
|
1215
1332
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1304,23 +1421,25 @@ module Azure::ARM::CDN
|
|
1304
1421
|
def validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil)
|
1305
1422
|
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
1306
1423
|
fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil?
|
1307
|
-
custom_domain_properties.validate unless custom_domain_properties.nil?
|
1308
1424
|
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
1309
1425
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1310
1426
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1311
1427
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1428
|
+
|
1429
|
+
|
1312
1430
|
request_headers = {}
|
1313
1431
|
|
1314
1432
|
# Set Headers
|
1315
1433
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1316
1434
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1317
1435
|
|
1318
|
-
# Serialize Request
|
1319
1436
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
request_content =
|
1437
|
+
|
1438
|
+
# Serialize Request
|
1439
|
+
request_mapper = ValidateCustomDomainInput.mapper()
|
1440
|
+
request_content = @client.serialize(request_mapper, custom_domain_properties, 'custom_domain_properties')
|
1441
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1442
|
+
|
1324
1443
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain'
|
1325
1444
|
options = {
|
1326
1445
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1352,10 +1471,8 @@ module Azure::ARM::CDN
|
|
1352
1471
|
if status_code == 200
|
1353
1472
|
begin
|
1354
1473
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1355
|
-
|
1356
|
-
|
1357
|
-
end
|
1358
|
-
result.body = parsed_response
|
1474
|
+
result_mapper = ValidateCustomDomainOutput.mapper()
|
1475
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1359
1476
|
rescue Exception => e
|
1360
1477
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1361
1478
|
end
|