azure_mgmt_cdn 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_cdn/cdn_management_client.rb +268 -14
  3. data/lib/generated/azure_mgmt_cdn/custom_domains.rb +28 -28
  4. data/lib/generated/azure_mgmt_cdn/edge_nodes.rb +109 -0
  5. data/lib/generated/azure_mgmt_cdn/endpoints.rb +306 -60
  6. data/lib/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +54 -0
  7. data/lib/generated/azure_mgmt_cdn/models/custom_domain.rb +3 -5
  8. data/lib/generated/azure_mgmt_cdn/models/deep_created_origin.rb +3 -3
  9. data/lib/generated/azure_mgmt_cdn/models/edge_node.rb +97 -0
  10. data/lib/generated/azure_mgmt_cdn/models/edgenode_result.rb +53 -0
  11. data/lib/generated/azure_mgmt_cdn/models/endpoint.rb +22 -21
  12. data/lib/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +16 -15
  13. data/lib/generated/azure_mgmt_cdn/models/geo_filter.rb +5 -5
  14. data/lib/generated/azure_mgmt_cdn/models/ip_address_group.rb +80 -0
  15. data/lib/generated/azure_mgmt_cdn/models/load_parameters.rb +3 -3
  16. data/lib/generated/azure_mgmt_cdn/models/profile.rb +2 -1
  17. data/lib/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +1 -1
  18. data/lib/generated/azure_mgmt_cdn/models/purge_parameters.rb +1 -1
  19. data/lib/generated/azure_mgmt_cdn/models/resource_usage.rb +74 -0
  20. data/lib/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +94 -0
  21. data/lib/generated/azure_mgmt_cdn/models/sku.rb +2 -1
  22. data/lib/generated/azure_mgmt_cdn/models/sso_uri.rb +2 -2
  23. data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +1 -1
  24. data/lib/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +1 -1
  25. data/lib/generated/azure_mgmt_cdn/origins.rb +14 -14
  26. data/lib/generated/azure_mgmt_cdn/profiles.rb +230 -22
  27. data/lib/generated/azure_mgmt_cdn/version.rb +1 -1
  28. data/lib/generated/azure_mgmt_cdn.rb +21 -14
  29. metadata +11 -4
@@ -229,7 +229,8 @@ module Azure::ARM::CDN
229
229
  end
230
230
 
231
231
  #
232
- # Creates a new CDN endpoint with the specified parameters.
232
+ # Creates a new CDN endpoint with the specified endpoint name under the
233
+ # specified subscription, resource group and profile.
233
234
  #
234
235
  # @param resource_group_name [String] Name of the Resource group within the
235
236
  # Azure subscription.
@@ -281,10 +282,11 @@ module Azure::ARM::CDN
281
282
  end
282
283
 
283
284
  #
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.
285
+ # Updates an existing CDN endpoint with the specified endpoint name under the
286
+ # specified subscription, resource group and profile. Only tags and Origin
287
+ # HostHeader can be updated after creating an endpoint. To update origins, use
288
+ # the Update Origin operation. To update custom domains, use the Update Custom
289
+ # Domain operation.
288
290
  #
289
291
  # @param resource_group_name [String] Name of the Resource group within the
290
292
  # Azure subscription.
@@ -338,7 +340,8 @@ module Azure::ARM::CDN
338
340
  end
339
341
 
340
342
  #
341
- # Deletes an existing CDN endpoint with the specified parameters.
343
+ # Deletes an existing CDN endpoint with the specified endpoint name under the
344
+ # specified subscription, resource group and profile.
342
345
  #
343
346
  # @param resource_group_name [String] Name of the Resource group within the
344
347
  # Azure subscription.
@@ -384,7 +387,7 @@ module Azure::ARM::CDN
384
387
  end
385
388
 
386
389
  #
387
- # Starts an existing stopped CDN endpoint.
390
+ # Starts an existing CDN endpoint that is on a stopped state.
388
391
  #
389
392
  # @param resource_group_name [String] Name of the Resource group within the
