azure_mgmt_cdn 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_cdn.rb +16 -20
  3. data/lib/generated/azure_mgmt_cdn/cdn_management_client.rb +362 -11
  4. data/lib/generated/azure_mgmt_cdn/custom_domains.rb +240 -234
  5. data/lib/generated/azure_mgmt_cdn/endpoints.rb +735 -572
  6. data/lib/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +1 -1
  7. data/lib/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +4 -4
  8. data/lib/generated/azure_mgmt_cdn/models/custom_domain.rb +42 -10
  9. data/lib/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +45 -2
  10. data/lib/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +3 -2
  11. data/lib/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +1 -1
  12. data/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb +10 -2
  13. data/lib/generated/azure_mgmt_cdn/models/endpoint.rb +70 -42
  14. data/lib/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +45 -2
  15. data/lib/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +1 -1
  16. data/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +44 -15
  17. data/lib/generated/azure_mgmt_cdn/models/error_response.rb +4 -3
  18. data/lib/generated/azure_mgmt_cdn/models/geo_filter.rb +75 -0
  19. data/lib/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  20. data/lib/generated/azure_mgmt_cdn/models/load_parameters.rb +1 -1
  21. data/lib/generated/azure_mgmt_cdn/models/operation.rb +2 -2
  22. data/lib/generated/azure_mgmt_cdn/models/operation_display.rb +4 -4
  23. data/lib/generated/azure_mgmt_cdn/models/operation_list_result.rb +45 -2
  24. data/lib/generated/azure_mgmt_cdn/models/origin.rb +38 -11
  25. data/lib/generated/azure_mgmt_cdn/models/origin_list_result.rb +45 -2
  26. data/lib/generated/azure_mgmt_cdn/models/origin_resource_state.rb +1 -1
  27. data/lib/generated/azure_mgmt_cdn/models/{origin_parameters.rb → origin_update_parameters.rb} +14 -6
  28. data/lib/generated/azure_mgmt_cdn/models/profile.rb +13 -15
  29. data/lib/generated/azure_mgmt_cdn/models/profile_list_result.rb +45 -2
  30. data/lib/generated/azure_mgmt_cdn/models/profile_resource_state.rb +1 -1
  31. data/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +1 -1
  32. data/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb +1 -1
  33. data/lib/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +1 -1
  34. data/lib/generated/azure_mgmt_cdn/models/resource_type.rb +1 -1
  35. data/lib/generated/azure_mgmt_cdn/models/sku.rb +3 -4
  36. data/lib/generated/azure_mgmt_cdn/models/sku_name.rb +2 -1
  37. data/lib/generated/azure_mgmt_cdn/models/sso_uri.rb +1 -1
  38. data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +1 -1
  39. data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +1 -1
  40. data/lib/generated/azure_mgmt_cdn/module_definition.rb +1 -1
  41. data/lib/generated/azure_mgmt_cdn/origins.rb +154 -387
  42. data/lib/generated/azure_mgmt_cdn/profiles.rb +480 -257
  43. data/lib/generated/azure_mgmt_cdn/version.rb +2 -2
  44. metadata +7 -11
  45. data/lib/generated/azure_mgmt_cdn/models/endpoint_create_parameters.rb +0 -173
  46. data/lib/generated/azure_mgmt_cdn/models/profile_create_parameters.rb +0 -72
  47. data/lib/generated/azure_mgmt_cdn/models/provisioning_state.rb +0 -17
  48. data/lib/generated/azure_mgmt_cdn/models/tracked_resource.rb +0 -85
  49. data/lib/generated/azure_mgmt_cdn/name_availability.rb +0 -133
  50. data/lib/generated/azure_mgmt_cdn/operations.rb +0 -111
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -7,9 +7,7 @@ module Azure::ARM::CDN
7
7
  #
8
8
  # Use these APIs to manage Azure CDN resources through the Azure Resource
9
9
  # Manager. You must make sure that requests made to these resources are
10
- # secure. For more information, see <a
11
- # href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
12
- # Azure Resource Manager requests.</a>
10
+ # secure.
13
11
  #
14
12
  class Endpoints
15
13
  include Azure::ARM::CDN::Models
@@ -27,53 +25,53 @@ module Azure::ARM::CDN
27
25
  attr_reader :client
28
26
 
29
27
  #
30
- # Lists existing CDN endpoints within a profile.
28
+ # Lists existing CDN endpoints.
31
29
  #
32
- # @param profile_name [String] Name of the CDN profile within the resource
33
- # group.
34
- # @param resource_group_name [String] Name of the resource group within the
30
+ # @param resource_group_name [String] Name of the Resource group within the
35
31
  # Azure subscription.
32
+ # @param profile_name [String] Name of the CDN profile which is unique within
33
+ # the resource group.
36
34
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
35
  # will be added to the HTTP request.
38
36
  #
39
- # @return [EndpointListResult] operation results.
37
+ # @return [Array<Endpoint>] operation results.
40
38
  #
41
- def list_by_profile(profile_name, resource_group_name, custom_headers = nil)
42
- response = list_by_profile_async(profile_name, resource_group_name, custom_headers).value!
43
- response.body unless response.nil?
39
+ def list_by_profile(resource_group_name, profile_name, custom_headers = nil)
40
+ first_page = list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers)
41
+ first_page.get_all_items
44
42
  end
45
43
 
46
44
  #
47
- # Lists existing CDN endpoints within a profile.
45
+ # Lists existing CDN endpoints.
48
46
  #
49
- # @param profile_name [String] Name of the CDN profile within the resource
50
- # group.
51
- # @param resource_group_name [String] Name of the resource group within the
47
+ # @param resource_group_name [String] Name of the Resource group within the
52
48
  # Azure subscription.
49
+ # @param profile_name [String] Name of the CDN profile which is unique within
50
+ # the resource group.
53
51
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
52
  # will be added to the HTTP request.
55
53
  #
56
54
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
57
55
  #
58
- def list_by_profile_with_http_info(profile_name, resource_group_name, custom_headers = nil)
59
- list_by_profile_async(profile_name, resource_group_name, custom_headers).value!
56
+ def list_by_profile_with_http_info(resource_group_name, profile_name, custom_headers = nil)
57
+ list_by_profile_async(resource_group_name, profile_name, custom_headers).value!
60
58
  end
61
59
 
62
60
  #
63
- # Lists existing CDN endpoints within a profile.
61
+ # Lists existing CDN endpoints.
64
62
  #
65
- # @param profile_name [String] Name of the CDN profile within the resource
66
- # group.
67
- # @param resource_group_name [String] Name of the resource group within the
63
+ # @param resource_group_name [String] Name of the Resource group within the
68
64
  # Azure subscription.
65
+ # @param profile_name [String] Name of the CDN profile which is unique within
66
+ # the resource group.
69
67
  # @param [Hash{String => String}] A hash of custom headers that will be added
70
68
  # to the HTTP request.
71
69
  #
72
70
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
73
71
  #
74
- def list_by_profile_async(profile_name, resource_group_name, custom_headers = nil)
75
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
72
+ def list_by_profile_async(resource_group_name, profile_name, custom_headers = nil)
76
73
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
74
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
77
75
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
78
76
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
79
77
 
@@ -89,7 +87,7 @@ module Azure::ARM::CDN
89
87
 
