azure_mgmt_cdn 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_cdn/cdn_management_client.rb +268 -14
  3. data/lib/generated/azure_mgmt_cdn/custom_domains.rb +28 -28
  4. data/lib/generated/azure_mgmt_cdn/edge_nodes.rb +109 -0
  5. data/lib/generated/azure_mgmt_cdn/endpoints.rb +306 -60
  6. data/lib/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +54 -0
  7. data/lib/generated/azure_mgmt_cdn/models/custom_domain.rb +3 -5
  8. data/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb +3 -3
  9. data/lib/generated/azure_mgmt_cdn/models/edge_node.rb +97 -0
  10. data/lib/generated/azure_mgmt_cdn/models/edgenode_result.rb +53 -0
  11. data/lib/generated/azure_mgmt_cdn/models/endpoint.rb +22 -21
  12. data/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +16 -15
  13. data/lib/generated/azure_mgmt_cdn/models/geo_filter.rb +5 -5
  14. data/lib/generated/azure_mgmt_cdn/models/ip_address_group.rb +80 -0
  15. data/lib/generated/azure_mgmt_cdn/models/load_parameters.rb +3 -3
  16. data/lib/generated/azure_mgmt_cdn/models/profile.rb +2 -1
  17. data/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +1 -1
  18. data/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb +1 -1
  19. data/lib/generated/azure_mgmt_cdn/models/resource_usage.rb +74 -0
  20. data/lib/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +94 -0
  21. data/lib/generated/azure_mgmt_cdn/models/sku.rb +2 -1
  22. data/lib/generated/azure_mgmt_cdn/models/sso_uri.rb +2 -2
  23. data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +1 -1
  24. data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +1 -1
  25. data/lib/generated/azure_mgmt_cdn/origins.rb +14 -14
  26. data/lib/generated/azure_mgmt_cdn/profiles.rb +230 -22
  27. data/lib/generated/azure_mgmt_cdn/version.rb +1 -1
  28. data/lib/generated/azure_mgmt_cdn.rb +21 -14
  29. metadata +11 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38db031ac2d395151a09bec19793f2b981beeb5a
4
- data.tar.gz: 7752084d80cbd4db22cd025ff556cfa2f8d89edc
3
+ metadata.gz: a16bff2149a838c9b351623416faf509e7f2578b
4
+ data.tar.gz: 27e6391dbfb3b191cac8f666543fcc961e73bec4
5
5
  SHA512:
6
- metadata.gz: da767cb9e1edb34b34f411f94283bed723ad8a41793237a6273fed5c072c722af5d83647678a66b04346087379ac90ee51e5f034c09e4e708acfbfedf14d4190
7
- data.tar.gz: 2a386b847c7067206733c7d4d4a20b83f6f446006daf20fd3f9ecd7c33e807316b28582f0ad6a9222785d1f328f4588a626d3f43ccb052dab59b154da6349e0c
6
+ metadata.gz: 23bc2a920d3707a942b698cb4fa94615f00d934e7d67f0848b977c6b245449cf60cf36998f4ede062676d22c65dd669c379d52caa1c4444322fdb372b688127f
7
+ data.tar.gz: 6e288573d339ebd3aec44624dd0d8298c0af15e1fbdb039b1f7e9335f068a6d2703fcf3eb4c3a1cd594d0b3c5ed4956826ec1b52a43473570fb42a8d571a4a79
@@ -47,24 +47,27 @@ module Azure::ARM::CDN
47
47
  # @return [CustomDomains] custom_domains
48
48
  attr_reader :custom_domains
49
49
 
50
+ # @return [EdgeNodes] edge_nodes
51
+ attr_reader :edge_nodes
52
+
50
53
  #
51
54
  # Creates initializes a new instance of the CdnManagementClient class.
52
55
  # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
53
56
  # @param base_url [String] the base URI of the service.
54
57
  # @param options [Array] filters to be applied to the HTTP requests.
55
58
  #
56
- def initialize(credentials, base_url = nil, options = nil)
59
+ def initialize(credentials = nil, base_url = nil, options = nil)
57
60
  super(credentials, options)
58
61
  @base_url = base_url || 'https://management.azure.com'
59
62
 
60
- fail ArgumentError, 'credentials is nil' if credentials.nil?
61
- fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
63
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
62
64
  @credentials = credentials
63
65
 
64
66
  @profiles = Profiles.new(self)
65
67
  @endpoints = Endpoints.new(self)
66
68
  @origins = Origins.new(self)
