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,1426 @@
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 AFDEndpoints
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the AFDEndpoints class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [CdnManagementClient] reference to the CdnManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists existing AzureFrontDoor endpoints.
26
+ #
27
+ # @param resource_group_name [String] Name of the Resource group within the
28
+ # Azure subscription.
29
+ # @param profile_name [String] Name of the CDN profile which is unique within
30
+ # the resource group.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Array<AFDEndpoint>] operation results.
35
+ #
36
+ def list_by_profile(resource_group_name, profile_name, custom_headers:nil)
37
+ first_page = list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers:custom_headers)
38
+ first_page.get_all_items
39
+ end
40
+
41
+ #
42
+ # Lists existing AzureFrontDoor endpoints.
43
+ #
44
+ # @param resource_group_name [String] Name of the Resource group within the
45
+ # Azure subscription.
46
+ # @param profile_name [String] Name of the CDN profile which is unique within
47
+ # the resource group.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_by_profile_with_http_info(resource_group_name, profile_name, custom_headers:nil)
54
+ list_by_profile_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Lists existing AzureFrontDoor endpoints.
59
+ #
60
+ # @param resource_group_name [String] Name of the Resource group within the
61
+ # Azure subscription.
62
+ # @param profile_name [String] Name of the CDN profile which is unique within
63
+ # the resource group.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_by_profile_async(resource_group_name, profile_name, custom_headers:nil)
70
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
71
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
72
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
73
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
74
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
75
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
76
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'subscriptionId' => @client.subscription_id},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
109
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpointListResult.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Gets an existing AzureFrontDoor endpoint with the specified endpoint name
129
+ # under the specified subscription, resource group and profile.
130
+ #
131
+ # @param resource_group_name [String] Name of the Resource group within the
132
+ # Azure subscription.
133
+ # @param profile_name [String] Name of the CDN profile which is unique within
134
+ # the resource group.
135
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
136
+ # unique globally.
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [AFDEndpoint] operation results.
141
+ #
142
+ def get(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
143
+ response = get_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
144
+ response.body unless response.nil?
145
+ end
146
+
147
+ #
148
+ # Gets an existing AzureFrontDoor endpoint with the specified endpoint name
149
+ # under the specified subscription, resource group and profile.
150
+ #
151
+ # @param resource_group_name [String] Name of the Resource group within the
152
+ # Azure subscription.
153
+ # @param profile_name [String] Name of the CDN profile which is unique within
154
+ # the resource group.
155
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
156
+ # unique globally.
157
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
158
+ # will be added to the HTTP request.
159
+ #
160
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
161
+ #
162
+ def get_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
163
+ get_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
164
+ end
165
+
166
+ #
167
+ # Gets an existing AzureFrontDoor endpoint with the specified endpoint name
168
+ # under the specified subscription, resource group and profile.
169
+ #
170
+ # @param resource_group_name [String] Name of the Resource group within the
171
+ # Azure subscription.
172
+ # @param profile_name [String] Name of the CDN profile which is unique within
173
+ # the resource group.
174
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
175
+ # unique globally.
176
+ # @param [Hash{String => String}] A hash of custom headers that will be added
177
+ # to the HTTP request.
178
+ #
179
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
180
+ #
181
+ def get_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
182
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
183
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
184
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
185
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
186
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
187
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
188
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
189
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
190
+
191
+
192
+ request_headers = {}
193
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
194
+
195
+ # Set Headers
196
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
197
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
198
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}'
199
+
200
+ request_url = @base_url || @client.base_url
201
+
202
+ options = {
203
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
204
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
205
+ query_params: {'api-version' => @client.api_version},
206
+ headers: request_headers.merge(custom_headers || {}),
207
+ base_url: request_url
208
+ }
209
+ promise = @client.make_request_async(:get, path_template, options)
210
+
211
+ promise = promise.then do |result|
212
+ http_response = result.response
213
+ status_code = http_response.status
214
+ response_content = http_response.body
215
+ unless status_code == 200
216
+ error_model = JSON.load(response_content)
217
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
218
+ end
219
+
220
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
221
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
222
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
223
+ # Deserialize Response
224
+ if status_code == 200
225
+ begin
226
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
227
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpoint.mapper()
228
+ result.body = @client.deserialize(result_mapper, parsed_response)
229
+ rescue Exception => e
230
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
231
+ end
232
+ end
233
+
234
+ result
235
+ end
236
+
237
+ promise.execute
238
+ end
239
+
240
+ #
241
+ # Creates a new AzureFrontDoor endpoint with the specified endpoint name under
242
+ # the specified subscription, resource group and profile.
243
+ #
244
+ # @param resource_group_name [String] Name of the Resource group within the
245
+ # Azure subscription.
246
+ # @param profile_name [String] Name of the CDN profile which is unique within
247
+ # the resource group.
248
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
249
+ # unique globally.
250
+ # @param endpoint [AFDEndpoint] Endpoint properties
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [AFDEndpoint] operation results.
255
+ #
256
+ def create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
257
+ response = create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
258
+ response.body unless response.nil?
259
+ end
260
+
261
+ #
262
+ # @param resource_group_name [String] Name of the Resource group within the
263
+ # Azure subscription.
264
+ # @param profile_name [String] Name of the CDN profile which is unique within
265
+ # the resource group.
266
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
267
+ # unique globally.
268
+ # @param endpoint [AFDEndpoint] Endpoint properties
269
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
270
+ # will be added to the HTTP request.
271
+ #
272
+ # @return [Concurrent::Promise] promise which provides async access to http
273
+ # response.
274
+ #
275
+ def create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
276
+ # Send request
277
+ promise = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers)
278
+
279
+ promise = promise.then do |response|
280
+ # Defining deserialization method.
281
+ deserialize_method = lambda do |parsed_response|
282
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpoint.mapper()
283
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
284
+ end
285
+
286
+ # Waiting for response.
287
+ @client.get_long_running_operation_result(response, deserialize_method)
288
+ end
289
+
290
+ promise
291
+ end
292
+
293
+ #
294
+ # Updates an existing AzureFrontDoor endpoint with the specified endpoint name
295
+ # under the specified subscription, resource group and profile. Only tags can
296
+ # be updated after creating an endpoint. To update origins, use the Update
297
+ # Origin operation. To update origin groups, use the Update Origin group
298
+ # operation. To update domains, use the Update Custom Domain operation.
299
+ #
300
+ # @param resource_group_name [String] Name of the Resource group within the
301
+ # Azure subscription.
302
+ # @param profile_name [String] Name of the CDN profile which is unique within
303
+ # the resource group.
304
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
305
+ # unique globally.
306
+ # @param endpoint_update_properties [AFDEndpointUpdateParameters] Endpoint
307
+ # update properties
308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
+ # will be added to the HTTP request.
310
+ #
311
+ # @return [AFDEndpoint] operation results.
312
+ #
313
+ def update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
314
+ response = update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
315
+ response.body unless response.nil?
316
+ end
317
+
318
+ #
319
+ # @param resource_group_name [String] Name of the Resource group within the
320
+ # Azure subscription.
321
+ # @param profile_name [String] Name of the CDN profile which is unique within
322
+ # the resource group.
323
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
324
+ # unique globally.
325
+ # @param endpoint_update_properties [AFDEndpointUpdateParameters] Endpoint
326
+ # update properties
327
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
328
+ # will be added to the HTTP request.
329
+ #
330
+ # @return [Concurrent::Promise] promise which provides async access to http
331
+ # response.
332
+ #
333
+ def update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
334
+ # Send request
335
+ promise = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers)
336
+
337
+ promise = promise.then do |response|
338
+ # Defining deserialization method.
339
+ deserialize_method = lambda do |parsed_response|
340
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpoint.mapper()
341
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
342
+ end
343
+
344
+ # Waiting for response.
345
+ @client.get_long_running_operation_result(response, deserialize_method)
346
+ end
347
+
348
+ promise
349
+ end
350
+
351
+ #
352
+ # Deletes an existing AzureFrontDoor endpoint with the specified endpoint name
353
+ # under the specified subscription, resource group and profile.
354
+ #
355
+ # @param resource_group_name [String] Name of the Resource group within the
356
+ # Azure subscription.
357
+ # @param profile_name [String] Name of the CDN profile which is unique within
358
+ # the resource group.
359
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
360
+ # unique globally.
361
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
362
+ # will be added to the HTTP request.
363
+ #
364
+ def delete(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
365
+ response = delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
366
+ nil
367
+ end
368
+
369
+ #
370
+ # @param resource_group_name [String] Name of the Resource group within the
371
+ # Azure subscription.
372
+ # @param profile_name [String] Name of the CDN profile which is unique within
373
+ # the resource group.
374
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
375
+ # unique globally.
376
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
377
+ # will be added to the HTTP request.
378
+ #
379
+ # @return [Concurrent::Promise] promise which provides async access to http
380
+ # response.
381
+ #
382
+ def delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
383
+ # Send request
384
+ promise = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
385
+
386
+ promise = promise.then do |response|
387
+ # Defining deserialization method.
388
+ deserialize_method = lambda do |parsed_response|
389
+ end
390
+
391
+ # Waiting for response.
392
+ @client.get_long_running_operation_result(response, deserialize_method)
393
+ end
394
+
395
+ promise
396
+ end
397
+
398
+ #
399
+ # Removes a content from AzureFrontDoor.
400
+ #
401
+ # @param resource_group_name [String] Name of the Resource group within the
402
+ # Azure subscription.
403
+ # @param profile_name [String] Name of the CDN profile which is unique within
404
+ # the resource group.
405
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
406
+ # unique globally.
407
+ # @param contents [AfdPurgeParameters] The list of paths to the content and the
408
+ # list of linked domains to be purged. Path can be a full URL, e.g.
409
+ # '/pictures/city.png' which removes a single file, or a directory with a
410
+ # wildcard, e.g. '/pictures/*' which removes all folders and files in the
411
+ # directory.
412
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
413
+ # will be added to the HTTP request.
414
+ #
415
+ def purge_content(resource_group_name, profile_name, endpoint_name, contents, custom_headers:nil)
416
+ response = purge_content_async(resource_group_name, profile_name, endpoint_name, contents, custom_headers:custom_headers).value!
417
+ nil
418
+ end
419
+
420
+ #
421
+ # @param resource_group_name [String] Name of the Resource group within the
422
+ # Azure subscription.
423
+ # @param profile_name [String] Name of the CDN profile which is unique within
424
+ # the resource group.
425
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
426
+ # unique globally.
427
+ # @param contents [AfdPurgeParameters] The list of paths to the content and the
428
+ # list of linked domains to be purged. Path can be a full URL, e.g.
429
+ # '/pictures/city.png' which removes a single file, or a directory with a
430
+ # wildcard, e.g. '/pictures/*' which removes all folders and files in the
431
+ # directory.
432
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
433
+ # will be added to the HTTP request.
434
+ #
435
+ # @return [Concurrent::Promise] promise which provides async access to http
436
+ # response.
437
+ #
438
+ def purge_content_async(resource_group_name, profile_name, endpoint_name, contents, custom_headers:nil)
439
+ # Send request
440
+ promise = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, contents, custom_headers:custom_headers)
441
+
442
+ promise = promise.then do |response|
443
+ # Defining deserialization method.
444
+ deserialize_method = lambda do |parsed_response|
445
+ end
446
+
447
+ # Waiting for response.
448
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION)
449
+ end
450
+
451
+ promise
452
+ end
453
+
454
+ #
455
+ # Checks the quota and actual usage of endpoints under the given CDN profile.
456
+ #
457
+ # @param resource_group_name [String] Name of the Resource group within the
458
+ # Azure subscription.
459
+ # @param profile_name [String] Name of the CDN profile which is unique within
460
+ # the resource group.
461
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
462
+ # unique globally.
463
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
+ # will be added to the HTTP request.
465
+ #
466
+ # @return [Array<Usage>] operation results.
467
+ #
468
+ def list_resource_usage(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
469
+ first_page = list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
470
+ first_page.get_all_items
471
+ end
472
+
473
+ #
474
+ # Checks the quota and actual usage of endpoints under the given CDN profile.
475
+ #
476
+ # @param resource_group_name [String] Name of the Resource group within the
477
+ # Azure subscription.
478
+ # @param profile_name [String] Name of the CDN profile which is unique within
479
+ # the resource group.
480
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
481
+ # unique globally.
482
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
483
+ # will be added to the HTTP request.
484
+ #
485
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
486
+ #
487
+ def list_resource_usage_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
488
+ list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
489
+ end
490
+
491
+ #
492
+ # Checks the quota and actual usage of endpoints under the given CDN profile.
493
+ #
494
+ # @param resource_group_name [String] Name of the Resource group within the
495
+ # Azure subscription.
496
+ # @param profile_name [String] Name of the CDN profile which is unique within
497
+ # the resource group.
498
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
499
+ # unique globally.
500
+ # @param [Hash{String => String}] A hash of custom headers that will be added
501
+ # to the HTTP request.
502
+ #
503
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
504
+ #
505
+ def list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
506
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
507
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
508
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
509
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
510
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
511
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
512
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
513
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
514
+
515
+
516
+ request_headers = {}
517
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
518
+
519
+ # Set Headers
520
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
521
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
522
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages'
523
+
524
+ request_url = @base_url || @client.base_url
525
+
526
+ options = {
527
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
528
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
529
+ query_params: {'api-version' => @client.api_version},
530
+ headers: request_headers.merge(custom_headers || {}),
531
+ base_url: request_url
532
+ }
533
+ promise = @client.make_request_async(:post, path_template, options)
534
+
535
+ promise = promise.then do |result|
536
+ http_response = result.response
537
+ status_code = http_response.status
538
+ response_content = http_response.body
539
+ unless status_code == 200
540
+ error_model = JSON.load(response_content)
541
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
542
+ end
543
+
544
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
545
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
546
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
547
+ # Deserialize Response
548
+ if status_code == 200
549
+ begin
550
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
551
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::UsagesListResult.mapper()
552
+ result.body = @client.deserialize(result_mapper, parsed_response)
553
+ rescue Exception => e
554
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
555
+ end
556
+ end
557
+
558
+ result
559
+ end
560
+
561
+ promise.execute
562
+ end
563
+
564
+ #
565
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
566
+ # endpoint in DNS.
567
+ #
568
+ # @param resource_group_name [String] Name of the Resource group within the
569
+ # Azure subscription.
570
+ # @param profile_name [String] Name of the CDN profile which is unique within
571
+ # the resource group.
572
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
573
+ # unique globally.
574
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
575
+ # be validated.
576
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
577
+ # will be added to the HTTP request.
578
+ #
579
+ # @return [ValidateCustomDomainOutput] operation results.
580
+ #
581
+ def validate_custom_domain(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
582
+ response = validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:custom_headers).value!
583
+ response.body unless response.nil?
584
+ end
585
+
586
+ #
587
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
588
+ # endpoint in DNS.
589
+ #
590
+ # @param resource_group_name [String] Name of the Resource group within the
591
+ # Azure subscription.
592
+ # @param profile_name [String] Name of the CDN profile which is unique within
593
+ # the resource group.
594
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
595
+ # unique globally.
596
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
597
+ # be validated.
598
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
599
+ # will be added to the HTTP request.
600
+ #
601
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
602
+ #
603
+ def validate_custom_domain_with_http_info(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
604
+ validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:custom_headers).value!
605
+ end
606
+
607
+ #
608
+ # Validates the custom domain mapping to ensure it maps to the correct CDN
609
+ # endpoint in DNS.
610
+ #
611
+ # @param resource_group_name [String] Name of the Resource group within the
612
+ # Azure subscription.
613
+ # @param profile_name [String] Name of the CDN profile which is unique within
614
+ # the resource group.
615
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
616
+ # unique globally.
617
+ # @param custom_domain_properties [ValidateCustomDomainInput] Custom domain to
618
+ # be validated.
619
+ # @param [Hash{String => String}] A hash of custom headers that will be added
620
+ # to the HTTP request.
621
+ #
622
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
623
+ #
624
+ def validate_custom_domain_async(resource_group_name, profile_name, endpoint_name, custom_domain_properties, custom_headers:nil)
625
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
626
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
627
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
628
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
629
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
630
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
631
+ fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil?
632
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
633
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
634
+
635
+
636
+ request_headers = {}
637
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
638
+
639
+ # Set Headers
640
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
641
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
642
+
643
+ # Serialize Request
644
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::ValidateCustomDomainInput.mapper()
645
+ request_content = @client.serialize(request_mapper, custom_domain_properties)
646
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
647
+
648
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain'
649
+
650
+ request_url = @base_url || @client.base_url
651
+
652
+ options = {
653
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
654
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
655
+ query_params: {'api-version' => @client.api_version},
656
+ body: request_content,
657
+ headers: request_headers.merge(custom_headers || {}),
658
+ base_url: request_url
659
+ }
660
+ promise = @client.make_request_async(:post, path_template, options)
661
+
662
+ promise = promise.then do |result|
663
+ http_response = result.response
664
+ status_code = http_response.status
665
+ response_content = http_response.body
666
+ unless status_code == 200
667
+ error_model = JSON.load(response_content)
668
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
669
+ end
670
+
671
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
672
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
673
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
674
+ # Deserialize Response
675
+ if status_code == 200
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::ValidateCustomDomainOutput.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
+ # Creates a new AzureFrontDoor endpoint with the specified endpoint name under
693
+ # the specified subscription, resource group and profile.
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 endpoint [AFDEndpoint] Endpoint properties
702
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
703
+ # will be added to the HTTP request.
704
+ #
705
+ # @return [AFDEndpoint] operation results.
706
+ #
707
+ def begin_create(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
708
+ response = begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
709
+ response.body unless response.nil?
710
+ end
711
+
712
+ #
713
+ # Creates a new AzureFrontDoor endpoint with the specified endpoint name under
714
+ # the specified subscription, resource group and profile.
715
+ #
716
+ # @param resource_group_name [String] Name of the Resource group within the
717
+ # Azure subscription.
718
+ # @param profile_name [String] Name of the CDN profile which is unique within
719
+ # the resource group.
720
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
721
+ # unique globally.
722
+ # @param endpoint [AFDEndpoint] Endpoint properties
723
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
724
+ # will be added to the HTTP request.
725
+ #
726
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
727
+ #
728
+ def begin_create_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
729
+ begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:custom_headers).value!
730
+ end
731
+
732
+ #
733
+ # Creates a new AzureFrontDoor endpoint with the specified endpoint name under
734
+ # the specified subscription, resource group and profile.
735
+ #
736
+ # @param resource_group_name [String] Name of the Resource group within the
737
+ # Azure subscription.
738
+ # @param profile_name [String] Name of the CDN profile which is unique within
739
+ # the resource group.
740
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
741
+ # unique globally.
742
+ # @param endpoint [AFDEndpoint] Endpoint properties
743
+ # @param [Hash{String => String}] A hash of custom headers that will be added
744
+ # to the HTTP request.
745
+ #
746
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
747
+ #
748
+ def begin_create_async(resource_group_name, profile_name, endpoint_name, endpoint, custom_headers:nil)
749
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
750
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
751
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
752
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
753
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
754
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
755
+ fail ArgumentError, 'endpoint is nil' if endpoint.nil?
756
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
757
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
758
+
759
+
760
+ request_headers = {}
761
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
762
+
763
+ # Set Headers
764
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
765
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
766
+
767
+ # Serialize Request
768
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpoint.mapper()
769
+ request_content = @client.serialize(request_mapper, endpoint)
770
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
771
+
772
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}'
773
+
774
+ request_url = @base_url || @client.base_url
775
+
776
+ options = {
777
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
778
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
779
+ query_params: {'api-version' => @client.api_version},
780
+ body: request_content,
781
+ headers: request_headers.merge(custom_headers || {}),
782
+ base_url: request_url
783
+ }
784
+ promise = @client.make_request_async(:put, path_template, options)
785
+
786
+ promise = promise.then do |result|
787
+ http_response = result.response
788
+ status_code = http_response.status
789
+ response_content = http_response.body
790
+ unless status_code == 200 || status_code == 201
791
+ error_model = JSON.load(response_content)
792
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
793
+ end
794
+
795
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
796
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
797
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
798
+ # Deserialize Response
799
+ if status_code == 200
800
+ begin
801
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
802
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpoint.mapper()
803
+ result.body = @client.deserialize(result_mapper, parsed_response)
804
+ rescue Exception => e
805
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
806
+ end
807
+ end
808
+ # Deserialize Response
809
+ if status_code == 201
810
+ begin
811
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
812
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpoint.mapper()
813
+ result.body = @client.deserialize(result_mapper, parsed_response)
814
+ rescue Exception => e
815
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
816
+ end
817
+ end
818
+
819
+ result
820
+ end
821
+
822
+ promise.execute
823
+ end
824
+
825
+ #
826
+ # Updates an existing AzureFrontDoor endpoint with the specified endpoint name
827
+ # under the specified subscription, resource group and profile. Only tags can
828
+ # be updated after creating an endpoint. To update origins, use the Update
829
+ # Origin operation. To update origin groups, use the Update Origin group
830
+ # operation. To update domains, use the Update Custom Domain operation.
831
+ #
832
+ # @param resource_group_name [String] Name of the Resource group within the
833
+ # Azure subscription.
834
+ # @param profile_name [String] Name of the CDN profile which is unique within
835
+ # the resource group.
836
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
837
+ # unique globally.
838
+ # @param endpoint_update_properties [AFDEndpointUpdateParameters] Endpoint
839
+ # update properties
840
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
841
+ # will be added to the HTTP request.
842
+ #
843
+ # @return [AFDEndpoint] operation results.
844
+ #
845
+ def begin_update(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
846
+ response = begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
847
+ response.body unless response.nil?
848
+ end
849
+
850
+ #
851
+ # Updates an existing AzureFrontDoor endpoint with the specified endpoint name
852
+ # under the specified subscription, resource group and profile. Only tags can
853
+ # be updated after creating an endpoint. To update origins, use the Update
854
+ # Origin operation. To update origin groups, use the Update Origin group
855
+ # operation. To update domains, use the Update Custom Domain operation.
856
+ #
857
+ # @param resource_group_name [String] Name of the Resource group within the
858
+ # Azure subscription.
859
+ # @param profile_name [String] Name of the CDN profile which is unique within
860
+ # the resource group.
861
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
862
+ # unique globally.
863
+ # @param endpoint_update_properties [AFDEndpointUpdateParameters] Endpoint
864
+ # update properties
865
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
866
+ # will be added to the HTTP request.
867
+ #
868
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
869
+ #
870
+ def begin_update_with_http_info(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
871
+ begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:custom_headers).value!
872
+ end
873
+
874
+ #
875
+ # Updates an existing AzureFrontDoor endpoint with the specified endpoint name
876
+ # under the specified subscription, resource group and profile. Only tags can
877
+ # be updated after creating an endpoint. To update origins, use the Update
878
+ # Origin operation. To update origin groups, use the Update Origin group
879
+ # operation. To update domains, use the Update Custom Domain operation.
880
+ #
881
+ # @param resource_group_name [String] Name of the Resource group within the
882
+ # Azure subscription.
883
+ # @param profile_name [String] Name of the CDN profile which is unique within
884
+ # the resource group.
885
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
886
+ # unique globally.
887
+ # @param endpoint_update_properties [AFDEndpointUpdateParameters] Endpoint
888
+ # update properties
889
+ # @param [Hash{String => String}] A hash of custom headers that will be added
890
+ # to the HTTP request.
891
+ #
892
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
893
+ #
894
+ def begin_update_async(resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers:nil)
895
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
896
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
897
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
898
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
899
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
900
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
901
+ fail ArgumentError, 'endpoint_update_properties is nil' if endpoint_update_properties.nil?
902
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
903
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
904
+
905
+
906
+ request_headers = {}
907
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
908
+
909
+ # Set Headers
910
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
911
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
912
+
913
+ # Serialize Request
914
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpointUpdateParameters.mapper()
915
+ request_content = @client.serialize(request_mapper, endpoint_update_properties)
916
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
917
+
918
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}'
919
+
920
+ request_url = @base_url || @client.base_url
921
+
922
+ options = {
923
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
924
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
925
+ query_params: {'api-version' => @client.api_version},
926
+ body: request_content,
927
+ headers: request_headers.merge(custom_headers || {}),
928
+ base_url: request_url
929
+ }
930
+ promise = @client.make_request_async(:patch, path_template, options)
931
+
932
+ promise = promise.then do |result|
933
+ http_response = result.response
934
+ status_code = http_response.status
935
+ response_content = http_response.body
936
+ unless status_code == 200 || status_code == 202
937
+ error_model = JSON.load(response_content)
938
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
939
+ end
940
+
941
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
942
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
943
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
944
+ # Deserialize Response
945
+ if status_code == 200
946
+ begin
947
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
948
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpoint.mapper()
949
+ result.body = @client.deserialize(result_mapper, parsed_response)
950
+ rescue Exception => e
951
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
952
+ end
953
+ end
954
+ # Deserialize Response
955
+ if status_code == 202
956
+ begin
957
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
958
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpoint.mapper()
959
+ result.body = @client.deserialize(result_mapper, parsed_response)
960
+ rescue Exception => e
961
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
962
+ end
963
+ end
964
+
965
+ result
966
+ end
967
+
968
+ promise.execute
969
+ end
970
+
971
+ #
972
+ # Deletes an existing AzureFrontDoor endpoint with the specified endpoint name
973
+ # under the specified subscription, resource group and profile.
974
+ #
975
+ # @param resource_group_name [String] Name of the Resource group within the
976
+ # Azure subscription.
977
+ # @param profile_name [String] Name of the CDN profile which is unique within
978
+ # the resource group.
979
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
980
+ # unique globally.
981
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
982
+ # will be added to the HTTP request.
983
+ #
984
+ #
985
+ def begin_delete(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
986
+ response = begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
987
+ nil
988
+ end
989
+
990
+ #
991
+ # Deletes an existing AzureFrontDoor endpoint with the specified endpoint name
992
+ # under the specified subscription, resource group and profile.
993
+ #
994
+ # @param resource_group_name [String] Name of the Resource group within the
995
+ # Azure subscription.
996
+ # @param profile_name [String] Name of the CDN profile which is unique within
997
+ # the resource group.
998
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
999
+ # unique globally.
1000
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1001
+ # will be added to the HTTP request.
1002
+ #
1003
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1004
+ #
1005
+ def begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1006
+ begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1007
+ end
1008
+
1009
+ #
1010
+ # Deletes an existing AzureFrontDoor endpoint with the specified endpoint name
1011
+ # under the specified subscription, resource group and profile.
1012
+ #
1013
+ # @param resource_group_name [String] Name of the Resource group within the
1014
+ # Azure subscription.
1015
+ # @param profile_name [String] Name of the CDN profile which is unique within
1016
+ # the resource group.
1017
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1018
+ # unique globally.
1019
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1020
+ # to the HTTP request.
1021
+ #
1022
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1023
+ #
1024
+ def begin_delete_async(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1025
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1026
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1027
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1028
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1029
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1030
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1031
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1032
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1033
+
1034
+
1035
+ request_headers = {}
1036
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1037
+
1038
+ # Set Headers
1039
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1040
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1041
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}'
1042
+
1043
+ request_url = @base_url || @client.base_url
1044
+
1045
+ options = {
1046
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1047
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1048
+ query_params: {'api-version' => @client.api_version},
1049
+ headers: request_headers.merge(custom_headers || {}),
1050
+ base_url: request_url
1051
+ }
1052
+ promise = @client.make_request_async(:delete, path_template, options)
1053
+
1054
+ promise = promise.then do |result|
1055
+ http_response = result.response
1056
+ status_code = http_response.status
1057
+ response_content = http_response.body
1058
+ unless status_code == 200 || status_code == 204
1059
+ error_model = JSON.load(response_content)
1060
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1061
+ end
1062
+
1063
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1064
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1065
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1066
+
1067
+ result
1068
+ end
1069
+
1070
+ promise.execute
1071
+ end
1072
+
1073
+ #
1074
+ # Removes a content from AzureFrontDoor.
1075
+ #
1076
+ # @param resource_group_name [String] Name of the Resource group within the
1077
+ # Azure subscription.
1078
+ # @param profile_name [String] Name of the CDN profile which is unique within
1079
+ # the resource group.
1080
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1081
+ # unique globally.
1082
+ # @param contents [AfdPurgeParameters] The list of paths to the content and the
1083
+ # list of linked domains to be purged. Path can be a full URL, e.g.
1084
+ # '/pictures/city.png' which removes a single file, or a directory with a
1085
+ # wildcard, e.g. '/pictures/*' which removes all folders and files in the
1086
+ # directory.
1087
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1088
+ # will be added to the HTTP request.
1089
+ #
1090
+ #
1091
+ def begin_purge_content(resource_group_name, profile_name, endpoint_name, contents, custom_headers:nil)
1092
+ response = begin_purge_content_async(resource_group_name, profile_name, endpoint_name, contents, custom_headers:custom_headers).value!
1093
+ nil
1094
+ end
1095
+
1096
+ #
1097
+ # Removes a content from AzureFrontDoor.
1098
+ #
1099
+ # @param resource_group_name [String] Name of the Resource group within the
1100
+ # Azure subscription.
1101
+ # @param profile_name [String] Name of the CDN profile which is unique within
1102
+ # the resource group.
1103
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1104
+ # unique globally.
1105
+ # @param contents [AfdPurgeParameters] The list of paths to the content and the
1106
+ # list of linked domains to be purged. Path can be a full URL, e.g.
1107
+ # '/pictures/city.png' which removes a single file, or a directory with a
1108
+ # wildcard, e.g. '/pictures/*' which removes all folders and files in the
1109
+ # directory.
1110
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1111
+ # will be added to the HTTP request.
1112
+ #
1113
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1114
+ #
1115
+ def begin_purge_content_with_http_info(resource_group_name, profile_name, endpoint_name, contents, custom_headers:nil)
1116
+ begin_purge_content_async(resource_group_name, profile_name, endpoint_name, contents, custom_headers:custom_headers).value!
1117
+ end
1118
+
1119
+ #
1120
+ # Removes a content from AzureFrontDoor.
1121
+ #
1122
+ # @param resource_group_name [String] Name of the Resource group within the
1123
+ # Azure subscription.
1124
+ # @param profile_name [String] Name of the CDN profile which is unique within
1125
+ # the resource group.
1126
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1127
+ # unique globally.
1128
+ # @param contents [AfdPurgeParameters] The list of paths to the content and the
1129
+ # list of linked domains to be purged. Path can be a full URL, e.g.
1130
+ # '/pictures/city.png' which removes a single file, or a directory with a
1131
+ # wildcard, e.g. '/pictures/*' which removes all folders and files in the
1132
+ # directory.
1133
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1134
+ # to the HTTP request.
1135
+ #
1136
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1137
+ #
1138
+ def begin_purge_content_async(resource_group_name, profile_name, endpoint_name, contents, custom_headers:nil)
1139
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1140
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1141
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1142
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1143
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
1144
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
1145
+ fail ArgumentError, 'contents is nil' if contents.nil?
1146
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1147
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1148
+
1149
+
1150
+ request_headers = {}
1151
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1152
+
1153
+ # Set Headers
1154
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1155
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1156
+
1157
+ # Serialize Request
1158
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AfdPurgeParameters.mapper()
1159
+ request_content = @client.serialize(request_mapper, contents)
1160
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1161
+
1162
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge'
1163
+
1164
+ request_url = @base_url || @client.base_url
1165
+
1166
+ options = {
1167
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1168
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'subscriptionId' => @client.subscription_id},
1169
+ query_params: {'api-version' => @client.api_version},
1170
+ body: request_content,
1171
+ headers: request_headers.merge(custom_headers || {}),
1172
+ base_url: request_url
1173
+ }
1174
+ promise = @client.make_request_async(:post, path_template, options)
1175
+
1176
+ promise = promise.then do |result|
1177
+ http_response = result.response
1178
+ status_code = http_response.status
1179
+ response_content = http_response.body
1180
+ unless status_code == 200 || status_code == 202
1181
+ error_model = JSON.load(response_content)
1182
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1183
+ end
1184
+
1185
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1186
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1187
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1188
+
1189
+ result
1190
+ end
1191
+
1192
+ promise.execute
1193
+ end
1194
+
1195
+ #
1196
+ # Lists existing AzureFrontDoor endpoints.
1197
+ #
1198
+ # @param next_page_link [String] The NextLink from the previous successful call
1199
+ # to List operation.
1200
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1201
+ # will be added to the HTTP request.
1202
+ #
1203
+ # @return [AFDEndpointListResult] operation results.
1204
+ #
1205
+ def list_by_profile_next(next_page_link, custom_headers:nil)
1206
+ response = list_by_profile_next_async(next_page_link, custom_headers:custom_headers).value!
1207
+ response.body unless response.nil?
1208
+ end
1209
+
1210
+ #
1211
+ # Lists existing AzureFrontDoor endpoints.
1212
+ #
1213
+ # @param next_page_link [String] The NextLink from the previous successful call
1214
+ # to List operation.
1215
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1216
+ # will be added to the HTTP request.
1217
+ #
1218
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1219
+ #
1220
+ def list_by_profile_next_with_http_info(next_page_link, custom_headers:nil)
1221
+ list_by_profile_next_async(next_page_link, custom_headers:custom_headers).value!
1222
+ end
1223
+
1224
+ #
1225
+ # Lists existing AzureFrontDoor endpoints.
1226
+ #
1227
+ # @param next_page_link [String] The NextLink from the previous successful call
1228
+ # to List operation.
1229
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1230
+ # to the HTTP request.
1231
+ #
1232
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1233
+ #
1234
+ def list_by_profile_next_async(next_page_link, custom_headers:nil)
1235
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1236
+
1237
+
1238
+ request_headers = {}
1239
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1240
+
1241
+ # Set Headers
1242
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1243
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1244
+ path_template = '{nextLink}'
1245
+
1246
+ request_url = @base_url || @client.base_url
1247
+
1248
+ options = {
1249
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1250
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1251
+ headers: request_headers.merge(custom_headers || {}),
1252
+ base_url: request_url
1253
+ }
1254
+ promise = @client.make_request_async(:get, path_template, options)
1255
+
1256
+ promise = promise.then do |result|
1257
+ http_response = result.response
1258
+ status_code = http_response.status
1259
+ response_content = http_response.body
1260
+ unless status_code == 200
1261
+ error_model = JSON.load(response_content)
1262
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1263
+ end
1264
+
1265
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1266
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1267
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1268
+ # Deserialize Response
1269
+ if status_code == 200
1270
+ begin
1271
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1272
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDEndpointListResult.mapper()
1273
+ result.body = @client.deserialize(result_mapper, parsed_response)
1274
+ rescue Exception => e
1275
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1276
+ end
1277
+ end
1278
+
1279
+ result
1280
+ end
1281
+
1282
+ promise.execute
1283
+ end
1284
+
1285
+ #
1286
+ # Checks the quota and actual usage of endpoints under the given CDN profile.
1287
+ #
1288
+ # @param next_page_link [String] The NextLink from the previous successful call
1289
+ # to List operation.
1290
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1291
+ # will be added to the HTTP request.
1292
+ #
1293
+ # @return [UsagesListResult] operation results.
1294
+ #
1295
+ def list_resource_usage_next(next_page_link, custom_headers:nil)
1296
+ response = list_resource_usage_next_async(next_page_link, custom_headers:custom_headers).value!
1297
+ response.body unless response.nil?
1298
+ end
1299
+
1300
+ #
1301
+ # Checks the quota and actual usage of endpoints under the given CDN profile.
1302
+ #
1303
+ # @param next_page_link [String] The NextLink from the previous successful call
1304
+ # to List operation.
1305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1306
+ # will be added to the HTTP request.
1307
+ #
1308
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1309
+ #
1310
+ def list_resource_usage_next_with_http_info(next_page_link, custom_headers:nil)
1311
+ list_resource_usage_next_async(next_page_link, custom_headers:custom_headers).value!
1312
+ end
1313
+
1314
+ #
1315
+ # Checks the quota and actual usage of endpoints under the given CDN profile.
1316
+ #
1317
+ # @param next_page_link [String] The NextLink from the previous successful call
1318
+ # to List operation.
1319
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1320
+ # to the HTTP request.
1321
+ #
1322
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1323
+ #
1324
+ def list_resource_usage_next_async(next_page_link, custom_headers:nil)
1325
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1326
+
1327
+
1328
+ request_headers = {}
1329
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1330
+
1331
+ # Set Headers
1332
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1333
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1334
+ path_template = '{nextLink}'
1335
+
1336
+ request_url = @base_url || @client.base_url
1337
+
1338
+ options = {
1339
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1340
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1341
+ headers: request_headers.merge(custom_headers || {}),
1342
+ base_url: request_url
1343
+ }
1344
+ promise = @client.make_request_async(:post, path_template, options)
1345
+
1346
+ promise = promise.then do |result|
1347
+ http_response = result.response
1348
+ status_code = http_response.status
1349
+ response_content = http_response.body
1350
+ unless status_code == 200
1351
+ error_model = JSON.load(response_content)
1352
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1353
+ end
1354
+
1355
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1356
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1357
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1358
+ # Deserialize Response
1359
+ if status_code == 200
1360
+ begin
1361
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1362
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::UsagesListResult.mapper()
1363
+ result.body = @client.deserialize(result_mapper, parsed_response)
1364
+ rescue Exception => e
1365
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1366
+ end
1367
+ end
1368
+
1369
+ result
1370
+ end
1371
+
1372
+ promise.execute
1373
+ end
1374
+
1375
+ #
1376
+ # Lists existing AzureFrontDoor endpoints.
1377
+ #
1378
+ # @param resource_group_name [String] Name of the Resource group within the
1379
+ # Azure subscription.
1380
+ # @param profile_name [String] Name of the CDN profile which is unique within
1381
+ # the resource group.
1382
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1383
+ # will be added to the HTTP request.
1384
+ #
1385
+ # @return [AFDEndpointListResult] which provide lazy access to pages of the
1386
+ # response.
1387
+ #
1388
+ def list_by_profile_as_lazy(resource_group_name, profile_name, custom_headers:nil)
1389
+ response = list_by_profile_async(resource_group_name, profile_name, custom_headers:custom_headers).value!
1390
+ unless response.nil?
1391
+ page = response.body
1392
+ page.next_method = Proc.new do |next_page_link|
1393
+ list_by_profile_next_async(next_page_link, custom_headers:custom_headers)
1394
+ end
1395
+ page
1396
+ end
1397
+ end
1398
+
1399
+ #
1400
+ # Checks the quota and actual usage of endpoints under the given CDN profile.
1401
+ #
1402
+ # @param resource_group_name [String] Name of the Resource group within the
1403
+ # Azure subscription.
1404
+ # @param profile_name [String] Name of the CDN profile which is unique within
1405
+ # the resource group.
1406
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
1407
+ # unique globally.
1408
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1409
+ # will be added to the HTTP request.
1410
+ #
1411
+ # @return [UsagesListResult] which provide lazy access to pages of the
1412
+ # response.
1413
+ #
1414
+ def list_resource_usage_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
1415
+ response = list_resource_usage_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
1416
+ unless response.nil?
1417
+ page = response.body
1418
+ page.next_method = Proc.new do |next_page_link|
1419
+ list_resource_usage_next_async(next_page_link, custom_headers:custom_headers)
1420
+ end
1421
+ page
1422
+ end
1423
+ end
1424
+
1425
+ end
1426
+ end