90
88
  options = {
91
89
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
92
- path_params: {'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
90
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
93
91
  query_params: {'api-version' => @client.api_version},
94
92
  headers: request_headers.merge(custom_headers || {}),
95
93
  base_url: request_url
@@ -124,57 +122,63 @@ module Azure::ARM::CDN
124
122
  end
125
123
 
126
124
  #
127
- # Gets an existing CDN endpoint with the specified parameters.
125
+ # Gets an existing CDN endpoint with the specified endpoint name under the
126
+ # specified subscription, resource group and profile.
128
127
  #
129
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
130
- # @param profile_name [String] Name of the CDN profile within the resource
131
- # group.
132
- # @param resource_group_name [String] Name of the resource group within the
128
+ # @param resource_group_name [String] Name of the Resource group within the
133
129
  # Azure subscription.
130
+ # @param profile_name [String] Name of the CDN profile which is unique within
131
+ # the resource group.
132
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
133
+ # unique globally.
134
134
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
135
  # will be added to the HTTP request.
136
136
  #
137
137
  # @return [Endpoint] operation results.
138
138
  #
139
- def get(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
140
- response = get_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
139
+ def get(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
140
+ response = get_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
141
141
  response.body unless response.nil?
142
142
  end
143
143
 
144
144
  #
145
- # Gets an existing CDN endpoint with the specified parameters.
145
+ # Gets an existing CDN endpoint with the specified endpoint name under the
146
+ # specified subscription, resource group and profile.
146
147
  #
147
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
148
- # @param profile_name [String] Name of the CDN profile within the resource
149
- # group.
150
- # @param resource_group_name [String] Name of the resource group within the
148
+ # @param resource_group_name [String] Name of the Resource group within the
151
149
  # Azure subscription.
150
+ # @param profile_name [String] Name of the CDN profile which is unique within
151
+ # the resource group.
152
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
153
+ # unique globally.
152
154
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
153
155
  # will be added to the HTTP request.
154
156
  #
155
157
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
156
158
  #
157
- def get_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
158
- get_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
159
+ def get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
160
+ get_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
159
161
  end
160
162
 
161
163
  #
162
- # Gets an existing CDN endpoint with the specified parameters.
164
+ # Gets an existing CDN endpoint with the specified endpoint name under the
165
+ # specified subscription, resource group and profile.
163
166
  #
164
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
165
- # @param profile_name [String] Name of the CDN profile within the resource
166
- # group.
167
- # @param resource_group_name [String] Name of the resource group within the
167
+ # @param resource_group_name [String] Name of the Resource group within the
168
168
  # Azure subscription.
169
+ # @param profile_name [String] Name of the CDN profile which is unique within
170
+ # the resource group.
171
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
172
+ # unique globally.
169
173
  # @param [Hash{String => String}] A hash of custom headers that will be added
170
174
  # to the HTTP request.
171
175
  #
172
176
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
173
177
  #
174
- def get_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
175
- fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
176
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
178
+ def get_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
177
179
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
180
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
181
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
178
182
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
179
183
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
180
184
 
@@ -190,7 +194,7 @@ module Azure::ARM::CDN
190
194
 
191
195
  options = {
192
196
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
193
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
197
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
194
198
  query_params: {'api-version' => @client.api_version},
195
199
  headers: request_headers.merge(custom_headers || {}),
196
200
  base_url: request_url
@@ -227,38 +231,97 @@ module Azure::ARM::CDN
227
231
  #
228
232
  # Creates a new CDN endpoint with the specified parameters.
229
233
  #
230
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
231
- # @param endpoint_properties [EndpointCreateParameters] Endpoint properties
232
- # @param profile_name [String] Name of the CDN profile within the resource
233
- # group.
234
- # @param resource_group_name [String] Name of the resource group within the
234
+ # @param resource_group_name [String] Name of the Resource group within the
235
+ # Azure subscription.
236
+ # @param profile_name [String] Name of the CDN profile which is unique within
237
+ # the resource group.
238
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
239
+ # unique globally.
240
+ # @param endpoint [Endpoint] Endpoint properties
241
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
242
+ # will be added to the HTTP request.
243
+ #
244
+ # @return [Endpoint] operation results.
245
+ #
246
+ def create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
247
+ response = create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers).value!
248
+ response.body unless response.nil?
249
+ end
250
+
251
+ #
252
+ # @param resource_group_name [String] Name of the Resource group within the
253
+ # Azure subscription.
254
+ # @param profile_name [String] Name of the CDN profile which is unique within
255
+ # the resource group.
256
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
257
+ # unique globally.
258
+ # @param endpoint [Endpoint] Endpoint properties
259
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
260
+ # will be added to the HTTP request.
261
+ #
262
+ # @return [Concurrent::Promise] promise which provides async access to http
263
+ # response.
264
+ #
265
+ def create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
266
+ # Send request
267
+ promise = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers)
268
+
269
+ promise = promise.then do |response|
270
+ # Defining deserialization method.
271
+ deserialize_method = lambda do |parsed_response|
272
+ result_mapper = Endpoint.mapper()
273
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
274
+ end
275
+
276
+ # Waiting for response.
277
+ @client.get_long_running_operation_result(response, deserialize_method)
278
+ end
279
+
280
+ promise
281
+ end
282
+
283
+ #
284
+ # Updates an existing CDN endpoint with the specified parameters. Only tags and
285
+ # OriginHostHeader can be updated after creating an endpoint. To update
286
+ # origins, use the Update Origin operation. To update custom domains, use the
287
+ # Update Custom Domain operation.
288
+ #
289
+ # @param resource_group_name [String] Name of the Resource group within the
235
290
  # Azure subscription.
291
+ # @param profile_name [String] Name of the CDN profile which is unique within
292
+ # the resource group.
293
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
294
+ # unique globally.
295
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
296
+ # properties
236
297
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
237
298
  # will be added to the HTTP request.
238
299
  #
239
300
  # @return [Endpoint] operation results.
240
301
  #
241
- def create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
242
- response = create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value!
302
+ def update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
303
+ response = update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers).value!
243
304
  response.body unless response.nil?
244
305
  end
245
306
 
246
307
  #
247
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
248
- # @param endpoint_properties [EndpointCreateParameters] Endpoint properties
249
- # @param profile_name [String] Name of the CDN profile within the resource
250
- # group.
251
- # @param resource_group_name [String] Name of the resource group within the
308
+ # @param resource_group_name [String] Name of the Resource group within the
252
309
  # Azure subscription.
310
+ # @param profile_name [String] Name of the CDN profile which is unique within
311
+ # the resource group.
312
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
313
+ # unique globally.
314
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
315
+ # properties
253
316
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
254
317
  # will be added to the HTTP request.
255
318
  #
256
319
  # @return [Concurrent::Promise] promise which provides async access to http
257
320
  # response.
258
321
  #
259
- def create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
322
+ def update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
260
323
  # Send request
261
- promise = begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers)
324
+ promise = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers)
262
325
 
263
326
  promise = promise.then do |response|
264
327
  # Defining deserialization method.
@@ -274,62 +337,436 @@ module Azure::ARM::CDN
274
337
  promise
275
338
  end
276
339
 