390
393
  # Azure subscription.
@@ -484,7 +487,7 @@ module Azure::ARM::CDN
484
487
  end
485
488
 
486
489
  #
487
- # Forcibly purges CDN endpoint content.
490
+ # Removes a content from CDN.
488
491
  #
489
492
  # @param resource_group_name [String] Name of the Resource group within the
490
493
  # Azure subscription.
@@ -493,8 +496,9 @@ module Azure::ARM::CDN
493
496
  # @param endpoint_name [String] Name of the endpoint under the profile which is
494
497
  # unique globally.
495
498
  # @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/'
499
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
500
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
501
+ # all folders and files in the directory.
498
502
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
499
503
  # will be added to the HTTP request.
500
504
  #
@@ -511,8 +515,9 @@ module Azure::ARM::CDN
511
515
  # @param endpoint_name [String] Name of the endpoint under the profile which is
512
516
  # unique globally.
513
517
  # @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/'
518
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
519
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
520
+ # all folders and files in the directory.
516
521
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
517
522
  # will be added to the HTTP request.
518
523
  #
@@ -536,7 +541,7 @@ module Azure::ARM::CDN
536
541
  end
537
542
 
538
543
  #
539
- # Forcibly pre-loads CDN endpoint content. Available for Verizon Profiles.
544
+ # Pre-loads a content to CDN. Available for Verizon Profiles.
540
545
  #
541
546
  # @param resource_group_name [String] Name of the Resource group within the
542
547
  # Azure subscription.
@@ -545,7 +550,8 @@ module Azure::ARM::CDN
545
550
  # @param endpoint_name [String] Name of the endpoint under the profile which is
546
551
  # unique globally.
547
552
  # @param content_file_paths [LoadParameters] The path to the content to be
548
- # loaded. Path should describe a file.
553
+ # loaded. Path should be a full URL, e.g. ‘/pictires/city.png' which loads a
554
+ # single file
549
555
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
550
556
  # will be added to the HTTP request.
551
557
  #
@@ -562,7 +568,8 @@ module Azure::ARM::CDN
562
568
  # @param endpoint_name [String] Name of the endpoint under the profile which is
563
569
  # unique globally.
564
570
  # @param content_file_paths [LoadParameters] The path to the content to be
565
- # loaded. Path should describe a file.
571
+ # loaded. Path should be a full URL, e.g. ‘/pictires/city.png' which loads a
572
+ # single file
566
573
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
567
574
  # will be added to the HTTP request.
568
575
  #
@@ -586,8 +593,8 @@ module Azure::ARM::CDN
586
593
  end
587
594
 
588
595
  #
589
- # Validates a custom domain mapping to ensure it maps to the correct CNAME in
590
- # DNS.
596
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
597
+ # endpoint in DNS.
591
598
  #
592
599
  # @param resource_group_name [String] Name of the Resource group within the
593
600
  # Azure subscription.
@@ -596,7 +603,7 @@ module Azure::ARM::CDN
596
603
  # @param endpoint_name [String] Name of the endpoint under the profile which is
597
604
  # unique globally.
598
605
  # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
599
- # validate.
606
+ # be validated.
600
607
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
601
608
  # will be added to the HTTP request.
602
609
  #
@@ -608,8 +615,8 @@ module Azure::ARM::CDN
608
615
  end
609
616
 
610
617
  #
611
- # Validates a custom domain mapping to ensure it maps to the correct CNAME in
612
- # DNS.
618
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
619
+ # endpoint in DNS.
613
620
  #
614
621
  # @param resource_group_name [String] Name of the Resource group within the
615
622
  # Azure subscription.
@@ -618,7 +625,7 @@ module Azure::ARM::CDN
618
625
  # @param endpoint_name [String] Name of the endpoint under the profile which is
619
626
  # unique globally.
620
627
  # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
621
- # validate.
628
+ # be validated.
622
629
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
623
630
  # will be added to the HTTP request.
624
631
  #
