azure_mgmt_cdn 0.9.0 → 0.10.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/cdn_management_client.rb +16 -16
- data/lib/generated/azure_mgmt_cdn/custom_domains.rb +223 -1
- data/lib/generated/azure_mgmt_cdn/edge_nodes.rb +110 -4
- data/lib/generated/azure_mgmt_cdn/endpoints.rb +1 -1
- 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 +1 -1
- data/lib/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/custom_domain.rb +14 -1
- data/lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
- data/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/edge_node.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/edgenode_result.rb +43 -1
- data/lib/generated/azure_mgmt_cdn/models/endpoint.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/error_response.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/geo_filter.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/ip_address_group.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/load_parameters.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/operation.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/operation_display.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/operation_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/origin.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/origin_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/origin_resource_state.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/profile.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/profile_list_result.rb +1 -1
- 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/resource_usage.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/sku.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/models/sku_name.rb +1 -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 +1 -1
- data/lib/generated/azure_mgmt_cdn/profiles.rb +1 -1
- data/lib/generated/azure_mgmt_cdn/version.rb +2 -2
- data/lib/generated/azure_mgmt_cdn.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e949e4b67083eaa31aba5451b82eeea9a35b31d4
|
|
4
|
+
data.tar.gz: 0b721e005dd0e751340c68e6988e29174f7806ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b215821865e9b0055c78641aa048cfde16787cb0af0c5e66bdebac63b10803f8340550aeba616abf2cb47a4e6a0ef48b09be10c13e0b20487389ff1e1d1951c7
|
|
7
|
+
data.tar.gz: 03df2739c807e175c3469982457b76b66d0c33b9c6a0ccc09551734d25d0883524d53117d36a78aa4828463ee389e20a3d41aa3bea818e27fd0975ac6c739560
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
@@ -239,8 +239,8 @@ module Azure::ARM::CDN
|
|
|
239
239
|
#
|
|
240
240
|
# @return [Array<ResourceUsage>] operation results.
|
|
241
241
|
#
|
|
242
|
-
def
|
|
243
|
-
first_page =
|
|
242
|
+
def list_resource_usage(custom_headers = nil)
|
|
243
|
+
first_page = list_resource_usage_as_lazy(custom_headers)
|
|
244
244
|
first_page.get_all_items
|
|
245
245
|
end
|
|
246
246
|
|
|
@@ -253,8 +253,8 @@ module Azure::ARM::CDN
|
|
|
253
253
|
#
|
|
254
254
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
255
255
|
#
|
|
256
|
-
def
|
|
257
|
-
|
|
256
|
+
def list_resource_usage_with_http_info(custom_headers = nil)
|
|
257
|
+
list_resource_usage_async(custom_headers).value!
|
|
258
258
|
end
|
|
259
259
|
|
|
260
260
|
#
|
|
@@ -266,7 +266,7 @@ module Azure::ARM::CDN
|
|
|
266
266
|
#
|
|
267
267
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
268
268
|
#
|
|
269
|
-
def
|
|
269
|
+
def list_resource_usage_async(custom_headers = nil)
|
|
270
270
|
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
|
271
271
|
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
|
272
272
|
|
|
@@ -408,8 +408,8 @@ module Azure::ARM::CDN
|
|
|
408
408
|
#
|
|
409
409
|
# @return [ResourceUsageListResult] operation results.
|
|
410
410
|
#
|
|
411
|
-
def
|
|
412
|
-
response =
|
|
411
|
+
def list_resource_usage_next(next_page_link, custom_headers = nil)
|
|
412
|
+
response = list_resource_usage_next_async(next_page_link, custom_headers).value!
|
|
413
413
|
response.body unless response.nil?
|
|
414
414
|
end
|
|
415
415
|
|
|
@@ -424,8 +424,8 @@ module Azure::ARM::CDN
|
|
|
424
424
|
#
|
|
425
425
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
426
426
|
#
|
|
427
|
-
def
|
|
428
|
-
|
|
427
|
+
def list_resource_usage_next_with_http_info(next_page_link, custom_headers = nil)
|
|
428
|
+
list_resource_usage_next_async(next_page_link, custom_headers).value!
|
|
429
429
|
end
|
|
430
430
|
|
|
431
431
|
#
|
|
@@ -439,7 +439,7 @@ module Azure::ARM::CDN
|
|
|
439
439
|
#
|
|
440
440
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
441
441
|
#
|
|
442
|
-
def
|
|
442
|
+
def list_resource_usage_next_async(next_page_link, custom_headers = nil)
|
|
443
443
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
|
444
444
|
|
|
445
445
|
|
|
@@ -583,8 +583,8 @@ module Azure::ARM::CDN
|
|
|
583
583
|
#
|
|
584
584
|
# @return [ResourceUsageListResult] operation results.
|
|
585
585
|
#
|
|
586
|
-
def
|
|
587
|
-
first_page =
|
|
586
|
+
def list_resource_usage_as_lazy(custom_headers = nil)
|
|
587
|
+
first_page = list_resource_usage_as_lazy_as_lazy(custom_headers)
|
|
588
588
|
first_page.get_all_items
|
|
589
589
|
end
|
|
590
590
|
|
|
@@ -597,8 +597,8 @@ module Azure::ARM::CDN
|
|
|
597
597
|
#
|
|
598
598
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
599
599
|
#
|
|
600
|
-
def
|
|
601
|
-
|
|
600
|
+
def list_resource_usage_as_lazy_with_http_info(custom_headers = nil)
|
|
601
|
+
list_resource_usage_as_lazy_async(custom_headers).value!
|
|
602
602
|
end
|
|
603
603
|
|
|
604
604
|
#
|
|
@@ -610,7 +610,7 @@ module Azure::ARM::CDN
|
|
|
610
610
|
#
|
|
611
611
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
612
612
|
#
|
|
613
|
-
def
|
|
613
|
+
def list_resource_usage_as_lazy_async(custom_headers = nil)
|
|
614
614
|
|
|
615
615
|
|
|
616
616
|
request_headers = {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
@@ -351,6 +351,228 @@ module Azure::ARM::CDN
|
|
|
351
351
|
promise
|
|
352
352
|
end
|
|
353
353
|
|
|
354
|
+
#
|
|
355
|
+
# Disable https delivery of the custom domain.
|
|
356
|
+
#
|
|
357
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
|
358
|
+
# Azure subscription.
|
|
359
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
|
360
|
+
# the resource group.
|
|
361
|
+
# @param endpoint_name [String] Name of the endpoint under the profile which is
|
|
362
|
+
# unique globally.
|
|
363
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
|
364
|
+
# endpoint.
|
|
365
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
366
|
+
# will be added to the HTTP request.
|
|
367
|
+
#
|
|
368
|
+
# @return [CustomDomain] operation results.
|
|
369
|
+
#
|
|
370
|
+
def disable_custom_https(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers = nil)
|
|
371
|
+
response = disable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers).value!
|
|
372
|
+
response.body unless response.nil?
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
#
|
|
376
|
+
# Disable https delivery of the custom domain.
|
|
377
|
+
#
|
|
378
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
|
379
|
+
# Azure subscription.
|
|
380
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
|
381
|
+
# the resource group.
|
|
382
|
+
# @param endpoint_name [String] Name of the endpoint under the profile which is
|
|
383
|
+
# unique globally.
|
|
384
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
|
385
|
+
# endpoint.
|
|
386
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
387
|
+
# will be added to the HTTP request.
|
|
388
|
+
#
|
|
389
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
390
|
+
#
|
|
391
|
+
def disable_custom_https_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers = nil)
|
|
392
|
+
disable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers).value!
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
#
|
|
396
|
+
# Disable https delivery of the custom domain.
|
|
397
|
+
#
|
|
398
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
|
399
|
+
# Azure subscription.
|
|
400
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
|
401
|
+
# the resource group.
|
|
402
|
+
# @param endpoint_name [String] Name of the endpoint under the profile which is
|
|
403
|
+
# unique globally.
|
|
404
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
|
405
|
+
# endpoint.
|
|
406
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
407
|
+
# to the HTTP request.
|
|
408
|
+
#
|
|
409
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
410
|
+
#
|
|
411
|
+
def disable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers = nil)
|
|
412
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
413
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
|
414
|
+
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
|
415
|
+
fail ArgumentError, 'custom_domain_name is nil' if custom_domain_name.nil?
|
|
416
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
417
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
request_headers = {}
|
|
421
|
+
|
|
422
|
+
# Set Headers
|
|
423
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
424
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
425
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'
|
|
426
|
+
|
|
427
|
+
request_url = @base_url || @client.base_url
|
|
428
|
+
|
|
429
|
+
options = {
|
|
430
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
431
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'customDomainName' => custom_domain_name,'subscriptionId' => @client.subscription_id},
|
|
432
|
+
query_params: {'api-version' => @client.api_version},
|
|
433
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
434
|
+
base_url: request_url
|
|
435
|
+
}
|
|
436
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
437
|
+
|
|
438
|
+
promise = promise.then do |result|
|
|
439
|
+
http_response = result.response
|
|
440
|
+
status_code = http_response.status
|
|
441
|
+
response_content = http_response.body
|
|
442
|
+
unless status_code == 202 || status_code == 200
|
|
443
|
+
error_model = JSON.load(response_content)
|
|
444
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
448
|
+
# Deserialize Response
|
|
449
|
+
if status_code == 202
|
|
450
|
+
begin
|
|
451
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
452
|
+
result_mapper = CustomDomain.mapper()
|
|
453
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
454
|
+
rescue Exception => e
|
|
455
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
456
|
+
end
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
result
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
promise.execute
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
#
|
|
466
|
+
# Enable https delivery of the custom domain.
|
|
467
|
+
#
|
|
468
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
|
469
|
+
# Azure subscription.
|
|
470
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
|
471
|
+
# the resource group.
|
|
472
|
+
# @param endpoint_name [String] Name of the endpoint under the profile which is
|
|
473
|
+
# unique globally.
|
|
474
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
|
475
|
+
# endpoint.
|
|
476
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
477
|
+
# will be added to the HTTP request.
|
|
478
|
+
#
|
|
479
|
+
# @return [CustomDomain] operation results.
|
|
480
|
+
#
|
|
481
|
+
def enable_custom_https(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers = nil)
|
|
482
|
+
response = enable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers).value!
|
|
483
|
+
response.body unless response.nil?
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
#
|
|
487
|
+
# Enable https delivery of the custom domain.
|
|
488
|
+
#
|
|
489
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
|
490
|
+
# Azure subscription.
|
|
491
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
|
492
|
+
# the resource group.
|
|
493
|
+
# @param endpoint_name [String] Name of the endpoint under the profile which is
|
|
494
|
+
# unique globally.
|
|
495
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
|
496
|
+
# endpoint.
|
|
497
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
498
|
+
# will be added to the HTTP request.
|
|
499
|
+
#
|
|
500
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
501
|
+
#
|
|
502
|
+
def enable_custom_https_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers = nil)
|
|
503
|
+
enable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers).value!
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
#
|
|
507
|
+
# Enable https delivery of the custom domain.
|
|
508
|
+
#
|
|
509
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
|
510
|
+
# Azure subscription.
|
|
511
|
+
# @param profile_name [String] Name of the CDN profile which is unique within
|
|
512
|
+
# the resource group.
|
|
513
|
+
# @param endpoint_name [String] Name of the endpoint under the profile which is
|
|
514
|
+
# unique globally.
|
|
515
|
+
# @param custom_domain_name [String] Name of the custom domain within an
|
|
516
|
+
# endpoint.
|
|
517
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
518
|
+
# to the HTTP request.
|
|
519
|
+
#
|
|
520
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
521
|
+
#
|
|
522
|
+
def enable_custom_https_async(resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers = nil)
|
|
523
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
524
|
+
fail ArgumentError, 'profile_name is nil' if profile_name.nil?
|
|
525
|
+
fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
|
|
526
|
+
fail ArgumentError, 'custom_domain_name is nil' if custom_domain_name.nil?
|
|
527
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
528
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
request_headers = {}
|
|
532
|
+
|
|
533
|
+
# Set Headers
|
|
534
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
535
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
536
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'
|
|
537
|
+
|
|
538
|
+
request_url = @base_url || @client.base_url
|
|
539
|
+
|
|
540
|
+
options = {
|
|
541
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
542
|
+
path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'customDomainName' => custom_domain_name,'subscriptionId' => @client.subscription_id},
|
|
543
|
+
query_params: {'api-version' => @client.api_version},
|
|
544
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
545
|
+
base_url: request_url
|
|
546
|
+
}
|
|
547
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
548
|
+
|
|
549
|
+
promise = promise.then do |result|
|
|
550
|
+
http_response = result.response
|
|
551
|
+
status_code = http_response.status
|
|
552
|
+
response_content = http_response.body
|
|
553
|
+
unless status_code == 202 || status_code == 200
|
|
554
|
+
error_model = JSON.load(response_content)
|
|
555
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
559
|
+
# Deserialize Response
|
|
560
|
+
if status_code == 202
|
|
561
|
+
begin
|
|
562
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
563
|
+
result_mapper = CustomDomain.mapper()
|
|
564
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
565
|
+
rescue Exception => e
|
|
566
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
567
|
+
end
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
result
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
promise.execute
|
|
574
|
+
end
|
|
575
|
+
|
|
354
576
|
#
|
|
355
577
|
# Creates a new custom domain within an endpoint.
|
|
356
578
|
#
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
@@ -30,11 +30,11 @@ module Azure::ARM::CDN
|
|
|
30
30
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
31
31
|
# will be added to the HTTP request.
|
|
32
32
|
#
|
|
33
|
-
# @return [
|
|
33
|
+
# @return [Array<EdgeNode>] operation results.
|
|
34
34
|
#
|
|
35
35
|
def list(custom_headers = nil)
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
first_page = list_as_lazy(custom_headers)
|
|
37
|
+
first_page.get_all_items
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
#
|
|
@@ -105,5 +105,111 @@ module Azure::ARM::CDN
|
|
|
105
105
|
promise.execute
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
+
#
|
|
109
|
+
# Lists all the edge nodes of a CDN service.
|
|
110
|
+
#
|
|
111
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
112
|
+
# to List operation.
|
|
113
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
114
|
+
# will be added to the HTTP request.
|
|
115
|
+
#
|
|
116
|
+
# @return [EdgenodeResult] operation results.
|
|
117
|
+
#
|
|
118
|
+
def list_next(next_page_link, custom_headers = nil)
|
|
119
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
|
120
|
+
response.body unless response.nil?
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
#
|
|
124
|
+
# Lists all the edge nodes of a CDN service.
|
|
125
|
+
#
|
|
126
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
127
|
+
# to List operation.
|
|
128
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
129
|
+
# will be added to the HTTP request.
|
|
130
|
+
#
|
|
131
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
132
|
+
#
|
|
133
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
|
134
|
+
list_next_async(next_page_link, custom_headers).value!
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
#
|
|
138
|
+
# Lists all the edge nodes of a CDN service.
|
|
139
|
+
#
|
|
140
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
141
|
+
# to List operation.
|
|
142
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
143
|
+
# to the HTTP request.
|
|
144
|
+
#
|
|
145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
146
|
+
#
|
|
147
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
|
148
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
request_headers = {}
|
|
152
|
+
|
|
153
|
+
# Set Headers
|
|
154
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
155
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
156
|
+
path_template = '{nextLink}'
|
|
157
|
+
|
|
158
|
+
request_url = @base_url || @client.base_url
|
|
159
|
+
|
|
160
|
+
options = {
|
|
161
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
162
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
|
163
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
164
|
+
base_url: request_url
|
|
165
|
+
}
|
|
166
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
167
|
+
|
|
168
|
+
promise = promise.then do |result|
|
|
169
|
+
http_response = result.response
|
|
170
|
+
status_code = http_response.status
|
|
171
|
+
response_content = http_response.body
|
|
172
|
+
unless status_code == 200
|
|
173
|
+
error_model = JSON.load(response_content)
|
|
174
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
178
|
+
# Deserialize Response
|
|
179
|
+
if status_code == 200
|
|
180
|
+
begin
|
|
181
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
182
|
+
result_mapper = EdgenodeResult.mapper()
|
|
183
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
184
|
+
rescue Exception => e
|
|
185
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
result
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
promise.execute
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
#
|
|
196
|
+
# Lists all the edge nodes of a CDN service.
|
|
197
|
+
#
|
|
198
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
199
|
+
# will be added to the HTTP request.
|
|
200
|
+
#
|
|
201
|
+
# @return [EdgenodeResult] which provide lazy access to pages of the response.
|
|
202
|
+
#
|
|
203
|
+
def list_as_lazy(custom_headers = nil)
|
|
204
|
+
response = list_async(custom_headers).value!
|
|
205
|
+
unless response.nil?
|
|
206
|
+
page = response.body
|
|
207
|
+
page.next_method = Proc.new do |next_page_link|
|
|
208
|
+
list_next_async(next_page_link, custom_headers)
|
|
209
|
+
end
|
|
210
|
+
page
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
108
214
|
end
|
|
109
215
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
@@ -20,6 +20,11 @@ module Azure::ARM::CDN
|
|
|
20
20
|
# domain. Possible values include: 'Creating', 'Active', 'Deleting'
|
|
21
21
|
attr_accessor :resource_state
|
|
22
22
|
|
|
23
|
+
# @return [CustomHttpsProvisioningState] Provisioning state of Custom
|
|
24
|
+
# Https of the custom domain. Possible values include: 'Enabling',
|
|
25
|
+
# 'Enabled', 'Disabling', 'Disabled', 'Failed'
|
|
26
|
+
attr_accessor :custom_https_provisioning_state
|
|
27
|
+
|
|
23
28
|
# @return [String] Special validation or data may be required when
|
|
24
29
|
# delivering CDN to some regions due to local compliance reasons. E.g.
|
|
25
30
|
# ICP license number of a custom domain is required to deliver content in
|
|
@@ -102,6 +107,14 @@ module Azure::ARM::CDN
|
|
|
102
107
|
name: 'String'
|
|
103
108
|
}
|
|
104
109
|
},
|
|
110
|
+
custom_https_provisioning_state: {
|
|
111
|
+
required: false,
|
|
112
|
+
read_only: true,
|
|
113
|
+
serialized_name: 'properties.customHttpsProvisioningState',
|
|
114
|
+
type: {
|
|
115
|
+
name: 'String'
|
|
116
|
+
}
|
|
117
|
+
},
|
|
105
118
|
validation_data: {
|
|
106
119
|
required: false,
|
|
107
120
|
serialized_name: 'properties.validationData',
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::CDN
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Defines values for CustomHttpsProvisioningState
|
|
10
|
+
#
|
|
11
|
+
module CustomHttpsProvisioningState
|
|
12
|
+
Enabling = "Enabling"
|
|
13
|
+
Enabled = "Enabled"
|
|
14
|
+
Disabling = "Disabling"
|
|
15
|
+
Disabled = "Disabled"
|
|
16
|
+
Failed = "Failed"
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
@@ -16,6 +16,41 @@ module Azure::ARM::CDN
|
|
|
16
16
|
# @return [Array<EdgeNode>] Edge node of CDN service.
|
|
17
17
|
attr_accessor :value
|
|
18
18
|
|
|
19
|
+
# @return [String] URL to get the next set of edgenode list results if
|
|
20
|
+
# there are any.
|
|
21
|
+
attr_accessor :next_link
|
|
22
|
+
|
|
23
|
+
# return [Proc] with next page method call.
|
|
24
|
+
attr_accessor :next_method
|
|
25
|
+
|
|
26
|
+
#
|
|
27
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<EdgeNode>] operation results.
|
|
30
|
+
#
|
|
31
|
+
def get_all_items
|
|
32
|
+
items = @value
|
|
33
|
+
page = self
|
|
34
|
+
while page.next_link != nil do
|
|
35
|
+
page = page.get_next_page
|
|
36
|
+
items.concat(page.value)
|
|
37
|
+
end
|
|
38
|
+
items
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
#
|
|
42
|
+
# Gets the next page of results.
|
|
43
|
+
#
|
|
44
|
+
# @return [EdgenodeResult] with next page content.
|
|
45
|
+
#
|
|
46
|
+
def get_next_page
|
|
47
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
|
48
|
+
unless response.nil?
|
|
49
|
+
@next_link = response.body.next_link
|
|
50
|
+
@value = response.body.value
|
|
51
|
+
self
|
|
52
|
+
end
|
|
53
|
+
end
|
|
19
54
|
|
|
20
55
|
#
|
|
21
56
|
# Mapper for EdgenodeResult class as Ruby Hash.
|
|
@@ -43,6 +78,13 @@ module Azure::ARM::CDN
|
|
|
43
78
|
}
|
|
44
79
|
}
|
|
45
80
|
}
|
|
81
|
+
},
|
|
82
|
+
next_link: {
|
|
83
|
+
required: false,
|
|
84
|
+
serialized_name: 'nextLink',
|
|
85
|
+
type: {
|
|
86
|
+
name: 'String'
|
|
87
|
+
}
|
|
46
88
|
}
|
|
47
89
|
}
|
|
48
90
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
6
6
|
module Azure::ARM::CDN
|
|
7
|
-
VERSION = '0.
|
|
7
|
+
VERSION = '0.10.0'
|
|
8
8
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
@@ -67,6 +67,7 @@ module Azure::ARM::CDN
|
|
|
67
67
|
autoload :GeoFilterActions, 'generated/azure_mgmt_cdn/models/geo_filter_actions.rb'
|
|
68
68
|
autoload :OriginResourceState, 'generated/azure_mgmt_cdn/models/origin_resource_state.rb'
|
|
69
69
|
autoload :CustomDomainResourceState, 'generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb'
|
|
70
|
+
autoload :CustomHttpsProvisioningState, 'generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb'
|
|
70
71
|
autoload :ResourceType, 'generated/azure_mgmt_cdn/models/resource_type.rb'
|
|
71
72
|
end
|
|
72
73
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: azure_mgmt_cdn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Microsoft Corporation
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -100,6 +100,7 @@ files:
|
|
|
100
100
|
- lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb
|
|
101
101
|
- lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb
|
|
102
102
|
- lib/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb
|
|
103
|
+
- lib/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb
|
|
103
104
|
- lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb
|
|
104
105
|
- lib/generated/azure_mgmt_cdn/models/edge_node.rb
|
|
105
106
|
- lib/generated/azure_mgmt_cdn/models/edgenode_result.rb
|