340
+ #
341
+ # Deletes an existing CDN endpoint with the specified parameters.
342
+ #
343
+ # @param resource_group_name [String] Name of the Resource group within the
344
+ # Azure subscription.
345
+ # @param profile_name [String] Name of the CDN profile which is unique within
346
+ # the resource group.
347
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
348
+ # unique globally.
349
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
350
+ # will be added to the HTTP request.
351
+ #
352
+ def delete(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
353
+ response = delete_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
354
+ nil
355
+ end
356
+
357
+ #
358
+ # @param resource_group_name [String] Name of the Resource group within the
359
+ # Azure subscription.
360
+ # @param profile_name [String] Name of the CDN profile which is unique within
361
+ # the resource group.
362
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
363
+ # unique globally.
364
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
365
+ # will be added to the HTTP request.
366
+ #
367
+ # @return [Concurrent::Promise] promise which provides async access to http
368
+ # response.
369
+ #
370
+ def delete_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
371
+ # Send request
372
+ promise = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers)
373
+
374
+ promise = promise.then do |response|
375
+ # Defining deserialization method.
376
+ deserialize_method = lambda do |parsed_response|
377
+ end
378
+
379
+ # Waiting for response.
380
+ @client.get_long_running_operation_result(response, deserialize_method)
381
+ end
382
+
383
+ promise
384
+ end
385
+
386
+ #
387
+ # Starts an existing stopped CDN endpoint.
388
+ #
389
+ # @param resource_group_name [String] Name of the Resource group within the
390
+ # Azure subscription.
391
+ # @param profile_name [String] Name of the CDN profile which is unique within
392
+ # the resource group.
393
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
394
+ # unique globally.
395
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
396
+ # will be added to the HTTP request.
397
+ #
398
+ # @return [Endpoint] operation results.
399
+ #
400
+ def start(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
401
+ response = start_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
402
+ response.body unless response.nil?
403
+ end
404
+
405
+ #
406
+ # @param resource_group_name [String] Name of the Resource group within the
407
+ # Azure subscription.
408
+ # @param profile_name [String] Name of the CDN profile which is unique within
409
+ # the resource group.
410
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
411
+ # unique globally.
412
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
413
+ # will be added to the HTTP request.
414
+ #
415
+ # @return [Concurrent::Promise] promise which provides async access to http
416
+ # response.
417
+ #
418
+ def start_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
419
+ # Send request
420
+ promise = begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers)
421
+
422
+ promise = promise.then do |response|
423
+ # Defining deserialization method.
424
+ deserialize_method = lambda do |parsed_response|
425
+ result_mapper = Endpoint.mapper()
426
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
427
+ end
428
+
429
+ # Waiting for response.
430
+ @client.get_long_running_operation_result(response, deserialize_method)
431
+ end
432
+
433
+ promise
434
+ end
435
+
436
+ #
437
+ # Stops an existing running CDN endpoint.
438
+ #
439
+ # @param resource_group_name [String] Name of the Resource group within the
440
+ # Azure subscription.
441
+ # @param profile_name [String] Name of the CDN profile which is unique within
442
+ # the resource group.
443
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
444
+ # unique globally.
445
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
446
+ # will be added to the HTTP request.
447
+ #
448
+ # @return [Endpoint] operation results.
449
+ #
450
+ def stop(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
451
+ response = stop_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
452
+ response.body unless response.nil?
453
+ end
454
+
455
+ #
456
+ # @param resource_group_name [String] Name of the Resource group within the
457
+ # Azure subscription.
458
+ # @param profile_name [String] Name of the CDN profile which is unique within
459
+ # the resource group.
460
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
461
+ # unique globally.
462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
463
+ # will be added to the HTTP request.
464
+ #
465
+ # @return [Concurrent::Promise] promise which provides async access to http
466
+ # response.
467
+ #
468
+ def stop_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
469
+ # Send request
470
+ promise = begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers)
471
+
472
+ promise = promise.then do |response|
473
+ # Defining deserialization method.
474
+ deserialize_method = lambda do |parsed_response|
475
+ result_mapper = Endpoint.mapper()
476
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
477
+ end
478
+
479
+ # Waiting for response.
480
+ @client.get_long_running_operation_result(response, deserialize_method)
481
+ end
482
+
483
+ promise
484
+ end
485
+
486
+ #
487
+ # Forcibly purges CDN endpoint content.
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 content_file_paths [PurgeParameters] The path to the content to be
496
+ # purged. Path can describe a file or directory using the wildcard. e.g.
497
+ # '/my/directory/*' or '/my/file.exe/'
498
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
499
+ # will be added to the HTTP request.
500
+ #
501
+ def purge_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
502
+ response = purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
503
+ nil
504
+ end
505
+
506
+ #
507
+ # @param resource_group_name [String] Name of the Resource group within the
508
+ # Azure subscription.
509
+ # @param profile_name [String] Name of the CDN profile which is unique within
510
+ # the resource group.
511
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
512
+ # unique globally.
513
+ # @param content_file_paths [PurgeParameters] The path to the content to be
514
+ # purged. Path can describe a file or directory using the wildcard. e.g.
515
+ # '/my/directory/*' or '/my/file.exe/'
516
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
517
+ # will be added to the HTTP request.
518
+ #
519
+ # @return [Concurrent::Promise] promise which provides async access to http
520
+ # response.
521
+ #
522
+ def purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
523
+ # Send request
524
+ promise = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers)
525
+
526
+ promise = promise.then do |response|
527
+ # Defining deserialization method.
528
+ deserialize_method = lambda do |parsed_response|
529
+ end
530
+
531
+ # Waiting for response.
532
+ @client.get_long_running_operation_result(response, deserialize_method)
533
+ end
534
+
535
+ promise
536
+ end
537
+
538
+ #
539
+ # Forcibly pre-loads CDN endpoint content. Available for Verizon Profiles.
540
+ #
541
+ # @param resource_group_name [String] Name of the Resource group within the
542
+ # Azure subscription.
543
+ # @param profile_name [String] Name of the CDN profile which is unique within
544
+ # the resource group.
545
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
546
+ # unique globally.
547
+ # @param content_file_paths [LoadParameters] The path to the content to be
548
+ # loaded. Path should describe a file.
549
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
550
+ # will be added to the HTTP request.
551
+ #
552
+ def load_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
553
+ response = load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
554
+ nil
555
+ end
556
+
557
+ #
558
+ # @param resource_group_name [String] Name of the Resource group within the
559
+ # Azure subscription.
560
+ # @param profile_name [String] Name of the CDN profile which is unique within
561
+ # the resource group.
562
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
563
+ # unique globally.
564
+ # @param content_file_paths [LoadParameters] The path to the content to be
565
+ # loaded. Path should describe a file.
566
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
567
+ # will be added to the HTTP request.
568
+ #
569
+ # @return [Concurrent::Promise] promise which provides async access to http
570
+ # response.
571
+ #
572
+ def load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
573
+ # Send request
574
+ promise = begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers)
575
+
576
+ promise = promise.then do |response|
577
+ # Defining deserialization method.
578
+ deserialize_method = lambda do |parsed_response|
579
+ end
580
+
581
+ # Waiting for response.
582
+ @client.get_long_running_operation_result(response, deserialize_method)
583
+ end
584
+
585
+ promise
586
+ end
587
+
588
+ #
589
+ # Validates a custom domain mapping to ensure it maps to the correct CNAME in
590
+ # DNS.
591
+ #
592
+ # @param resource_group_name [String] Name of the Resource group within the
593
+ # Azure subscription.
594
+ # @param profile_name [String] Name of the CDN profile which is unique within
595
+ # the resource group.
596
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
597
+ # unique globally.
598
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
599
+ # validate.
600
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
601
+ # will be added to the HTTP request.
602
+ #
603
+ # @return [ValidateCustomDomainOutput] operation results.
604
+ #
605
+ def validate_custom_domain(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers = nil)
606
+ response = validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers).value!
607
+ response.body unless response.nil?
608
+ end
609
+
610
+ #
611
+ # Validates a custom domain mapping to ensure it maps to the correct CNAME in
612
+ # DNS.
613
+ #
614
+ # @param resource_group_name [String] Name of the Resource group within the
615
+ # Azure subscription.
616
+ # @param profile_name [String] Name of the CDN profile which is unique within
617
+ # the resource group.
618
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
619
+ # unique globally.
620
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
621
+ # validate.
622
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
623
+ # will be added to the HTTP request.
624
+ #
625
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
626
+ #
627
+ def validate_custom_domain_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers = nil)
628
+ validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers).value!
629
+ end
630
+
631
+ #
632
+ # Validates a custom domain mapping to ensure it maps to the correct CNAME in
633
+ # DNS.
634
+ #
635
+ # @param resource_group_name [String] Name of the Resource group within the
636
+ # Azure subscription.
637
+ # @param profile_name [String] Name of the CDN profile which is unique within
638
+ # the resource group.
639
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
640
+ # unique globally.
641
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
642
+ # validate.
643
+ # @param [Hash{String => String}] A hash of custom headers that will be added
644
+ # to the HTTP request.
645
+ #
646
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
647
+ #
648
+ def validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers = nil)
649
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
650
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
651
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
652
+ fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil?
653
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
654
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
655
+
656
+
657
+ request_headers = {}
658
+
659
+ # Set Headers
660
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
661
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
662
+
663
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
664
+
665
+ # Serialize Request
666
+ request_mapper = ValidateCustomDomainInput.mapper()
667
+ request_content = @client.serialize(request_mapper, custom_domain_properties, 'custom_domain_properties')
668
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
669
+
670
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain'
671
+
672
+ request_url = @base_url || @client.base_url
673
+
674
+ options = {
675
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
676
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
677
+ query_params: {'api-version' => @client.api_version},
678
+ body: request_content,
679
+ headers: request_headers.merge(custom_headers || {}),
680
+ base_url: request_url
681
+ }
682
+ promise = @client.make_request_async(:post, path_template, options)
683
+
684
+ promise = promise.then do |result|
685
+ http_response = result.response
686
+ status_code = http_response.status
687
+ response_content = http_response.body
688
+ unless status_code == 200
689
+ error_model = JSON.load(response_content)
690
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
691
+ end
692
+
693
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
694
+ # Deserialize Response
695
+ if status_code == 200
696
+ begin
697
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
698
+ result_mapper = ValidateCustomDomainOutput.mapper()
699
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
700
+ rescue Exception => e
701
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
702
+ end
703
+ end
704
+
705
+ result
706
+ end
707
+
708
+ promise.execute
709
+ end
710
+
277
711
  #