@@ -629,8 +636,8 @@ module Azure::ARM::CDN
629
636
  end
630
637
 
631
638
  #
632
- # Validates a custom domain mapping to ensure it maps to the correct CNAME in
633
- # DNS.
639
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
640
+ # endpoint in DNS.
634
641
  #
635
642
  # @param resource_group_name [String] Name of the Resource group within the
636
643
  # Azure subscription.
@@ -639,7 +646,7 @@ module Azure::ARM::CDN
639
646
  # @param endpoint_name [String] Name of the endpoint under the profile which is
640
647
  # unique globally.
641
648
  # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
642
- # validate.
649
+ # be validated.
643
650
  # @param [Hash{String => String}] A hash of custom headers that will be added
644
651
  # to the HTTP request.
645
652
  #
@@ -709,7 +716,115 @@ module Azure::ARM::CDN
709
716
  end
710
717
 
711
718
  #
712
- # Creates a new CDN endpoint with the specified parameters.
719
+ # Checks the quota and usage of geo filters and custom domains under the given
720
+ # endpoint.
721
+ #
722
+ # @param resource_group_name [String] Name of the Resource group within the
723
+ # Azure subscription.
724
+ # @param profile_name [String] Name of the CDN profile which is unique within
725
+ # the resource group.
726
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
727
+ # unique globally.
728
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
729
+ # will be added to the HTTP request.
730
+ #
731
+ # @return [Array<ResourceUsage>] operation results.
732
+ #
733
+ def list_resource_usage(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
734
+ first_page = list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers)
735
+ first_page.get_all_items
736
+ end
737
+
738
+ #
739
+ # Checks the quota and usage of geo filters and custom domains under the given
740
+ # endpoint.
741
+ #
742
+ # @param resource_group_name [String] Name of the Resource group within the
743
+ # Azure subscription.
744
+ # @param profile_name [String] Name of the CDN profile which is unique within
745
+ # the resource group.
746
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
747
+ # unique globally.
748
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
749
+ # will be added to the HTTP request.
750
+ #
751
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
752
+ #
753
+ def list_resource_usage_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
754
+ list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
755
+ end
756
+
757
+ #
758
+ # Checks the quota and usage of geo filters and custom domains under the given
759
+ # endpoint.
760
+ #
761
+ # @param resource_group_name [String] Name of the Resource group within the
762
+ # Azure subscription.
763
+ # @param profile_name [String] Name of the CDN profile which is unique within
764
+ # the resource group.
765
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
766
+ # unique globally.
767
+ # @param [Hash{String => String}] A hash of custom headers that will be added
768
+ # to the HTTP request.
769
+ #
770
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
771
+ #
772
+ def list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
773
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
774
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
775
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
776
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
777
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
778
+
779
+
780
+ request_headers = {}
781
+
782
+ # Set Headers
783
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
784
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
785
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage'
786
+
787
+ request_url = @base_url || @client.base_url
788
+
789
+ options = {
790
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
791
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
792
+ query_params: {'api-version' => @client.api_version},
793
+ headers: request_headers.merge(custom_headers || {}),
794
+ base_url: request_url
795
+ }
796
+ promise = @client.make_request_async(:post, path_template, options)
797
+
798
+ promise = promise.then do |result|
799
+ http_response = result.response
800
+ status_code = http_response.status
801
+ response_content = http_response.body
802
+ unless status_code == 200
803
+ error_model = JSON.load(response_content)
804
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
805
+ end
806
+
807
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
808
+ # Deserialize Response
809
+ if status_code == 200
810
+ begin
811
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
812
+ result_mapper = ResourceUsageListResult.mapper()
813
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
814
+ rescue Exception => e
815
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
816
+ end
817
+ end
818
+
819
+ result
820
+ end
821
+
822
+ promise.execute
823
+ end
824
+
825
+ #
826
+ # Creates a new CDN endpoint with the specified endpoint name under the
827
+ # specified subscription, resource group and profile.
713
828
  #
