azure_mgmt_cdn 0.17.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (465) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2015-06-01/generated/azure_mgmt_cdn.rb +70 -0
  4. data/lib/2015-06-01/generated/azure_mgmt_cdn/cdn_management_client.rb +152 -0
  5. data/lib/2015-06-01/generated/azure_mgmt_cdn/custom_domains.rb +729 -0
  6. data/lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb +1476 -0
  7. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  8. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +69 -0
  9. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/custom_domain.rb +103 -0
  10. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +57 -0
  11. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +47 -0
  12. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  13. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/deep_created_origin.rb +82 -0
  14. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/endpoint.rb +249 -0
  15. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/endpoint_create_parameters.rb +185 -0
  16. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +56 -0
  17. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  18. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +152 -0
  19. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/error_response.rb +58 -0
  20. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  21. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/operation.rb +58 -0
  22. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/operation_display.rb +70 -0
  23. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/operation_list_result.rb +57 -0
  24. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/origin.rb +128 -0
  25. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/origin_list_result.rb +56 -0
  26. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/origin_parameters.rb +71 -0
  27. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  28. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/profile.rb +128 -0
  29. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/profile_create_parameters.rb +77 -0
  30. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/profile_list_result.rb +56 -0
  31. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  32. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  33. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
  34. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  35. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  36. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/resource.rb +81 -0
  37. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  38. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/sku.rb +48 -0
  39. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/sku_name.rb +16 -0
  40. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/sso_uri.rb +46 -0
  41. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  42. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  43. data/lib/2015-06-01/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +70 -0
  44. data/lib/2015-06-01/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  45. data/lib/2015-06-01/generated/azure_mgmt_cdn/name_availability.rb +132 -0
  46. data/lib/2015-06-01/generated/azure_mgmt_cdn/operations.rb +112 -0
  47. data/lib/2015-06-01/generated/azure_mgmt_cdn/origins.rb +788 -0
  48. data/lib/2015-06-01/generated/azure_mgmt_cdn/profiles.rb +913 -0
  49. data/lib/2016-04-02/generated/azure_mgmt_cdn.rb +70 -0
  50. data/lib/2016-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +152 -0
  51. data/lib/2016-04-02/generated/azure_mgmt_cdn/custom_domains.rb +729 -0
  52. data/lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb +1476 -0
  53. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  54. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +69 -0
  55. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain.rb +103 -0
  56. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +57 -0
  57. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +47 -0
  58. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  59. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/deep_created_origin.rb +82 -0
  60. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint.rb +249 -0
  61. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_create_parameters.rb +185 -0
  62. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +56 -0
  63. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  64. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +152 -0
  65. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/error_response.rb +58 -0
  66. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  67. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation.rb +58 -0
  68. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation_display.rb +70 -0
  69. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/operation_list_result.rb +57 -0
  70. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin.rb +128 -0
  71. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_list_result.rb +56 -0
  72. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_parameters.rb +71 -0
  73. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  74. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile.rb +128 -0
  75. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_create_parameters.rb +77 -0
  76. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_list_result.rb +56 -0
  77. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  78. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  79. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
  80. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  81. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  82. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/resource.rb +81 -0
  83. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  84. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sku.rb +49 -0
  85. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sku_name.rb +18 -0
  86. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/sso_uri.rb +46 -0
  87. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  88. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  89. data/lib/2016-04-02/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +70 -0
  90. data/lib/2016-04-02/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  91. data/lib/2016-04-02/generated/azure_mgmt_cdn/name_availability.rb +132 -0
  92. data/lib/2016-04-02/generated/azure_mgmt_cdn/operations.rb +112 -0
  93. data/lib/2016-04-02/generated/azure_mgmt_cdn/origins.rb +788 -0
  94. data/lib/2016-04-02/generated/azure_mgmt_cdn/profiles.rb +913 -0
  95. data/lib/2016-10-02/generated/azure_mgmt_cdn.rb +76 -0
  96. data/lib/2016-10-02/generated/azure_mgmt_cdn/cdn_management_client.rb +764 -0
  97. data/lib/2016-10-02/generated/azure_mgmt_cdn/custom_domains.rb +984 -0
  98. data/lib/2016-10-02/generated/azure_mgmt_cdn/edge_nodes.rb +220 -0
  99. data/lib/2016-10-02/generated/azure_mgmt_cdn/endpoints.rb +1928 -0
  100. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  101. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +69 -0
  102. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
  103. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/custom_domain.rb +151 -0
  104. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +101 -0
  105. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
  106. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  107. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
  108. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/deep_created_origin.rb +90 -0
  109. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/edge_node.rb +106 -0
  110. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/edgenode_result.rb +100 -0
  111. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/endpoint.rb +285 -0
  112. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +100 -0
  113. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  114. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +190 -0
  115. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/error_response.rb +58 -0
  116. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
  117. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  118. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
  119. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  120. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/operation.rb +58 -0
  121. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/operation_display.rb +69 -0
  122. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/operation_list_result.rb +101 -0
  123. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
  124. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/origin.rb +158 -0
  125. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/origin_list_result.rb +100 -0
  126. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  127. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +79 -0
  128. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/profile.rb +127 -0
  129. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/profile_list_result.rb +100 -0
  130. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  131. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  132. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  133. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  134. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/resource.rb +110 -0
  135. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  136. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/resource_usage.rb +79 -0
  137. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +99 -0
  138. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/sku.rb +49 -0
  139. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/sku_name.rb +19 -0
  140. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/sso_uri.rb +46 -0
  141. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/supported_optimization_types_result.rb +55 -0
  142. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  143. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +70 -0
  144. data/lib/2016-10-02/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  145. data/lib/2016-10-02/generated/azure_mgmt_cdn/origins.rb +564 -0
  146. data/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb +1484 -0
  147. data/lib/2017-04-02/generated/azure_mgmt_cdn.rb +83 -0
  148. data/lib/2017-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +363 -0
  149. data/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb +984 -0
  150. data/lib/2017-04-02/generated/azure_mgmt_cdn/edge_nodes.rb +227 -0
  151. data/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb +1948 -0
  152. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  153. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +72 -0
  154. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
  155. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_domain.rb +148 -0
  156. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +102 -0
  157. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
  158. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  159. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
  160. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb +24 -0
  161. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/deep_created_origin.rb +91 -0
  162. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/edge_node.rb +83 -0
  163. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/edgenode_result.rb +101 -0
  164. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint.rb +305 -0
  165. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +101 -0
  166. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  167. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +210 -0
  168. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/error_response.rb +60 -0
  169. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
  170. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  171. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
  172. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  173. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/operation.rb +59 -0
  174. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/operation_display.rb +72 -0
  175. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/operations_list_result.rb +102 -0
  176. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
  177. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/origin.rb +158 -0
  178. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/origin_list_result.rb +101 -0
  179. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  180. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +79 -0
  181. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile.rb +125 -0
  182. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile_list_result.rb +101 -0
  183. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  184. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  185. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/proxy_resource.rb +63 -0
  186. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  187. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  188. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/resource.rb +80 -0
  189. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  190. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/resource_usage.rb +83 -0
  191. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +100 -0
  192. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/sku.rb +49 -0
  193. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/sku_name.rb +19 -0
  194. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/sso_uri.rb +48 -0
  195. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb +56 -0
  196. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  197. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  198. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +72 -0
  199. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/validate_probe_input.rb +46 -0
  200. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/validate_probe_output.rb +73 -0
  201. data/lib/2017-04-02/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  202. data/lib/2017-04-02/generated/azure_mgmt_cdn/operations.rb +221 -0
  203. data/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb +564 -0
  204. data/lib/2017-04-02/generated/azure_mgmt_cdn/profiles.rb +1484 -0
  205. data/lib/2017-04-02/generated/azure_mgmt_cdn/resource_usage_operations.rb +230 -0
  206. data/lib/2017-10-12/generated/azure_mgmt_cdn.rb +100 -0
  207. data/lib/2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb +466 -0
  208. data/lib/2017-10-12/generated/azure_mgmt_cdn/custom_domains.rb +1003 -0
  209. data/lib/2017-10-12/generated/azure_mgmt_cdn/edge_nodes.rb +227 -0
  210. data/lib/2017-10-12/generated/azure_mgmt_cdn/endpoints.rb +1948 -0
  211. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/cache_expiration_action_parameters.rb +89 -0
  212. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/cdn_certificate_source_parameters.rb +62 -0
  213. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/cdn_managed_https_parameters.rb +73 -0
  214. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/certificate_type.rb +16 -0
  215. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  216. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +72 -0
  217. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
  218. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain.rb +148 -0
  219. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_https_parameters.rb +60 -0
  220. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +102 -0
  221. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
  222. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  223. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
  224. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb +24 -0
  225. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/deep_created_origin.rb +91 -0
  226. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule.rb +96 -0
  227. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_action.rb +46 -0
  228. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_cache_expiration_action.rb +64 -0
  229. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_condition.rb +47 -0
  230. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_url_file_extension_condition.rb +64 -0
  231. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/delivery_rule_url_path_condition.rb +64 -0
  232. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/edge_node.rb +83 -0
  233. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/edgenode_result.rb +101 -0
  234. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint.rb +318 -0
  235. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +101 -0
  236. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_delivery_policy.rb +67 -0
  237. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  238. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +223 -0
  239. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/error_response.rb +60 -0
  240. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
  241. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  242. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
  243. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/key_vault_certificate_source_parameters.rb +137 -0
  244. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  245. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operation.rb +59 -0
  246. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operation_display.rb +72 -0
  247. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operations_list_result.rb +102 -0
  248. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
  249. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin.rb +158 -0
  250. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_list_result.rb +101 -0
  251. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  252. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +79 -0
  253. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile.rb +125 -0
  254. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_list_result.rb +101 -0
  255. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  256. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  257. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/protocol_type.rb +16 -0
  258. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/proxy_resource.rb +63 -0
  259. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  260. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  261. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource.rb +80 -0
  262. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  263. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_usage.rb +83 -0
  264. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +100 -0
  265. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sku.rb +49 -0
  266. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sku_name.rb +20 -0
  267. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/sso_uri.rb +48 -0
  268. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb +56 -0
  269. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  270. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/url_file_extension_condition_parameters.rb +70 -0
  271. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/url_path_condition_parameters.rb +72 -0
  272. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/user_managed_https_parameters.rb +73 -0
  273. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  274. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +72 -0
  275. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_probe_input.rb +46 -0
  276. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/validate_probe_output.rb +73 -0
  277. data/lib/2017-10-12/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  278. data/lib/2017-10-12/generated/azure_mgmt_cdn/operations.rb +221 -0
  279. data/lib/2017-10-12/generated/azure_mgmt_cdn/origins.rb +564 -0
  280. data/lib/2017-10-12/generated/azure_mgmt_cdn/profiles.rb +1484 -0
  281. data/lib/2017-10-12/generated/azure_mgmt_cdn/resource_usage_operations.rb +230 -0
  282. data/lib/2020-04-15/generated/azure_mgmt_cdn.rb +201 -0
  283. data/lib/2020-04-15/generated/azure_mgmt_cdn/cdn_management_client.rb +478 -0
  284. data/lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb +1001 -0
  285. data/lib/2020-04-15/generated/azure_mgmt_cdn/edge_nodes.rb +225 -0
  286. data/lib/2020-04-15/generated/azure_mgmt_cdn/endpoints.rb +1946 -0
  287. data/lib/2020-04-15/generated/azure_mgmt_cdn/managed_rule_sets.rb +221 -0
  288. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/action_type.rb +18 -0
  289. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/algorithm.rb +15 -0
  290. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cache_behavior.rb +17 -0
  291. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cache_expiration_action_parameters.rb +88 -0
  292. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cache_key_query_string_action_parameters.rb +75 -0
  293. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_certificate_source_parameters.rb +62 -0
  294. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_endpoint.rb +46 -0
  295. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_managed_https_parameters.rb +82 -0
  296. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy.rb +210 -0
  297. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy_list.rb +103 -0
  298. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy_patch_parameters.rb +55 -0
  299. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/certificate_type.rb +16 -0
  300. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  301. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +72 -0
  302. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
  303. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cookies_match_condition_parameters.rb +123 -0
  304. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cookies_operator.rb +23 -0
  305. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain.rb +148 -0
  306. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain_https_parameters.rb +73 -0
  307. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +102 -0
  308. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
  309. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  310. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
  311. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb +24 -0
  312. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_rule.rb +108 -0
  313. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_rule_enabled_state.rb +16 -0
  314. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_rule_list.rb +55 -0
  315. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/deep_created_origin.rb +200 -0
  316. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/deep_created_origin_group.rb +114 -0
  317. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule.rb +107 -0
  318. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_action.rb +51 -0
  319. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_cache_expiration_action.rb +64 -0
  320. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_cache_key_query_string_action.rb +64 -0
  321. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_condition.rb +59 -0
  322. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_cookies_condition.rb +64 -0
  323. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_http_version_condition.rb +64 -0
  324. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_is_device_condition.rb +64 -0
  325. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_post_args_condition.rb +64 -0
  326. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_query_string_condition.rb +64 -0
  327. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_remote_address_condition.rb +64 -0
  328. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_body_condition.rb +64 -0
  329. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_header_action.rb +63 -0
  330. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_header_condition.rb +64 -0
  331. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_method_condition.rb +64 -0
  332. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_scheme_condition.rb +64 -0
  333. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_uri_condition.rb +64 -0
  334. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_response_header_action.rb +63 -0
  335. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_url_file_extension_condition.rb +64 -0
  336. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_url_file_name_condition.rb +64 -0
  337. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_url_path_condition.rb +64 -0
  338. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/destination_protocol.rb +17 -0
  339. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/edge_node.rb +83 -0
  340. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/edgenode_result.rb +101 -0
  341. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint.rb +391 -0
  342. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +101 -0
  343. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_delivery_policy.rb +67 -0
  344. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_web_application_firewall_policy_link.rb +49 -0
  345. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  346. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +274 -0
  347. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/error_response.rb +60 -0
  348. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
  349. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  350. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/header_action.rb +17 -0
  351. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/header_action_parameters.rb +83 -0
  352. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/health_probe_parameters.rb +90 -0
  353. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/health_probe_request_type.rb +17 -0
  354. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/http_error_range_parameters.rb +65 -0
  355. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/http_version_match_condition_parameters.rb +95 -0
  356. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
  357. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/is_device_match_condition_parameters.rb +113 -0
  358. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/key_vault_certificate_source_parameters.rb +137 -0
  359. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/key_vault_signing_key_parameters.rb +106 -0
  360. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  361. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_definition.rb +59 -0
  362. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_enabled_state.rb +16 -0
  363. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_group_definition.rb +81 -0
  364. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_group_override.rb +68 -0
  365. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_override.rb +72 -0
  366. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_set.rb +94 -0
  367. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_set_definition.rb +133 -0
  368. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_set_definition_list.rb +101 -0
  369. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_set_list.rb +55 -0
  370. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/match_condition.rb +125 -0
  371. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/match_variable.rb +23 -0
  372. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/minimum_tls_version.rb +17 -0
  373. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/operation.rb +59 -0
  374. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/operation_display.rb +72 -0
  375. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/operations_list_result.rb +102 -0
  376. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/operator.rb +26 -0
  377. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
  378. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin.rb +256 -0
  379. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_group.rb +153 -0
  380. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_group_list_result.rb +102 -0
  381. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_group_resource_state.rb +17 -0
  382. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_group_update_parameters.rb +100 -0
  383. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_list_result.rb +101 -0
  384. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  385. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +187 -0
  386. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/param_indicator.rb +17 -0
  387. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/policy_enabled_state.rb +16 -0
  388. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/policy_mode.rb +16 -0
  389. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/policy_resource_state.rb +20 -0
  390. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/policy_settings.rb +99 -0
  391. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/post_args_match_condition_parameters.rb +123 -0
  392. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/post_args_operator.rb +23 -0
  393. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/private_endpoint_status.rb +19 -0
  394. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/probe_protocol.rb +17 -0
  395. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/profile.rb +125 -0
  396. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/profile_list_result.rb +101 -0
  397. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  398. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  399. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/protocol_type.rb +16 -0
  400. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
  401. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/proxy_resource.rb +63 -0
  402. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  403. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/query_string_behavior.rb +18 -0
  404. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  405. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/query_string_match_condition_parameters.rb +114 -0
  406. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/query_string_operator.rb +23 -0
  407. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/rate_limit_rule.rb +117 -0
  408. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/rate_limit_rule_list.rb +55 -0
  409. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/redirect_type.rb +18 -0
  410. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/remote_address_match_condition_parameters.rb +114 -0
  411. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/remote_address_operator.rb +17 -0
  412. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_body_match_condition_parameters.rb +114 -0
  413. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_body_operator.rb +23 -0
  414. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_header_match_condition_parameters.rb +125 -0
  415. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_header_operator.rb +23 -0
  416. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_method_match_condition_parameters.rb +95 -0
  417. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_scheme_match_condition_parameters.rb +95 -0
  418. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_uri_match_condition_parameters.rb +113 -0
  419. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_uri_operator.rb +23 -0
  420. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource.rb +80 -0
  421. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource_reference.rb +46 -0
  422. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  423. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource_usage.rb +83 -0
  424. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +100 -0
  425. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/response_based_detected_error_types.rb +17 -0
  426. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/response_based_origin_error_detection_parameters.rb +89 -0
  427. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/sku.rb +50 -0
  428. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/sku_name.rb +21 -0
  429. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/sso_uri.rb +48 -0
  430. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb +56 -0
  431. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  432. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/transform.rb +16 -0
  433. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/transform_type.rb +20 -0
  434. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_file_extension_match_condition_parameters.rb +114 -0
  435. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_file_extension_operator.rb +23 -0
  436. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_file_name_match_condition_parameters.rb +114 -0
  437. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_file_name_operator.rb +23 -0
  438. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_path_match_condition_parameters.rb +114 -0
  439. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_path_operator.rb +24 -0
  440. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_redirect_action.rb +64 -0
  441. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_redirect_action_parameters.rb +127 -0
  442. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_rewrite_action.rb +64 -0
  443. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_rewrite_action_parameters.rb +86 -0
  444. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_signing_action_parameters.rb +112 -0
  445. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_signing_key.rb +62 -0
  446. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_signing_param_identifier.rb +58 -0
  447. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/user_managed_https_parameters.rb +82 -0
  448. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  449. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +72 -0
  450. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/validate_probe_input.rb +46 -0
  451. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/validate_probe_output.rb +73 -0
  452. data/lib/2020-04-15/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  453. data/lib/2020-04-15/generated/azure_mgmt_cdn/operations.rb +219 -0
  454. data/lib/2020-04-15/generated/azure_mgmt_cdn/origin_groups.rb +927 -0
  455. data/lib/2020-04-15/generated/azure_mgmt_cdn/origins.rb +922 -0
  456. data/lib/2020-04-15/generated/azure_mgmt_cdn/policies.rb +789 -0
  457. data/lib/2020-04-15/generated/azure_mgmt_cdn/profiles.rb +1482 -0
  458. data/lib/2020-04-15/generated/azure_mgmt_cdn/resource_usage_operations.rb +228 -0
  459. data/lib/azure_mgmt_cdn.rb +11 -0
  460. data/lib/module_definition.rb +7 -0
  461. data/lib/profiles/latest/cdn_latest_profile_client.rb +40 -0
  462. data/lib/profiles/latest/cdn_module_definition.rb +8 -0
  463. data/lib/profiles/latest/modules/cdn_profile_module.rb +735 -0
  464. data/lib/version.rb +7 -0
  465. metadata +581 -0