278
712
  # Creates a new CDN endpoint with the specified parameters.
279
713
  #
280
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
281
- # @param endpoint_properties [EndpointCreateParameters] Endpoint properties
282
- # @param profile_name [String] Name of the CDN profile within the resource
283
- # group.
284
- # @param resource_group_name [String] Name of the resource group within the
714
+ # @param resource_group_name [String] Name of the Resource group within the
285
715
  # Azure subscription.
716
+ # @param profile_name [String] Name of the CDN profile which is unique within
717
+ # the resource group.
718
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
719
+ # unique globally.
720
+ # @param endpoint [Endpoint] Endpoint properties
286
721
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
287
722
  # will be added to the HTTP request.
288
723
  #
289
724
  # @return [Endpoint] operation results.
290
725
  #
291
- def begin_create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
292
- response = begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value!
726
+ def begin_create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
727
+ response = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers).value!
293
728
  response.body unless response.nil?
294
729
  end
295
730
 
296
731
  #
297
732
  # Creates a new CDN endpoint with the specified parameters.
298
733
  #
299
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
300
- # @param endpoint_properties [EndpointCreateParameters] Endpoint properties
301
- # @param profile_name [String] Name of the CDN profile within the resource
302
- # group.
303
- # @param resource_group_name [String] Name of the resource group within the
734
+ # @param resource_group_name [String] Name of the Resource group within the
304
735
  # Azure subscription.
736
+ # @param profile_name [String] Name of the CDN profile which is unique within
737
+ # the resource group.
738
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
739
+ # unique globally.
740
+ # @param endpoint [Endpoint] Endpoint properties
305
741
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
306
742
  # will be added to the HTTP request.
307
743
  #
308
744
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
309
745
  #
310
- def begin_create_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
311
- begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value!
746
+ def begin_create_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
747
+ begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers).value!
312
748
  end
313
749
 
314
750
  #
315
751
  # Creates a new CDN endpoint with the specified parameters.
316
752
  #
317
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
318
- # @param endpoint_properties [EndpointCreateParameters] Endpoint properties
319
- # @param profile_name [String] Name of the CDN profile within the resource
320
- # group.
321
- # @param resource_group_name [String] Name of the resource group within the
753
+ # @param resource_group_name [String] Name of the Resource group within the
322
754
  # Azure subscription.
755
+ # @param profile_name [String] Name of the CDN profile which is unique within
756
+ # the resource group.
757
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
758
+ # unique globally.
759
+ # @param endpoint [Endpoint] Endpoint properties
323
760
  # @param [Hash{String => String}] A hash of custom headers that will be added
324
761
  # to the HTTP request.
325
762
  #
326
763
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
327
764
  #
328
- def begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
329
- fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
330
- fail ArgumentError, 'endpoint_properties is nil' if endpoint_properties.nil?
331
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
765
+ def begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers = nil)
332
766
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
767
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
768
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
769
+ fail ArgumentError, 'endpoint is nil' if endpoint.nil?
333
770
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
334
771
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
335
772
 
@@ -343,8 +780,8 @@ module Azure::ARM::CDN
343
780
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
344
781
 
345
782
  # Serialize Request
346
- request_mapper = EndpointCreateParameters.mapper()
347
- request_content = @client.serialize(request_mapper, endpoint_properties, 'endpoint_properties')
783
+ request_mapper = Endpoint.mapper()
784
+ request_content = @client.serialize(request_mapper, endpoint, 'endpoint')
348
785
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
349
786
 
350
787
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'
@@ -353,7 +790,7 @@ module Azure::ARM::CDN
353
790
 
354
791
  options = {
355
792
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
356
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
793
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
357
794
  query_params: {'api-version' => @client.api_version},
358
795
  body: request_content,
359
796
  headers: request_headers.merge(custom_headers || {}),
@@ -405,127 +842,80 @@ module Azure::ARM::CDN
405
842
  result
406
843
  end
407
844
 
408
- promise.execute
409
- end
410
-
411
- #
412
- # Updates an existing CDN endpoint with the specified parameters. Only tags
413
- # and OriginHostHeader can be updated after creating an endpoint. To update
414
- # origins, use the Update Origin operation. To update custom domains, use the
415
- # Update Custom Domain operation.
416
- #
417
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
418
- # @param endpoint_properties [EndpointUpdateParameters] Endpoint properties
419
- # @param profile_name [String] Name of the CDN profile within the resource
420
- # group.
421
- # @param resource_group_name [String] Name of the resource group within the
422
- # Azure subscription.
423
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
424
- # will be added to the HTTP request.
425
- #
426
- # @return [Endpoint] operation results.
427
- #
428
- def update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
429
- response = update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value!
430
- response.body unless response.nil?
431
- end
432
-
433
- #
434
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
435
- # @param endpoint_properties [EndpointUpdateParameters] Endpoint properties
436
- # @param profile_name [String] Name of the CDN profile within the resource
437
- # group.
438
- # @param resource_group_name [String] Name of the resource group within the
439
- # Azure subscription.
440
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
441
- # will be added to the HTTP request.
442
- #
443
- # @return [Concurrent::Promise] promise which provides async access to http
444
- # response.
445
- #
446
- def update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
447
- # Send request
448
- promise = begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers)
449
-
450
- promise = promise.then do |response|
451
- # Defining deserialization method.
452
- deserialize_method = lambda do |parsed_response|
453
- result_mapper = Endpoint.mapper()
454
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
455
- end
456
-
457
- # Waiting for response.
458
- @client.get_long_running_operation_result(response, deserialize_method)
459
- end
460
-
461
- promise
845
+ promise.execute
462
846
  end
463
847
 
464
848
  #
465
- # Updates an existing CDN endpoint with the specified parameters. Only tags
466
- # and OriginHostHeader can be updated after creating an endpoint. To update
849
+ # Updates an existing CDN endpoint with the specified parameters. Only tags and
850
+ # OriginHostHeader can be updated after creating an endpoint. To update
467
851
  # origins, use the Update Origin operation. To update custom domains, use the
468
852
  # Update Custom Domain operation.
469
853
  #
470
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
471
- # @param endpoint_properties [EndpointUpdateParameters] Endpoint properties
472
- # @param profile_name [String] Name of the CDN profile within the resource
473
- # group.
474
- # @param resource_group_name [String] Name of the resource group within the
854
+ # @param resource_group_name [String] Name of the Resource group within the
475
855
  # Azure subscription.
856
+ # @param profile_name [String] Name of the CDN profile which is unique within
857
+ # the resource group.
858
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
859
+ # unique globally.
860
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
861
+ # properties
476
862
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
477
863
  # will be added to the HTTP request.
478
864
  #
479
865
  # @return [Endpoint] operation results.
480
866
  #
481
- def begin_update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
482
- response = begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value!
867
+ def begin_update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
868
+ response = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers).value!
483
869
  response.body unless response.nil?
484
870
  end
485
871
 
486
872
  #