714
829
  # @param resource_group_name [String] Name of the Resource group within the
715
830
  # Azure subscription.
@@ -729,7 +844,8 @@ module Azure::ARM::CDN
729
844
  end
730
845
 
731
846
  #
732
- # Creates a new CDN endpoint with the specified parameters.
847
+ # Creates a new CDN endpoint with the specified endpoint name under the
848
+ # specified subscription, resource group and profile.
733
849
  #
734
850
  # @param resource_group_name [String] Name of the Resource group within the
735
851
  # Azure subscription.
@@ -748,7 +864,8 @@ module Azure::ARM::CDN
748
864
  end
749
865
 
750
866
  #
751
- # Creates a new CDN endpoint with the specified parameters.
867
+ # Creates a new CDN endpoint with the specified endpoint name under the
868
+ # specified subscription, resource group and profile.
752
869
  #
753
870
  # @param resource_group_name [String] Name of the Resource group within the
754
871
  # Azure subscription.
@@ -846,10 +963,11 @@ module Azure::ARM::CDN
846
963
  end
847
964
 
848
965
  #
849
- # Updates an existing CDN endpoint with the specified parameters. Only tags and
850
- # OriginHostHeader can be updated after creating an endpoint. To update
851
- # origins, use the Update Origin operation. To update custom domains, use the
852
- # Update Custom Domain operation.
966
+ # Updates an existing CDN endpoint with the specified endpoint name under the
967
+ # specified subscription, resource group and profile. Only tags and Origin
968
+ # HostHeader can be updated after creating an endpoint. To update origins, use
969
+ # the Update Origin operation. To update custom domains, use the Update Custom
970
+ # Domain operation.
853
971
  #
854
972
  # @param resource_group_name [String] Name of the Resource group within the
855
973
  # Azure subscription.
@@ -870,10 +988,11 @@ module Azure::ARM::CDN
870
988
  end
871
989
 
872
990
  #
873
- # Updates an existing CDN endpoint with the specified parameters. Only tags and
874
- # OriginHostHeader can be updated after creating an endpoint. To update
875
- # origins, use the Update Origin operation. To update custom domains, use the
876
- # Update Custom Domain operation.
991
+ # Updates an existing CDN endpoint with the specified endpoint name under the
992
+ # specified subscription, resource group and profile. Only tags and Origin
993
+ # HostHeader can be updated after creating an endpoint. To update origins, use
994
+ # the Update Origin operation. To update custom domains, use the Update Custom
995
+ # Domain operation.
877
996
  #
878
997
  # @param resource_group_name [String] Name of the Resource group within the
879
998
  # Azure subscription.
@@ -893,10 +1012,11 @@ module Azure::ARM::CDN
893
1012
  end
894
1013
 
895
1014
  #
896
- # Updates an existing CDN endpoint with the specified parameters. Only tags and
897
- # OriginHostHeader can be updated after creating an endpoint. To update
898
- # origins, use the Update Origin operation. To update custom domains, use the
899
- # Update Custom Domain operation.
1015
+ # Updates an existing CDN endpoint with the specified endpoint name under the
1016
+ # specified subscription, resource group and profile. Only tags and Origin
1017
+ # HostHeader can be updated after creating an endpoint. To update origins, use
1018
+ # the Update Origin operation. To update custom domains, use the Update Custom
1019
+ # Domain operation.
900
1020
  #
901
1021
  # @param resource_group_name [String] Name of the Resource group within the
902
1022
  # Azure subscription.
@@ -985,7 +1105,8 @@ module Azure::ARM::CDN
985
1105
  end
986
1106
 
987
1107
  #
988
- # Deletes an existing CDN endpoint with the specified parameters.
1108
+ # Deletes an existing CDN endpoint with the specified endpoint name under the
1109
+ # specified subscription, resource group and profile.
989
1110
  #
990
1111
  # @param resource_group_name [String] Name of the Resource group within the
991
1112
  # Azure subscription.
