azure_mgmt_cdn 0.17.2 → 0.17.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-06-01/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  3. data/lib/2015-06-01/generated/azure_mgmt_cdn/custom_domains.rb +10 -0
  4. data/lib/2015-06-01/generated/azure_mgmt_cdn/endpoints.rb +20 -0
  5. data/lib/2015-06-01/generated/azure_mgmt_cdn/name_availability.rb +2 -0
  6. data/lib/2015-06-01/generated/azure_mgmt_cdn/operations.rb +2 -0
  7. data/lib/2015-06-01/generated/azure_mgmt_cdn/origins.rb +10 -0
  8. data/lib/2015-06-01/generated/azure_mgmt_cdn/profiles.rb +14 -0
  9. data/lib/2016-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  10. data/lib/2016-04-02/generated/azure_mgmt_cdn/custom_domains.rb +10 -0
  11. data/lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb +20 -0
  12. data/lib/2016-04-02/generated/azure_mgmt_cdn/name_availability.rb +2 -0
  13. data/lib/2016-04-02/generated/azure_mgmt_cdn/operations.rb +2 -0
  14. data/lib/2016-04-02/generated/azure_mgmt_cdn/origins.rb +10 -0
  15. data/lib/2016-04-02/generated/azure_mgmt_cdn/profiles.rb +14 -0
  16. data/lib/2016-10-02/generated/azure_mgmt_cdn/cdn_management_client.rb +15 -1
  17. data/lib/2016-10-02/generated/azure_mgmt_cdn/custom_domains.rb +14 -0
  18. data/lib/2016-10-02/generated/azure_mgmt_cdn/edge_nodes.rb +4 -0
  19. data/lib/2016-10-02/generated/azure_mgmt_cdn/endpoints.rb +26 -0
  20. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +1 -1
  21. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/edgenode_result.rb +1 -1
  22. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +1 -1
  23. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/operation_list_result.rb +1 -1
  24. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/origin_list_result.rb +1 -1
  25. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/profile_list_result.rb +1 -1
  26. data/lib/2016-10-02/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +1 -1
  27. data/lib/2016-10-02/generated/azure_mgmt_cdn/origins.rb +8 -0
  28. data/lib/2016-10-02/generated/azure_mgmt_cdn/profiles.rb +24 -0
  29. data/lib/2017-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +5 -1
  30. data/lib/2017-04-02/generated/azure_mgmt_cdn/custom_domains.rb +14 -0
  31. data/lib/2017-04-02/generated/azure_mgmt_cdn/edge_nodes.rb +4 -0
  32. data/lib/2017-04-02/generated/azure_mgmt_cdn/endpoints.rb +26 -0
  33. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +1 -1
  34. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/edgenode_result.rb +1 -1
  35. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +1 -1
  36. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/operations_list_result.rb +1 -1
  37. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/origin_list_result.rb +1 -1
  38. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/profile_list_result.rb +1 -1
  39. data/lib/2017-04-02/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +1 -1
  40. data/lib/2017-04-02/generated/azure_mgmt_cdn/operations.rb +4 -0
  41. data/lib/2017-04-02/generated/azure_mgmt_cdn/origins.rb +8 -0
  42. data/lib/2017-04-02/generated/azure_mgmt_cdn/profiles.rb +24 -0
  43. data/lib/2017-04-02/generated/azure_mgmt_cdn/resource_usage_operations.rb +4 -0
  44. data/lib/2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb +7 -1
  45. data/lib/2017-10-12/generated/azure_mgmt_cdn/custom_domains.rb +14 -0
  46. data/lib/2017-10-12/generated/azure_mgmt_cdn/edge_nodes.rb +4 -0
  47. data/lib/2017-10-12/generated/azure_mgmt_cdn/endpoints.rb +26 -0
  48. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +1 -1
  49. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/edgenode_result.rb +1 -1
  50. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +1 -1
  51. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/operations_list_result.rb +1 -1
  52. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/origin_list_result.rb +1 -1
  53. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/profile_list_result.rb +1 -1
  54. data/lib/2017-10-12/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +1 -1
  55. data/lib/2017-10-12/generated/azure_mgmt_cdn/operations.rb +4 -0
  56. data/lib/2017-10-12/generated/azure_mgmt_cdn/origins.rb +8 -0
  57. data/lib/2017-10-12/generated/azure_mgmt_cdn/profiles.rb +24 -0
  58. data/lib/2017-10-12/generated/azure_mgmt_cdn/resource_usage_operations.rb +4 -0
  59. data/lib/2020-04-15/generated/azure_mgmt_cdn.rb +202 -0
  60. data/lib/2020-04-15/generated/azure_mgmt_cdn/cdn_management_client.rb +478 -0
  61. data/lib/2020-04-15/generated/azure_mgmt_cdn/custom_domains.rb +1001 -0
  62. data/lib/2020-04-15/generated/azure_mgmt_cdn/edge_nodes.rb +225 -0
  63. data/lib/2020-04-15/generated/azure_mgmt_cdn/endpoints.rb +1946 -0
  64. data/lib/2020-04-15/generated/azure_mgmt_cdn/managed_rule_sets.rb +221 -0
  65. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/action_type.rb +18 -0
  66. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/algorithm.rb +15 -0
  67. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cache_behavior.rb +17 -0
  68. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cache_expiration_action_parameters.rb +88 -0
  69. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cache_key_query_string_action_parameters.rb +75 -0
  70. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_certificate_source_parameters.rb +62 -0
  71. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_endpoint.rb +46 -0
  72. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_managed_https_parameters.rb +82 -0
  73. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy.rb +210 -0
  74. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy_list.rb +103 -0
  75. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy_patch_parameters.rb +55 -0
  76. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/certificate_type.rb +16 -0
  77. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  78. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +72 -0
  79. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
  80. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cookies_match_condition_parameters.rb +123 -0
  81. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/cookies_operator.rb +23 -0
  82. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain.rb +148 -0
  83. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain_https_parameters.rb +73 -0
  84. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +102 -0
  85. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
  86. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  87. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
  88. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb +24 -0
  89. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_rule.rb +108 -0
  90. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_rule_enabled_state.rb +16 -0
  91. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_rule_list.rb +55 -0
  92. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/deep_created_origin.rb +200 -0
  93. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/deep_created_origin_group.rb +114 -0
  94. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule.rb +107 -0
  95. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_action.rb +52 -0
  96. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_cache_expiration_action.rb +64 -0
  97. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_cache_key_query_string_action.rb +64 -0
  98. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_condition.rb +59 -0
  99. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_cookies_condition.rb +64 -0
  100. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_http_version_condition.rb +64 -0
  101. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_is_device_condition.rb +64 -0
  102. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_post_args_condition.rb +64 -0
  103. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_query_string_condition.rb +64 -0
  104. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_remote_address_condition.rb +64 -0
  105. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_body_condition.rb +64 -0
  106. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_header_action.rb +63 -0
  107. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_header_condition.rb +64 -0
  108. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_method_condition.rb +64 -0
  109. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_scheme_condition.rb +64 -0
  110. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_request_uri_condition.rb +64 -0
  111. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_response_header_action.rb +63 -0
  112. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_url_file_extension_condition.rb +64 -0
  113. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_url_file_name_condition.rb +64 -0
  114. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/delivery_rule_url_path_condition.rb +64 -0
  115. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/destination_protocol.rb +17 -0
  116. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/edge_node.rb +83 -0
  117. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/edgenode_result.rb +101 -0
  118. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint.rb +391 -0
  119. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +101 -0
  120. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_delivery_policy.rb +67 -0
  121. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_web_application_firewall_policy_link.rb +49 -0
  122. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  123. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +274 -0
  124. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/error_response.rb +60 -0
  125. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
  126. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  127. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/header_action.rb +17 -0
  128. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/header_action_parameters.rb +83 -0
  129. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/health_probe_parameters.rb +90 -0
  130. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/health_probe_request_type.rb +17 -0
  131. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/http_error_range_parameters.rb +65 -0
  132. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/http_version_match_condition_parameters.rb +95 -0
  133. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
  134. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/is_device_match_condition_parameters.rb +113 -0
  135. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/key_vault_certificate_source_parameters.rb +137 -0
  136. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/key_vault_signing_key_parameters.rb +106 -0
  137. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  138. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_definition.rb +59 -0
  139. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_enabled_state.rb +16 -0
  140. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_group_definition.rb +81 -0
  141. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_group_override.rb +68 -0
  142. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_override.rb +72 -0
  143. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_set.rb +94 -0
  144. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_set_definition.rb +133 -0
  145. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_set_definition_list.rb +101 -0
  146. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/managed_rule_set_list.rb +55 -0
  147. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/match_condition.rb +125 -0
  148. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/match_variable.rb +23 -0
  149. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/minimum_tls_version.rb +17 -0
  150. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/operation.rb +59 -0
  151. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/operation_display.rb +72 -0
  152. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/operations_list_result.rb +102 -0
  153. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/operator.rb +26 -0
  154. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
  155. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin.rb +256 -0
  156. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_group.rb +153 -0
  157. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_group_list_result.rb +102 -0
  158. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_group_resource_state.rb +17 -0
  159. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_group_update_parameters.rb +100 -0
  160. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_list_result.rb +101 -0
  161. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  162. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +187 -0
  163. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/param_indicator.rb +17 -0
  164. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/policy_enabled_state.rb +16 -0
  165. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/policy_mode.rb +16 -0
  166. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/policy_resource_state.rb +20 -0
  167. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/policy_settings.rb +99 -0
  168. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/post_args_match_condition_parameters.rb +123 -0
  169. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/post_args_operator.rb +23 -0
  170. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/private_endpoint_status.rb +19 -0
  171. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/probe_protocol.rb +17 -0
  172. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/profile.rb +125 -0
  173. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/profile_list_result.rb +101 -0
  174. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  175. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  176. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/protocol_type.rb +16 -0
  177. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
  178. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/proxy_resource.rb +63 -0
  179. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  180. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/query_string_behavior.rb +18 -0
  181. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  182. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/query_string_match_condition_parameters.rb +114 -0
  183. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/query_string_operator.rb +23 -0
  184. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/rate_limit_rule.rb +117 -0
  185. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/rate_limit_rule_list.rb +55 -0
  186. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/redirect_type.rb +18 -0
  187. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/remote_address_match_condition_parameters.rb +114 -0
  188. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/remote_address_operator.rb +17 -0
  189. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_body_match_condition_parameters.rb +114 -0
  190. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_body_operator.rb +23 -0
  191. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_header_match_condition_parameters.rb +125 -0
  192. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_header_operator.rb +23 -0
  193. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_method_match_condition_parameters.rb +95 -0
  194. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_scheme_match_condition_parameters.rb +95 -0
  195. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_uri_match_condition_parameters.rb +113 -0
  196. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/request_uri_operator.rb +23 -0
  197. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource.rb +80 -0
  198. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource_reference.rb +46 -0
  199. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  200. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource_usage.rb +83 -0
  201. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +100 -0
  202. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/response_based_detected_error_types.rb +17 -0
  203. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/response_based_origin_error_detection_parameters.rb +89 -0
  204. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/sku.rb +50 -0
  205. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/sku_name.rb +21 -0
  206. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/sso_uri.rb +48 -0
  207. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb +56 -0
  208. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/tracked_resource.rb +92 -0
  209. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/transform.rb +16 -0
  210. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/transform_type.rb +20 -0
  211. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_file_extension_match_condition_parameters.rb +114 -0
  212. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_file_extension_operator.rb +23 -0
  213. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_file_name_match_condition_parameters.rb +114 -0
  214. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_file_name_operator.rb +23 -0
  215. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_path_match_condition_parameters.rb +114 -0
  216. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_path_operator.rb +24 -0
  217. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_redirect_action.rb +64 -0
  218. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_redirect_action_parameters.rb +127 -0
  219. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_rewrite_action.rb +64 -0
  220. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_rewrite_action_parameters.rb +86 -0
  221. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_signing_action.rb +63 -0
  222. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_signing_action_parameters.rb +112 -0
  223. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_signing_key.rb +62 -0
  224. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/url_signing_param_identifier.rb +58 -0
  225. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/user_managed_https_parameters.rb +82 -0
  226. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  227. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +72 -0
  228. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/validate_probe_input.rb +46 -0
  229. data/lib/2020-04-15/generated/azure_mgmt_cdn/models/validate_probe_output.rb +73 -0
  230. data/lib/2020-04-15/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  231. data/lib/2020-04-15/generated/azure_mgmt_cdn/operations.rb +219 -0
  232. data/lib/2020-04-15/generated/azure_mgmt_cdn/origin_groups.rb +927 -0
  233. data/lib/2020-04-15/generated/azure_mgmt_cdn/origins.rb +922 -0
  234. data/lib/2020-04-15/generated/azure_mgmt_cdn/policies.rb +789 -0
  235. data/lib/2020-04-15/generated/azure_mgmt_cdn/profiles.rb +1482 -0
  236. data/lib/2020-04-15/generated/azure_mgmt_cdn/resource_usage_operations.rb +228 -0
  237. data/lib/azure_mgmt_cdn.rb +4 -3
  238. data/lib/profiles/latest/modules/cdn_profile_module.rb +576 -174
  239. data/lib/version.rb +1 -1
  240. metadata +183 -5