487
- # Updates an existing CDN endpoint with the specified parameters. Only tags
488
- # and OriginHostHeader can be updated after creating an endpoint. To update
873
+ # Updates an existing CDN endpoint with the specified parameters. Only tags and
874
+ # OriginHostHeader can be updated after creating an endpoint. To update
489
875
  # origins, use the Update Origin operation. To update custom domains, use the
490
876
  # Update Custom Domain operation.
491
877
  #
492
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
493
- # @param endpoint_properties [EndpointUpdateParameters] Endpoint properties
494
- # @param profile_name [String] Name of the CDN profile within the resource
495
- # group.
496
- # @param resource_group_name [String] Name of the resource group within the
878
+ # @param resource_group_name [String] Name of the Resource group within the
497
879
  # Azure subscription.
880
+ # @param profile_name [String] Name of the CDN profile which is unique within
881
+ # the resource group.
882
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
883
+ # unique globally.
884
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
885
+ # properties
498
886
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
499
887
  # will be added to the HTTP request.
500
888
  #
501
889
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
502
890
  #
503
- def begin_update_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
504
- begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers).value!
891
+ def begin_update_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
892
+ begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers).value!
505
893
  end
506
894
 
507
895
  #
508
- # Updates an existing CDN endpoint with the specified parameters. Only tags
509
- # and OriginHostHeader can be updated after creating an endpoint. To update
896
+ # Updates an existing CDN endpoint with the specified parameters. Only tags and
897
+ # OriginHostHeader can be updated after creating an endpoint. To update
510
898
  # origins, use the Update Origin operation. To update custom domains, use the
511
899
  # Update Custom Domain operation.
512
900
  #
513
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
514
- # @param endpoint_properties [EndpointUpdateParameters] Endpoint properties
515
- # @param profile_name [String] Name of the CDN profile within the resource
516
- # group.
517
- # @param resource_group_name [String] Name of the resource group within the
901
+ # @param resource_group_name [String] Name of the Resource group within the
518
902
  # Azure subscription.
903
+ # @param profile_name [String] Name of the CDN profile which is unique within
904
+ # the resource group.
905
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
906
+ # unique globally.
907
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
908
+ # properties
519
909
  # @param [Hash{String => String}] A hash of custom headers that will be added
520
910
  # to the HTTP request.
521
911
  #
522
912
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
523
913
  #
524
- def begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers = nil)
525
- fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
526
- fail ArgumentError, 'endpoint_properties is nil' if endpoint_properties.nil?
527
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
914
+ def begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers = nil)
528
915
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
916
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
917
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
918
+ fail ArgumentError, 'endpoint_update_properties is nil' if endpoint_update_properties.nil?
529
919
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
530
920
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
531
921
 
@@ -540,7 +930,7 @@ module Azure::ARM::CDN
540
930
 
541
931
  # Serialize Request
542
932
  request_mapper = EndpointUpdateParameters.mapper()
543
- request_content = @client.serialize(request_mapper, endpoint_properties, 'endpoint_properties')
933
+ request_content = @client.serialize(request_mapper, endpoint_update_properties, 'endpoint_update_properties')
544
934
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
545
935
 
546
936
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'
@@ -549,7 +939,7 @@ module Azure::ARM::CDN
549
939
 
550
940
  options = {
551
941
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
552
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
942
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
553
943
  query_params: {'api-version' => @client.api_version},
554
944
  body: request_content,
555
945
  headers: request_headers.merge(custom_headers || {}),
@@ -597,98 +987,57 @@ module Azure::ARM::CDN
597
987
  #
598
988
  # Deletes an existing CDN endpoint with the specified parameters.
599
989
  #
600
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
601
- # @param profile_name [String] Name of the CDN profile within the resource
602
- # group.
603
- # @param resource_group_name [String] Name of the resource group within the
604
- # Azure subscription.
605
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
606
- # will be added to the HTTP request.
607
- #
608
- def delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
609
- response = delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
610
- nil
611
- end
612
-
613
- #
614
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
615
- # @param profile_name [String] Name of the CDN profile within the resource
616
- # group.
617
- # @param resource_group_name [String] Name of the resource group within the
618
- # Azure subscription.
619
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
620
- # will be added to the HTTP request.
621
- #
622
- # @return [Concurrent::Promise] promise which provides async access to http
623
- # response.
624
- #
625
- def delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
626
- # Send request
627
- promise = begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers)
628
-
629
- promise = promise.then do |response|
630
- # Defining deserialization method.
631
- deserialize_method = lambda do |parsed_response|
632
- end
633
-
634
- # Waiting for response.
635
- @client.get_long_running_operation_result(response, deserialize_method)
636
- end
637
-
638
- promise
639
- end
640
-
641
- #
642
- # Deletes an existing CDN endpoint with the specified parameters.
643
- #
644
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
645
- # @param profile_name [String] Name of the CDN profile within the resource
646
- # group.
647
- # @param resource_group_name [String] Name of the resource group within the
990
+ # @param resource_group_name [String] Name of the Resource group within the
648
991
  # Azure subscription.
992
+ # @param profile_name [String] Name of the CDN profile which is unique within
993
+ # the resource group.
994
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
995
+ # unique globally.
649
996
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
650
997
  # will be added to the HTTP request.
651
998
  #
652
999
  #