@@ -0,0 +1,225 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CDN::Mgmt::V2020_04_15
7
+ #
8
+ # Cdn Management Client
9
+ #
10
+ class EdgeNodes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the EdgeNodes class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [CdnManagementClient] reference to the CdnManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Edgenodes are the global Point of Presence (POP) locations used to deliver
26
+ # CDN content to end users.
27
+ #
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<EdgeNode>] operation results.
32
+ #
33
+ def list(custom_headers:nil)
34
+ first_page = list_as_lazy(custom_headers:custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Edgenodes are the global Point of Presence (POP) locations used to deliver
40
+ # CDN content to end users.
41
+ #
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(custom_headers:nil)
48
+ list_async(custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Edgenodes are the global Point of Presence (POP) locations used to deliver
53
+ # CDN content to end users.
54
+ #
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(custom_headers:nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+
63
+
64
+ request_headers = {}
65
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
+
67
+ # Set Headers
68
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
69
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
70
+ path_template = 'providers/Microsoft.Cdn/edgenodes'
71
+
72
+ request_url = @base_url || @client.base_url
73
+
74
+ options = {
75
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
76
+ query_params: {'api-version' => @client.api_version},
77
+ headers: request_headers.merge(custom_headers || {}),
78
+ base_url: request_url
79
+ }
80
+ promise = @client.make_request_async(:get, path_template, options)
81
+
82
+ promise = promise.then do |result|
83
+ http_response = result.response
84
+ status_code = http_response.status
85
+ response_content = http_response.body
86
+ unless status_code == 200
87
+ error_model = JSON.load(response_content)
88
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
89
+ end
90
+
91
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
92
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
93
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
94
+ # Deserialize Response
95
+ if status_code == 200
96
+ begin
97
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
98
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::EdgenodeResult.mapper()
99
+ result.body = @client.deserialize(result_mapper, parsed_response)
100
+ rescue Exception => e
101
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
102
+ end
103
+ end
104
+
105
+ result
106
+ end
107
+
108
+ promise.execute
109
+ end
110
+
111
+ #
112
+ # Edgenodes are the global Point of Presence (POP) locations used to deliver
113
+ # CDN content to end users.
114
+ #
115
+ # @param next_page_link [String] The NextLink from the previous successful call
116
+ # to List operation.
117
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
118
+ # will be added to the HTTP request.
119
+ #
120
+ # @return [EdgenodeResult] operation results.
121
+ #
122
+ def list_next(next_page_link, custom_headers:nil)
123
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
124
+ response.body unless response.nil?
125
+ end
126
+
127
+ #
128
+ # Edgenodes are the global Point of Presence (POP) locations used to deliver
129
+ # CDN content to end users.
130
+ #
131
+ # @param next_page_link [String] The NextLink from the previous successful call
132
+ # to List operation.
133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
+ # will be added to the HTTP request.
135
+ #
136
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
137
+ #
138
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
139
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
140
+ end
141
+
142
+ #
143
+ # Edgenodes are the global Point of Presence (POP) locations used to deliver
144
+ # CDN content to end users.
145
+ #
146
+ # @param next_page_link [String] The NextLink from the previous successful call
147
+ # to List operation.
148
+ # @param [Hash{String => String}] A hash of custom headers that will be added
149
+ # to the HTTP request.
150
+ #
151
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
152
+ #
153
+ def list_next_async(next_page_link, custom_headers:nil)
154
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
155
+
156
+
157
+ request_headers = {}
158
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
159
+
160
+ # Set Headers
161
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
162
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
163
+ path_template = '{nextLink}'
164
+
165
+ request_url = @base_url || @client.base_url
166
+
167
+ options = {
168
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
169
+ skip_encoding_path_params: {'nextLink' => next_page_link},
170
+ headers: request_headers.merge(custom_headers || {}),
171
+ base_url: request_url
172
+ }
173
+ promise = @client.make_request_async(:get, path_template, options)
174
+
175
+ promise = promise.then do |result|
176
+ http_response = result.response
177
+ status_code = http_response.status
178
+ response_content = http_response.body
179
+ unless status_code == 200
180
+ error_model = JSON.load(response_content)
181
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
182
+ end
183
+
184
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
185
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
186
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
187
+ # Deserialize Response
188
+ if status_code == 200
189
+ begin
190
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
191
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::EdgenodeResult.mapper()
192
+ result.body = @client.deserialize(result_mapper, parsed_response)
193
+ rescue Exception => e
194
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
195
+ end
196
+ end
197
+
198
+ result
199
+ end
200
+
201
+ promise.execute
202
+ end
203
+
204
+ #
205
+ # Edgenodes are the global Point of Presence (POP) locations used to deliver
206
+ # CDN content to end users.
207
+ #
208
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
209
+ # will be added to the HTTP request.
210
+ #
211
+ # @return [EdgenodeResult] which provide lazy access to pages of the response.
212
+ #
213
+ def list_as_lazy(custom_headers:nil)
214
+ response = list_async(custom_headers:custom_headers).value!
215
+ unless response.nil?
216
+ page = response.body
217
+ page.next_method = Proc.new do |next_page_link|
218
+ list_next_async(next_page_link, custom_headers:custom_headers)
219
+ end
220
+ page
221
+ end
222
+ end
223
+
224
+ end
225
+ end
@@ -0,0 +1,1946 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CDN::Mgmt::V2020_04_15
7
+ #
8
+ # Cdn Management Client
9
+ #
10
+ class Endpoints
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Endpoints class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [CdnManagementClient] reference to the CdnManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists existing CDN endpoints.
26
+ #
27
+ # @param resource_group_name [String] Name of the Resource group within the
28
+ # Azure subscription.
29
+ # @param profile_name [String] Name of the CDN profile which is unique within
30
+ # the resource group.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Array<Endpoint>] operation results.
35
+ #
36
+ def list_by_profile(resource_group_name, profile_name, custom_headers:nil)
37
+ first_page = list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers:custom_headers)
38
+ first_page.get_all_items
39
+ end
40
+
41
+ #
42
+ # Lists existing CDN endpoints.
43
+ #
44
+ # @param resource_group_name [String] Name of the Resource group within the
45
+ # Azure subscription.
46
+ # @param profile_name [String] Name of the CDN profile which is unique within
47
+ # the resource group.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_by_profile_with_http_info(resource_group_name, profile_name, custom_headers:nil)
54
+ list_by_profile_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Lists existing CDN endpoints.
59
+ #
60
+ # @param resource_group_name [String] Name of the Resource group within the
61
+ # Azure subscription.
62
+ # @param profile_name [String] Name of the CDN profile which is unique within
63
+ # the resource group.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_by_profile_async(resource_group_name, profile_name, custom_headers:nil)
70
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
71
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
72
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
73
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
74
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
75
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
76
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
109
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::EndpointListResult.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Gets an existing CDN endpoint with the specified endpoint name under the
129
+ # specified subscription, resource group and profile.
130
+ #
131
+ # @param resource_group_name [String] Name of the Resource group within the
132
+ # Azure subscription.
133
+ # @param profile_name [String] Name of the CDN profile which is unique within
134
+ # the resource group.
135
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
136
+ # unique globally.
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [Endpoint] operation results.
141
+ #
142
+ def get(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
143
+ response = get_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
144
+ response.body unless response.nil?
145
+ end
146
+
147
+ #
148
+ # Gets an existing CDN endpoint with the specified endpoint name under the
149
+ # specified subscription, resource group and profile.
150
+ #
151
+ # @param resource_group_name [String] Name of the Resource group within the
152
+ # Azure subscription.
153
+ # @param profile_name [String] Name of the CDN profile which is unique within
154
+ # the resource group.
155
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
156
+ # unique globally.
157
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
158
+ # will be added to the HTTP request.
159
+ #
160
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
161
+ #
162
+ def get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
163
+ get_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
164
+ end
165
+
166
+ #
167
+ # Gets an existing CDN endpoint with the specified endpoint name under the
168
+ # specified subscription, resource group and profile.
169
+ #
170
+ # @param resource_group_name [String] Name of the Resource group within the
171
+ # Azure subscription.
172
+ # @param profile_name [String] Name of the CDN profile which is unique within
173
+ # the resource group.
174
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
175
+ # unique globally.
176
+ # @param [Hash{String => String}] A hash of custom headers that will be added
177
+ # to the HTTP request.
178
+ #
179
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
180
+ #
181
+ def get_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
182
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
183
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
184
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
185
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
186
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
187
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
188
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
189
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
190
+
191
+
192
+ request_headers = {}
193
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
194
+
195
+ # Set Headers
196
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
197
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
198
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'
199
+
200
+ request_url = @base_url || @client.base_url
201
+
202
+ options = {
203
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
204
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
205
+ query_params: {'api-version' => @client.api_version},
206
+ headers: request_headers.merge(custom_headers || {}),
207
+ base_url: request_url
208
+ }
209
+ promise = @client.make_request_async(:get, path_template, options)
210
+
211
+ promise = promise.then do |result|
212
+ http_response = result.response
213
+ status_code = http_response.status
214
+ response_content = http_response.body
215
+ unless status_code == 200
216
+ error_model = JSON.load(response_content)
217
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
218
+ end
219
+
220
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
221
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
222
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
223
+ # Deserialize Response
224
+ if status_code == 200
225
+ begin
226
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
227
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
228
+ result.body = @client.deserialize(result_mapper, parsed_response)
229
+ rescue Exception => e
230
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
231
+ end
232
+ end
233
+
234
+ result
235
+ end
236
+
237
+ promise.execute
238
+ end
239
+
240
+ #
241
+ # Creates a new CDN endpoint with the specified endpoint name under the
242
+ # specified subscription, resource group and profile.
243
+ #
244
+ # @param resource_group_name [String] Name of the Resource group within the
245
+ # Azure subscription.
246
+ # @param profile_name [String] Name of the CDN profile which is unique within
247
+ # the resource group.
248
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
249
+ # unique globally.
250
+ # @param endpoint [Endpoint] Endpoint properties
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [Endpoint] operation results.
255
+ #
256
+ def create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
257
+ response = create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
258
+ response.body unless response.nil?
259
+ end
260
+
261
+ #
262
+ # @param resource_group_name [String] Name of the Resource group within the
263
+ # Azure subscription.
264
+ # @param profile_name [String] Name of the CDN profile which is unique within
265
+ # the resource group.
266
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
267
+ # unique globally.
268
+ # @param endpoint [Endpoint] Endpoint properties
269
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
270
+ # will be added to the HTTP request.
271
+ #
272
+ # @return [Concurrent::Promise] promise which provides async access to http
273
+ # response.
274
+ #
275
+ def create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
276
+ # Send request
277
+ promise = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers)
278
+
279
+ promise = promise.then do |response|
280
+ # Defining deserialization method.
281
+ deserialize_method = lambda do |parsed_response|
282
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
283
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
284
+ end
285
+
286
+ # Waiting for response.
287
+ @client.get_long_running_operation_result(response, deserialize_method)
288
+ end
289
+
290
+ promise
291
+ end
292
+
293
+ #
294
+ # Updates an existing CDN endpoint with the specified endpoint name under the
295
+ # specified subscription, resource group and profile. Only tags can be updated
296
+ # after creating an endpoint. To update origins, use the Update Origin
297
+ # operation. To update origin groups, use the Update Origin group operation. To
298
+ # update custom domains, use the Update Custom Domain operation.
299
+ #
300
+ # @param resource_group_name [String] Name of the Resource group within the
301
+ # Azure subscription.
302
+ # @param profile_name [String] Name of the CDN profile which is unique within
303
+ # the resource group.
304
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
305
+ # unique globally.
306
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
307
+ # properties
308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
+ # will be added to the HTTP request.
310
+ #
311
+ # @return [Endpoint] operation results.
312
+ #
313
+ def update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
314
+ response = update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
315
+ response.body unless response.nil?
316
+ end
317
+
318
+ #
319
+ # @param resource_group_name [String] Name of the Resource group within the
320
+ # Azure subscription.
321
+ # @param profile_name [String] Name of the CDN profile which is unique within
322
+ # the resource group.
323
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
324
+ # unique globally.
325
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
326
+ # properties
327
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
328
+ # will be added to the HTTP request.
329
+ #
330
+ # @return [Concurrent::Promise] promise which provides async access to http
331
+ # response.
332
+ #
333
+ def update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
334
+ # Send request
335
+ promise = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers)
336
+
337
+ promise = promise.then do |response|
338
+ # Defining deserialization method.
339
+ deserialize_method = lambda do |parsed_response|
340
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
341
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
342
+ end
343
+
344
+ # Waiting for response.
345
+ @client.get_long_running_operation_result(response, deserialize_method)
346
+ end
347
+
348
+ promise
349
+ end
350
+
351
+ #
352
+ # Deletes an existing CDN endpoint with the specified endpoint name under the
353
+ # specified subscription, resource group and profile.
354
+ #
355
+ # @param resource_group_name [String] Name of the Resource group within the
356
+ # Azure subscription.
357
+ # @param profile_name [String] Name of the CDN profile which is unique within
358
+ # the resource group.
359
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
360
+ # unique globally.
361
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
362
+ # will be added to the HTTP request.
363
+ #
364
+ def delete(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
365
+ response = delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
366
+ nil
367
+ end
368
+
369
+ #
370
+ # @param resource_group_name [String] Name of the Resource group within the
371
+ # Azure subscription.
372
+ # @param profile_name [String] Name of the CDN profile which is unique within
373
+ # the resource group.
374
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
375
+ # unique globally.
376
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
377
+ # will be added to the HTTP request.
378
+ #
379
+ # @return [Concurrent::Promise] promise which provides async access to http
380
+ # response.
381
+ #
382
+ def delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
383
+ # Send request
384
+ promise = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
385
+
386
+ promise = promise.then do |response|
387
+ # Defining deserialization method.
388
+ deserialize_method = lambda do |parsed_response|
389
+ end
390
+
391
+ # Waiting for response.
392
+ @client.get_long_running_operation_result(response, deserialize_method)
393
+ end
394
+
395
+ promise
396
+ end
397
+
398
+ #
399
+ # Starts an existing CDN endpoint that is on a stopped state.
400
+ #
401
+ # @param resource_group_name [String] Name of the Resource group within the
402
+ # Azure subscription.
403
+ # @param profile_name [String] Name of the CDN profile which is unique within
404
+ # the resource group.
405
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
406
+ # unique globally.
407
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
408
+ # will be added to the HTTP request.
409
+ #
410
+ # @return [Endpoint] operation results.
411
+ #
412
+ def start(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
413
+ response = start_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
414
+ response.body unless response.nil?
415
+ end
416
+
417
+ #
418
+ # @param resource_group_name [String] Name of the Resource group within the
419
+ # Azure subscription.
420
+ # @param profile_name [String] Name of the CDN profile which is unique within
421
+ # the resource group.
422
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
423
+ # unique globally.
424
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
425
+ # will be added to the HTTP request.
426
+ #
427
+ # @return [Concurrent::Promise] promise which provides async access to http
428
+ # response.
429
+ #
430
+ def start_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
431
+ # Send request
432
+ promise = begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
433
+
434
+ promise = promise.then do |response|
435
+ # Defining deserialization method.
436
+ deserialize_method = lambda do |parsed_response|
437
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
438
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
439
+ end
440
+
441
+ # Waiting for response.
442
+ @client.get_long_running_operation_result(response, deserialize_method)
443
+ end
444
+
445
+ promise
446
+ end
447
+
448
+ #
449
+ # Stops an existing running CDN endpoint.
450
+ #
451
+ # @param resource_group_name [String] Name of the Resource group within the
452
+ # Azure subscription.
453
+ # @param profile_name [String] Name of the CDN profile which is unique within
454
+ # the resource group.
455
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
456
+ # unique globally.
457
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
458
+ # will be added to the HTTP request.
459
+ #
460
+ # @return [Endpoint] operation results.
461
+ #
462
+ def stop(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
463
+ response = stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
464
+ response.body unless response.nil?
465
+ end
466
+
467
+ #
468
+ # @param resource_group_name [String] Name of the Resource group within the
469
+ # Azure subscription.
470
+ # @param profile_name [String] Name of the CDN profile which is unique within
471
+ # the resource group.
472
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
473
+ # unique globally.
474
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
475
+ # will be added to the HTTP request.
476
+ #
477
+ # @return [Concurrent::Promise] promise which provides async access to http
478
+ # response.
479
+ #
480
+ def stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
481
+ # Send request
482
+ promise = begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
483
+
484
+ promise = promise.then do |response|
485
+ # Defining deserialization method.
486
+ deserialize_method = lambda do |parsed_response|
487
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
488
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
489
+ end
490
+
491
+ # Waiting for response.
492
+ @client.get_long_running_operation_result(response, deserialize_method)
493
+ end
494
+
495
+ promise
496
+ end
497
+
498
+ #
499
+ # Removes a content from CDN.
500
+ #
501
+ # @param resource_group_name [String] Name of the Resource group within the
502
+ # Azure subscription.
503
+ # @param profile_name [String] Name of the CDN profile which is unique within
504
+ # the resource group.
505
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
506
+ # unique globally.
507
+ # @param content_file_paths [PurgeParameters] The path to the content to be
508
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
509
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
510
+ # all folders and files in the directory.
511
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
512
+ # will be added to the HTTP request.
513
+ #
514
+ def purge_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
515
+ response = purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
516
+ nil
517
+ end
518
+
519
+ #
520
+ # @param resource_group_name [String] Name of the Resource group within the
521
+ # Azure subscription.
522
+ # @param profile_name [String] Name of the CDN profile which is unique within
523
+ # the resource group.
524
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
525
+ # unique globally.
526
+ # @param content_file_paths [PurgeParameters] The path to the content to be
527
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
528
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
529
+ # all folders and files in the directory.
530
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
531
+ # will be added to the HTTP request.
532
+ #
533
+ # @return [Concurrent::Promise] promise which provides async access to http
534
+ # response.
535
+ #
536
+ def purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
537
+ # Send request
538
+ promise = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers)
539
+
540
+ promise = promise.then do |response|
541
+ # Defining deserialization method.
542
+ deserialize_method = lambda do |parsed_response|
543
+ end
544
+
545
+ # Waiting for response.
546
+ @client.get_long_running_operation_result(response, deserialize_method)
547
+ end
548
+
549
+ promise
550
+ end
551
+
552
+ #
553
+ # Pre-loads a content to CDN. Available for Verizon Profiles.
554
+ #
555
+ # @param resource_group_name [String] Name of the Resource group within the
556
+ # Azure subscription.
557
+ # @param profile_name [String] Name of the CDN profile which is unique within
558
+ # the resource group.
559
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
560
+ # unique globally.
561
+ # @param content_file_paths [LoadParameters] The path to the content to be
562
+ # loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads a
563
+ # single file
564
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
565
+ # will be added to the HTTP request.
566
+ #
567
+ def load_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
568
+ response = load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
569
+ nil
570
+ end
571
+
572
+ #
573
+ # @param resource_group_name [String] Name of the Resource group within the
574
+ # Azure subscription.
575
+ # @param profile_name [String] Name of the CDN profile which is unique within
576
+ # the resource group.
577
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
578
+ # unique globally.
579
+ # @param content_file_paths [LoadParameters] The path to the content to be
580
+ # loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads a
581
+ # single file
582
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
583
+ # will be added to the HTTP request.
584
+ #
585
+ # @return [Concurrent::Promise] promise which provides async access to http
586
+ # response.
587
+ #
588
+ def load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
589
+ # Send request
590
+ promise = begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers)
591
+
592
+ promise = promise.then do |response|
593
+ # Defining deserialization method.
594
+ deserialize_method = lambda do |parsed_response|
595
+ end
596
+
597
+ # Waiting for response.
598
+ @client.get_long_running_operation_result(response, deserialize_method)
599
+ end
600
+
601
+ promise
602
+ end
603
+
604
+ #
605
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
606
+ # endpoint in DNS.
607
+ #
608
+ # @param resource_group_name [String] Name of the Resource group within the
609
+ # Azure subscription.
610
+ # @param profile_name [String] Name of the CDN profile which is unique within
611
+ # the resource group.
612
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
613
+ # unique globally.
614
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
615
+ # be validated.
616
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
617
+ # will be added to the HTTP request.
618
+ #
619
+ # @return [ValidateCustomDomainOutput] operation results.
620
+ #
621
+ def validate_custom_domain(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
622
+ response = validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:custom_headers).value!
623
+ response.body unless response.nil?
624
+ end
625
+
626
+ #
627
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
628
+ # endpoint in DNS.
629
+ #
630
+ # @param resource_group_name [String] Name of the Resource group within the
631
+ # Azure subscription.
632
+ # @param profile_name [String] Name of the CDN profile which is unique within
633
+ # the resource group.
634
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
635
+ # unique globally.
636
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
637
+ # be validated.
638
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
639
+ # will be added to the HTTP request.
640
+ #
641
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
642
+ #
643
+ def validate_custom_domain_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
644
+ validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:custom_headers).value!
645
+ end
646
+
647
+ #
648
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
649
+ # endpoint in DNS.
650
+ #
651
+ # @param resource_group_name [String] Name of the Resource group within the
652
+ # Azure subscription.
653
+ # @param profile_name [String] Name of the CDN profile which is unique within
654
+ # the resource group.
655
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
656
+ # unique globally.
657
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
658
+ # be validated.
659
+ # @param [Hash{String => String}] A hash of custom headers that will be added
660
+ # to the HTTP request.
661
+ #
662
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
663
+ #
664
+ def validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
665
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
666
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
667
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
668
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
669
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
670
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
671
+ fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil?
672
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
673
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
674
+
675
+
676
+ request_headers = {}
677
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
678
+
679
+ # Set Headers
680
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
681
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
682
+
683
+ # Serialize Request
684
+ request_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::ValidateCustomDomainInput.mapper()
685
+ request_content = @client.serialize(request_mapper, custom_domain_properties)
686
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
687
+
688
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain'
689
+
690
+ request_url = @base_url || @client.base_url
691
+
692
+ options = {
693
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
694
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
695
+ query_params: {'api-version' => @client.api_version},
696
+ body: request_content,
697
+ headers: request_headers.merge(custom_headers || {}),
698
+ base_url: request_url
699
+ }
700
+ promise = @client.make_request_async(:post, path_template, options)
701
+
702
+ promise = promise.then do |result|
703
+ http_response = result.response
704
+ status_code = http_response.status
705
+ response_content = http_response.body
706
+ unless status_code == 200
707
+ error_model = JSON.load(response_content)
708
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
709
+ end
710
+
711
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
712
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
713
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
714
+ # Deserialize Response
715
+ if status_code == 200
716
+ begin
717
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
718
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::ValidateCustomDomainOutput.mapper()
719
+ result.body = @client.deserialize(result_mapper, parsed_response)
720
+ rescue Exception => e
721
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
722
+ end
723
+ end
724
+
725
+ result
726
+ end
727
+
728
+ promise.execute
729
+ end
730
+
731
+ #
732
+ # Checks the quota and usage of geo filters and custom domains under the given
733
+ # endpoint.
734
+ #
735
+ # @param resource_group_name [String] Name of the Resource group within the
736
+ # Azure subscription.
737
+ # @param profile_name [String] Name of the CDN profile which is unique within
738
+ # the resource group.
739
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
740
+ # unique globally.
741
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
742
+ # will be added to the HTTP request.
743
+ #
744
+ # @return [Array<ResourceUsage>] operation results.
745
+ #
746
+ def list_resource_usage(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
747
+ first_page = list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
748
+ first_page.get_all_items
749
+ end
750
+
751
+ #
752
+ # Checks the quota and usage of geo filters and custom domains under the given
753
+ # endpoint.
754
+ #
755
+ # @param resource_group_name [String] Name of the Resource group within the
756
+ # Azure subscription.
757
+ # @param profile_name [String] Name of the CDN profile which is unique within
758
+ # the resource group.
759
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
760
+ # unique globally.
761
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
762
+ # will be added to the HTTP request.
763
+ #
764
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
765
+ #
766
+ def list_resource_usage_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
767
+ list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
768
+ end
769
+
770
+ #
771
+ # Checks the quota and usage of geo filters and custom domains under the given
772
+ # endpoint.
773
+ #
774
+ # @param resource_group_name [String] Name of the Resource group within the
775
+ # Azure subscription.
776
+ # @param profile_name [String] Name of the CDN profile which is unique within
777
+ # the resource group.
778
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
779
+ # unique globally.
780
+ # @param [Hash{String => String}] A hash of custom headers that will be added
781
+ # to the HTTP request.
782
+ #
783
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
784
+ #
785
+ def list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
786
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
787
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
788
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
789
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
790
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
791
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
792
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
793
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
794
+
795
+
796
+ request_headers = {}
797
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
798
+
799
+ # Set Headers
800
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
801
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
802
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage'
803
+
804
+ request_url = @base_url || @client.base_url
805
+
806
+ options = {
807
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
808
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
809
+ query_params: {'api-version' => @client.api_version},
810
+ headers: request_headers.merge(custom_headers || {}),
811
+ base_url: request_url
812
+ }
813
+ promise = @client.make_request_async(:post, path_template, options)
814
+
815
+ promise = promise.then do |result|
816
+ http_response = result.response
817
+ status_code = http_response.status
818
+ response_content = http_response.body
819
+ unless status_code == 200
820
+ error_model = JSON.load(response_content)
821
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
822
+ end
823
+
824
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
825
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
826
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
827
+ # Deserialize Response
828
+ if status_code == 200
829
+ begin
830
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
831
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::ResourceUsageListResult.mapper()
832
+ result.body = @client.deserialize(result_mapper, parsed_response)
833
+ rescue Exception => e
834
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
835
+ end
836
+ end
837
+
838
+ result
839
+ end
840
+
841
+ promise.execute
842
+ end
843
+
844
+ #
845
+ # Creates a new CDN endpoint with the specified endpoint name under the
846
+ # specified subscription, resource group and profile.
847
+ #
848
+ # @param resource_group_name [String] Name of the Resource group within the
849
+ # Azure subscription.
850
+ # @param profile_name [String] Name of the CDN profile which is unique within
851
+ # the resource group.
852
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
853
+ # unique globally.
854
+ # @param endpoint [Endpoint] Endpoint properties
855
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
856
+ # will be added to the HTTP request.
857
+ #
858
+ # @return [Endpoint] operation results.
859
+ #
860
+ def begin_create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
861
+ response = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
862
+ response.body unless response.nil?
863
+ end
864
+
865
+ #
866
+ # Creates a new CDN endpoint with the specified endpoint name under the
867
+ # specified subscription, resource group and profile.
868
+ #
869
+ # @param resource_group_name [String] Name of the Resource group within the
870
+ # Azure subscription.
871
+ # @param profile_name [String] Name of the CDN profile which is unique within
872
+ # the resource group.
873
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
874
+ # unique globally.
875
+ # @param endpoint [Endpoint] Endpoint properties
876
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
877
+ # will be added to the HTTP request.
878
+ #
879
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
880
+ #
881
+ def begin_create_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
882
+ begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
883
+ end
884
+
885
+ #
886
+ # Creates a new CDN endpoint with the specified endpoint name under the
887
+ # specified subscription, resource group and profile.
888
+ #
889
+ # @param resource_group_name [String] Name of the Resource group within the
890
+ # Azure subscription.
891
+ # @param profile_name [String] Name of the CDN profile which is unique within
892
+ # the resource group.
893
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
894
+ # unique globally.
895
+ # @param endpoint [Endpoint] Endpoint properties
896
+ # @param [Hash{String => String}] A hash of custom headers that will be added
897
+ # to the HTTP request.
898
+ #
899
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
900
+ #
901
+ def begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
902
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
903
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
904
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
905
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
906
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
907
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
908
+ fail ArgumentError, 'endpoint is nil' if endpoint.nil?
909
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
910
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
911
+
912
+
913
+ request_headers = {}
914
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
915
+
916
+ # Set Headers
917
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
918
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
919
+
920
+ # Serialize Request
921
+ request_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
922
+ request_content = @client.serialize(request_mapper, endpoint)
923
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
924
+
925
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'
926
+
927
+ request_url = @base_url || @client.base_url
928
+
929
+ options = {
930
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
931
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
932
+ query_params: {'api-version' => @client.api_version},
933
+ body: request_content,
934
+ headers: request_headers.merge(custom_headers || {}),
935
+ base_url: request_url
936
+ }
937
+ promise = @client.make_request_async(:put, path_template, options)
938
+
939
+ promise = promise.then do |result|
940
+ http_response = result.response
941
+ status_code = http_response.status
942
+ response_content = http_response.body
943
+ unless status_code == 200 || status_code == 201 || status_code == 202
944
+ error_model = JSON.load(response_content)
945
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
946
+ end
947
+
948
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
949
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
950
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
951
+ # Deserialize Response
952
+ if status_code == 200
953
+ begin
954
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
955
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
956
+ result.body = @client.deserialize(result_mapper, parsed_response)
957
+ rescue Exception => e
958
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
959
+ end
960
+ end
961
+ # Deserialize Response
962
+ if status_code == 201
963
+ begin
964
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
965
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
966
+ result.body = @client.deserialize(result_mapper, parsed_response)
967
+ rescue Exception => e
968
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
969
+ end
970
+ end
971
+ # Deserialize Response
972
+ if status_code == 202
973
+ begin
974
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
975
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
976
+ result.body = @client.deserialize(result_mapper, parsed_response)
977
+ rescue Exception => e
978
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
979
+ end
980
+ end
981
+
982
+ result
983
+ end
984
+
985
+ promise.execute
986
+ end
987
+
988
+ #
989
+ # Updates an existing CDN endpoint with the specified endpoint name under the
990
+ # specified subscription, resource group and profile. Only tags can be updated
991
+ # after creating an endpoint. To update origins, use the Update Origin
992
+ # operation. To update origin groups, use the Update Origin group operation. To
993
+ # update custom domains, use the Update Custom Domain operation.
994
+ #
995
+ # @param resource_group_name [String] Name of the Resource group within the
996
+ # Azure subscription.
997
+ # @param profile_name [String] Name of the CDN profile which is unique within
998
+ # the resource group.
999
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1000
+ # unique globally.
1001
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
1002
+ # properties
1003
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1004
+ # will be added to the HTTP request.
1005
+ #
1006
+ # @return [Endpoint] operation results.
1007
+ #
1008
+ def begin_update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
1009
+ response = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
1010
+ response.body unless response.nil?
1011
+ end
1012
+
1013
+ #
1014
+ # Updates an existing CDN endpoint with the specified endpoint name under the
1015
+ # specified subscription, resource group and profile. Only tags can be updated
1016
+ # after creating an endpoint. To update origins, use the Update Origin
1017
+ # operation. To update origin groups, use the Update Origin group operation. To
1018
+ # update custom domains, use the Update Custom Domain operation.
1019
+ #
1020
+ # @param resource_group_name [String] Name of the Resource group within the
1021
+ # Azure subscription.
1022
+ # @param profile_name [String] Name of the CDN profile which is unique within
1023
+ # the resource group.
1024
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1025
+ # unique globally.
1026
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
1027
+ # properties
1028
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1029
+ # will be added to the HTTP request.
1030
+ #
1031
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1032
+ #
1033
+ def begin_update_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
1034
+ begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
1035
+ end
1036
+
1037
+ #
1038
+ # Updates an existing CDN endpoint with the specified endpoint name under the
1039
+ # specified subscription, resource group and profile. Only tags can be updated
1040
+ # after creating an endpoint. To update origins, use the Update Origin
1041
+ # operation. To update origin groups, use the Update Origin group operation. To
1042
+ # update custom domains, use the Update Custom Domain operation.
1043
+ #
1044
+ # @param resource_group_name [String] Name of the Resource group within the
1045
+ # Azure subscription.
1046
+ # @param profile_name [String] Name of the CDN profile which is unique within
1047
+ # the resource group.
1048
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1049
+ # unique globally.
1050
+ # @param endpoint_update_properties [EndpointUpdateParameters] Endpoint update
1051
+ # properties
1052
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1053
+ # to the HTTP request.
1054
+ #
1055
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1056
+ #
1057
+ def begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
1058
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1059
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1060
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1061
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1062
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1063
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1064
+ fail ArgumentError, 'endpoint_update_properties is nil' if endpoint_update_properties.nil?
1065
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1066
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1067
+
1068
+
1069
+ request_headers = {}
1070
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1071
+
1072
+ # Set Headers
1073
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1074
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1075
+
1076
+ # Serialize Request
1077
+ request_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::EndpointUpdateParameters.mapper()
1078
+ request_content = @client.serialize(request_mapper, endpoint_update_properties)
1079
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1080
+
1081
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'
1082
+
1083
+ request_url = @base_url || @client.base_url
1084
+
1085
+ options = {
1086
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1087
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1088
+ query_params: {'api-version' => @client.api_version},
1089
+ body: request_content,
1090
+ headers: request_headers.merge(custom_headers || {}),
1091
+ base_url: request_url
1092
+ }
1093
+ promise = @client.make_request_async(:patch, path_template, options)
1094
+
1095
+ promise = promise.then do |result|
1096
+ http_response = result.response
1097
+ status_code = http_response.status
1098
+ response_content = http_response.body
1099
+ unless status_code == 200 || status_code == 202
1100
+ error_model = JSON.load(response_content)
1101
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1102
+ end
1103
+
1104
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1105
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1106
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1107
+ # Deserialize Response
1108
+ if status_code == 200
1109
+ begin
1110
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1111
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
1112
+ result.body = @client.deserialize(result_mapper, parsed_response)
1113
+ rescue Exception => e
1114
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1115
+ end
1116
+ end
1117
+ # Deserialize Response
1118
+ if status_code == 202
1119
+ begin
1120
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1121
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
1122
+ result.body = @client.deserialize(result_mapper, parsed_response)
1123
+ rescue Exception => e
1124
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1125
+ end
1126
+ end
1127
+
1128
+ result
1129
+ end
1130
+
1131
+ promise.execute
1132
+ end
1133
+
1134
+ #
1135
+ # Deletes an existing CDN endpoint with the specified endpoint name under the
1136
+ # specified subscription, resource group and profile.
1137
+ #
1138
+ # @param resource_group_name [String] Name of the Resource group within the
1139
+ # Azure subscription.
1140
+ # @param profile_name [String] Name of the CDN profile which is unique within
1141
+ # the resource group.
1142
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1143
+ # unique globally.
1144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1145
+ # will be added to the HTTP request.
1146
+ #
1147
+ #
1148
+ def begin_delete(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1149
+ response = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1150
+ nil
1151
+ end
1152
+
1153
+ #
1154
+ # Deletes an existing CDN endpoint with the specified endpoint name under the
1155
+ # specified subscription, resource group and profile.
1156
+ #
1157
+ # @param resource_group_name [String] Name of the Resource group within the
1158
+ # Azure subscription.
1159
+ # @param profile_name [String] Name of the CDN profile which is unique within
1160
+ # the resource group.
1161
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1162
+ # unique globally.
1163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1164
+ # will be added to the HTTP request.
1165
+ #
1166
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1167
+ #
1168
+ def begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1169
+ begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1170
+ end
1171
+
1172
+ #
1173
+ # Deletes an existing CDN endpoint with the specified endpoint name under the
1174
+ # specified subscription, resource group and profile.
1175
+ #
1176
+ # @param resource_group_name [String] Name of the Resource group within the
1177
+ # Azure subscription.
1178
+ # @param profile_name [String] Name of the CDN profile which is unique within
1179
+ # the resource group.
1180
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1181
+ # unique globally.
1182
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1183
+ # to the HTTP request.
1184
+ #
1185
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1186
+ #
1187
+ def begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1188
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1189
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1190
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1191
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1192
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1193
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1194
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1195
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1196
+
1197
+
1198
+ request_headers = {}
1199
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1200
+
1201
+ # Set Headers
1202
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1203
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1204
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'
1205
+
1206
+ request_url = @base_url || @client.base_url
1207
+
1208
+ options = {
1209
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1210
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1211
+ query_params: {'api-version' => @client.api_version},
1212
+ headers: request_headers.merge(custom_headers || {}),
1213
+ base_url: request_url
1214
+ }
1215
+ promise = @client.make_request_async(:delete, path_template, options)
1216
+
1217
+ promise = promise.then do |result|
1218
+ http_response = result.response
1219
+ status_code = http_response.status
1220
+ response_content = http_response.body
1221
+ unless status_code == 202 || status_code == 204
1222
+ error_model = JSON.load(response_content)
1223
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1224
+ end
1225
+
1226
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1227
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1228
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1229
+
1230
+ result
1231
+ end
1232
+
1233
+ promise.execute
1234
+ end
1235
+
1236
+ #
1237
+ # Starts an existing CDN endpoint that is on a stopped state.
1238
+ #
1239
+ # @param resource_group_name [String] Name of the Resource group within the
1240
+ # Azure subscription.
1241
+ # @param profile_name [String] Name of the CDN profile which is unique within
1242
+ # the resource group.
1243
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1244
+ # unique globally.
1245
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1246
+ # will be added to the HTTP request.
1247
+ #
1248
+ # @return [Endpoint] operation results.
1249
+ #
1250
+ def begin_start(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1251
+ response = begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1252
+ response.body unless response.nil?
1253
+ end
1254
+
1255
+ #
1256
+ # Starts an existing CDN endpoint that is on a stopped state.
1257
+ #
1258
+ # @param resource_group_name [String] Name of the Resource group within the
1259
+ # Azure subscription.
1260
+ # @param profile_name [String] Name of the CDN profile which is unique within
1261
+ # the resource group.
1262
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1263
+ # unique globally.
1264
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1265
+ # will be added to the HTTP request.
1266
+ #
1267
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1268
+ #
1269
+ def begin_start_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1270
+ begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1271
+ end
1272
+
1273
+ #
1274
+ # Starts an existing CDN endpoint that is on a stopped state.
1275
+ #
1276
+ # @param resource_group_name [String] Name of the Resource group within the
1277
+ # Azure subscription.
1278
+ # @param profile_name [String] Name of the CDN profile which is unique within
1279
+ # the resource group.
1280
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1281
+ # unique globally.
1282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1283
+ # to the HTTP request.
1284
+ #
1285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1286
+ #
1287
+ def begin_start_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1288
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1289
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1290
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1291
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1292
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1293
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1294
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1295
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1296
+
1297
+
1298
+ request_headers = {}
1299
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1300
+
1301
+ # Set Headers
1302
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1303
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1304
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start'
1305
+
1306
+ request_url = @base_url || @client.base_url
1307
+
1308
+ options = {
1309
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1310
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1311
+ query_params: {'api-version' => @client.api_version},
1312
+ headers: request_headers.merge(custom_headers || {}),
1313
+ base_url: request_url
1314
+ }
1315
+ promise = @client.make_request_async(:post, path_template, options)
1316
+
1317
+ promise = promise.then do |result|
1318
+ http_response = result.response
1319
+ status_code = http_response.status
1320
+ response_content = http_response.body
1321
+ unless status_code == 200 || status_code == 202
1322
+ error_model = JSON.load(response_content)
1323
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1324
+ end
1325
+
1326
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1327
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1328
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1329
+ # Deserialize Response
1330
+ if status_code == 200
1331
+ begin
1332
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1333
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
1334
+ result.body = @client.deserialize(result_mapper, parsed_response)
1335
+ rescue Exception => e
1336
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1337
+ end
1338
+ end
1339
+ # Deserialize Response
1340
+ if status_code == 202
1341
+ begin
1342
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1343
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
1344
+ result.body = @client.deserialize(result_mapper, parsed_response)
1345
+ rescue Exception => e
1346
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1347
+ end
1348
+ end
1349
+
1350
+ result
1351
+ end
1352
+
1353
+ promise.execute
1354
+ end
1355
+
1356
+ #
1357
+ # Stops an existing running CDN endpoint.
1358
+ #
1359
+ # @param resource_group_name [String] Name of the Resource group within the
1360
+ # Azure subscription.
1361
+ # @param profile_name [String] Name of the CDN profile which is unique within
1362
+ # the resource group.
1363
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1364
+ # unique globally.
1365
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1366
+ # will be added to the HTTP request.
1367
+ #
1368
+ # @return [Endpoint] operation results.
1369
+ #
1370
+ def begin_stop(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1371
+ response = begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1372
+ response.body unless response.nil?
1373
+ end
1374
+
1375
+ #
1376
+ # Stops an existing running CDN endpoint.
1377
+ #
1378
+ # @param resource_group_name [String] Name of the Resource group within the
1379
+ # Azure subscription.
1380
+ # @param profile_name [String] Name of the CDN profile which is unique within
1381
+ # the resource group.
1382
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1383
+ # unique globally.
1384
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1385
+ # will be added to the HTTP request.
1386
+ #
1387
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1388
+ #
1389
+ def begin_stop_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1390
+ begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1391
+ end
1392
+
1393
+ #
1394
+ # Stops an existing running CDN endpoint.
1395
+ #
1396
+ # @param resource_group_name [String] Name of the Resource group within the
1397
+ # Azure subscription.
1398
+ # @param profile_name [String] Name of the CDN profile which is unique within
1399
+ # the resource group.
1400
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1401
+ # unique globally.
1402
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1403
+ # to the HTTP request.
1404
+ #
1405
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1406
+ #
1407
+ def begin_stop_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1408
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1409
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1410
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1411
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1412
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1413
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1414
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1415
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1416
+
1417
+
1418
+ request_headers = {}
1419
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1420
+
1421
+ # Set Headers
1422
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1423
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1424
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop'
1425
+
1426
+ request_url = @base_url || @client.base_url
1427
+
1428
+ options = {
1429
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1430
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1431
+ query_params: {'api-version' => @client.api_version},
1432
+ headers: request_headers.merge(custom_headers || {}),
1433
+ base_url: request_url
1434
+ }
1435
+ promise = @client.make_request_async(:post, path_template, options)
1436
+
1437
+ promise = promise.then do |result|
1438
+ http_response = result.response
1439
+ status_code = http_response.status
1440
+ response_content = http_response.body
1441
+ unless status_code == 200 || status_code == 202
1442
+ error_model = JSON.load(response_content)
1443
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1444
+ end
1445
+
1446
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1447
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1448
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1449
+ # Deserialize Response
1450
+ if status_code == 200
1451
+ begin
1452
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1453
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
1454
+ result.body = @client.deserialize(result_mapper, parsed_response)
1455
+ rescue Exception => e
1456
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1457
+ end
1458
+ end
1459
+ # Deserialize Response
1460
+ if status_code == 202
1461
+ begin
1462
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1463
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::Endpoint.mapper()
1464
+ result.body = @client.deserialize(result_mapper, parsed_response)
1465
+ rescue Exception => e
1466
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1467
+ end
1468
+ end
1469
+
1470
+ result
1471
+ end
1472
+
1473
+ promise.execute
1474
+ end
1475
+
1476
+ #
1477
+ # Removes a content from CDN.
1478
+ #
1479
+ # @param resource_group_name [String] Name of the Resource group within the
1480
+ # Azure subscription.
1481
+ # @param profile_name [String] Name of the CDN profile which is unique within
1482
+ # the resource group.
1483
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1484
+ # unique globally.
1485
+ # @param content_file_paths [PurgeParameters] The path to the content to be
1486
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
1487
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
1488
+ # all folders and files in the directory.
1489
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1490
+ # will be added to the HTTP request.
1491
+ #
1492
+ #
1493
+ def begin_purge_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1494
+ response = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
1495
+ nil
1496
+ end
1497
+
1498
+ #
1499
+ # Removes a content from CDN.
1500
+ #
1501
+ # @param resource_group_name [String] Name of the Resource group within the
1502
+ # Azure subscription.
1503
+ # @param profile_name [String] Name of the CDN profile which is unique within
1504
+ # the resource group.
1505
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1506
+ # unique globally.
1507
+ # @param content_file_paths [PurgeParameters] The path to the content to be
1508
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
1509
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
1510
+ # all folders and files in the directory.
1511
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1512
+ # will be added to the HTTP request.
1513
+ #
1514
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1515
+ #
1516
+ def begin_purge_content_with_http_info(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1517
+ begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
1518
+ end
1519
+
1520
+ #
1521
+ # Removes a content from CDN.
1522
+ #
1523
+ # @param resource_group_name [String] Name of the Resource group within the
1524
+ # Azure subscription.
1525
+ # @param profile_name [String] Name of the CDN profile which is unique within
1526
+ # the resource group.
1527
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1528
+ # unique globally.
1529
+ # @param content_file_paths [PurgeParameters] The path to the content to be
1530
+ # purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
1531
+ # single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
1532
+ # all folders and files in the directory.
1533
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1534
+ # to the HTTP request.
1535
+ #
1536
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1537
+ #
1538
+ def begin_purge_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1539
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1540
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1541
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1542
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1543
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1544
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1545
+ fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil?
1546
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1547
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1548
+
1549
+
1550
+ request_headers = {}
1551
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1552
+
1553
+ # Set Headers
1554
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1555
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1556
+
1557
+ # Serialize Request
1558
+ request_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::PurgeParameters.mapper()
1559
+ request_content = @client.serialize(request_mapper, content_file_paths)
1560
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1561
+
1562
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge'
1563
+
1564
+ request_url = @base_url || @client.base_url
1565
+
1566
+ options = {
1567
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1568
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1569
+ query_params: {'api-version' => @client.api_version},
1570
+ body: request_content,
1571
+ headers: request_headers.merge(custom_headers || {}),
1572
+ base_url: request_url
1573
+ }
1574
+ promise = @client.make_request_async(:post, path_template, options)
1575
+
1576
+ promise = promise.then do |result|
1577
+ http_response = result.response
1578
+ status_code = http_response.status
1579
+ response_content = http_response.body
1580
+ unless status_code == 200 || status_code == 202
1581
+ error_model = JSON.load(response_content)
1582
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1583
+ end
1584
+
1585
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1586
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1587
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1588
+
1589
+ result
1590
+ end
1591
+
1592
+ promise.execute
1593
+ end
1594
+
1595
+ #
1596
+ # Pre-loads a content to CDN. Available for Verizon Profiles.
1597
+ #
1598
+ # @param resource_group_name [String] Name of the Resource group within the
1599
+ # Azure subscription.
1600
+ # @param profile_name [String] Name of the CDN profile which is unique within
1601
+ # the resource group.
1602
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1603
+ # unique globally.
1604
+ # @param content_file_paths [LoadParameters] The path to the content to be
1605
+ # loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads a
1606
+ # single file
1607
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1608
+ # will be added to the HTTP request.
1609
+ #
1610
+ #
1611
+ def begin_load_content(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1612
+ response = begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
1613
+ nil
1614
+ end
1615
+
1616
+ #
1617
+ # Pre-loads a content to CDN. Available for Verizon Profiles.
1618
+ #
1619
+ # @param resource_group_name [String] Name of the Resource group within the
1620
+ # Azure subscription.
1621
+ # @param profile_name [String] Name of the CDN profile which is unique within
1622
+ # the resource group.
1623
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1624
+ # unique globally.
1625
+ # @param content_file_paths [LoadParameters] The path to the content to be
1626
+ # loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads a
1627
+ # single file
1628
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1629
+ # will be added to the HTTP request.
1630
+ #
1631
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1632
+ #
1633
+ def begin_load_content_with_http_info(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1634
+ begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:custom_headers).value!
1635
+ end
1636
+
1637
+ #
1638
+ # Pre-loads a content to CDN. Available for Verizon Profiles.
1639
+ #
1640
+ # @param resource_group_name [String] Name of the Resource group within the
1641
+ # Azure subscription.
1642
+ # @param profile_name [String] Name of the CDN profile which is unique within
1643
+ # the resource group.
1644
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1645
+ # unique globally.
1646
+ # @param content_file_paths [LoadParameters] The path to the content to be
1647
+ # loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads a
1648
+ # single file
1649
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1650
+ # to the HTTP request.
1651
+ #
1652
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1653
+ #
1654
+ def begin_load_content_async(resource_group_name, profile_name, endpoint_name, content_file_paths, custom_headers:nil)
1655
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1656
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1657
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1658
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1659
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1660
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1661
+ fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil?
1662
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1663
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1664
+
1665
+
1666
+ request_headers = {}
1667
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1668
+
1669
+ # Set Headers
1670
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1671
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1672
+
1673
+ # Serialize Request
1674
+ request_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::LoadParameters.mapper()
1675
+ request_content = @client.serialize(request_mapper, content_file_paths)
1676
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1677
+
1678
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load'
1679
+
1680
+ request_url = @base_url || @client.base_url
1681
+
1682
+ options = {
1683
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1684
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1685
+ query_params: {'api-version' => @client.api_version},
1686
+ body: request_content,
1687
+ headers: request_headers.merge(custom_headers || {}),
1688
+ base_url: request_url
1689
+ }
1690
+ promise = @client.make_request_async(:post, path_template, options)
1691
+
1692
+ promise = promise.then do |result|
1693
+ http_response = result.response
1694
+ status_code = http_response.status
1695
+ response_content = http_response.body
1696
+ unless status_code == 200 || status_code == 202
1697
+ error_model = JSON.load(response_content)
1698
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1699
+ end
1700
+
1701
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1702
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1703
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1704
+
1705
+ result
1706
+ end
1707
+
1708
+ promise.execute
1709
+ end
1710
+
1711
+ #
1712
+ # Lists existing CDN endpoints.
1713
+ #
1714
+ # @param next_page_link [String] The NextLink from the previous successful call
1715
+ # to List operation.
1716
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1717
+ # will be added to the HTTP request.
1718
+ #
1719
+ # @return [EndpointListResult] operation results.
1720
+ #
1721
+ def list_by_profile_next(next_page_link, custom_headers:nil)
1722
+ response = list_by_profile_next_async(next_page_link, custom_headers:custom_headers).value!
1723
+ response.body unless response.nil?
1724
+ end
1725
+
1726
+ #
1727
+ # Lists existing CDN endpoints.
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 [MsRestAzure::AzureOperationResponse] HTTP response information.
1735
+ #
1736
+ def list_by_profile_next_with_http_info(next_page_link, custom_headers:nil)
1737
+ list_by_profile_next_async(next_page_link, custom_headers:custom_headers).value!
1738
+ end
1739
+
1740
+ #
1741
+ # Lists existing CDN endpoints.
1742
+ #
1743
+ # @param next_page_link [String] The NextLink from the previous successful call
1744
+ # to List operation.
1745
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1746
+ # to the HTTP request.
1747
+ #
1748
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1749
+ #
1750
+ def list_by_profile_next_async(next_page_link, custom_headers:nil)
1751
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1752
+
1753
+
1754
+ request_headers = {}
1755
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1756
+
1757
+ # Set Headers
1758
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1759
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1760
+ path_template = '{nextLink}'
1761
+
1762
+ request_url = @base_url || @client.base_url
1763
+
1764
+ options = {
1765
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1766
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1767
+ headers: request_headers.merge(custom_headers || {}),
1768
+ base_url: request_url
1769
+ }
1770
+ promise = @client.make_request_async(:get, path_template, options)
1771
+
1772
+ promise = promise.then do |result|
1773
+ http_response = result.response
1774
+ status_code = http_response.status
1775
+ response_content = http_response.body
1776
+ unless status_code == 200
1777
+ error_model = JSON.load(response_content)
1778
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1779
+ end
1780
+
1781
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1782
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1783
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1784
+ # Deserialize Response
1785
+ if status_code == 200
1786
+ begin
1787
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1788
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::EndpointListResult.mapper()
1789
+ result.body = @client.deserialize(result_mapper, parsed_response)
1790
+ rescue Exception => e
1791
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1792
+ end
1793
+ end
1794
+
1795
+ result
1796
+ end
1797
+
1798
+ promise.execute
1799
+ end
1800
+
1801
+ #
1802
+ # Checks the quota and usage of geo filters and custom domains under the given
1803
+ # endpoint.
1804
+ #
1805
+ # @param next_page_link [String] The NextLink from the previous successful call
1806
+ # to List operation.
1807
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1808
+ # will be added to the HTTP request.
1809
+ #
1810
+ # @return [ResourceUsageListResult] operation results.
1811
+ #
1812
+ def list_resource_usage_next(next_page_link, custom_headers:nil)
1813
+ response = list_resource_usage_next_async(next_page_link, custom_headers:custom_headers).value!
1814
+ response.body unless response.nil?
1815
+ end
1816
+
1817
+ #
1818
+ # Checks the quota and usage of geo filters and custom domains under the given
1819
+ # endpoint.
1820
+ #
1821
+ # @param next_page_link [String] The NextLink from the previous successful call
1822
+ # to List operation.
1823
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1824
+ # will be added to the HTTP request.
1825
+ #
1826
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1827
+ #
1828
+ def list_resource_usage_next_with_http_info(next_page_link, custom_headers:nil)
1829
+ list_resource_usage_next_async(next_page_link, custom_headers:custom_headers).value!
1830
+ end
1831
+
1832
+ #
1833
+ # Checks the quota and usage of geo filters and custom domains under the given
1834
+ # endpoint.
1835
+ #
1836
+ # @param next_page_link [String] The NextLink from the previous successful call
1837
+ # to List operation.
1838
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1839
+ # to the HTTP request.
1840
+ #
1841
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1842
+ #
1843
+ def list_resource_usage_next_async(next_page_link, custom_headers:nil)
1844
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1845
+
1846
+
1847
+ request_headers = {}
1848
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1849
+
1850
+ # Set Headers
1851
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1852
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1853
+ path_template = '{nextLink}'
1854
+
1855
+ request_url = @base_url || @client.base_url
1856
+
1857
+ options = {
1858
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1859
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1860
+ headers: request_headers.merge(custom_headers || {}),
1861
+ base_url: request_url
1862
+ }
1863
+ promise = @client.make_request_async(:post, path_template, options)
1864
+
1865
+ promise = promise.then do |result|
1866
+ http_response = result.response
1867
+ status_code = http_response.status
1868
+ response_content = http_response.body
1869
+ unless status_code == 200
1870
+ error_model = JSON.load(response_content)
1871
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1872
+ end
1873
+
1874
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1875
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1876
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1877
+ # Deserialize Response
1878
+ if status_code == 200
1879
+ begin
1880
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1881
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::ResourceUsageListResult.mapper()
1882
+ result.body = @client.deserialize(result_mapper, parsed_response)
1883
+ rescue Exception => e
1884
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1885
+ end
1886
+ end
1887
+
1888
+ result
1889
+ end
1890
+
1891
+ promise.execute
1892
+ end
1893
+
1894
+ #
1895
+ # Lists existing CDN endpoints.
1896
+ #
1897
+ # @param resource_group_name [String] Name of the Resource group within the
1898
+ # Azure subscription.
1899
+ # @param profile_name [String] Name of the CDN profile which is unique within
1900
+ # the resource group.
1901
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1902
+ # will be added to the HTTP request.
1903
+ #
1904
+ # @return [EndpointListResult] which provide lazy access to pages of the
1905
+ # response.
1906
+ #
1907
+ def list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers:nil)
1908
+ response = list_by_profile_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
1909
+ unless response.nil?
1910
+ page = response.body
1911
+ page.next_method = Proc.new do |next_page_link|
1912
+ list_by_profile_next_async(next_page_link, custom_headers:custom_headers)
1913
+ end
1914
+ page
1915
+ end
1916
+ end
1917
+
1918
+ #
1919
+ # Checks the quota and usage of geo filters and custom domains under the given
1920
+ # endpoint.
1921
+ #
1922
+ # @param resource_group_name [String] Name of the Resource group within the
1923
+ # Azure subscription.
1924
+ # @param profile_name [String] Name of the CDN profile which is unique within
1925
+ # the resource group.
1926
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1927
+ # unique globally.
1928
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1929
+ # will be added to the HTTP request.
1930
+ #
1931
+ # @return [ResourceUsageListResult] which provide lazy access to pages of the
1932
+ # response.
1933
+ #
1934
+ def list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1935
+ response = list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1936
+ unless response.nil?
1937
+ page = response.body
1938
+ page.next_method = Proc.new do |next_page_link|
1939
+ list_resource_usage_next_async(next_page_link, custom_headers:custom_headers)
1940
+ end
1941
+ page
1942
+ end
1943
+ end
1944
+
1945
+ end
1946
+ end