azure_mgmt_cdn 0.17.7 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-01/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  3. data/lib/2016-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  4. data/lib/2016-10-02/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  5. data/lib/2017-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  6. data/lib/2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  7. data/lib/2020-04-15/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  8. data/lib/2020-09-01/generated/azure_mgmt_cdn.rb +304 -0
  9. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdcustom_domains.rb +1035 -0
  10. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdendpoints.rb +1426 -0
  11. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdorigin_groups.rb +1094 -0
  12. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdorigins.rb +912 -0
  13. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdprofiles.rb +362 -0
  14. data/lib/2020-09-01/generated/azure_mgmt_cdn/cdn_management_client.rb +533 -0
  15. data/lib/2020-09-01/generated/azure_mgmt_cdn/custom_domains.rb +1001 -0
  16. data/lib/2020-09-01/generated/azure_mgmt_cdn/edge_nodes.rb +225 -0
  17. data/lib/2020-09-01/generated/azure_mgmt_cdn/endpoints.rb +1946 -0
  18. data/lib/2020-09-01/generated/azure_mgmt_cdn/log_analytics.rb +748 -0
  19. data/lib/2020-09-01/generated/azure_mgmt_cdn/managed_rule_sets.rb +221 -0
  20. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/action_type.rb +18 -0
  21. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_certificate_type.rb +16 -0
  22. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_error_response.rb +51 -0
  23. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_minimum_tls_version.rb +16 -0
  24. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_provisioning_state.rb +19 -0
  25. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_purge_parameters.rb +74 -0
  26. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afddomain.rb +166 -0
  27. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afddomain_https_parameters.rb +73 -0
  28. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afddomain_list_result.rb +102 -0
  29. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afddomain_update_parameters.rb +62 -0
  30. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint.rb +166 -0
  31. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint_list_result.rb +102 -0
  32. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint_protocols.rb +16 -0
  33. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint_update_parameters.rb +82 -0
  34. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin.rb +232 -0
  35. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_group.rb +169 -0
  36. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_group_list_result.rb +102 -0
  37. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_group_update_parameters.rb +105 -0
  38. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_list_result.rb +101 -0
  39. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_update_parameters.rb +166 -0
  40. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdstate_properties.rb +61 -0
  41. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/algorithm.rb +15 -0
  42. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cache_behavior.rb +17 -0
  43. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cache_expiration_action_parameters.rb +88 -0
  44. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cache_key_query_string_action_parameters.rb +75 -0
  45. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_certificate_source_parameters.rb +62 -0
  46. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_endpoint.rb +46 -0
  47. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_managed_https_parameters.rb +82 -0
  48. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy.rb +220 -0
  49. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy_list.rb +103 -0
  50. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy_patch_parameters.rb +55 -0
  51. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/certificate.rb +68 -0
  52. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/certificate_type.rb +16 -0
  53. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  54. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +72 -0
  55. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
  56. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/compression_settings.rb +70 -0
  57. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/continents_response.rb +75 -0
  58. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/continents_response_continents_item.rb +47 -0
  59. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/continents_response_country_or_regions_item.rb +58 -0
  60. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cookies_match_condition_parameters.rb +124 -0
  61. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cookies_operator.rb +24 -0
  62. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain.rb +158 -0
  63. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain_https_parameters.rb +73 -0
  64. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +102 -0
  65. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
  66. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  67. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
  68. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb +24 -0
  69. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_rule.rb +108 -0
  70. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_rule_enabled_state.rb +16 -0
  71. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_rule_list.rb +55 -0
  72. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/customer_certificate.rb +122 -0
  73. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/customer_certificate_parameters.rb +144 -0
  74. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/deep_created_origin.rb +200 -0
  75. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/deep_created_origin_group.rb +114 -0
  76. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule.rb +107 -0
  77. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_action.rb +53 -0
  78. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_cache_expiration_action.rb +64 -0
  79. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_cache_key_query_string_action.rb +64 -0
  80. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_condition.rb +59 -0
  81. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_cookies_condition.rb +64 -0
  82. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_http_version_condition.rb +64 -0
  83. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_is_device_condition.rb +64 -0
  84. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_post_args_condition.rb +64 -0
  85. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_query_string_condition.rb +64 -0
  86. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_remote_address_condition.rb +64 -0
  87. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_body_condition.rb +64 -0
  88. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_header_action.rb +63 -0
  89. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_header_condition.rb +64 -0
  90. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_method_condition.rb +64 -0
  91. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_scheme_condition.rb +64 -0
  92. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_uri_condition.rb +64 -0
  93. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_response_header_action.rb +63 -0
  94. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_url_file_extension_condition.rb +64 -0
  95. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_url_file_name_condition.rb +64 -0
  96. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_url_path_condition.rb +64 -0
  97. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/deployment_status.rb +18 -0
  98. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/destination_protocol.rb +17 -0
  99. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/domain_validation_properties.rb +60 -0
  100. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/domain_validation_state.rb +20 -0
  101. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/edge_node.rb +93 -0
  102. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/edgenode_result.rb +101 -0
  103. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/enabled_state.rb +16 -0
  104. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint.rb +401 -0
  105. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +101 -0
  106. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_delivery_policy.rb +67 -0
  107. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_web_application_firewall_policy_link.rb +49 -0
  108. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  109. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +274 -0
  110. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/error_response.rb +60 -0
  111. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/forwarding_protocol.rb +17 -0
  112. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
  113. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  114. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/header_action.rb +17 -0
  115. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/header_action_parameters.rb +83 -0
  116. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/health_probe_parameters.rb +90 -0
  117. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/health_probe_request_type.rb +17 -0
  118. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/http_error_range_parameters.rb +65 -0
  119. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/http_version_match_condition_parameters.rb +95 -0
  120. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/https_redirect.rb +16 -0
  121. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/identity_type.rb +18 -0
  122. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
  123. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/is_device_match_condition_parameters.rb +113 -0
  124. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/key_vault_certificate_source_parameters.rb +137 -0
  125. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/key_vault_signing_key_parameters.rb +106 -0
  126. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/link_to_default_domain.rb +16 -0
  127. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/load_balancing_settings_parameters.rb +71 -0
  128. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  129. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_certificate.rb +59 -0
  130. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_certificate_parameters.rb +80 -0
  131. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_definition.rb +59 -0
  132. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_enabled_state.rb +16 -0
  133. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_group_definition.rb +81 -0
  134. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_group_override.rb +68 -0
  135. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_override.rb +72 -0
  136. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_set.rb +94 -0
  137. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_set_definition.rb +133 -0
  138. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_set_definition_list.rb +101 -0
  139. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_set_list.rb +55 -0
  140. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/match_condition.rb +125 -0
  141. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/match_processing_behavior.rb +16 -0
  142. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/match_variable.rb +23 -0
  143. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/metrics_response.rb +88 -0
  144. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/metrics_response_series_item.rb +99 -0
  145. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/metrics_response_series_item_data_item.rb +58 -0
  146. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/metrics_response_series_item_groups_item.rb +58 -0
  147. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/minimum_tls_version.rb +17 -0
  148. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/operation.rb +59 -0
  149. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/operation_display.rb +72 -0
  150. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/operations_list_result.rb +102 -0
  151. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/operator.rb +26 -0
  152. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
  153. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin.rb +266 -0
  154. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group.rb +163 -0
  155. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_list_result.rb +102 -0
  156. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_override_action.rb +64 -0
  157. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_override_action_parameters.rb +63 -0
  158. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_resource_state.rb +17 -0
  159. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_update_parameters.rb +100 -0
  160. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_list_result.rb +101 -0
  161. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  162. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +187 -0
  163. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/param_indicator.rb +17 -0
  164. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/policy_enabled_state.rb +16 -0
  165. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/policy_mode.rb +16 -0
  166. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/policy_resource_state.rb +20 -0
  167. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/policy_settings.rb +99 -0
  168. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/post_args_match_condition_parameters.rb +124 -0
  169. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/post_args_operator.rb +24 -0
  170. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/private_endpoint_status.rb +19 -0
  171. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/probe_protocol.rb +17 -0
  172. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/profile.rb +147 -0
  173. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/profile_list_result.rb +101 -0
  174. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  175. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  176. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/protocol_type.rb +16 -0
  177. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
  178. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/proxy_resource.rb +76 -0
  179. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  180. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/query_string_behavior.rb +18 -0
  181. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  182. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/query_string_match_condition_parameters.rb +114 -0
  183. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/query_string_operator.rb +24 -0
  184. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rankings_response.rb +77 -0
  185. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rankings_response_tables_item.rb +67 -0
  186. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rankings_response_tables_item_data_item.rb +67 -0
  187. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rankings_response_tables_item_data_item_metrics_item.rb +70 -0
  188. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rate_limit_rule.rb +117 -0
  189. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rate_limit_rule_list.rb +55 -0
  190. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/redirect_type.rb +18 -0
  191. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/remote_address_match_condition_parameters.rb +114 -0
  192. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/remote_address_operator.rb +17 -0
  193. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_body_match_condition_parameters.rb +114 -0
  194. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_body_operator.rb +24 -0
  195. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_header_match_condition_parameters.rb +125 -0
  196. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_header_operator.rb +24 -0
  197. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_method_match_condition_parameters.rb +95 -0
  198. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_scheme_match_condition_parameters.rb +95 -0
  199. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_uri_match_condition_parameters.rb +114 -0
  200. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_uri_operator.rb +24 -0
  201. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource.rb +80 -0
  202. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource_reference.rb +46 -0
  203. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  204. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource_usage.rb +83 -0
  205. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +100 -0
  206. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resources_response.rb +75 -0
  207. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resources_response_custom_domains_item.rb +80 -0
  208. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resources_response_endpoints_item.rb +89 -0
  209. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resources_response_endpoints_item_custom_domains_item.rb +81 -0
  210. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/response_based_detected_error_types.rb +17 -0
  211. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/response_based_origin_error_detection_parameters.rb +89 -0
  212. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/route.rb +299 -0
  213. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/route_list_result.rb +101 -0
  214. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/route_update_parameters.rb +235 -0
  215. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule.rb +174 -0
  216. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule_list_result.rb +101 -0
  217. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule_set.rb +99 -0
  218. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule_set_list_result.rb +102 -0
  219. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule_update_parameters.rb +110 -0
  220. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret.rb +113 -0
  221. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret_list_result.rb +102 -0
  222. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret_parameters.rb +46 -0
  223. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret_properties.rb +67 -0
  224. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret_type.rb +17 -0
  225. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy.rb +111 -0
  226. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy_list_result.rb +102 -0
  227. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy_parameters.rb +46 -0
  228. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy_web_application_firewall_association.rb +75 -0
  229. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy_web_application_firewall_parameters.rb +84 -0
  230. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/shared_private_link_resource_properties.rb +99 -0
  231. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/shared_private_link_resource_status.rb +19 -0
  232. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/sku.rb +54 -0
  233. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/sku_name.rb +28 -0
  234. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/sso_uri.rb +48 -0
  235. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/status.rb +18 -0
  236. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb +56 -0
  237. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/system_data.rb +107 -0
  238. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/tracked_resource.rb +105 -0
  239. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/transform.rb +16 -0
  240. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/transform_type.rb +20 -0
  241. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_file_extension_match_condition_parameters.rb +114 -0
  242. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_file_extension_operator.rb +24 -0
  243. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_file_name_match_condition_parameters.rb +114 -0
  244. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_file_name_operator.rb +24 -0
  245. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_path_match_condition_parameters.rb +114 -0
  246. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_path_operator.rb +25 -0
  247. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_redirect_action.rb +64 -0
  248. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_redirect_action_parameters.rb +127 -0
  249. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_rewrite_action.rb +64 -0
  250. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_rewrite_action_parameters.rb +86 -0
  251. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_action.rb +64 -0
  252. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_action_parameters.rb +82 -0
  253. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_key.rb +62 -0
  254. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_key_parameters.rb +86 -0
  255. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_param_identifier.rb +58 -0
  256. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/usage.rb +95 -0
  257. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/usage_name.rb +57 -0
  258. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/usages_list_result.rb +98 -0
  259. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/user_managed_https_parameters.rb +82 -0
  260. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  261. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +72 -0
  262. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_probe_input.rb +46 -0
  263. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_probe_output.rb +73 -0
  264. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_secret_input.rb +59 -0
  265. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_secret_output.rb +58 -0
  266. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_secret_type.rb +17 -0
  267. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validation_token.rb +47 -0
  268. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_metrics_response.rb +88 -0
  269. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_metrics_response_series_item.rb +98 -0
  270. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_metrics_response_series_item_data_item.rb +58 -0
  271. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_metrics_response_series_item_groups_item.rb +58 -0
  272. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_rankings_response.rb +96 -0
  273. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_rankings_response_data_item.rb +75 -0
  274. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_rankings_response_data_item_metrics_item.rb +69 -0
  275. data/lib/2020-09-01/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  276. data/lib/2020-09-01/generated/azure_mgmt_cdn/operations.rb +219 -0
  277. data/lib/2020-09-01/generated/azure_mgmt_cdn/origin_groups.rb +927 -0
  278. data/lib/2020-09-01/generated/azure_mgmt_cdn/origins.rb +922 -0
  279. data/lib/2020-09-01/generated/azure_mgmt_cdn/policies.rb +789 -0
  280. data/lib/2020-09-01/generated/azure_mgmt_cdn/profiles.rb +1482 -0
  281. data/lib/2020-09-01/generated/azure_mgmt_cdn/resource_usage_operations.rb +228 -0
  282. data/lib/2020-09-01/generated/azure_mgmt_cdn/routes.rb +913 -0
  283. data/lib/2020-09-01/generated/azure_mgmt_cdn/rule_sets.rb +908 -0
  284. data/lib/2020-09-01/generated/azure_mgmt_cdn/rules.rb +889 -0
  285. data/lib/2020-09-01/generated/azure_mgmt_cdn/secrets.rb +845 -0
  286. data/lib/2020-09-01/generated/azure_mgmt_cdn/security_policies.rb +868 -0
  287. data/lib/2020-09-01/generated/azure_mgmt_cdn/validate.rb +122 -0
  288. data/lib/azure_mgmt_cdn.rb +1 -0
  289. data/lib/profiles/latest/modules/cdn_profile_module.rb +802 -418
  290. data/lib/version.rb +1 -1
  291. metadata +282 -2