653
- def begin_delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
654
- response = begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
1000
+ def begin_delete(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1001
+ response = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
655
1002
  nil
656
1003
  end
657
1004
 
658
1005
  #
659
1006
  # Deletes an existing CDN endpoint with the specified parameters.
660
1007
  #
661
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
662
- # @param profile_name [String] Name of the CDN profile within the resource
663
- # group.
664
- # @param resource_group_name [String] Name of the resource group within the
1008
+ # @param resource_group_name [String] Name of the Resource group within the
665
1009
  # Azure subscription.
1010
+ # @param profile_name [String] Name of the CDN profile which is unique within
1011
+ # the resource group.
1012
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1013
+ # unique globally.
666
1014
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
667
1015
  # will be added to the HTTP request.
668
1016
  #
669
1017
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
670
1018
  #
671
- def begin_delete_if_exists_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
672
- begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
1019
+ def begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1020
+ begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
673
1021
  end
674
1022
 
675
1023
  #
676
1024
  # Deletes an existing CDN endpoint with the specified parameters.
677
1025
  #
678
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
679
- # @param profile_name [String] Name of the CDN profile within the resource
680
- # group.
681
- # @param resource_group_name [String] Name of the resource group within the
1026
+ # @param resource_group_name [String] Name of the Resource group within the
682
1027
  # Azure subscription.
1028
+ # @param profile_name [String] Name of the CDN profile which is unique within
1029
+ # the resource group.
1030
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1031
+ # unique globally.
683
1032
  # @param [Hash{String => String}] A hash of custom headers that will be added
684
1033
  # to the HTTP request.
685
1034
  #
686
1035
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
687
1036
  #
688
- def begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
689
- fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
690
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1037
+ def begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
691
1038
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1039
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1040
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
692
1041
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
693
1042
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
694
1043
 
@@ -704,7 +1053,7 @@ module Azure::ARM::CDN
704
1053
 
705
1054
  options = {
706
1055
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
707
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1056
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
708
1057
  query_params: {'api-version' => @client.api_version},
709
1058
  headers: request_headers.merge(custom_headers || {}),
710
1059
  base_url: request_url
@@ -731,103 +1080,58 @@ module Azure::ARM::CDN
731
1080
  #
732
1081
  # Starts an existing stopped CDN endpoint.
733
1082
  #
734
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
735
- # @param profile_name [String] Name of the CDN profile within the resource
736
- # group.
737
- # @param resource_group_name [String] Name of the resource group within the
738
- # Azure subscription.
739
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
740
- # will be added to the HTTP request.
741
- #
742
- # @return [Endpoint] operation results.
743
- #
744
- def start(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
745
- response = start_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
746
- response.body unless response.nil?
747
- end
748
-
749
- #
750
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
751
- # @param profile_name [String] Name of the CDN profile within the resource
752
- # group.
753
- # @param resource_group_name [String] Name of the resource group within the
754
- # Azure subscription.
755
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
756
- # will be added to the HTTP request.
757
- #
758
- # @return [Concurrent::Promise] promise which provides async access to http
759
- # response.
760
- #
761
- def start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
762
- # Send request
763
- promise = begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers)
764
-
765
- promise = promise.then do |response|
766
- # Defining deserialization method.
767
- deserialize_method = lambda do |parsed_response|
768
- result_mapper = Endpoint.mapper()
769
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
770
- end
771
-
772
- # Waiting for response.
773
- @client.get_long_running_operation_result(response, deserialize_method)
774
- end
775
-
776
- promise
777
- end
778
-
779
- #
780
- # Starts an existing stopped CDN endpoint.
781
- #
782
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
783
- # @param profile_name [String] Name of the CDN profile within the resource
784
- # group.
785
- # @param resource_group_name [String] Name of the resource group within the
1083
+ # @param resource_group_name [String] Name of the Resource group within the
786
1084
  # Azure subscription.
1085
+ # @param profile_name [String] Name of the CDN profile which is unique within
1086
+ # the resource group.
1087
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1088
+ # unique globally.
787
1089
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
788
1090
  # will be added to the HTTP request.
789
1091
  #
790
1092
  # @return [Endpoint] operation results.
791
1093
  #
792
- def begin_start(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
793
- response = begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
1094
+ def begin_start(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1095
+ response = begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
794
1096
  response.body unless response.nil?
795
1097
  end
796
1098
 
797
1099
  #
798
1100
  # Starts an existing stopped CDN endpoint.
799
1101
  #
800
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
801
- # @param profile_name [String] Name of the CDN profile within the resource
802
- # group.
803
- # @param resource_group_name [String] Name of the resource group within the
1102
+ # @param resource_group_name [String] Name of the Resource group within the
804
1103
  # Azure subscription.
1104
+ # @param profile_name [String] Name of the CDN profile which is unique within
1105
+ # the resource group.
1106
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1107
+ # unique globally.
805
1108
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
806
1109
  # will be added to the HTTP request.
807
1110
  #
808
1111
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
809
1112
  #
810
- def begin_start_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
811
- begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
1113
+ def begin_start_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1114
+ begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
812
1115
  end
813
1116
 
814
1117
  #
815
1118
  # Starts an existing stopped CDN endpoint.
816
1119
  #
817
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
818
- # @param profile_name [String] Name of the CDN profile within the resource
819
- # group.
820
- # @param resource_group_name [String] Name of the resource group within the
1120
+ # @param resource_group_name [String] Name of the Resource group within the
821
1121
  # Azure subscription.
1122
+ # @param profile_name [String] Name of the CDN profile which is unique within
1123
+ # the resource group.
1124
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1125
+ # unique globally.
822
1126
  # @param [Hash{String => String}] A hash of custom headers that will be added
823
1127
  # to the HTTP request.
824
1128
  #
825
1129
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
826
1130
  #
827
- def begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
828
- fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
829
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1131
+ def begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
830
1132
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1133
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1134
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
831
1135
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
832
1136
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
833
1137
 
@@ -843,7 +1147,7 @@ module Azure::ARM::CDN
843
1147
 
844
1148
  options = {
845
1149
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
846
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1150
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
847
1151
  query_params: {'api-version' => @client.api_version},
848
1152
  headers: request_headers.merge(custom_headers || {}),
849
1153
  base_url: request_url
@@ -880,103 +1184,58 @@ module Azure::ARM::CDN
880
1184
  #
881
1185
  # Stops an existing running CDN endpoint.
882
1186
  #
883
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
884
- # @param profile_name [String] Name of the CDN profile within the resource
885
- # group.
886
- # @param resource_group_name [String] Name of the resource group within the
887
- # Azure subscription.
888
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
889
- # will be added to the HTTP request.
890
- #
891
- # @return [Endpoint] operation results.
892
- #
893
- def stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
894
- response = stop_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
895
- response.body unless response.nil?
896
- end
897
-
898
- #
899
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
900
- # @param profile_name [String] Name of the CDN profile within the resource
901
- # group.
902
- # @param resource_group_name [String] Name of the resource group within the
903
- # Azure subscription.
904
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
905
- # will be added to the HTTP request.
906
- #
907
- # @return [Concurrent::Promise] promise which provides async access to http
908
- # response.
909
- #
910
- def stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
911
- # Send request
912
- promise = begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers)
913
-
914
- promise = promise.then do |response|
915
- # Defining deserialization method.
916
- deserialize_method = lambda do |parsed_response|
917
- result_mapper = Endpoint.mapper()
918
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
919
- end
920
-
921
- # Waiting for response.
922
- @client.get_long_running_operation_result(response, deserialize_method)
923
- end
924
-
925
- promise
926
- end
927
-
928
- #
929
- # Stops an existing running CDN endpoint.
930
- #
931
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
932
- # @param profile_name [String] Name of the CDN profile within the resource
933
- # group.
934
- # @param resource_group_name [String] Name of the resource group within the
1187
+ # @param resource_group_name [String] Name of the Resource group within the
935
1188
  # Azure subscription.
1189
+ # @param profile_name [String] Name of the CDN profile which is unique within
1190
+ # the resource group.
1191
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1192
+ # unique globally.
936
1193
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
937
1194
  # will be added to the HTTP request.
938
1195
  #
939
1196
  # @return [Endpoint] operation results.
940
1197
  #
941
- def begin_stop(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
942
- response = begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
1198
+ def begin_stop(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1199
+ response = begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
943
1200
  response.body unless response.nil?
944
1201
  end
945
1202
 
946
1203
  #
947
1204
  # Stops an existing running CDN endpoint.
948
1205
  #
949
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
950
- # @param profile_name [String] Name of the CDN profile within the resource
951
- # group.
952
- # @param resource_group_name [String] Name of the resource group within the
1206
+ # @param resource_group_name [String] Name of the Resource group within the
953
1207
  # Azure subscription.
1208
+ # @param profile_name [String] Name of the CDN profile which is unique within
1209
+ # the resource group.
1210
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1211
+ # unique globally.
954
1212
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
955
1213
  # will be added to the HTTP request.
956
1214
  #
957
1215
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
958
1216
  #
959
- def begin_stop_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
960
- begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers).value!
1217
+ def begin_stop_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1218
+ begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
961
1219
  end
962
1220
 
963
1221
  #
964
1222
  # Stops an existing running CDN endpoint.
965
1223
  #
966
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
967
- # @param profile_name [String] Name of the CDN profile within the resource
968
- # group.
969
- # @param resource_group_name [String] Name of the resource group within the
1224
+ # @param resource_group_name [String] Name of the Resource group within the
970
1225
  # Azure subscription.
1226
+ # @param profile_name [String] Name of the CDN profile which is unique within
1227
+ # the resource group.
1228
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1229
+ # unique globally.
971
1230
  # @param [Hash{String => String}] A hash of custom headers that will be added
972
1231
  # to the HTTP request.
973
1232
  #
974
1233
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
975
1234
  #
976
- def begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers = nil)
977
- fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
978
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1235
+ def begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
979
1236
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1237
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1238
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
980
1239
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
981
1240
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
982
1241
 
@@ -992,7 +1251,7 @@ module Azure::ARM::CDN
992
1251
 
993
1252
  options = {
994
1253
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
995
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1254
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
996
1255
  query_params: {'api-version' => @client.api_version},
997
1256
  headers: request_headers.merge(custom_headers || {}),
998
1257
  base_url: request_url
@@ -1029,109 +1288,67 @@ module Azure::ARM::CDN
1029
1288
  #
1030
1289
  # Forcibly purges CDN endpoint content.
1031
1290
  #
1032
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1033
- # @param content_file_paths [PurgeParameters] The path to the content to be
1034
- # purged. Path can describe a file or directory.
1035
- # @param profile_name [String] Name of the CDN profile within the resource
1036
- # group.
1037
- # @param resource_group_name [String] Name of the resource group within the
1038
- # Azure subscription.
1039
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1040
- # will be added to the HTTP request.
1041
- #
1042
- def purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1043
- response = purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value!
1044
- nil
1045
- end
1046
-
1047
- #
1048
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1049
- # @param content_file_paths [PurgeParameters] The path to the content to be
1050
- # purged. Path can describe a file or directory.
1051
- # @param profile_name [String] Name of the CDN profile within the resource
1052
- # group.
1053
- # @param resource_group_name [String] Name of the resource group within the
1291
+ # @param resource_group_name [String] Name of the Resource group within the
1054
1292
  # Azure subscription.
1055
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1056
- # will be added to the HTTP request.
1057
- #
1058
- # @return [Concurrent::Promise] promise which provides async access to http
1059
- # response.
1060
- #
1061
- def purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1062
- # Send request
1063
- promise = begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers)
1064
-
1065
- promise = promise.then do |response|
1066
- # Defining deserialization method.
1067
- deserialize_method = lambda do |parsed_response|
1068
- end
1069
-
1070
- # Waiting for response.
1071
- @client.get_long_running_operation_result(response, deserialize_method)
1072
- end
1073
-
1074
- promise
1075
- end
1076
-
1077
- #
1078
- # Forcibly purges CDN endpoint content.
1079
- #
1080
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1293
+ # @param profile_name [String] Name of the CDN profile which is unique within
1294
+ # the resource group.
1295
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1296
+ # unique globally.
1081
1297
  # @param content_file_paths [PurgeParameters] The path to the content to be
1082
- # purged. Path can describe a file or directory.
1083
- # @param profile_name [String] Name of the CDN profile within the resource
1084
- # group.
1085
- # @param resource_group_name [String] Name of the resource group within the
1086
- # Azure subscription.
1298
+ # purged. Path can describe a file or directory using the wildcard. e.g.
1299
+ # '/my/directory/*' or '/my/file.exe/'
1087
1300
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1088
1301
  # will be added to the HTTP request.
1089
1302
  #
1090
1303
  #
1091
- def begin_purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1092
- response = begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value!
1304
+ def begin_purge_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1305
+ response = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
1093
1306
  nil
1094
1307
  end
1095
1308
 
1096
1309
  #
1097
1310
  # Forcibly purges CDN endpoint content.
1098
1311
  #
1099
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1100
- # @param content_file_paths [PurgeParameters] The path to the content to be
1101
- # purged. Path can describe a file or directory.
1102
- # @param profile_name [String] Name of the CDN profile within the resource
1103
- # group.
1104
- # @param resource_group_name [String] Name of the resource group within the
1312
+ # @param resource_group_name [String] Name of the Resource group within the
1105
1313
  # Azure subscription.
1314
+ # @param profile_name [String] Name of the CDN profile which is unique within
1315
+ # the resource group.
1316
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1317
+ # unique globally.
1318
+ # @param content_file_paths [PurgeParameters] The path to the content to be
1319
+ # purged. Path can describe a file or directory using the wildcard. e.g.
1320
+ # '/my/directory/*' or '/my/file.exe/'
1106
1321
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1107
1322
  # will be added to the HTTP request.
1108
1323
  #
1109
1324
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1110
1325
  #
1111
- def begin_purge_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1112
- begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value!
1326
+ def begin_purge_content_with_http_info(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1327
+ begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
1113
1328
  end
1114
1329
 
1115
1330
  #
1116
1331
  # Forcibly purges CDN endpoint content.
1117
1332
  #
1118
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1119
- # @param content_file_paths [PurgeParameters] The path to the content to be
1120
- # purged. Path can describe a file or directory.
1121
- # @param profile_name [String] Name of the CDN profile within the resource
1122
- # group.
1123
- # @param resource_group_name [String] Name of the resource group within the
1333
+ # @param resource_group_name [String] Name of the Resource group within the
1124
1334
  # Azure subscription.
1335
+ # @param profile_name [String] Name of the CDN profile which is unique within
1336
+ # the resource group.
1337
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1338
+ # unique globally.
1339
+ # @param content_file_paths [PurgeParameters] The path to the content to be
1340
+ # purged. Path can describe a file or directory using the wildcard. e.g.
1341
+ # '/my/directory/*' or '/my/file.exe/'
1125
1342
  # @param [Hash{String => String}] A hash of custom headers that will be added
1126
1343
  # to the HTTP request.
1127
1344
  #
1128
1345
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1129
1346
  #
1130
- def begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1347
+ def begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1348
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1349
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1131
1350
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1132
1351
  fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil?
1133
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1134
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1135
1352
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1136
1353
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1137
1354
 
@@ -1155,7 +1372,7 @@ module Azure::ARM::CDN
1155
1372
 
1156
1373
  options = {
1157
1374
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1158
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1375
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1159
1376
  query_params: {'api-version' => @client.api_version},
1160
1377
  body: request_content,
1161
1378
  headers: request_headers.merge(custom_headers || {}),
@@ -1181,111 +1398,66 @@ module Azure::ARM::CDN
1181
1398
  end
1182
1399
 
1183
1400
  #
1184
- # Forcibly pre-loads CDN endpoint content.
1185
- #
1186
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1187
- # @param content_file_paths [LoadParameters] The path to the content to be
1188
- # loaded. Path should describe a file.
1189
- # @param profile_name [String] Name of the CDN profile within the resource
1190
- # group.
1191
- # @param resource_group_name [String] Name of the resource group within the
1192
- # Azure subscription.
1193
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1194
- # will be added to the HTTP request.
1195
- #
1196
- def load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1197
- response = load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value!
1198
- nil
1199
- end
1200
-
1401
+ # Forcibly pre-loads CDN endpoint content. Available for Verizon Profiles.
1201
1402
  #
1202
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1203
- # @param content_file_paths [LoadParameters] The path to the content to be
1204
- # loaded. Path should describe a file.
1205
- # @param profile_name [String] Name of the CDN profile within the resource
1206
- # group.
1207
- # @param resource_group_name [String] Name of the resource group within the
1403
+ # @param resource_group_name [String] Name of the Resource group within the
1208
1404
  # Azure subscription.
1209
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1210
- # will be added to the HTTP request.
1211
- #
1212
- # @return [Concurrent::Promise] promise which provides async access to http
1213
- # response.
1214
- #
1215
- def load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1216
- # Send request
1217
- promise = begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers)
1218
-
1219
- promise = promise.then do |response|
1220
- # Defining deserialization method.
1221
- deserialize_method = lambda do |parsed_response|
1222
- end
1223
-
1224
- # Waiting for response.
1225
- @client.get_long_running_operation_result(response, deserialize_method)
1226
- end
1227
-
1228
- promise
1229
- end
1230
-
1231
- #
1232
- # Forcibly pre-loads CDN endpoint content.
1233
- #
1234
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1405
+ # @param profile_name [String] Name of the CDN profile which is unique within
1406
+ # the resource group.
1407
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1408
+ # unique globally.
1235
1409
  # @param content_file_paths [LoadParameters] The path to the content to be
1236
1410
  # loaded. Path should describe a file.
1237
- # @param profile_name [String] Name of the CDN profile within the resource
1238
- # group.
1239
- # @param resource_group_name [String] Name of the resource group within the
1240
- # Azure subscription.
1241
1411
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1242
1412
  # will be added to the HTTP request.
1243
1413
  #
1244
1414
  #
1245
- def begin_load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1246
- response = begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value!
1415
+ def begin_load_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1416
+ response = begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
1247
1417
  nil
1248
1418
  end
1249
1419
 
1250
1420
  #
1251
- # Forcibly pre-loads CDN endpoint content.
1421
+ # Forcibly pre-loads CDN endpoint content. Available for Verizon Profiles.
1252
1422
  #
1253
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1423
+ # @param resource_group_name [String] Name of the Resource group within the
1424
+ # Azure subscription.
1425
+ # @param profile_name [String] Name of the CDN profile which is unique within
1426
+ # the resource group.
1427
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1428
+ # unique globally.
1254
1429
  # @param content_file_paths [LoadParameters] The path to the content to be
1255
1430
  # loaded. Path should describe a file.
1256
- # @param profile_name [String] Name of the CDN profile within the resource
1257
- # group.
1258
- # @param resource_group_name [String] Name of the resource group within the
1259
- # Azure subscription.
1260
1431
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1261
1432
  # will be added to the HTTP request.
1262
1433
  #
1263
1434
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1264
1435
  #
1265
- def begin_load_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1266
- begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers).value!
1436
+ def begin_load_content_with_http_info(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1437
+ begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers).value!
1267
1438
  end
1268
1439
 
1269
1440
  #
1270
- # Forcibly pre-loads CDN endpoint content.
1441
+ # Forcibly pre-loads CDN endpoint content. Available for Verizon Profiles.
1271
1442
  #
1272
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1443
+ # @param resource_group_name [String] Name of the Resource group within the
1444
+ # Azure subscription.
1445
+ # @param profile_name [String] Name of the CDN profile which is unique within
1446
+ # the resource group.
1447
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1448
+ # unique globally.
1273
1449
  # @param content_file_paths [LoadParameters] The path to the content to be
1274
1450
  # loaded. Path should describe a file.
1275
- # @param profile_name [String] Name of the CDN profile within the resource
1276
- # group.
1277
- # @param resource_group_name [String] Name of the resource group within the
1278
- # Azure subscription.
1279
1451
  # @param [Hash{String => String}] A hash of custom headers that will be added
1280
1452
  # to the HTTP request.
1281
1453
  #
1282
1454
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1283
1455
  #
1284
- def begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers = nil)
1456
+ def begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers = nil)
1457
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1458
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1285
1459
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1286
1460
  fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil?
1287
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1288
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1289
1461
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1290
1462
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1291
1463
 
@@ -1309,7 +1481,7 @@ module Azure::ARM::CDN
1309
1481
 
1310
1482
  options = {
1311
1483
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1312
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1484
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1313
1485
  query_params: {'api-version' => @client.api_version},
1314
1486
  body: request_content,
1315
1487
  headers: request_headers.merge(custom_headers || {}),
@@ -1335,69 +1507,46 @@ module Azure::ARM::CDN
1335
1507
  end
1336
1508
 
1337
1509
  #
1338
- # Validates a custom domain mapping to ensure it maps to the correct CNAME in
1339
- # DNS.
1510
+ # Lists existing CDN endpoints.
1340
1511
  #
1341
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1342
- # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
1343
- # validate.
1344
- # @param profile_name [String] Name of the CDN profile within the resource
1345
- # group.
1346
- # @param resource_group_name [String] Name of the resource group within the
1347
- # Azure subscription.
1512
+ # @param next_page_link [String] The NextLink from the previous successful call
1513
+ # to List operation.
1348
1514
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1349
1515
  # will be added to the HTTP request.
1350
1516
  #
1351
- # @return [ValidateCustomDomainOutput] operation results.
1517
+ # @return [EndpointListResult] operation results.
1352
1518
  #
1353
- def validate_custom_domain(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil)
1354
- response = validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers).value!
1519
+ def list_by_profile_next(next_page_link, custom_headers = nil)
1520
+ response = list_by_profile_next_async(next_page_link, custom_headers).value!
1355
1521
  response.body unless response.nil?
1356
1522
  end
1357
1523
 
1358
1524
  #
1359
- # Validates a custom domain mapping to ensure it maps to the correct CNAME in
1360
- # DNS.
1525
+ # Lists existing CDN endpoints.
1361
1526
  #
1362
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1363
- # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
1364
- # validate.
1365
- # @param profile_name [String] Name of the CDN profile within the resource
1366
- # group.
1367
- # @param resource_group_name [String] Name of the resource group within the
1368
- # Azure subscription.
1527
+ # @param next_page_link [String] The NextLink from the previous successful call
1528
+ # to List operation.
1369
1529
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1370
1530
  # will be added to the HTTP request.
1371
1531
  #
1372
1532
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1373
1533
  #
1374
- def validate_custom_domain_with_http_info(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil)
1375
- validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers).value!
1534
+ def list_by_profile_next_with_http_info(next_page_link, custom_headers = nil)
1535
+ list_by_profile_next_async(next_page_link, custom_headers).value!
1376
1536
  end
1377
1537
 
1378
1538
  #
1379
- # Validates a custom domain mapping to ensure it maps to the correct CNAME in
1380
- # DNS.
1539
+ # Lists existing CDN endpoints.
1381
1540
  #
1382
- # @param endpoint_name [String] Name of the endpoint within the CDN profile.
1383
- # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
1384
- # validate.
1385
- # @param profile_name [String] Name of the CDN profile within the resource
1386
- # group.
1387
- # @param resource_group_name [String] Name of the resource group within the
1388
- # Azure subscription.
1541
+ # @param next_page_link [String] The NextLink from the previous successful call
1542
+ # to List operation.
1389
1543
  # @param [Hash{String => String}] A hash of custom headers that will be added
1390
1544
  # to the HTTP request.
1391
1545
  #
1392
1546
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1393
1547
  #
1394
- def validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers = nil)
1395
- fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1396
- fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil?
1397
- fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1398
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1399
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1400
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1548
+ def list_by_profile_next_async(next_page_link, custom_headers = nil)
1549
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1401
1550
 