@@ -1003,7 +1124,8 @@ module Azure::ARM::CDN
1003
1124
  end
1004
1125
 
1005
1126
  #
1006
- # Deletes an existing CDN endpoint with the specified parameters.
1127
+ # Deletes an existing CDN endpoint with the specified endpoint name under the
1128
+ # specified subscription, resource group and profile.
1007
1129
  #
1008
1130
  # @param resource_group_name [String] Name of the Resource group within the
1009
1131
  # Azure subscription.
@@ -1021,7 +1143,8 @@ module Azure::ARM::CDN
1021
1143
  end
1022
1144
 
1023
1145
  #
1024
- # Deletes an existing CDN endpoint with the specified parameters.
1146
+ # Deletes an existing CDN endpoint with the specified endpoint name under the
1147
+ # specified subscription, resource group and profile.
1025
1148
  #
1026
1149
  # @param resource_group_name [String] Name of the Resource group within the
1027
1150
  # Azure subscription.
@@ -1078,7 +1201,7 @@ module Azure::ARM::CDN
1078
1201
  end
1079
1202
 
1080
1203
  #
1081
- # Starts an existing stopped CDN endpoint.
1204
+ # Starts an existing CDN endpoint that is on a stopped state.
1082
1205
  #
1083
1206
  # @param resource_group_name [String] Name of the Resource group within the
1084
1207
  # Azure subscription.
@@ -1097,7 +1220,7 @@ module Azure::ARM::CDN
1097
1220
  end
1098
1221
 
1099
1222
  #
1100
- # Starts an existing stopped CDN endpoint.
1223
+ # Starts an existing CDN endpoint that is on a stopped state.
1101
1224
  #
1102
1225
  # @param resource_group_name [String] Name of the Resource group within the
1103
1226
  # Azure subscription.
@@ -1115,7 +1238,7 @@ module Azure::ARM::CDN
1115
1238
  end
1116
1239
 
1117
1240
  #
1118
- # Starts an existing stopped CDN endpoint.
1241
+ # Starts an existing CDN endpoint that is on a stopped state.
1119
1242
  #
1120
1243
  # @param resource_group_name [String] Name of the Resource group within the
1121
1244
  # Azure subscription.
@@ -1286,7 +1409,7 @@ module Azure::ARM::CDN
1286
1409
  end
1287
1410
 
1288
1411
  #
1289
- # Forcibly purges CDN endpoint content.
1412
+ # Removes a content from CDN.
1290
1413
  #
1291
1414
  # @param resource_group_name [String] Name of the Resource group within the
1292
1415
  # Azure subscription.
@@ -1295,8 +1418,9 @@ module Azure::ARM::CDN
1295
1418
  # @param endpoint_name [String] Name of the endpoint under the profile which is
1296
1419
  # unique globally.
1297
1420
  # @param content_file_paths [PurgeParameters] The path to the content to be
1298
- # purged. Path can describe a file or directory using the wildcard. e.g.
1299
- # '/my/directory/*' or '/my/file.exe/'
1421
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
1422
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
1423
+ # all folders and files in the directory.
1300
1424
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1301
1425
  # will be added to the HTTP request.
1302
1426
  #
@@ -1307,7 +1431,7 @@ module Azure::ARM::CDN
1307
1431
  end
1308
1432
 
1309
1433
  #
1310
- # Forcibly purges CDN endpoint content.
1434
+ # Removes a content from CDN.
1311
1435
  #
1312
1436
  # @param resource_group_name [String] Name of the Resource group within the
1313
1437
  # Azure subscription.
@@ -1316,8 +1440,9 @@ module Azure::ARM::CDN
1316
1440
  # @param endpoint_name [String] Name of the endpoint under the profile which is
1317
1441
  # unique globally.
1318
1442
  # @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/'
1443
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
1444
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
1445
+ # all folders and files in the directory.
1321
1446
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1322
1447
  # will be added to the HTTP request.
1323
1448
  #
@@ -1328,7 +1453,7 @@ module Azure::ARM::CDN
1328
1453
  end
