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