67
69
  @custom_domains = CustomDomains.new(self)
70
+ @edge_nodes = EdgeNodes.new(self)
68
71
  @api_version = '2016-10-02'
69
72
  @accept_language = 'en-US'
70
73
  @long_running_operation_retry_timeout = 30
@@ -74,7 +77,7 @@ module Azure::ARM::CDN
74
77
 
75
78
  #
76
79
  # Makes a request and returns the body of the response.
77
- # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
80
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
78
81
  # @param path [String] the path, relative to {base_url}.
79
82
  # @param options [Hash{String=>String}] specifying any request options like :body.
80
83
  # @return [Hash{String=>String}] containing the body of the response.
@@ -128,9 +131,8 @@ module Azure::ARM::CDN
128
131
  end
129
132
 
130
133
  #
131
- # Check the availability of a resource name without creating the resource. This
132
- # is needed for resources where name is globally unique, such as a CDN
133
- # endpoint.
134
+ # Check the availability of a resource name. This is needed for resources where
135
+ # name is globally unique, such as a CDN endpoint.
134
136
  #
135
137
  # @param check_name_availability_input [CheckNameAvailabilityInput] Input to
136
138
  # check.
@@ -145,9 +147,8 @@ module Azure::ARM::CDN
145
147
  end
146
148
 
147
149
  #
148
- # Check the availability of a resource name without creating the resource. This
149
- # is needed for resources where name is globally unique, such as a CDN
150
- # endpoint.
150
+ # Check the availability of a resource name. This is needed for resources where
151
+ # name is globally unique, such as a CDN endpoint.
151
152
  #
152
153
  # @param check_name_availability_input [CheckNameAvailabilityInput] Input to
153
154
  # check.
@@ -161,9 +162,8 @@ module Azure::ARM::CDN
161
162
  end
162
163
 
163
164
  #
164
- # Check the availability of a resource name without creating the resource. This
165
- # is needed for resources where name is globally unique, such as a CDN
166
- # endpoint.
165
+ # Check the availability of a resource name. This is needed for resources where
166
+ # name is globally unique, such as a CDN endpoint.
167
167
  #
168
168
  # @param check_name_availability_input [CheckNameAvailabilityInput] Input to
169
169
  # check.
@@ -230,6 +230,92 @@ module Azure::ARM::CDN
230
230
  promise.execute
231
231
  end
232
232
 
233
+ #
234
+ # Check the quota and actual usage of the CDN profiles under the given
235
+ # subscription.
236
+ #
237
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
238
+ # will be added to the HTTP request.
239
+ #
240
+ # @return [Array<ResourceUsage>] operation results.
241
+ #
242
+ def check_resource_usage(custom_headers = nil)
243
+ first_page = check_resource_usage_as_lazy(custom_headers)
244
+ first_page.get_all_items
245
+ end
246
+
247
+ #
248
+ # Check the quota and actual usage of the CDN profiles under the given
249
+ # subscription.
250
+ #
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
255
+ #
256
+ def check_resource_usage_with_http_info(custom_headers = nil)
257
+ check_resource_usage_async(custom_headers).value!
258
+ end
259
+
260
+ #
261
+ # Check the quota and actual usage of the CDN profiles under the given
262
+ # subscription.
263
+ #
264
+ # @param [Hash{String => String}] A hash of custom headers that will be added
265
+ # to the HTTP request.
266
+ #
267
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
268
+ #
269
+ def check_resource_usage_async(custom_headers = nil)
270
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
271
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
272
+
273
+
274
+ request_headers = {}
275
+
276
+ # Set Headers
277
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
278
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
279
+ path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage'
280
+
281
+ request_url = @base_url || self.base_url
282
+
283
+ options = {
284
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
285
+ path_params: {'subscriptionId' => subscription_id},
286
+ query_params: {'api-version' => api_version},
287
+ headers: request_headers.merge(custom_headers || {}),
288
+ base_url: request_url
289
+ }
290
+ promise = self.make_request_async(:post, path_template, options)
291
+
292
+ promise = promise.then do |result|
293
+ http_response = result.response
294
+ status_code = http_response.status
295
+ response_content = http_response.body
296
+ unless status_code == 200
297
+ error_model = JSON.load(response_content)
298
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
299
+ end
300
+
301
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
302
+ # Deserialize Response
303
+ if status_code == 200
304
+ begin
305
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
306
+ result_mapper = ResourceUsageListResult.mapper()
307
+ result.body = self.deserialize(result_mapper, parsed_response, 'result.body')
308
+ rescue Exception => e
309
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
310
+ end
311
+ end
312
+
313
+ result
314
+ end
315
+
316
+ promise.execute
317
+ end
318
+
233
319
  #