1329
1454
 
1330
1455
  #
1331
- # Forcibly purges CDN endpoint content.
1456
+ # Removes a content from CDN.
1332
1457
  #
1333
1458
  # @param resource_group_name [String] Name of the Resource group within the
1334
1459
  # Azure subscription.
@@ -1337,8 +1462,9 @@ module Azure::ARM::CDN
1337
1462
  # @param endpoint_name [String] Name of the endpoint under the profile which is
1338
1463
  # unique globally.
1339
1464
  # @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/'
1465
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
1466
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
1467
+ # all folders and files in the directory.
1342
1468
  # @param [Hash{String => String}] A hash of custom headers that will be added
1343
1469
  # to the HTTP request.
1344
1470
  #
@@ -1398,7 +1524,7 @@ module Azure::ARM::CDN
1398
1524
  end
1399
1525
 
1400
1526
  #
1401
- # Forcibly pre-loads CDN endpoint content. Available for Verizon Profiles.
1527
+ # Pre-loads a content to CDN. Available for Verizon Profiles.
1402
1528
  #
1403
1529
  # @param resource_group_name [String] Name of the Resource group within the
1404
1530
  # Azure subscription.
@@ -1407,7 +1533,8 @@ module Azure::ARM::CDN
1407
1533
  # @param endpoint_name [String] Name of the endpoint under the profile which is
1408
1534
  # unique globally.
1409
1535
  # @param content_file_paths [LoadParameters] The path to the content to be
1410
- # loaded. Path should describe a file.
1536
+ # loaded. Path should be a full URL, e.g. ‘/pictires/city.png' which loads a
1537
+ # single file
1411
1538
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1412
1539
  # will be added to the HTTP request.
1413
1540
  #
@@ -1418,7 +1545,7 @@ module Azure::ARM::CDN
1418
1545
  end
1419
1546
 
1420
1547
  #
1421
- # Forcibly pre-loads CDN endpoint content. Available for Verizon Profiles.
1548
+ # Pre-loads a content to CDN. Available for Verizon Profiles.
1422
1549
  #
1423
1550
  # @param resource_group_name [String] Name of the Resource group within the
1424
1551
  # Azure subscription.
@@ -1427,7 +1554,8 @@ module Azure::ARM::CDN
1427
1554
  # @param endpoint_name [String] Name of the endpoint under the profile which is
1428
1555
  # unique globally.
1429
1556
  # @param content_file_paths [LoadParameters] The path to the content to be
1430
- # loaded. Path should describe a file.
1557
+ # loaded. Path should be a full URL, e.g. ‘/pictires/city.png' which loads a
1558
+ # single file
1431
1559
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1432
1560
  # will be added to the HTTP request.
1433
1561
  #
@@ -1438,7 +1566,7 @@ module Azure::ARM::CDN
1438
1566
  end
1439
1567
 
1440
1568
  #
1441
- # Forcibly pre-loads CDN endpoint content. Available for Verizon Profiles.
1569
+ # Pre-loads a content to CDN. Available for Verizon Profiles.
1442
1570
  #
1443
1571
  # @param resource_group_name [String] Name of the Resource group within the
1444
1572
  # Azure subscription.
@@ -1447,7 +1575,8 @@ module Azure::ARM::CDN
1447
1575
  # @param endpoint_name [String] Name of the endpoint under the profile which is
1448
1576
  # unique globally.
1449
1577
  # @param content_file_paths [LoadParameters] The path to the content to be
1450
- # loaded. Path should describe a file.
1578
+ # loaded. Path should be a full URL, e.g. ‘/pictires/city.png' which loads a
1579
+ # single file
1451
1580
  # @param [Hash{String => String}] A hash of custom headers that will be added
1452
1581
  # to the HTTP request.
1453
1582
  #
@@ -1593,6 +1722,96 @@ module Azure::ARM::CDN
1593
1722
  promise.execute
1594
1723
  end
1595
1724
 
