azure_mgmt_cdn 0.17.1 → 0.17.6

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