234
320
  # Lists all of the available CDN REST API operations.
235
321
  #
@@ -311,6 +397,96 @@ module Azure::ARM::CDN
311
397
  promise.execute
312
398
  end
313
399
 
400
+ #
401
+ # Check the quota and actual usage of the CDN profiles under the given
402
+ # subscription.
403
+ #
404
+ # @param next_page_link [String] The NextLink from the previous successful call
405
+ # to List operation.
406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
407
+ # will be added to the HTTP request.
408
+ #
409
+ # @return [ResourceUsageListResult] operation results.
410
+ #
411
+ def check_resource_usage_next(next_page_link, custom_headers = nil)
412
+ response = check_resource_usage_next_async(next_page_link, custom_headers).value!
413
+ response.body unless response.nil?
414
+ end
415
+
416
+ #
417
+ # Check the quota and actual usage of the CDN profiles under the given
418
+ # subscription.
419
+ #
420
+ # @param next_page_link [String] The NextLink from the previous successful call
421
+ # to List operation.
422
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
423
+ # will be added to the HTTP request.
424
+ #
425
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
426
+ #
427
+ def check_resource_usage_next_with_http_info(next_page_link, custom_headers = nil)
428
+ check_resource_usage_next_async(next_page_link, custom_headers).value!
429
+ end
430
+
431
+ #
432
+ # Check the quota and actual usage of the CDN profiles under the given
433
+ # subscription.
434
+ #
435
+ # @param next_page_link [String] The NextLink from the previous successful call
436
+ # to List operation.
437
+ # @param [Hash{String => String}] A hash of custom headers that will be added
438
+ # to the HTTP request.
439
+ #
440
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
441
+ #
442
+ def check_resource_usage_next_async(next_page_link, custom_headers = nil)
443
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
444
+
445
+
446
+ request_headers = {}
447
+
448
+ # Set Headers
449
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
450
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
451
+ path_template = '{nextLink}'
452
+
453
+ request_url = @base_url || self.base_url
454
+
455
+ options = {
456
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
457
+ skip_encoding_path_params: {'nextLink' => next_page_link},
458
+ headers: request_headers.merge(custom_headers || {}),
459
+ base_url: request_url
460
+ }
461
+ promise = self.make_request_async(:post, path_template, options)
462
+
463
+ promise = promise.then do |result|
464
+ http_response = result.response
465
+ status_code = http_response.status
466
+ response_content = http_response.body
467
+ unless status_code == 200
468
+ error_model = JSON.load(response_content)
469
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
470
+ end
471
+
472
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
473
+ # Deserialize Response
474
+ if status_code == 200
475
+ begin
476
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
477
+ result_mapper = ResourceUsageListResult.mapper()
478
+ result.body = self.deserialize(result_mapper, parsed_response, 'result.body')
479
+ rescue Exception => e
480
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
481
+ end
482
+ end
483
+
484
+ result
485
+ end
486
+
487
+ promise.execute
488
+ end
489
+
314
490
  #
315
491
  # Lists all of the available CDN REST API operations.
316
492
  #
@@ -398,6 +574,84 @@ module Azure::ARM::CDN
398
574
  promise.execute
399
575
  end
400
576
 