1725
+ #
1726
+ # Checks the quota and usage of geo filters and custom domains under the given
1727
+ # endpoint.
1728
+ #
1729
+ # @param next_page_link [String] The NextLink from the previous successful call
1730
+ # to List operation.
1731
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1732
+ # will be added to the HTTP request.
1733
+ #
1734
+ # @return [ResourceUsageListResult] operation results.
1735
+ #
1736
+ def list_resource_usage_next(next_page_link, custom_headers = nil)
1737
+ response = list_resource_usage_next_async(next_page_link, custom_headers).value!
1738
+ response.body unless response.nil?
1739
+ end
1740
+
1741
+ #
1742
+ # Checks the quota and usage of geo filters and custom domains under the given
1743
+ # endpoint.
1744
+ #
1745
+ # @param next_page_link [String] The NextLink from the previous successful call
1746
+ # to List operation.
1747
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1748
+ # will be added to the HTTP request.
1749
+ #
1750
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1751
+ #
1752
+ def list_resource_usage_next_with_http_info(next_page_link, custom_headers = nil)
1753
+ list_resource_usage_next_async(next_page_link, custom_headers).value!
1754
+ end
1755
+
1756
+ #
1757
+ # Checks the quota and usage of geo filters and custom domains under the given
1758
+ # endpoint.
1759
+ #
1760
+ # @param next_page_link [String] The NextLink from the previous successful call
1761
+ # to List operation.
1762
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1763
+ # to the HTTP request.
1764
+ #
1765
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1766
+ #
1767
+ def list_resource_usage_next_async(next_page_link, custom_headers = nil)
1768
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1769
+
1770
+
1771
+ request_headers = {}
1772
+
1773
+ # Set Headers
1774
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1775
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1776
+ path_template = '{nextLink}'
1777
+
1778
+ request_url = @base_url || @client.base_url
1779
+
1780
+ options = {
1781
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1782
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1783
+ headers: request_headers.merge(custom_headers || {}),
1784
+ base_url: request_url
1785
+ }
1786
+ promise = @client.make_request_async(:post, path_template, options)
1787
+
1788
+ promise = promise.then do |result|
1789
+ http_response = result.response
1790
+ status_code = http_response.status
1791
+ response_content = http_response.body
1792
+ unless status_code == 200
1793
+ error_model = JSON.load(response_content)
1794
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1795
+ end
1796
+
1797
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1798
+ # Deserialize Response
1799
+ if status_code == 200
1800
+ begin
1801
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1802
+ result_mapper = ResourceUsageListResult.mapper()
1803
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1804
+ rescue Exception => e
1805
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1806
+ end
1807
+ end
1808
+
1809
+ result
1810
+ end
1811
+
1812
+ promise.execute
1813
+ end
1814
+
1596
1815
  #
1597
1816
  # Lists existing CDN endpoints.
1598
1817
  #
@@ -1617,5 +1836,32 @@ module Azure::ARM::CDN
1617
1836
  end
1618
1837
  end
1619
1838
 
1839
+ #
1840
+ # Checks the quota and usage of geo filters and custom domains under the given
1841
+ # endpoint.
1842
+ #
1843
+ # @param resource_group_name [String] Name of the Resource group within the
1844
+ # Azure subscription.
1845
+ # @param profile_name [String] Name of the CDN profile which is unique within
1846
+ # the resource group.
1847
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1848
+ # unique globally.
1849
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1850
+ # will be added to the HTTP request.
1851
+ #
1852
+ # @return [ResourceUsageListResult] which provide lazy access to pages of the
1853
+ # response.
1854
+ #
1855
+ def list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers = nil)
1856
+ response = list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers).value!
1857
+ unless response.nil?
1858
+ page = response.body
1859
+ page.next_method = Proc.new do |next_page_link|
1860
+ list_resource_usage_next_async(next_page_link, custom_headers)
1861
+ end
1862
+ page
1863
+ end
1864
+ end
1865
+
1620
1866
  end
1621
1867
  end