1402
1551
 
1403
1552
  request_headers = {}
@@ -1405,27 +1554,17 @@ module Azure::ARM::CDN
1405
1554
  # Set Headers
1406
1555
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1407
1556
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1408
-
1409
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1410
-
1411
- # Serialize Request
1412
- request_mapper = ValidateCustomDomainInput.mapper()
1413
- request_content = @client.serialize(request_mapper, custom_domain_properties, 'custom_domain_properties')
1414
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1415
-
1416
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain'
1557
+ path_template = '{nextLink}'
1417
1558
 
1418
1559
  request_url = @base_url || @client.base_url
1419
1560
 
1420
1561
  options = {
1421
1562
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1422
- path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1423
- query_params: {'api-version' => @client.api_version},
1424
- body: request_content,
1563
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1425
1564
  headers: request_headers.merge(custom_headers || {}),
1426
1565
  base_url: request_url
1427
1566
  }
1428
- promise = @client.make_request_async(:post, path_template, options)
1567
+ promise = @client.make_request_async(:get, path_template, options)
1429
1568
 
1430
1569
  promise = promise.then do |result|
1431
1570
  http_response = result.response
@@ -1441,7 +1580,7 @@ module Azure::ARM::CDN
1441
1580
  if status_code == 200
1442
1581
  begin