@@ -0,0 +1,789 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CDN::Mgmt::V2020_04_15
7
+ #
8
+ # Cdn Management Client
9
+ #
10
+ class Policies
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Policies class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [CdnManagementClient] reference to the CdnManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the protection policies within a resource group.
26
+ #
27
+ # @param resource_group_name [String] Name of the Resource group within the
28
+ # Azure subscription.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<CdnWebApplicationFirewallPolicy>] operation results.
33
+ #
34
+ def list(resource_group_name, custom_headers:nil)
35
+ first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Lists all of the protection policies within a resource group.
41
+ #
42
+ # @param resource_group_name [String] Name of the Resource group within the
43
+ # Azure subscription.
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(resource_group_name, custom_headers:nil)
50
+ list_async(resource_group_name, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Lists all of the protection policies within a resource group.
55
+ #
56
+ # @param resource_group_name [String] Name of the Resource group within the
57
+ # Azure subscription.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(resource_group_name, custom_headers:nil)
64
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
65
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
66
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
67
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
68
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
70
+
71
+
72
+ request_headers = {}
73
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
+
75
+ # Set Headers
76
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
77
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
78
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies'
79
+
80
+ request_url = @base_url || @client.base_url
81
+
82
+ options = {
83
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
84
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
85
+ query_params: {'api-version' => @client.api_version},
86
+ headers: request_headers.merge(custom_headers || {}),
87
+ base_url: request_url
88
+ }
89
+ promise = @client.make_request_async(:get, path_template, options)
90
+
91
+ promise = promise.then do |result|
92
+ http_response = result.response
93
+ status_code = http_response.status
94
+ response_content = http_response.body
95
+ unless status_code == 200
96
+ error_model = JSON.load(response_content)
97
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
98
+ end
99
+
100
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
101
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
102
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
103
+ # Deserialize Response
104
+ if status_code == 200
105
+ begin
106
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
107
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicyList.mapper()
108
+ result.body = @client.deserialize(result_mapper, parsed_response)
109
+ rescue Exception => e
110
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
111
+ end
112
+ end
113
+
114
+ result
115
+ end
116
+
117
+ promise.execute
118
+ end
119
+
120
+ #
121
+ # Retrieve protection policy with specified name within a resource group.
122
+ #
123
+ # @param resource_group_name [String] Name of the Resource group within the
124
+ # Azure subscription.
125
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
126
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
+ # will be added to the HTTP request.
128
+ #
129
+ # @return [CdnWebApplicationFirewallPolicy] operation results.
130
+ #
131
+ def get(resource_group_name, policy_name, custom_headers:nil)
132
+ response = get_async(resource_group_name, policy_name, custom_headers:custom_headers).value!
133
+ response.body unless response.nil?
134
+ end
135
+
136
+ #
137
+ # Retrieve protection policy with specified name within a resource group.
138
+ #
139
+ # @param resource_group_name [String] Name of the Resource group within the
140
+ # Azure subscription.
141
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
143
+ # will be added to the HTTP request.
144
+ #
145
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
146
+ #
147
+ def get_with_http_info(resource_group_name, policy_name, custom_headers:nil)
148
+ get_async(resource_group_name, policy_name, custom_headers:custom_headers).value!
149
+ end
150
+
151
+ #
152
+ # Retrieve protection policy with specified name within a resource group.
153
+ #
154
+ # @param resource_group_name [String] Name of the Resource group within the
155
+ # Azure subscription.
156
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
157
+ # @param [Hash{String => String}] A hash of custom headers that will be added
158
+ # to the HTTP request.
159
+ #
160
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
161
+ #
162
+ def get_async(resource_group_name, policy_name, custom_headers:nil)
163
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
164
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
165
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
166
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
167
+ fail ArgumentError, 'policy_name is nil' if policy_name.nil?
168
+ fail ArgumentError, "'policy_name' should satisfy the constraint - 'MaxLength': '128'" if !policy_name.nil? && policy_name.length > 128
169
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
170
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
171
+
172
+
173
+ request_headers = {}
174
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
175
+
176
+ # Set Headers
177
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
178
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
179
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}'
180
+
181
+ request_url = @base_url || @client.base_url
182
+
183
+ options = {
184
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
185
+ path_params: {'resourceGroupName' => resource_group_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
186
+ query_params: {'api-version' => @client.api_version},
187
+ headers: request_headers.merge(custom_headers || {}),
188
+ base_url: request_url
189
+ }
190
+ promise = @client.make_request_async(:get, path_template, options)
191
+
192
+ promise = promise.then do |result|
193
+ http_response = result.response
194
+ status_code = http_response.status
195
+ response_content = http_response.body
196
+ unless status_code == 200
197
+ error_model = JSON.load(response_content)
198
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
199
+ end
200
+
201
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
202
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
203
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
204
+ # Deserialize Response
205
+ if status_code == 200
206
+ begin
207
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
208
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
209
+ result.body = @client.deserialize(result_mapper, parsed_response)
210
+ rescue Exception => e
211
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
212
+ end
213
+ end
214
+
215
+ result
216
+ end
217
+
218
+ promise.execute
219
+ end
220
+
221
+ #
222
+ # Create or update policy with specified rule set name within a resource group.
223
+ #
224
+ # @param resource_group_name [String] Name of the Resource group within the
225
+ # Azure subscription.
226
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
227
+ # @param cdn_web_application_firewall_policy [CdnWebApplicationFirewallPolicy]
228
+ # Policy to be created.
229
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
230
+ # will be added to the HTTP request.
231
+ #
232
+ # @return [CdnWebApplicationFirewallPolicy] operation results.
233
+ #
234
+ def create_or_update(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:nil)
235
+ response = create_or_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:custom_headers).value!
236
+ response.body unless response.nil?
237
+ end
238
+
239
+ #
240
+ # @param resource_group_name [String] Name of the Resource group within the
241
+ # Azure subscription.
242
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
243
+ # @param cdn_web_application_firewall_policy [CdnWebApplicationFirewallPolicy]
244
+ # Policy to be created.
245
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
246
+ # will be added to the HTTP request.
247
+ #
248
+ # @return [Concurrent::Promise] promise which provides async access to http
249
+ # response.
250
+ #
251
+ def create_or_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:nil)
252
+ # Send request
253
+ promise = begin_create_or_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:custom_headers)
254
+
255
+ promise = promise.then do |response|
256
+ # Defining deserialization method.
257
+ deserialize_method = lambda do |parsed_response|
258
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
259
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
260
+ end
261
+
262
+ # Waiting for response.
263
+ @client.get_long_running_operation_result(response, deserialize_method)
264
+ end
265
+
266
+ promise
267
+ end
268
+
269
+ #
270
+ # Update an existing CdnWebApplicationFirewallPolicy with the specified policy
271
+ # name under the specified subscription and resource group
272
+ #
273
+ # @param resource_group_name [String] Name of the Resource group within the
274
+ # Azure subscription.
275
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
276
+ # @param cdn_web_application_firewall_policy_patch_parameters
277
+ # [CdnWebApplicationFirewallPolicyPatchParameters]
278
+ # CdnWebApplicationFirewallPolicy parameters to be patched.
279
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
280
+ # will be added to the HTTP request.
281
+ #
282
+ # @return [CdnWebApplicationFirewallPolicy] operation results.
283
+ #
284
+ def update(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:nil)
285
+ response = update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:custom_headers).value!
286
+ response.body unless response.nil?
287
+ end
288
+
289
+ #
290
+ # @param resource_group_name [String] Name of the Resource group within the
291
+ # Azure subscription.
292
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
293
+ # @param cdn_web_application_firewall_policy_patch_parameters
294
+ # [CdnWebApplicationFirewallPolicyPatchParameters]
295
+ # CdnWebApplicationFirewallPolicy parameters to be patched.
296
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
297
+ # will be added to the HTTP request.
298
+ #
299
+ # @return [Concurrent::Promise] promise which provides async access to http
300
+ # response.
301
+ #
302
+ def update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:nil)
303
+ # Send request
304
+ promise = begin_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:custom_headers)
305
+
306
+ promise = promise.then do |response|
307
+ # Defining deserialization method.
308
+ deserialize_method = lambda do |parsed_response|
309
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
310
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
311
+ end
312
+
313
+ # Waiting for response.
314
+ @client.get_long_running_operation_result(response, deserialize_method)
315
+ end
316
+
317
+ promise
318
+ end
319
+
320
+ #
321
+ # Deletes Policy
322
+ #
323
+ # @param resource_group_name [String] Name of the Resource group within the
324
+ # Azure subscription.
325
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
326
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
327
+ # will be added to the HTTP request.
328
+ #
329
+ #
330
+ def delete(resource_group_name, policy_name, custom_headers:nil)
331
+ response = delete_async(resource_group_name, policy_name, custom_headers:custom_headers).value!
332
+ nil
333
+ end
334
+
335
+ #
336
+ # Deletes Policy
337
+ #
338
+ # @param resource_group_name [String] Name of the Resource group within the
339
+ # Azure subscription.
340
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
342
+ # will be added to the HTTP request.
343
+ #
344
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
345
+ #
346
+ def delete_with_http_info(resource_group_name, policy_name, custom_headers:nil)
347
+ delete_async(resource_group_name, policy_name, custom_headers:custom_headers).value!
348
+ end
349
+
350
+ #
351
+ # Deletes Policy
352
+ #
353
+ # @param resource_group_name [String] Name of the Resource group within the
354
+ # Azure subscription.
355
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
356
+ # @param [Hash{String => String}] A hash of custom headers that will be added
357
+ # to the HTTP request.
358
+ #
359
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
360
+ #
361
+ def delete_async(resource_group_name, policy_name, custom_headers:nil)
362
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
363
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
364
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
365
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
366
+ fail ArgumentError, 'policy_name is nil' if policy_name.nil?
367
+ fail ArgumentError, "'policy_name' should satisfy the constraint - 'MaxLength': '128'" if !policy_name.nil? && policy_name.length > 128
368
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
369
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
370
+
371
+
372
+ request_headers = {}
373
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
374
+
375
+ # Set Headers
376
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
377
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
378
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}'
379
+
380
+ request_url = @base_url || @client.base_url
381
+
382
+ options = {
383
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
384
+ path_params: {'resourceGroupName' => resource_group_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
385
+ query_params: {'api-version' => @client.api_version},
386
+ headers: request_headers.merge(custom_headers || {}),
387
+ base_url: request_url
388
+ }
389
+ promise = @client.make_request_async(:delete, path_template, options)
390
+
391
+ promise = promise.then do |result|
392
+ http_response = result.response
393
+ status_code = http_response.status
394
+ response_content = http_response.body
395
+ unless status_code == 200 || status_code == 204
396
+ error_model = JSON.load(response_content)
397
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
398
+ end
399
+
400
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
401
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
402
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
403
+
404
+ result
405
+ end
406
+
407
+ promise.execute
408
+ end
409
+
410
+ #
411
+ # Create or update policy with specified rule set name within a resource group.
412
+ #
413
+ # @param resource_group_name [String] Name of the Resource group within the
414
+ # Azure subscription.
415
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
416
+ # @param cdn_web_application_firewall_policy [CdnWebApplicationFirewallPolicy]
417
+ # Policy to be created.
418
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
419
+ # will be added to the HTTP request.
420
+ #
421
+ # @return [CdnWebApplicationFirewallPolicy] operation results.
422
+ #
423
+ def begin_create_or_update(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:nil)
424
+ response = begin_create_or_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:custom_headers).value!
425
+ response.body unless response.nil?
426
+ end
427
+
428
+ #
429
+ # Create or update policy with specified rule set name within a resource group.
430
+ #
431
+ # @param resource_group_name [String] Name of the Resource group within the
432
+ # Azure subscription.
433
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
434
+ # @param cdn_web_application_firewall_policy [CdnWebApplicationFirewallPolicy]
435
+ # Policy to be created.
436
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
437
+ # will be added to the HTTP request.
438
+ #
439
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
440
+ #
441
+ def begin_create_or_update_with_http_info(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:nil)
442
+ begin_create_or_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:custom_headers).value!
443
+ end
444
+
445
+ #
446
+ # Create or update policy with specified rule set name within a resource group.
447
+ #
448
+ # @param resource_group_name [String] Name of the Resource group within the
449
+ # Azure subscription.
450
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
451
+ # @param cdn_web_application_firewall_policy [CdnWebApplicationFirewallPolicy]
452
+ # Policy to be created.
453
+ # @param [Hash{String => String}] A hash of custom headers that will be added
454
+ # to the HTTP request.
455
+ #
456
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
457
+ #
458
+ def begin_create_or_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy, custom_headers:nil)
459
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
460
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
461
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
462
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
463
+ fail ArgumentError, 'policy_name is nil' if policy_name.nil?
464
+ fail ArgumentError, "'policy_name' should satisfy the constraint - 'MaxLength': '128'" if !policy_name.nil? && policy_name.length > 128
465
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
466
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
467
+ fail ArgumentError, 'cdn_web_application_firewall_policy is nil' if cdn_web_application_firewall_policy.nil?
468
+
469
+
470
+ request_headers = {}
471
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
472
+
473
+ # Set Headers
474
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
475
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
476
+
477
+ # Serialize Request
478
+ request_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
479
+ request_content = @client.serialize(request_mapper, cdn_web_application_firewall_policy)
480
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
481
+
482
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}'
483
+
484
+ request_url = @base_url || @client.base_url
485
+
486
+ options = {
487
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
488
+ path_params: {'resourceGroupName' => resource_group_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
489
+ query_params: {'api-version' => @client.api_version},
490
+ body: request_content,
491
+ headers: request_headers.merge(custom_headers || {}),
492
+ base_url: request_url
493
+ }
494
+ promise = @client.make_request_async(:put, path_template, options)
495
+
496
+ promise = promise.then do |result|
497
+ http_response = result.response
498
+ status_code = http_response.status
499
+ response_content = http_response.body
500
+ unless status_code == 200 || status_code == 201 || status_code == 202
501
+ error_model = JSON.load(response_content)
502
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
503
+ end
504
+
505
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
506
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
507
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
508
+ # Deserialize Response
509
+ if status_code == 200
510
+ begin
511
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
512
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
513
+ result.body = @client.deserialize(result_mapper, parsed_response)
514
+ rescue Exception => e
515
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
516
+ end
517
+ end
518
+ # Deserialize Response
519
+ if status_code == 201
520
+ begin
521
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
522
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
523
+ result.body = @client.deserialize(result_mapper, parsed_response)
524
+ rescue Exception => e
525
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
526
+ end
527
+ end
528
+ # Deserialize Response
529
+ if status_code == 202
530
+ begin
531
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
532
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
533
+ result.body = @client.deserialize(result_mapper, parsed_response)
534
+ rescue Exception => e
535
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
536
+ end
537
+ end
538
+
539
+ result
540
+ end
541
+
542
+ promise.execute
543
+ end
544
+
545
+ #
546
+ # Update an existing CdnWebApplicationFirewallPolicy with the specified policy
547
+ # name under the specified subscription and resource group
548
+ #
549
+ # @param resource_group_name [String] Name of the Resource group within the
550
+ # Azure subscription.
551
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
552
+ # @param cdn_web_application_firewall_policy_patch_parameters
553
+ # [CdnWebApplicationFirewallPolicyPatchParameters]
554
+ # CdnWebApplicationFirewallPolicy parameters to be patched.
555
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
556
+ # will be added to the HTTP request.
557
+ #
558
+ # @return [CdnWebApplicationFirewallPolicy] operation results.
559
+ #
560
+ def begin_update(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:nil)
561
+ response = begin_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:custom_headers).value!
562
+ response.body unless response.nil?
563
+ end
564
+
565
+ #
566
+ # Update an existing CdnWebApplicationFirewallPolicy with the specified policy
567
+ # name under the specified subscription and resource group
568
+ #
569
+ # @param resource_group_name [String] Name of the Resource group within the
570
+ # Azure subscription.
571
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
572
+ # @param cdn_web_application_firewall_policy_patch_parameters
573
+ # [CdnWebApplicationFirewallPolicyPatchParameters]
574
+ # CdnWebApplicationFirewallPolicy parameters to be patched.
575
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
576
+ # will be added to the HTTP request.
577
+ #
578
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
579
+ #
580
+ def begin_update_with_http_info(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:nil)
581
+ begin_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:custom_headers).value!
582
+ end
583
+
584
+ #
585
+ # Update an existing CdnWebApplicationFirewallPolicy with the specified policy
586
+ # name under the specified subscription and resource group
587
+ #
588
+ # @param resource_group_name [String] Name of the Resource group within the
589
+ # Azure subscription.
590
+ # @param policy_name [String] The name of the CdnWebApplicationFirewallPolicy.
591
+ # @param cdn_web_application_firewall_policy_patch_parameters
592
+ # [CdnWebApplicationFirewallPolicyPatchParameters]
593
+ # CdnWebApplicationFirewallPolicy parameters to be patched.
594
+ # @param [Hash{String => String}] A hash of custom headers that will be added
595
+ # to the HTTP request.
596
+ #
597
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
598
+ #
599
+ def begin_update_async(resource_group_name, policy_name, cdn_web_application_firewall_policy_patch_parameters, custom_headers:nil)
600
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
601
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
602
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
603
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
604
+ fail ArgumentError, 'policy_name is nil' if policy_name.nil?
605
+ fail ArgumentError, "'policy_name' should satisfy the constraint - 'MaxLength': '128'" if !policy_name.nil? && policy_name.length > 128
606
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
607
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
608
+ fail ArgumentError, 'cdn_web_application_firewall_policy_patch_parameters is nil' if cdn_web_application_firewall_policy_patch_parameters.nil?
609
+
610
+
611
+ request_headers = {}
612
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
613
+
614
+ # Set Headers
615
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
616
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
617
+
618
+ # Serialize Request
619
+ request_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicyPatchParameters.mapper()
620
+ request_content = @client.serialize(request_mapper, cdn_web_application_firewall_policy_patch_parameters)
621
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
622
+
623
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/{policyName}'
624
+
625
+ request_url = @base_url || @client.base_url
626
+
627
+ options = {
628
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
629
+ path_params: {'resourceGroupName' => resource_group_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
630
+ query_params: {'api-version' => @client.api_version},
631
+ body: request_content,
632
+ headers: request_headers.merge(custom_headers || {}),
633
+ base_url: request_url
634
+ }
635
+ promise = @client.make_request_async(:patch, path_template, options)
636
+
637
+ promise = promise.then do |result|
638
+ http_response = result.response
639
+ status_code = http_response.status
640
+ response_content = http_response.body
641
+ unless status_code == 200 || status_code == 202
642
+ error_model = JSON.load(response_content)
643
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
644
+ end
645
+
646
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
647
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
648
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
649
+ # Deserialize Response
650
+ if status_code == 200
651
+ begin
652
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
653
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
654
+ result.body = @client.deserialize(result_mapper, parsed_response)
655
+ rescue Exception => e
656
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
657
+ end
658
+ end
659
+ # Deserialize Response
660
+ if status_code == 202
661
+ begin
662
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
663
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicy.mapper()
664
+ result.body = @client.deserialize(result_mapper, parsed_response)
665
+ rescue Exception => e
666
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
667
+ end
668
+ end
669
+
670
+ result
671
+ end
672
+
673
+ promise.execute
674
+ end
675
+
676
+ #
677
+ # Lists all of the protection policies within a resource group.
678
+ #
679
+ # @param next_page_link [String] The NextLink from the previous successful call
680
+ # to List operation.
681
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
682
+ # will be added to the HTTP request.
683
+ #
684
+ # @return [CdnWebApplicationFirewallPolicyList] operation results.
685
+ #
686
+ def list_next(next_page_link, custom_headers:nil)
687
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
688
+ response.body unless response.nil?
689
+ end
690
+
691
+ #
692
+ # Lists all of the protection policies within a resource group.
693
+ #
694
+ # @param next_page_link [String] The NextLink from the previous successful call
695
+ # to List operation.
696
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
697
+ # will be added to the HTTP request.
698
+ #
699
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
700
+ #
701
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
702
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
703
+ end
704
+
705
+ #
706
+ # Lists all of the protection policies within a resource group.
707
+ #
708
+ # @param next_page_link [String] The NextLink from the previous successful call
709
+ # to List operation.
710
+ # @param [Hash{String => String}] A hash of custom headers that will be added
711
+ # to the HTTP request.
712
+ #
713
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
714
+ #
715
+ def list_next_async(next_page_link, custom_headers:nil)
716
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
717
+
718
+
719
+ request_headers = {}
720
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
721
+
722
+ # Set Headers
723
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
724
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
725
+ path_template = '{nextLink}'
726
+
727
+ request_url = @base_url || @client.base_url
728
+
729
+ options = {
730
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
731
+ skip_encoding_path_params: {'nextLink' => next_page_link},
732
+ headers: request_headers.merge(custom_headers || {}),
733
+ base_url: request_url
734
+ }
735
+ promise = @client.make_request_async(:get, path_template, options)
736
+
737
+ promise = promise.then do |result|
738
+ http_response = result.response
739
+ status_code = http_response.status
740
+ response_content = http_response.body
741
+ unless status_code == 200
742
+ error_model = JSON.load(response_content)
743
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
744
+ end
745
+
746
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
747
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
748
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
749
+ # Deserialize Response
750
+ if status_code == 200
751
+ begin
752
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
753
+ result_mapper = Azure::CDN::Mgmt::V2020_04_15::Models::CdnWebApplicationFirewallPolicyList.mapper()
754
+ result.body = @client.deserialize(result_mapper, parsed_response)
755
+ rescue Exception => e
756
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
757
+ end
758
+ end
759
+
760
+ result
761
+ end
762
+
763
+ promise.execute
764
+ end
765
+
766
+ #
767
+ # Lists all of the protection policies within a resource group.
768
+ #
769
+ # @param resource_group_name [String] Name of the Resource group within the
770
+ # Azure subscription.
771
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
772
+ # will be added to the HTTP request.
773
+ #
774
+ # @return [CdnWebApplicationFirewallPolicyList] which provide lazy access to
775
+ # pages of the response.
776
+ #
777
+ def list_as_lazy(resource_group_name, custom_headers:nil)
778
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
779
+ unless response.nil?
780
+ page = response.body
781
+ page.next_method = Proc.new do |next_page_link|
782
+ list_next_async(next_page_link, custom_headers:custom_headers)
783
+ end
784
+ page
785
+ end
786
+ end
787
+
788
+ end
789
+ end