577
+ #
578
+ # Check the quota and actual usage of the CDN profiles under the given
579
+ # subscription.
580
+ #
581
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
582
+ # will be added to the HTTP request.
583
+ #
584
+ # @return [ResourceUsageListResult] operation results.
585
+ #
586
+ def check_resource_usage_as_lazy(custom_headers = nil)
587
+ first_page = check_resource_usage_as_lazy_as_lazy(custom_headers)
588
+ first_page.get_all_items
589
+ end
590
+
591
+ #
592
+ # Check the quota and actual usage of the CDN profiles under the given
593
+ # subscription.
594
+ #
595
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
596
+ # will be added to the HTTP request.
597
+ #
598
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
599
+ #
600
+ def check_resource_usage_as_lazy_with_http_info(custom_headers = nil)
601
+ check_resource_usage_as_lazy_async(custom_headers).value!
602
+ end
603
+
604
+ #
605
+ # Check the quota and actual usage of the CDN profiles under the given
606
+ # subscription.
607
+ #
608
+ # @param [Hash{String => String}] A hash of custom headers that will be added
609
+ # to the HTTP request.
610
+ #
611
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
612
+ #
613
+ def check_resource_usage_as_lazy_async(custom_headers = nil)
614
+
615
+
616
+ request_headers = {}
617
+ path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage'
618
+
619
+ request_url = @base_url || self.base_url
620
+
621
+ options = {
622
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
623
+ headers: request_headers.merge(custom_headers || {}),
624
+ base_url: request_url
625
+ }
626
+ promise = self.make_request_async(:post, path_template, options)
627
+
628
+ promise = promise.then do |result|
629
+ http_response = result.response
630
+ status_code = http_response.status
631
+ response_content = http_response.body
632
+ unless status_code == 200
633
+ error_model = JSON.load(response_content)
634
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
635
+ end
636
+
637
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
638
+ # Deserialize Response
639
+ if status_code == 200
640
+ begin
641
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
642
+ result_mapper = ResourceUsageListResult.mapper()
643
+ result.body = self.deserialize(result_mapper, parsed_response, 'result.body')
644
+ rescue Exception => e
645
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
646
+ end
647
+ end
648
+
649
+ result
650
+ end
651
+
652
+ promise.execute
653
+ end
654
+
401
655
  #
402
656
  # Lists all of the available CDN REST API operations.
403
657
  #
@@ -481,7 +735,7 @@ module Azure::ARM::CDN
481
735
  def add_telemetry
482
736
  sdk_information = 'azure_mgmt_cdn'
483
737
  if defined? Azure::ARM::CDN::VERSION
484
- sdk_information = "#{sdk_information}/#{Azure::ARM::CDN::VERSION}"
738
+ sdk_information = "#{sdk_information}/#{Azure::ARM::CDN::VERSION}"
485
739
  end
486
740
  add_user_agent_information(sdk_information)
487
741
  end
@@ -25,7 +25,7 @@ module Azure::ARM::CDN
25
25
  attr_reader :client
26
26
 
27
27
  #
28
- # Lists the existing CDN custom domains within an endpoint.
28
+ # Lists all of the existing custom domains within an endpoint.
29
29
  #
30
30
  # @param resource_group_name [String] Name of the Resource group within the
31
31
  # Azure subscription.
@@ -44,7 +44,7 @@ module Azure::ARM::CDN
44
44
  end
45
45
 
46
46
  #
47
- # Lists the existing CDN custom domains within an endpoint.
47
+ # Lists all of the existing custom domains within an endpoint.
48
48
  #
49
49
  # @param resource_group_name [String] Name of the Resource group within the
50
50
  # Azure subscription.
@@ -62,7 +62,7 @@ module Azure::ARM::CDN
62
62
  end
63
63
 
64
64
  #
65
- # Lists the existing CDN custom domains within an endpoint.
65
+ # Lists all of the existing custom domains within an endpoint.
66
66
  #
67
67
  # @param resource_group_name [String] Name of the Resource group within the
68
68
  # Azure subscription.
@@ -129,7 +129,7 @@ module Azure::ARM::CDN
129
129
  end
130
130
 
131
131
  #
132
- # Gets an existing CDN custom domain within an endpoint.
132
+ # Gets an exisitng custom domain within an endpoint.
133
133
  #
134
134
  # @param resource_group_name [String] Name of the Resource group within the
135
135
  # Azure subscription.
@@ -150,7 +150,7 @@ module Azure::ARM::CDN
150
150
  end
151
151
 
152
152
  #
153
- # Gets an existing CDN custom domain within an endpoint.
153
+ # Gets an exisitng custom domain within an endpoint.
154
154
  #
155
155
  # @param resource_group_name [String] Name of the Resource group within the
156
156
  # Azure subscription.
@@ -170,7 +170,7 @@ module Azure::ARM::CDN
170
170
  end
171
171
 
172
172
  #
173
- # Gets an existing CDN custom domain within an endpoint.
173
+ # Gets an exisitng custom domain within an endpoint.
174
174
  #
175
175
  # @param resource_group_name [String] Name of the Resource group within the
176
176
  # Azure subscription.
@@ -240,7 +240,7 @@ module Azure::ARM::CDN
240
240
  end
241
241
 
242
242
  #
243
- # Creates a new CDN custom domain within an endpoint.
243
+ # Creates a new custom domain within an endpoint.
244
244
  #
245
245
  # @param resource_group_name [String] Name of the Resource group within the
246
246
  # Azure subscription.
@@ -250,8 +250,8 @@ module Azure::ARM::CDN
250
250
  # unique globally.