1443
1582
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1444
- result_mapper = ValidateCustomDomainOutput.mapper()
1583
+ result_mapper = EndpointListResult.mapper()
1445
1584
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1446
1585
  rescue Exception => e
1447
1586
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1454,5 +1593,29 @@ module Azure::ARM::CDN
1454
1593
  promise.execute
1455
1594
  end
1456
1595
 
1596
+ #
1597
+ # Lists existing CDN endpoints.
1598
+ #
1599
+ # @param resource_group_name [String] Name of the Resource group within the
1600
+ # Azure subscription.
1601
+ # @param profile_name [String] Name of the CDN profile which is unique within
1602
+ # the resource group.
1603
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1604
+ # will be added to the HTTP request.
1605
+ #
1606
+ # @return [EndpointListResult] which provide lazy access to pages of the
1607
+ # response.
1608
+ #
1609
+ def list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers = nil)
1610
+ response = list_by_profile_async(resource_group_name, profile_name, custom_headers).value!
1611
+ unless response.nil?
1612
+ page = response.body
1613
+ page.next_method = Proc.new do |next_page_link|
1614
+ list_by_profile_next_async(next_page_link, custom_headers)
1615
+ end
1616
+ page
1617
+ end
1618
+ end
1619
+
1457
1620
  end
1458
1621
  end