@@ -0,0 +1,228 @@
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_09_01
7
+ #
8
+ # Cdn Management Client
9
+ #
10
+ class ResourceUsageOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ResourceUsageOperations 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
+ # Check the quota and actual usage of the CDN profiles under the given
26
+ # subscription.
27
+ #
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<ResourceUsage>] operation results.
32
+ #
33
+ def list(custom_headers:nil)
34
+ first_page = list_as_lazy(custom_headers:custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Check the quota and actual usage of the CDN profiles under the given
40
+ # subscription.
41
+ #
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(custom_headers:nil)
48
+ list_async(custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Check the quota and actual usage of the CDN profiles under the given
53
+ # subscription.
54
+ #
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(custom_headers:nil)
61
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
62
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
63
+
64
+
65
+ request_headers = {}
66
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
67
+
68
+ # Set Headers
69
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
70
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
71
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage'
72
+
73
+ request_url = @base_url || @client.base_url
74
+
75
+ options = {
76
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
77
+ path_params: {'subscriptionId' => @client.subscription_id},
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(:post, 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::V2020_09_01::Models::ResourceUsageListResult.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
+ # Check the quota and actual usage of the CDN profiles under the given
115
+ # subscription.
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 [ResourceUsageListResult] 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
+ # Check the quota and actual usage of the CDN profiles under the given
131
+ # subscription.
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
+ # Check the quota and actual usage of the CDN profiles under the given
146
+ # subscription.
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(:post, 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::V2020_09_01::Models::ResourceUsageListResult.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
+ # Check the quota and actual usage of the CDN profiles under the given
208
+ # subscription.
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 [ResourceUsageListResult] which provide lazy access to pages of the
214
+ # response.
215
+ #
216
+ def list_as_lazy(custom_headers:nil)
217
+ response = list_async(custom_headers:custom_headers).value!
218
+ unless response.nil?
219
+ page = response.body
220
+ page.next_method = Proc.new do |next_page_link|
221
+ list_next_async(next_page_link, custom_headers:custom_headers)
222
+ end
223
+ page
224
+ end
225
+ end
226
+
227
+ end
228
+ end
@@ -0,0 +1,913 @@
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_09_01
7
+ #
8
+ # Cdn Management Client
9
+ #
10
+ class Routes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Routes 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 existing origins within a profile.
26
+ #
27
+ # @param resource_group_name [String] Name of the Resource group within the
28
+ # Azure subscription.
29
+ # @param profile_name [String] Name of the CDN profile which is unique within
30
+ # the resource group.
31
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
32
+ # unique globally.
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<Route>] operation results.
37
+ #
38
+ def list_by_endpoint(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
39
+ first_page = list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Lists all of the existing origins within a profile.
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 endpoint_name [String] Name of the endpoint under the profile which is
51
+ # unique globally.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def list_by_endpoint_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
58
+ list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Lists all of the existing origins within a profile.
63
+ #
64
+ # @param resource_group_name [String] Name of the Resource group within the
65
+ # Azure subscription.
66
+ # @param profile_name [String] Name of the CDN profile which is unique within
67
+ # the resource group.
68
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
69
+ # unique globally.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
78
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
79
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
80
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
81
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
82
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+
85
+
86
+ request_headers = {}
87
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
88
+
89
+ # Set Headers
90
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes'
93
+
94
+ request_url = @base_url || @client.base_url
95
+
96
+ options = {
97
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
99
+ query_params: {'api-version' => @client.api_version},
100
+ headers: request_headers.merge(custom_headers || {}),
101
+ base_url: request_url
102
+ }
103
+ promise = @client.make_request_async(:get, path_template, options)
104
+
105
+ promise = promise.then do |result|
106
+ http_response = result.response
107
+ status_code = http_response.status
108
+ response_content = http_response.body
109
+ unless status_code == 200
110
+ error_model = JSON.load(response_content)
111
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
112
+ end
113
+
114
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
115
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
116
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
117
+ # Deserialize Response
118
+ if status_code == 200
119
+ begin
120
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
121
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::RouteListResult.mapper()
122
+ result.body = @client.deserialize(result_mapper, parsed_response)
123
+ rescue Exception => e
124
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
125
+ end
126
+ end
127
+
128
+ result
129
+ end
130
+
131
+ promise.execute
132
+ end
133
+
134
+ #
135
+ # Gets an existing route with the specified route name under the specified
136
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
137
+ #
138
+ # @param resource_group_name [String] Name of the Resource group within the
139
+ # Azure subscription.
140
+ # @param profile_name [String] Name of the CDN profile which is unique within
141
+ # the resource group.
142
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
143
+ # unique globally.
144
+ # @param route_name [String] Name of the routing rule.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [Route] operation results.
149
+ #
150
+ def get(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:nil)
151
+ response = get_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:custom_headers).value!
152
+ response.body unless response.nil?
153
+ end
154
+
155
+ #
156
+ # Gets an existing route with the specified route name under the specified
157
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
158
+ #
159
+ # @param resource_group_name [String] Name of the Resource group within the
160
+ # Azure subscription.
161
+ # @param profile_name [String] Name of the CDN profile which is unique within
162
+ # the resource group.
163
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
164
+ # unique globally.
165
+ # @param route_name [String] Name of the routing rule.
166
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
167
+ # will be added to the HTTP request.
168
+ #
169
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
170
+ #
171
+ def get_with_http_info(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:nil)
172
+ get_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:custom_headers).value!
173
+ end
174
+
175
+ #
176
+ # Gets an existing route with the specified route name under the specified
177
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
178
+ #
179
+ # @param resource_group_name [String] Name of the Resource group within the
180
+ # Azure subscription.
181
+ # @param profile_name [String] Name of the CDN profile which is unique within
182
+ # the resource group.
183
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
184
+ # unique globally.
185
+ # @param route_name [String] Name of the routing rule.
186
+ # @param [Hash{String => String}] A hash of custom headers that will be added
187
+ # to the HTTP request.
188
+ #
189
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
190
+ #
191
+ def get_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:nil)
192
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
193
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
194
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
195
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
196
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
197
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
198
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
199
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
200
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
201
+
202
+
203
+ request_headers = {}
204
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
205
+
206
+ # Set Headers
207
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
208
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
209
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}'
210
+
211
+ request_url = @base_url || @client.base_url
212
+
213
+ options = {
214
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
215
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
216
+ query_params: {'api-version' => @client.api_version},
217
+ headers: request_headers.merge(custom_headers || {}),
218
+ base_url: request_url
219
+ }
220
+ promise = @client.make_request_async(:get, path_template, options)
221
+
222
+ promise = promise.then do |result|
223
+ http_response = result.response
224
+ status_code = http_response.status
225
+ response_content = http_response.body
226
+ unless status_code == 200
227
+ error_model = JSON.load(response_content)
228
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
229
+ end
230
+
231
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
232
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
233
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
234
+ # Deserialize Response
235
+ if status_code == 200
236
+ begin
237
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
238
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Route.mapper()
239
+ result.body = @client.deserialize(result_mapper, parsed_response)
240
+ rescue Exception => e
241
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
242
+ end
243
+ end
244
+
245
+ result
246
+ end
247
+
248
+ promise.execute
249
+ end
250
+
251
+ #
252
+ # Creates a new route with the specified route name under the specified
253
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
254
+ #
255
+ # @param resource_group_name [String] Name of the Resource group within the
256
+ # Azure subscription.
257
+ # @param profile_name [String] Name of the CDN profile which is unique within
258
+ # the resource group.
259
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
260
+ # unique globally.
261
+ # @param route_name [String] Name of the routing rule.
262
+ # @param route [Route] Route properties
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ # @return [Route] operation results.
267
+ #
268
+ def create(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:nil)
269
+ response = create_async(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:custom_headers).value!
270
+ response.body unless response.nil?
271
+ end
272
+
273
+ #
274
+ # @param resource_group_name [String] Name of the Resource group within the
275
+ # Azure subscription.
276
+ # @param profile_name [String] Name of the CDN profile which is unique within
277
+ # the resource group.
278
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
279
+ # unique globally.
280
+ # @param route_name [String] Name of the routing rule.
281
+ # @param route [Route] Route properties
282
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
283
+ # will be added to the HTTP request.
284
+ #
285
+ # @return [Concurrent::Promise] promise which provides async access to http
286
+ # response.
287
+ #
288
+ def create_async(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:nil)
289
+ # Send request
290
+ promise = begin_create_async(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:custom_headers)
291
+
292
+ promise = promise.then do |response|
293
+ # Defining deserialization method.
294
+ deserialize_method = lambda do |parsed_response|
295
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Route.mapper()
296
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
297
+ end
298
+
299
+ # Waiting for response.
300
+ @client.get_long_running_operation_result(response, deserialize_method)
301
+ end
302
+
303
+ promise
304
+ end
305
+
306
+ #
307
+ # Updates an existing route with the specified route name under the specified
308
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
309
+ #
310
+ # @param resource_group_name [String] Name of the Resource group within the
311
+ # Azure subscription.
312
+ # @param profile_name [String] Name of the CDN profile which is unique within
313
+ # the resource group.
314
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
315
+ # unique globally.
316
+ # @param route_name [String] Name of the routing rule.
317
+ # @param route_update_properties [RouteUpdateParameters] Route update
318
+ # properties
319
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
320
+ # will be added to the HTTP request.
321
+ #
322
+ # @return [Route] operation results.
323
+ #
324
+ def update(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:nil)
325
+ response = update_async(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:custom_headers).value!
326
+ response.body unless response.nil?
327
+ end
328
+
329
+ #
330
+ # @param resource_group_name [String] Name of the Resource group within the
331
+ # Azure subscription.
332
+ # @param profile_name [String] Name of the CDN profile which is unique within
333
+ # the resource group.
334
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
335
+ # unique globally.
336
+ # @param route_name [String] Name of the routing rule.
337
+ # @param route_update_properties [RouteUpdateParameters] Route update
338
+ # properties
339
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
340
+ # will be added to the HTTP request.
341
+ #
342
+ # @return [Concurrent::Promise] promise which provides async access to http
343
+ # response.
344
+ #
345
+ def update_async(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:nil)
346
+ # Send request
347
+ promise = begin_update_async(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:custom_headers)
348
+
349
+ promise = promise.then do |response|
350
+ # Defining deserialization method.
351
+ deserialize_method = lambda do |parsed_response|
352
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Route.mapper()
353
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
354
+ end
355
+
356
+ # Waiting for response.
357
+ @client.get_long_running_operation_result(response, deserialize_method)
358
+ end
359
+
360
+ promise
361
+ end
362
+
363
+ #
364
+ # Deletes an existing route with the specified route name under the specified
365
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
366
+ #
367
+ # @param resource_group_name [String] Name of the Resource group within the
368
+ # Azure subscription.
369
+ # @param profile_name [String] Name of the CDN profile which is unique within
370
+ # the resource group.
371
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
372
+ # unique globally.
373
+ # @param route_name [String] Name of the routing rule.
374
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
375
+ # will be added to the HTTP request.
376
+ #
377
+ def delete(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:nil)
378
+ response = delete_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:custom_headers).value!
379
+ nil
380
+ end
381
+
382
+ #
383
+ # @param resource_group_name [String] Name of the Resource group within the
384
+ # Azure subscription.
385
+ # @param profile_name [String] Name of the CDN profile which is unique within
386
+ # the resource group.
387
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
388
+ # unique globally.
389
+ # @param route_name [String] Name of the routing rule.
390
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
391
+ # will be added to the HTTP request.
392
+ #
393
+ # @return [Concurrent::Promise] promise which provides async access to http
394
+ # response.
395
+ #
396
+ def delete_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:nil)
397
+ # Send request
398
+ promise = begin_delete_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:custom_headers)
399
+
400
+ promise = promise.then do |response|
401
+ # Defining deserialization method.
402
+ deserialize_method = lambda do |parsed_response|
403
+ end
404
+
405
+ # Waiting for response.
406
+ @client.get_long_running_operation_result(response, deserialize_method)
407
+ end
408
+
409
+ promise
410
+ end
411
+
412
+ #
413
+ # Creates a new route with the specified route name under the specified
414
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
415
+ #
416
+ # @param resource_group_name [String] Name of the Resource group within the
417
+ # Azure subscription.
418
+ # @param profile_name [String] Name of the CDN profile which is unique within
419
+ # the resource group.
420
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
421
+ # unique globally.
422
+ # @param route_name [String] Name of the routing rule.
423
+ # @param route [Route] Route properties
424
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
425
+ # will be added to the HTTP request.
426
+ #
427
+ # @return [Route] operation results.
428
+ #
429
+ def begin_create(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:nil)
430
+ response = begin_create_async(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:custom_headers).value!
431
+ response.body unless response.nil?
432
+ end
433
+
434
+ #
435
+ # Creates a new route with the specified route name under the specified
436
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
437
+ #
438
+ # @param resource_group_name [String] Name of the Resource group within the
439
+ # Azure subscription.
440
+ # @param profile_name [String] Name of the CDN profile which is unique within
441
+ # the resource group.
442
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
443
+ # unique globally.
444
+ # @param route_name [String] Name of the routing rule.
445
+ # @param route [Route] Route properties
446
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
447
+ # will be added to the HTTP request.
448
+ #
449
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
450
+ #
451
+ def begin_create_with_http_info(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:nil)
452
+ begin_create_async(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:custom_headers).value!
453
+ end
454
+
455
+ #
456
+ # Creates a new route with the specified route name under the specified
457
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
458
+ #
459
+ # @param resource_group_name [String] Name of the Resource group within the
460
+ # Azure subscription.
461
+ # @param profile_name [String] Name of the CDN profile which is unique within
462
+ # the resource group.
463
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
464
+ # unique globally.
465
+ # @param route_name [String] Name of the routing rule.
466
+ # @param route [Route] Route properties
467
+ # @param [Hash{String => String}] A hash of custom headers that will be added
468
+ # to the HTTP request.
469
+ #
470
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
471
+ #
472
+ def begin_create_async(resource_group_name, profile_name, endpoint_name, route_name, route, custom_headers:nil)
473
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
474
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
475
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
476
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
477
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
478
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
479
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
480
+ fail ArgumentError, 'route is nil' if route.nil?
481
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
482
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
483
+
484
+
485
+ request_headers = {}
486
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
487
+
488
+ # Set Headers
489
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
490
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
491
+
492
+ # Serialize Request
493
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Route.mapper()
494
+ request_content = @client.serialize(request_mapper, route)
495
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
496
+
497
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}'
498
+
499
+ request_url = @base_url || @client.base_url
500
+
501
+ options = {
502
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
503
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
504
+ query_params: {'api-version' => @client.api_version},
505
+ body: request_content,
506
+ headers: request_headers.merge(custom_headers || {}),
507
+ base_url: request_url
508
+ }
509
+ promise = @client.make_request_async(:put, path_template, options)
510
+
511
+ promise = promise.then do |result|
512
+ http_response = result.response
513
+ status_code = http_response.status
514
+ response_content = http_response.body
515
+ unless status_code == 200 || status_code == 201
516
+ error_model = JSON.load(response_content)
517
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
518
+ end
519
+
520
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
521
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
522
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
523
+ # Deserialize Response
524
+ if status_code == 200
525
+ begin
526
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
527
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Route.mapper()
528
+ result.body = @client.deserialize(result_mapper, parsed_response)
529
+ rescue Exception => e
530
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
531
+ end
532
+ end
533
+ # Deserialize Response
534
+ if status_code == 201
535
+ begin
536
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
537
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Route.mapper()
538
+ result.body = @client.deserialize(result_mapper, parsed_response)
539
+ rescue Exception => e
540
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
541
+ end
542
+ end
543
+
544
+ result
545
+ end
546
+
547
+ promise.execute
548
+ end
549
+
550
+ #
551
+ # Updates an existing route with the specified route name under the specified
552
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
553
+ #
554
+ # @param resource_group_name [String] Name of the Resource group within the
555
+ # Azure subscription.
556
+ # @param profile_name [String] Name of the CDN profile which is unique within
557
+ # the resource group.
558
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
559
+ # unique globally.
560
+ # @param route_name [String] Name of the routing rule.
561
+ # @param route_update_properties [RouteUpdateParameters] Route update
562
+ # properties
563
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
564
+ # will be added to the HTTP request.
565
+ #
566
+ # @return [Route] operation results.
567
+ #
568
+ def begin_update(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:nil)
569
+ response = begin_update_async(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:custom_headers).value!
570
+ response.body unless response.nil?
571
+ end
572
+
573
+ #
574
+ # Updates an existing route with the specified route name under the specified
575
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
576
+ #
577
+ # @param resource_group_name [String] Name of the Resource group within the
578
+ # Azure subscription.
579
+ # @param profile_name [String] Name of the CDN profile which is unique within
580
+ # the resource group.
581
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
582
+ # unique globally.
583
+ # @param route_name [String] Name of the routing rule.
584
+ # @param route_update_properties [RouteUpdateParameters] Route update
585
+ # properties
586
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
587
+ # will be added to the HTTP request.
588
+ #
589
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
590
+ #
591
+ def begin_update_with_http_info(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:nil)
592
+ begin_update_async(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:custom_headers).value!
593
+ end
594
+
595
+ #
596
+ # Updates an existing route with the specified route name under the specified
597
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
598
+ #
599
+ # @param resource_group_name [String] Name of the Resource group within the
600
+ # Azure subscription.
601
+ # @param profile_name [String] Name of the CDN profile which is unique within
602
+ # the resource group.
603
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
604
+ # unique globally.
605
+ # @param route_name [String] Name of the routing rule.
606
+ # @param route_update_properties [RouteUpdateParameters] Route update
607
+ # properties
608
+ # @param [Hash{String => String}] A hash of custom headers that will be added
609
+ # to the HTTP request.
610
+ #
611
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
612
+ #
613
+ def begin_update_async(resource_group_name, profile_name, endpoint_name, route_name, route_update_properties, custom_headers:nil)
614
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
615
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
616
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
617
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
618
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
619
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
620
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
621
+ fail ArgumentError, 'route_update_properties is nil' if route_update_properties.nil?
622
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
623
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
624
+
625
+
626
+ request_headers = {}
627
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
628
+
629
+ # Set Headers
630
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
631
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
632
+
633
+ # Serialize Request
634
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::RouteUpdateParameters.mapper()
635
+ request_content = @client.serialize(request_mapper, route_update_properties)
636
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
637
+
638
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}'
639
+
640
+ request_url = @base_url || @client.base_url
641
+
642
+ options = {
643
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
644
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
645
+ query_params: {'api-version' => @client.api_version},
646
+ body: request_content,
647
+ headers: request_headers.merge(custom_headers || {}),
648
+ base_url: request_url
649
+ }
650
+ promise = @client.make_request_async(:patch, path_template, options)
651
+
652
+ promise = promise.then do |result|
653
+ http_response = result.response
654
+ status_code = http_response.status
655
+ response_content = http_response.body
656
+ unless status_code == 200 || status_code == 202
657
+ error_model = JSON.load(response_content)
658
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
659
+ end
660
+
661
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
662
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
663
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
664
+ # Deserialize Response
665
+ if status_code == 200
666
+ begin
667
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
668
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Route.mapper()
669
+ result.body = @client.deserialize(result_mapper, parsed_response)
670
+ rescue Exception => e
671
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
672
+ end
673
+ end
674
+ # Deserialize Response
675
+ if status_code == 202
676
+ begin
677
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
678
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Route.mapper()
679
+ result.body = @client.deserialize(result_mapper, parsed_response)
680
+ rescue Exception => e
681
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
682
+ end
683
+ end
684
+
685
+ result
686
+ end
687
+
688
+ promise.execute
689
+ end
690
+
691
+ #
692
+ # Deletes an existing route with the specified route name under the specified
693
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
694
+ #
695
+ # @param resource_group_name [String] Name of the Resource group within the
696
+ # Azure subscription.
697
+ # @param profile_name [String] Name of the CDN profile which is unique within
698
+ # the resource group.
699
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
700
+ # unique globally.
701
+ # @param route_name [String] Name of the routing rule.
702
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
703
+ # will be added to the HTTP request.
704
+ #
705
+ #
706
+ def begin_delete(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:nil)
707
+ response = begin_delete_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:custom_headers).value!
708
+ nil
709
+ end
710
+
711
+ #
712
+ # Deletes an existing route with the specified route name under the specified
713
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
714
+ #
715
+ # @param resource_group_name [String] Name of the Resource group within the
716
+ # Azure subscription.
717
+ # @param profile_name [String] Name of the CDN profile which is unique within
718
+ # the resource group.
719
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
720
+ # unique globally.
721
+ # @param route_name [String] Name of the routing rule.
722
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
723
+ # will be added to the HTTP request.
724
+ #
725
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
726
+ #
727
+ def begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:nil)
728
+ begin_delete_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:custom_headers).value!
729
+ end
730
+
731
+ #
732
+ # Deletes an existing route with the specified route name under the specified
733
+ # subscription, resource group, profile, and AzureFrontDoor endpoint.
734
+ #
735
+ # @param resource_group_name [String] Name of the Resource group within the
736
+ # Azure subscription.
737
+ # @param profile_name [String] Name of the CDN profile which is unique within
738
+ # the resource group.
739
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
740
+ # unique globally.
741
+ # @param route_name [String] Name of the routing rule.
742
+ # @param [Hash{String => String}] A hash of custom headers that will be added
743
+ # to the HTTP request.
744
+ #
745
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
746
+ #
747
+ def begin_delete_async(resource_group_name, profile_name, endpoint_name, route_name, custom_headers:nil)
748
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
749
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
750
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
751
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
752
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
753
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
754
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
755
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
756
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
757
+
758
+
759
+ request_headers = {}
760
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
761
+
762
+ # Set Headers
763
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
764
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
765
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}'
766
+
767
+ request_url = @base_url || @client.base_url
768
+
769
+ options = {
770
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
771
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
772
+ query_params: {'api-version' => @client.api_version},
773
+ headers: request_headers.merge(custom_headers || {}),
774
+ base_url: request_url
775
+ }
776
+ promise = @client.make_request_async(:delete, path_template, options)
777
+
778
+ promise = promise.then do |result|
779
+ http_response = result.response
780
+ status_code = http_response.status
781
+ response_content = http_response.body
782
+ unless status_code == 200 || status_code == 204
783
+ error_model = JSON.load(response_content)
784
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
785
+ end
786
+
787
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
788
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
789
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
790
+
791
+ result
792
+ end
793
+
794
+ promise.execute
795
+ end
796
+
797
+ #
798
+ # Lists all of the existing origins within a profile.
799
+ #
800
+ # @param next_page_link [String] The NextLink from the previous successful call
801
+ # to List operation.
802
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
803
+ # will be added to the HTTP request.
804
+ #
805
+ # @return [RouteListResult] operation results.
806
+ #
807
+ def list_by_endpoint_next(next_page_link, custom_headers:nil)
808
+ response = list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers).value!
809
+ response.body unless response.nil?
810
+ end
811
+
812
+ #
813
+ # Lists all of the existing origins within a profile.
814
+ #
815
+ # @param next_page_link [String] The NextLink from the previous successful call
816
+ # to List operation.
817
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
818
+ # will be added to the HTTP request.
819
+ #
820
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
821
+ #
822
+ def list_by_endpoint_next_with_http_info(next_page_link, custom_headers:nil)
823
+ list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers).value!
824
+ end
825
+
826
+ #
827
+ # Lists all of the existing origins within a profile.
828
+ #
829
+ # @param next_page_link [String] The NextLink from the previous successful call
830
+ # to List operation.
831
+ # @param [Hash{String => String}] A hash of custom headers that will be added
832
+ # to the HTTP request.
833
+ #
834
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
835
+ #
836
+ def list_by_endpoint_next_async(next_page_link, custom_headers:nil)
837
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
838
+
839
+
840
+ request_headers = {}
841
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
842
+
843
+ # Set Headers
844
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
845
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
846
+ path_template = '{nextLink}'
847
+
848
+ request_url = @base_url || @client.base_url
849
+
850
+ options = {
851
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
852
+ skip_encoding_path_params: {'nextLink' => next_page_link},
853
+ headers: request_headers.merge(custom_headers || {}),
854
+ base_url: request_url
855
+ }
856
+ promise = @client.make_request_async(:get, path_template, options)
857
+
858
+ promise = promise.then do |result|
859
+ http_response = result.response
860
+ status_code = http_response.status
861
+ response_content = http_response.body
862
+ unless status_code == 200
863
+ error_model = JSON.load(response_content)
864
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
865
+ end
866
+
867
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
868
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
869
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
870
+ # Deserialize Response
871
+ if status_code == 200
872
+ begin
873
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
874
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::RouteListResult.mapper()
875
+ result.body = @client.deserialize(result_mapper, parsed_response)
876
+ rescue Exception => e
877
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
878
+ end
879
+ end
880
+
881
+ result
882
+ end
883
+
884
+ promise.execute
885
+ end
886
+
887
+ #
888
+ # Lists all of the existing origins within a profile.
889
+ #
890
+ # @param resource_group_name [String] Name of the Resource group within the
891
+ # Azure subscription.
892
+ # @param profile_name [String] Name of the CDN profile which is unique within
893
+ # the resource group.
894
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
895
+ # unique globally.
896
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
897
+ # will be added to the HTTP request.
898
+ #
899
+ # @return [RouteListResult] which provide lazy access to pages of the response.
900
+ #
901
+ def list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
902
+ response = list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
903
+ unless response.nil?
904
+ page = response.body
905
+ page.next_method = Proc.new do |next_page_link|
906
+ list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers)
907
+ end
908
+ page
909
+ end
910
+ end
911
+
912
+ end
913
+ end