251
251
  # @param custom_domain_name [String] Name of the custom domain within an
252
252
  # endpoint.
253
- # @param custom_domain_properties [CustomDomainParameters] Custom domain
254
- # properties required for creation.
253
+ # @param custom_domain_properties [CustomDomainParameters] Properties required
254
+ # to create a new custom domain.
255
255
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
256
  # will be added to the HTTP request.
257
257
  #
@@ -271,8 +271,8 @@ module Azure::ARM::CDN
271
271
  # unique globally.
272
272
  # @param custom_domain_name [String] Name of the custom domain within an
273
273
  # endpoint.
274
- # @param custom_domain_properties [CustomDomainParameters] Custom domain
275
- # properties required for creation.
274
+ # @param custom_domain_properties [CustomDomainParameters] Properties required
275
+ # to create a new custom domain.
276
276
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
277
277
  # will be added to the HTTP request.
278
278
  #
@@ -298,7 +298,7 @@ module Azure::ARM::CDN
298
298
  end
299
299
 
300
300
  #
301
- # Deletes an existing CDN custom domain within an endpoint.
301
+ # Deletes an existing custom domain within an endpoint.
302
302
  #
303
303
  # @param resource_group_name [String] Name of the Resource group within the
304
304
  # Azure subscription.
@@ -352,7 +352,7 @@ module Azure::ARM::CDN
352
352
  end
353
353
 
354
354
  #
355
- # Creates a new CDN custom domain within an endpoint.
355
+ # Creates a new custom domain within an endpoint.
356
356
  #
357
357
  # @param resource_group_name [String] Name of the Resource group within the
358
358
  # Azure subscription.
@@ -362,8 +362,8 @@ module Azure::ARM::CDN
362
362
  # unique globally.
363
363
  # @param custom_domain_name [String] Name of the custom domain within an
364
364
  # endpoint.
365
- # @param custom_domain_properties [CustomDomainParameters] Custom domain
366
- # properties required for creation.
365
+ # @param custom_domain_properties [CustomDomainParameters] Properties required
366
+ # to create a new custom domain.
367
367
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
368
368
  # will be added to the HTTP request.
369
369
  #
@@ -375,7 +375,7 @@ module Azure::ARM::CDN
375
375
  end
376
376
 
377
377
  #
378
- # Creates a new CDN custom domain within an endpoint.
378
+ # Creates a new custom domain within an endpoint.
379
379
  #
380
380
  # @param resource_group_name [String] Name of the Resource group within the
381
381
  # Azure subscription.
@@ -385,8 +385,8 @@ module Azure::ARM::CDN
385
385
  # unique globally.
386
386
  # @param custom_domain_name [String] Name of the custom domain within an
387
387
  # endpoint.
388
- # @param custom_domain_properties [CustomDomainParameters] Custom domain
389
- # properties required for creation.
388
+ # @param custom_domain_properties [CustomDomainParameters] Properties required
389
+ # to create a new custom domain.
390
390
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
391
391
  # will be added to the HTTP request.
392
392
  #
@@ -397,7 +397,7 @@ module Azure::ARM::CDN
397
397
  end
398
398
 
399
399
  #
400
- # Creates a new CDN custom domain within an endpoint.
400
+ # Creates a new custom domain within an endpoint.
401
401
  #
402
402
  # @param resource_group_name [String] Name of the Resource group within the
403
403
  # Azure subscription.
@@ -407,8 +407,8 @@ module Azure::ARM::CDN
407
407
  # unique globally.
408
408
  # @param custom_domain_name [String] Name of the custom domain within an
409
409
  # endpoint.
410
- # @param custom_domain_properties [CustomDomainParameters] Custom domain
411
- # properties required for creation.
410
+ # @param custom_domain_properties [CustomDomainParameters] Properties required
411
+ # to create a new custom domain.
412
412
  # @param [Hash{String => String}] A hash of custom headers that will be added
413
413
  # to the HTTP request.
414
414
  #
@@ -499,7 +499,7 @@ module Azure::ARM::CDN
499
499
  end
500
500
 
501
501
  #
502
- # Deletes an existing CDN custom domain within an endpoint.
502
+ # Deletes an existing custom domain within an endpoint.
503
503
  #
504
504
  # @param resource_group_name [String] Name of the Resource group within the
505
505
  # Azure subscription.
@@ -520,7 +520,7 @@ module Azure::ARM::CDN
520
520
  end
521
521
 
522
522
  #
523
- # Deletes an existing CDN custom domain within an endpoint.
523
+ # Deletes an existing custom domain within an endpoint.
524
524
  #
525
525
  # @param resource_group_name [String] Name of the Resource group within the
526
526
  # Azure subscription.
@@ -540,7 +540,7 @@ module Azure::ARM::CDN
540
540
  end
541
541
 
542
542
  #
543
- # Deletes an existing CDN custom domain within an endpoint.
543
+ # Deletes an existing custom domain within an endpoint.
544
544
  #
545
545
  # @param resource_group_name [String] Name of the Resource group within the
546
546
  # Azure subscription.
@@ -610,7 +610,7 @@ module Azure::ARM::CDN
610
610
  end
611
611
 
612
612
  #
613
- # Lists the existing CDN custom domains within an endpoint.
613
+ # Lists all of the existing custom domains within an endpoint.
614
614
  #
615
615
  # @param next_page_link [String] The NextLink from the previous successful call
616
616
  # to List operation.
@@ -625,7 +625,7 @@ module Azure::ARM::CDN
625
625
  end
626
626
 
627
627
  #
628
- # Lists the existing CDN custom domains within an endpoint.
628
+ # Lists all of the existing custom domains within an endpoint.
629
629
  #
630
630
  # @param next_page_link [String] The NextLink from the previous successful call
631
631
  # to List operation.
@@ -639,7 +639,7 @@ module Azure::ARM::CDN
639
639
  end
640
640
 
641
641
  #
642
- # Lists the existing CDN custom domains within an endpoint.
642
+ # Lists all of the existing custom domains within an endpoint.
643
643
  #
644
644
  # @param next_page_link [String] The NextLink from the previous successful call
645
645
  # to List operation.
@@ -697,7 +697,7 @@ module Azure::ARM::CDN
697
697
  end
698
698
 
699
699
  #
700
- # Lists the existing CDN custom domains within an endpoint.
700
+ # Lists all of the existing custom domains within an endpoint.
701
701
  #
702
702
  # @param resource_group_name [String] Name of the Resource group within the
703
703
  # Azure subscription.
@@ -0,0 +1,109 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::CDN
7
+ #
8
+ # Use these APIs to manage Azure CDN resources through the Azure Resource
9
+ # Manager. You must make sure that requests made to these resources are
10
+ # secure.
11
+ #
12
+ class EdgeNodes
13
+ include Azure::ARM::CDN::Models
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the EdgeNodes class.
18
+ # @param client service class for accessing basic functionality.
19
+ #
20
+ def initialize(client)
21
+ @client = client
22
+ end
23
+
24
+ # @return [CdnManagementClient] reference to the CdnManagementClient
25
+ attr_reader :client
26
+
27
+ #
28
+ # Lists all the edge nodes of a CDN service.
29
+ #
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [EdgenodeResult] operation results.
34
+ #
35
+ def list(custom_headers = nil)
36
+ response = list_async(custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Lists all the edge nodes of a CDN service.
42
+ #
43
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
44
+ # will be added to the HTTP request.
45
+ #
46
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
47
+ #
48
+ def list_with_http_info(custom_headers = nil)
49
+ list_async(custom_headers).value!
50
+ end
51
+
52
+ #
53
+ # Lists all the edge nodes of a CDN service.
54
+ #
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(custom_headers = nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+
63
+
64
+ request_headers = {}
65
+
66
+ # Set Headers
67
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
68
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
69
+ path_template = '/providers/Microsoft.Cdn/edgenodes'
70
+
71
+ request_url = @base_url || @client.base_url
72
+
73
+ options = {
74
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
75
+ query_params: {'api-version' => @client.api_version},
76
+ headers: request_headers.merge(custom_headers || {}),
77
+ base_url: request_url
78
+ }
79
+ promise = @client.make_request_async(:get, path_template, options)
80
+
81
+ promise = promise.then do |result|
82
+ http_response = result.response
83
+ status_code = http_response.status
84
+ response_content = http_response.body
85
+ unless status_code == 200
86
+ error_model = JSON.load(response_content)
87
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
88
+ end
89
+
90
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
91
+ # Deserialize Response
92
+ if status_code == 200
93
+ begin
94
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
95
+ result_mapper = EdgenodeResult.mapper()
96
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
97
+ rescue Exception => e
98
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
99
+ end
100
+ end
101
+
102
+ result
103
+ end
104
+
105
+ promise.execute
106
+ end
107
+
108
+ end
109
+ end