azure_mgmt_web 0.17.6 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (449) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  3. data/lib/2015-08-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  4. data/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  5. data/lib/2016-06-01/generated/azure_mgmt_web/logic_apps_management_client.rb +1 -1
  6. data/lib/2016-08-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  7. data/lib/2016-09-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  8. data/lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  9. data/lib/2020-09-01/generated/azure_mgmt_web.rb +461 -0
  10. data/lib/2020-09-01/generated/azure_mgmt_web/app_service_certificate_orders.rb +2704 -0
  11. data/lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb +7327 -0
  12. data/lib/2020-09-01/generated/azure_mgmt_web/app_service_plans.rb +3918 -0
  13. data/lib/2020-09-01/generated/azure_mgmt_web/certificate_registration_provider.rb +247 -0
  14. data/lib/2020-09-01/generated/azure_mgmt_web/certificates.rb +898 -0
  15. data/lib/2020-09-01/generated/azure_mgmt_web/deleted_web_apps.rb +550 -0
  16. data/lib/2020-09-01/generated/azure_mgmt_web/diagnostics.rb +3664 -0
  17. data/lib/2020-09-01/generated/azure_mgmt_web/domain_registration_provider.rb +247 -0
  18. data/lib/2020-09-01/generated/azure_mgmt_web/domains.rb +2186 -0
  19. data/lib/2020-09-01/generated/azure_mgmt_web/models/abnormal_time_period.rb +98 -0
  20. data/lib/2020-09-01/generated/azure_mgmt_web/models/access_control_entry_action.rb +16 -0
  21. data/lib/2020-09-01/generated/azure_mgmt_web/models/address.rb +101 -0
  22. data/lib/2020-09-01/generated/azure_mgmt_web/models/address_response.rb +141 -0
  23. data/lib/2020-09-01/generated/azure_mgmt_web/models/allowed_audiences_validation.rb +99 -0
  24. data/lib/2020-09-01/generated/azure_mgmt_web/models/analysis_data.rb +118 -0
  25. data/lib/2020-09-01/generated/azure_mgmt_web/models/analysis_definition.rb +91 -0
  26. data/lib/2020-09-01/generated/azure_mgmt_web/models/api_definition_info.rb +46 -0
  27. data/lib/2020-09-01/generated/azure_mgmt_web/models/api_management_config.rb +46 -0
  28. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_registration.rb +102 -0
  29. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_certificate.rb +76 -0
  30. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_certificate_collection.rb +99 -0
  31. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_certificate_order.rb +368 -0
  32. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb +99 -0
  33. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_certificate_order_patch_resource.rb +344 -0
  34. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_certificate_patch_resource.rb +121 -0
  35. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_certificate_resource.rb +145 -0
  36. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_environment.rb +569 -0
  37. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_environment_collection.rb +99 -0
  38. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_environment_patch_resource.rb +613 -0
  39. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_environment_resource.rb +637 -0
  40. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_plan.rb +352 -0
  41. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_plan_collection.rb +99 -0
  42. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_plan_patch_resource.rb +318 -0
  43. data/lib/2020-09-01/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb +20 -0
  44. data/lib/2020-09-01/generated/azure_mgmt_web/models/application_logs_config.rb +74 -0
  45. data/lib/2020-09-01/generated/azure_mgmt_web/models/application_stack.rb +109 -0
  46. data/lib/2020-09-01/generated/azure_mgmt_web/models/application_stack_collection.rb +99 -0
  47. data/lib/2020-09-01/generated/azure_mgmt_web/models/application_stack_resource.rb +153 -0
  48. data/lib/2020-09-01/generated/azure_mgmt_web/models/appservice_github_token.rb +91 -0
  49. data/lib/2020-09-01/generated/azure_mgmt_web/models/appservice_github_token_request.rb +57 -0
  50. data/lib/2020-09-01/generated/azure_mgmt_web/models/arm_id_wrapper.rb +47 -0
  51. data/lib/2020-09-01/generated/azure_mgmt_web/models/auth_platform.rb +113 -0
  52. data/lib/2020-09-01/generated/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
  53. data/lib/2020-09-01/generated/azure_mgmt_web/models/auto_heal_actions.rb +72 -0
  54. data/lib/2020-09-01/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +58 -0
  55. data/lib/2020-09-01/generated/azure_mgmt_web/models/auto_heal_rules.rb +61 -0
  56. data/lib/2020-09-01/generated/azure_mgmt_web/models/auto_heal_triggers.rb +91 -0
  57. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_active_directory.rb +138 -0
  58. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_active_directory_login.rb +110 -0
  59. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_active_directory_registration.rb +124 -0
  60. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_active_directory_validation.rb +111 -0
  61. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +73 -0
  62. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +72 -0
  63. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_resource_type.rb +16 -0
  64. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_storage_info_value.rb +109 -0
  65. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_storage_property_dictionary_resource.rb +99 -0
  66. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_storage_state.rb +17 -0
  67. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_storage_type.rb +16 -0
  68. data/lib/2020-09-01/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +60 -0
  69. data/lib/2020-09-01/generated/azure_mgmt_web/models/backup_item.rb +266 -0
  70. data/lib/2020-09-01/generated/azure_mgmt_web/models/backup_item_collection.rb +99 -0
  71. data/lib/2020-09-01/generated/azure_mgmt_web/models/backup_item_status.rb +24 -0
  72. data/lib/2020-09-01/generated/azure_mgmt_web/models/backup_request.rb +148 -0
  73. data/lib/2020-09-01/generated/azure_mgmt_web/models/backup_restore_operation_type.rb +19 -0
  74. data/lib/2020-09-01/generated/azure_mgmt_web/models/backup_schedule.rb +116 -0
  75. data/lib/2020-09-01/generated/azure_mgmt_web/models/billing_meter.rb +146 -0
  76. data/lib/2020-09-01/generated/azure_mgmt_web/models/billing_meter_collection.rb +99 -0
  77. data/lib/2020-09-01/generated/azure_mgmt_web/models/blob_storage_token_store.rb +91 -0
  78. data/lib/2020-09-01/generated/azure_mgmt_web/models/build_status.rb +21 -0
  79. data/lib/2020-09-01/generated/azure_mgmt_web/models/built_in_authentication_provider.rb +20 -0
  80. data/lib/2020-09-01/generated/azure_mgmt_web/models/capability.rb +68 -0
  81. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate.rb +356 -0
  82. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate_collection.rb +99 -0
  83. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate_details.rb +143 -0
  84. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate_email.rb +101 -0
  85. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate_order_action.rb +110 -0
  86. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate_order_action_type.rb +28 -0
  87. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate_order_status.rb +24 -0
  88. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate_patch_resource.rb +332 -0
  89. data/lib/2020-09-01/generated/azure_mgmt_web/models/certificate_product_type.rb +16 -0
  90. data/lib/2020-09-01/generated/azure_mgmt_web/models/channels.rb +19 -0
  91. data/lib/2020-09-01/generated/azure_mgmt_web/models/check_name_resource_types.rb +22 -0
  92. data/lib/2020-09-01/generated/azure_mgmt_web/models/client_cert_mode.rb +16 -0
  93. data/lib/2020-09-01/generated/azure_mgmt_web/models/client_credential_method.rb +15 -0
  94. data/lib/2020-09-01/generated/azure_mgmt_web/models/client_registration.rb +102 -0
  95. data/lib/2020-09-01/generated/azure_mgmt_web/models/clone_ability_result.rb +17 -0
  96. data/lib/2020-09-01/generated/azure_mgmt_web/models/cloning_info.rb +181 -0
  97. data/lib/2020-09-01/generated/azure_mgmt_web/models/compute_mode_options.rb +17 -0
  98. data/lib/2020-09-01/generated/azure_mgmt_web/models/conn_string_info.rb +71 -0
  99. data/lib/2020-09-01/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb +60 -0
  100. data/lib/2020-09-01/generated/azure_mgmt_web/models/connection_string_dictionary.rb +99 -0
  101. data/lib/2020-09-01/generated/azure_mgmt_web/models/connection_string_type.rb +25 -0
  102. data/lib/2020-09-01/generated/azure_mgmt_web/models/contact.rb +138 -0
  103. data/lib/2020-09-01/generated/azure_mgmt_web/models/container_cpu_statistics.rb +82 -0
  104. data/lib/2020-09-01/generated/azure_mgmt_web/models/container_cpu_usage.rb +88 -0
  105. data/lib/2020-09-01/generated/azure_mgmt_web/models/container_info.rb +128 -0
  106. data/lib/2020-09-01/generated/azure_mgmt_web/models/container_memory_statistics.rb +69 -0
  107. data/lib/2020-09-01/generated/azure_mgmt_web/models/container_network_interface_statistics.rb +124 -0
  108. data/lib/2020-09-01/generated/azure_mgmt_web/models/container_throttling_data.rb +69 -0
  109. data/lib/2020-09-01/generated/azure_mgmt_web/models/continuous_web_job.rb +201 -0
  110. data/lib/2020-09-01/generated/azure_mgmt_web/models/continuous_web_job_collection.rb +99 -0
  111. data/lib/2020-09-01/generated/azure_mgmt_web/models/continuous_web_job_status.rb +19 -0
  112. data/lib/2020-09-01/generated/azure_mgmt_web/models/cookie_expiration.rb +104 -0
  113. data/lib/2020-09-01/generated/azure_mgmt_web/models/cookie_expiration_convention.rb +16 -0
  114. data/lib/2020-09-01/generated/azure_mgmt_web/models/cors_settings.rb +70 -0
  115. data/lib/2020-09-01/generated/azure_mgmt_web/models/created_by_type.rb +18 -0
  116. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_copy_slot_entity.rb +63 -0
  117. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb +71 -0
  118. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_operation_collection.rb +99 -0
  119. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_operation_description.rb +82 -0
  120. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_operation_description_properties.rb +47 -0
  121. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_operation_display.rb +79 -0
  122. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_publishing_credentials_policies_collection.rb +106 -0
  123. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_publishing_credentials_policies_entity.rb +91 -0
  124. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb +60 -0
  125. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_slot_entity.rb +58 -0
  126. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_usage_quota.rb +91 -0
  127. data/lib/2020-09-01/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +99 -0
  128. data/lib/2020-09-01/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +16 -0
  129. data/lib/2020-09-01/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb +258 -0
  130. data/lib/2020-09-01/generated/azure_mgmt_web/models/custom_open_id_connect_provider.rb +115 -0
  131. data/lib/2020-09-01/generated/azure_mgmt_web/models/data_source.rb +74 -0
  132. data/lib/2020-09-01/generated/azure_mgmt_web/models/data_table_response_column.rb +68 -0
  133. data/lib/2020-09-01/generated/azure_mgmt_web/models/data_table_response_object.rb +94 -0
  134. data/lib/2020-09-01/generated/azure_mgmt_web/models/database_backup_setting.rb +84 -0
  135. data/lib/2020-09-01/generated/azure_mgmt_web/models/database_type.rb +18 -0
  136. data/lib/2020-09-01/generated/azure_mgmt_web/models/default_error_response.rb +48 -0
  137. data/lib/2020-09-01/generated/azure_mgmt_web/models/default_error_response_error.rb +104 -0
  138. data/lib/2020-09-01/generated/azure_mgmt_web/models/default_error_response_error_details_item.rb +72 -0
  139. data/lib/2020-09-01/generated/azure_mgmt_web/models/deleted_app_restore_request.rb +128 -0
  140. data/lib/2020-09-01/generated/azure_mgmt_web/models/deleted_site.rb +175 -0
  141. data/lib/2020-09-01/generated/azure_mgmt_web/models/deleted_web_app_collection.rb +99 -0
  142. data/lib/2020-09-01/generated/azure_mgmt_web/models/deployment.rb +179 -0
  143. data/lib/2020-09-01/generated/azure_mgmt_web/models/deployment_collection.rb +99 -0
  144. data/lib/2020-09-01/generated/azure_mgmt_web/models/deployment_locations.rb +98 -0
  145. data/lib/2020-09-01/generated/azure_mgmt_web/models/detector_abnormal_time_period.rb +153 -0
  146. data/lib/2020-09-01/generated/azure_mgmt_web/models/detector_definition.rb +127 -0
  147. data/lib/2020-09-01/generated/azure_mgmt_web/models/detector_info.rb +83 -0
  148. data/lib/2020-09-01/generated/azure_mgmt_web/models/detector_response.rb +111 -0
  149. data/lib/2020-09-01/generated/azure_mgmt_web/models/detector_response_collection.rb +99 -0
  150. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_analysis.rb +162 -0
  151. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_analysis_collection.rb +99 -0
  152. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_category.rb +91 -0
  153. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_category_collection.rb +99 -0
  154. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_data.rb +60 -0
  155. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_detector_collection.rb +99 -0
  156. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_detector_response.rb +206 -0
  157. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_metric_sample.rb +109 -0
  158. data/lib/2020-09-01/generated/azure_mgmt_web/models/diagnostic_metric_set.rb +113 -0
  159. data/lib/2020-09-01/generated/azure_mgmt_web/models/dimension.rb +81 -0
  160. data/lib/2020-09-01/generated/azure_mgmt_web/models/dns_type.rb +16 -0
  161. data/lib/2020-09-01/generated/azure_mgmt_web/models/dns_verification_test_result.rb +17 -0
  162. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain.rb +381 -0
  163. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_availability_check_result.rb +73 -0
  164. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_collection.rb +99 -0
  165. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb +72 -0
  166. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_ownership_identifier.rb +90 -0
  167. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb +99 -0
  168. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_patch_resource.rb +357 -0
  169. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_purchase_consent.rb +79 -0
  170. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +58 -0
  171. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_status.rb +35 -0
  172. data/lib/2020-09-01/generated/azure_mgmt_web/models/domain_type.rb +16 -0
  173. data/lib/2020-09-01/generated/azure_mgmt_web/models/enabled_config.rb +47 -0
  174. data/lib/2020-09-01/generated/azure_mgmt_web/models/endpoint_dependency.rb +68 -0
  175. data/lib/2020-09-01/generated/azure_mgmt_web/models/endpoint_detail.rb +83 -0
  176. data/lib/2020-09-01/generated/azure_mgmt_web/models/error_entity.rb +118 -0
  177. data/lib/2020-09-01/generated/azure_mgmt_web/models/experiments.rb +55 -0
  178. data/lib/2020-09-01/generated/azure_mgmt_web/models/facebook.rb +126 -0
  179. data/lib/2020-09-01/generated/azure_mgmt_web/models/file_system_application_logs_config.rb +49 -0
  180. data/lib/2020-09-01/generated/azure_mgmt_web/models/file_system_http_logs_config.rb +78 -0
  181. data/lib/2020-09-01/generated/azure_mgmt_web/models/file_system_token_store.rb +91 -0
  182. data/lib/2020-09-01/generated/azure_mgmt_web/models/forward_proxy.rb +115 -0
  183. data/lib/2020-09-01/generated/azure_mgmt_web/models/forward_proxy_convention.rb +17 -0
  184. data/lib/2020-09-01/generated/azure_mgmt_web/models/frequency_unit.rb +16 -0
  185. data/lib/2020-09-01/generated/azure_mgmt_web/models/ftps_state.rb +17 -0
  186. data/lib/2020-09-01/generated/azure_mgmt_web/models/function_envelope.rb +231 -0
  187. data/lib/2020-09-01/generated/azure_mgmt_web/models/function_envelope_collection.rb +99 -0
  188. data/lib/2020-09-01/generated/azure_mgmt_web/models/function_secrets.rb +57 -0
  189. data/lib/2020-09-01/generated/azure_mgmt_web/models/geo_region.rb +115 -0
  190. data/lib/2020-09-01/generated/azure_mgmt_web/models/geo_region_collection.rb +99 -0
  191. data/lib/2020-09-01/generated/azure_mgmt_web/models/git_hub.rb +115 -0
  192. data/lib/2020-09-01/generated/azure_mgmt_web/models/global_csm_sku_description.rb +131 -0
  193. data/lib/2020-09-01/generated/azure_mgmt_web/models/global_validation.rb +134 -0
  194. data/lib/2020-09-01/generated/azure_mgmt_web/models/google.rb +127 -0
  195. data/lib/2020-09-01/generated/azure_mgmt_web/models/handler_mapping.rb +73 -0
  196. data/lib/2020-09-01/generated/azure_mgmt_web/models/host_keys.rb +84 -0
  197. data/lib/2020-09-01/generated/azure_mgmt_web/models/host_name.rb +119 -0
  198. data/lib/2020-09-01/generated/azure_mgmt_web/models/host_name_binding.rb +188 -0
  199. data/lib/2020-09-01/generated/azure_mgmt_web/models/host_name_binding_collection.rb +99 -0
  200. data/lib/2020-09-01/generated/azure_mgmt_web/models/host_name_ssl_state.rb +106 -0
  201. data/lib/2020-09-01/generated/azure_mgmt_web/models/host_name_type.rb +16 -0
  202. data/lib/2020-09-01/generated/azure_mgmt_web/models/host_type.rb +16 -0
  203. data/lib/2020-09-01/generated/azure_mgmt_web/models/hosting_environment_deployment_info.rb +57 -0
  204. data/lib/2020-09-01/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb +57 -0
  205. data/lib/2020-09-01/generated/azure_mgmt_web/models/hosting_environment_profile.rb +70 -0
  206. data/lib/2020-09-01/generated/azure_mgmt_web/models/hosting_environment_status.rb +18 -0
  207. data/lib/2020-09-01/generated/azure_mgmt_web/models/http_logs_config.rb +61 -0
  208. data/lib/2020-09-01/generated/azure_mgmt_web/models/http_settings.rb +115 -0
  209. data/lib/2020-09-01/generated/azure_mgmt_web/models/http_settings_routes.rb +91 -0
  210. data/lib/2020-09-01/generated/azure_mgmt_web/models/hybrid_connection.rb +172 -0
  211. data/lib/2020-09-01/generated/azure_mgmt_web/models/hybrid_connection_collection.rb +99 -0
  212. data/lib/2020-09-01/generated/azure_mgmt_web/models/hybrid_connection_key.rb +104 -0
  213. data/lib/2020-09-01/generated/azure_mgmt_web/models/hybrid_connection_limits.rb +104 -0
  214. data/lib/2020-09-01/generated/azure_mgmt_web/models/identifier.rb +90 -0
  215. data/lib/2020-09-01/generated/azure_mgmt_web/models/identifier_collection.rb +99 -0
  216. data/lib/2020-09-01/generated/azure_mgmt_web/models/identity_providers.rb +160 -0
  217. data/lib/2020-09-01/generated/azure_mgmt_web/models/in_availability_reason_type.rb +16 -0
  218. data/lib/2020-09-01/generated/azure_mgmt_web/models/inbound_environment_endpoint.rb +88 -0
  219. data/lib/2020-09-01/generated/azure_mgmt_web/models/inbound_environment_endpoint_collection.rb +99 -0
  220. data/lib/2020-09-01/generated/azure_mgmt_web/models/ip_filter_tag.rb +17 -0
  221. data/lib/2020-09-01/generated/azure_mgmt_web/models/ip_security_restriction.rb +202 -0
  222. data/lib/2020-09-01/generated/azure_mgmt_web/models/issue_type.rb +22 -0
  223. data/lib/2020-09-01/generated/azure_mgmt_web/models/jwt_claim_checks.rb +118 -0
  224. data/lib/2020-09-01/generated/azure_mgmt_web/models/key_info.rb +57 -0
  225. data/lib/2020-09-01/generated/azure_mgmt_web/models/key_vault_secret_status.rb +25 -0
  226. data/lib/2020-09-01/generated/azure_mgmt_web/models/load_balancing_mode.rb +18 -0
  227. data/lib/2020-09-01/generated/azure_mgmt_web/models/localizable_string.rb +57 -0
  228. data/lib/2020-09-01/generated/azure_mgmt_web/models/log_level.rb +19 -0
  229. data/lib/2020-09-01/generated/azure_mgmt_web/models/log_specification.rb +79 -0
  230. data/lib/2020-09-01/generated/azure_mgmt_web/models/login.rb +158 -0
  231. data/lib/2020-09-01/generated/azure_mgmt_web/models/login_routes.rb +91 -0
  232. data/lib/2020-09-01/generated/azure_mgmt_web/models/login_scopes.rb +99 -0
  233. data/lib/2020-09-01/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
  234. data/lib/2020-09-01/generated/azure_mgmt_web/models/managed_service_identity.rb +97 -0
  235. data/lib/2020-09-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +18 -0
  236. data/lib/2020-09-01/generated/azure_mgmt_web/models/managed_service_identity_user_assigned_identities_value.rb +61 -0
  237. data/lib/2020-09-01/generated/azure_mgmt_web/models/metric_availability.rb +57 -0
  238. data/lib/2020-09-01/generated/azure_mgmt_web/models/metric_specification.rb +256 -0
  239. data/lib/2020-09-01/generated/azure_mgmt_web/models/migrate_my_sql_request.rb +103 -0
  240. data/lib/2020-09-01/generated/azure_mgmt_web/models/migrate_my_sql_status.rb +117 -0
  241. data/lib/2020-09-01/generated/azure_mgmt_web/models/msdeploy.rb +174 -0
  242. data/lib/2020-09-01/generated/azure_mgmt_web/models/msdeploy_log.rb +100 -0
  243. data/lib/2020-09-01/generated/azure_mgmt_web/models/msdeploy_log_entry.rb +73 -0
  244. data/lib/2020-09-01/generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb +17 -0
  245. data/lib/2020-09-01/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb +19 -0
  246. data/lib/2020-09-01/generated/azure_mgmt_web/models/msdeploy_status.rb +141 -0
  247. data/lib/2020-09-01/generated/azure_mgmt_web/models/my_sql_migration_type.rb +16 -0
  248. data/lib/2020-09-01/generated/azure_mgmt_web/models/name_identifier.rb +46 -0
  249. data/lib/2020-09-01/generated/azure_mgmt_web/models/name_identifier_collection.rb +99 -0
  250. data/lib/2020-09-01/generated/azure_mgmt_web/models/name_value_pair.rb +57 -0
  251. data/lib/2020-09-01/generated/azure_mgmt_web/models/network_access_control_entry.rb +81 -0
  252. data/lib/2020-09-01/generated/azure_mgmt_web/models/network_features.rb +149 -0
  253. data/lib/2020-09-01/generated/azure_mgmt_web/models/network_trace.rb +70 -0
  254. data/lib/2020-09-01/generated/azure_mgmt_web/models/nonce.rb +102 -0
  255. data/lib/2020-09-01/generated/azure_mgmt_web/models/notification_level.rb +18 -0
  256. data/lib/2020-09-01/generated/azure_mgmt_web/models/open_id_connect_client_credential.rb +104 -0
  257. data/lib/2020-09-01/generated/azure_mgmt_web/models/open_id_connect_config.rb +135 -0
  258. data/lib/2020-09-01/generated/azure_mgmt_web/models/open_id_connect_login.rb +110 -0
  259. data/lib/2020-09-01/generated/azure_mgmt_web/models/open_id_connect_registration.rb +115 -0
  260. data/lib/2020-09-01/generated/azure_mgmt_web/models/operation.rb +135 -0
  261. data/lib/2020-09-01/generated/azure_mgmt_web/models/operation_status.rb +19 -0
  262. data/lib/2020-09-01/generated/azure_mgmt_web/models/outbound_environment_endpoint.rb +70 -0
  263. data/lib/2020-09-01/generated/azure_mgmt_web/models/outbound_environment_endpoint_collection.rb +99 -0
  264. data/lib/2020-09-01/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb +99 -0
  265. data/lib/2020-09-01/generated/azure_mgmt_web/models/perf_mon_response.rb +69 -0
  266. data/lib/2020-09-01/generated/azure_mgmt_web/models/perf_mon_sample.rb +68 -0
  267. data/lib/2020-09-01/generated/azure_mgmt_web/models/perf_mon_set.rb +100 -0
  268. data/lib/2020-09-01/generated/azure_mgmt_web/models/premier_add_on.rb +158 -0
  269. data/lib/2020-09-01/generated/azure_mgmt_web/models/premier_add_on_offer.rb +193 -0
  270. data/lib/2020-09-01/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb +99 -0
  271. data/lib/2020-09-01/generated/azure_mgmt_web/models/premier_add_on_patch_resource.rb +134 -0
  272. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_access.rb +111 -0
  273. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_access_subnet.rb +58 -0
  274. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_access_virtual_network.rb +91 -0
  275. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_endpoint_connection_resource.rb +116 -0
  276. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_link_connection_approval_request_resource.rb +92 -0
  277. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_link_connection_state.rb +68 -0
  278. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_link_resource.rb +81 -0
  279. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_link_resource_properties.rb +87 -0
  280. data/lib/2020-09-01/generated/azure_mgmt_web/models/private_link_resources_wrapper.rb +55 -0
  281. data/lib/2020-09-01/generated/azure_mgmt_web/models/process_info.rb +518 -0
  282. data/lib/2020-09-01/generated/azure_mgmt_web/models/process_info_collection.rb +99 -0
  283. data/lib/2020-09-01/generated/azure_mgmt_web/models/process_module_info.rb +201 -0
  284. data/lib/2020-09-01/generated/azure_mgmt_web/models/process_module_info_collection.rb +99 -0
  285. data/lib/2020-09-01/generated/azure_mgmt_web/models/process_thread_info.rb +212 -0
  286. data/lib/2020-09-01/generated/azure_mgmt_web/models/process_thread_info_collection.rb +99 -0
  287. data/lib/2020-09-01/generated/azure_mgmt_web/models/provisioning_state.rb +19 -0
  288. data/lib/2020-09-01/generated/azure_mgmt_web/models/proxy_only_resource.rb +95 -0
  289. data/lib/2020-09-01/generated/azure_mgmt_web/models/public_certificate.rb +115 -0
  290. data/lib/2020-09-01/generated/azure_mgmt_web/models/public_certificate_collection.rb +99 -0
  291. data/lib/2020-09-01/generated/azure_mgmt_web/models/public_certificate_location.rb +17 -0
  292. data/lib/2020-09-01/generated/azure_mgmt_web/models/publishing_profile_format.rb +17 -0
  293. data/lib/2020-09-01/generated/azure_mgmt_web/models/push_settings.rb +132 -0
  294. data/lib/2020-09-01/generated/azure_mgmt_web/models/ramp_up_rule.rb +142 -0
  295. data/lib/2020-09-01/generated/azure_mgmt_web/models/recommendation.rb +369 -0
  296. data/lib/2020-09-01/generated/azure_mgmt_web/models/recommendation_collection.rb +99 -0
  297. data/lib/2020-09-01/generated/azure_mgmt_web/models/recommendation_rule.rb +246 -0
  298. data/lib/2020-09-01/generated/azure_mgmt_web/models/redundancy_mode.rb +19 -0
  299. data/lib/2020-09-01/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb +125 -0
  300. data/lib/2020-09-01/generated/azure_mgmt_web/models/relay_service_connection_entity.rb +156 -0
  301. data/lib/2020-09-01/generated/azure_mgmt_web/models/rendering.rb +71 -0
  302. data/lib/2020-09-01/generated/azure_mgmt_web/models/rendering_type.rb +18 -0
  303. data/lib/2020-09-01/generated/azure_mgmt_web/models/renew_certificate_order_request.rb +113 -0
  304. data/lib/2020-09-01/generated/azure_mgmt_web/models/requests_based_trigger.rb +57 -0
  305. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource.rb +133 -0
  306. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_collection.rb +98 -0
  307. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_health_metadata.rb +102 -0
  308. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_health_metadata_collection.rb +99 -0
  309. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_metric_availability.rb +59 -0
  310. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_metric_definition.rb +157 -0
  311. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb +99 -0
  312. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_name_availability.rb +78 -0
  313. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_name_availability_request.rb +71 -0
  314. data/lib/2020-09-01/generated/azure_mgmt_web/models/resource_scope_type.rb +17 -0
  315. data/lib/2020-09-01/generated/azure_mgmt_web/models/response_meta_data.rb +48 -0
  316. data/lib/2020-09-01/generated/azure_mgmt_web/models/restore_request.rb +226 -0
  317. data/lib/2020-09-01/generated/azure_mgmt_web/models/route_type.rb +17 -0
  318. data/lib/2020-09-01/generated/azure_mgmt_web/models/scm_type.rb +28 -0
  319. data/lib/2020-09-01/generated/azure_mgmt_web/models/service_specification.rb +76 -0
  320. data/lib/2020-09-01/generated/azure_mgmt_web/models/site.rb +643 -0
  321. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_auth_settings.rb +659 -0
  322. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_auth_settings_v2.rb +140 -0
  323. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_availability_state.rb +17 -0
  324. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_cloneability.rb +113 -0
  325. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_cloneability_criterion.rb +57 -0
  326. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_config.rb +782 -0
  327. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_config_resource.rb +826 -0
  328. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_config_resource_collection.rb +99 -0
  329. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb +103 -0
  330. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_configuration_snapshot_info_collection.rb +101 -0
  331. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_extension_info.rb +310 -0
  332. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_extension_info_collection.rb +99 -0
  333. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_extension_type.rb +16 -0
  334. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_limits.rb +68 -0
  335. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_load_balancing.rb +19 -0
  336. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_logs_config.rb +127 -0
  337. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_machine_key.rb +79 -0
  338. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_patch_resource.rb +619 -0
  339. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_php_error_log_flag.rb +123 -0
  340. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_runtime_state.rb +17 -0
  341. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_seal.rb +46 -0
  342. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_seal_request.rb +58 -0
  343. data/lib/2020-09-01/generated/azure_mgmt_web/models/site_source_control.rb +150 -0
  344. data/lib/2020-09-01/generated/azure_mgmt_web/models/sku_capacity.rb +83 -0
  345. data/lib/2020-09-01/generated/azure_mgmt_web/models/sku_description.rb +142 -0
  346. data/lib/2020-09-01/generated/azure_mgmt_web/models/sku_info.rb +70 -0
  347. data/lib/2020-09-01/generated/azure_mgmt_web/models/sku_info_collection.rb +99 -0
  348. data/lib/2020-09-01/generated/azure_mgmt_web/models/sku_infos.rb +67 -0
  349. data/lib/2020-09-01/generated/azure_mgmt_web/models/sku_name.rb +24 -0
  350. data/lib/2020-09-01/generated/azure_mgmt_web/models/slot_config_names_resource.rb +137 -0
  351. data/lib/2020-09-01/generated/azure_mgmt_web/models/slot_difference.rb +166 -0
  352. data/lib/2020-09-01/generated/azure_mgmt_web/models/slot_difference_collection.rb +99 -0
  353. data/lib/2020-09-01/generated/azure_mgmt_web/models/slot_swap_status.rb +71 -0
  354. data/lib/2020-09-01/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +68 -0
  355. data/lib/2020-09-01/generated/azure_mgmt_web/models/snapshot.rb +91 -0
  356. data/lib/2020-09-01/generated/azure_mgmt_web/models/snapshot_collection.rb +100 -0
  357. data/lib/2020-09-01/generated/azure_mgmt_web/models/snapshot_recovery_source.rb +62 -0
  358. data/lib/2020-09-01/generated/azure_mgmt_web/models/snapshot_restore_request.rb +154 -0
  359. data/lib/2020-09-01/generated/azure_mgmt_web/models/solution.rb +148 -0
  360. data/lib/2020-09-01/generated/azure_mgmt_web/models/solution_type.rb +17 -0
  361. data/lib/2020-09-01/generated/azure_mgmt_web/models/source_control.rb +123 -0
  362. data/lib/2020-09-01/generated/azure_mgmt_web/models/source_control_collection.rb +99 -0
  363. data/lib/2020-09-01/generated/azure_mgmt_web/models/ssl_state.rb +17 -0
  364. data/lib/2020-09-01/generated/azure_mgmt_web/models/stack_major_version.rb +138 -0
  365. data/lib/2020-09-01/generated/azure_mgmt_web/models/stack_minor_version.rb +81 -0
  366. data/lib/2020-09-01/generated/azure_mgmt_web/models/stamp_capacity.rb +168 -0
  367. data/lib/2020-09-01/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +99 -0
  368. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_armresource.rb +196 -0
  369. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_build_armresource.rb +166 -0
  370. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_build_collection.rb +99 -0
  371. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_build_properties.rb +68 -0
  372. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_collection.rb +99 -0
  373. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_custom_domain_overview_armresource.rb +105 -0
  374. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_custom_domain_overview_collection.rb +102 -0
  375. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_function_overview_armresource.rb +104 -0
  376. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_function_overview_collection.rb +101 -0
  377. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_patch_resource.rb +160 -0
  378. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_reset_properties_armresource.rb +103 -0
  379. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_user_armresource.rb +127 -0
  380. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_user_collection.rb +99 -0
  381. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_user_invitation_request_resource.rb +135 -0
  382. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_site_user_invitation_response_resource.rb +103 -0
  383. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_sites_workflow_preview.rb +103 -0
  384. data/lib/2020-09-01/generated/azure_mgmt_web/models/static_sites_workflow_preview_request.rb +114 -0
  385. data/lib/2020-09-01/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +90 -0
  386. data/lib/2020-09-01/generated/azure_mgmt_web/models/status_options.rb +17 -0
  387. data/lib/2020-09-01/generated/azure_mgmt_web/models/storage_migration_options.rb +128 -0
  388. data/lib/2020-09-01/generated/azure_mgmt_web/models/storage_migration_response.rb +92 -0
  389. data/lib/2020-09-01/generated/azure_mgmt_web/models/string_dictionary.rb +98 -0
  390. data/lib/2020-09-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  391. data/lib/2020-09-01/generated/azure_mgmt_web/models/swift_virtual_network.rb +105 -0
  392. data/lib/2020-09-01/generated/azure_mgmt_web/models/system_data.rb +105 -0
  393. data/lib/2020-09-01/generated/azure_mgmt_web/models/tld_legal_agreement.rb +79 -0
  394. data/lib/2020-09-01/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +99 -0
  395. data/lib/2020-09-01/generated/azure_mgmt_web/models/token_store.rb +126 -0
  396. data/lib/2020-09-01/generated/azure_mgmt_web/models/top_level_domain.rb +91 -0
  397. data/lib/2020-09-01/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb +61 -0
  398. data/lib/2020-09-01/generated/azure_mgmt_web/models/top_level_domain_collection.rb +99 -0
  399. data/lib/2020-09-01/generated/azure_mgmt_web/models/trigger_types.rb +16 -0
  400. data/lib/2020-09-01/generated/azure_mgmt_web/models/triggered_job_history.rb +100 -0
  401. data/lib/2020-09-01/generated/azure_mgmt_web/models/triggered_job_history_collection.rb +99 -0
  402. data/lib/2020-09-01/generated/azure_mgmt_web/models/triggered_job_run.rb +202 -0
  403. data/lib/2020-09-01/generated/azure_mgmt_web/models/triggered_web_job.rb +200 -0
  404. data/lib/2020-09-01/generated/azure_mgmt_web/models/triggered_web_job_collection.rb +99 -0
  405. data/lib/2020-09-01/generated/azure_mgmt_web/models/triggered_web_job_status.rb +17 -0
  406. data/lib/2020-09-01/generated/azure_mgmt_web/models/twitter.rb +103 -0
  407. data/lib/2020-09-01/generated/azure_mgmt_web/models/twitter_registration.rb +102 -0
  408. data/lib/2020-09-01/generated/azure_mgmt_web/models/unauthenticated_client_action.rb +16 -0
  409. data/lib/2020-09-01/generated/azure_mgmt_web/models/unauthenticated_client_action_v2.rb +18 -0
  410. data/lib/2020-09-01/generated/azure_mgmt_web/models/usage.rb +177 -0
  411. data/lib/2020-09-01/generated/azure_mgmt_web/models/usage_collection.rb +99 -0
  412. data/lib/2020-09-01/generated/azure_mgmt_web/models/usage_state.rb +16 -0
  413. data/lib/2020-09-01/generated/azure_mgmt_web/models/user.rb +134 -0
  414. data/lib/2020-09-01/generated/azure_mgmt_web/models/validate_request.rb +221 -0
  415. data/lib/2020-09-01/generated/azure_mgmt_web/models/validate_resource_types.rb +16 -0
  416. data/lib/2020-09-01/generated/azure_mgmt_web/models/validate_response.rb +59 -0
  417. data/lib/2020-09-01/generated/azure_mgmt_web/models/validate_response_error.rb +57 -0
  418. data/lib/2020-09-01/generated/azure_mgmt_web/models/virtual_application.rb +90 -0
  419. data/lib/2020-09-01/generated/azure_mgmt_web/models/virtual_directory.rb +57 -0
  420. data/lib/2020-09-01/generated/azure_mgmt_web/models/virtual_ipmapping.rb +90 -0
  421. data/lib/2020-09-01/generated/azure_mgmt_web/models/virtual_network_profile.rb +81 -0
  422. data/lib/2020-09-01/generated/azure_mgmt_web/models/vnet_gateway.rb +102 -0
  423. data/lib/2020-09-01/generated/azure_mgmt_web/models/vnet_info.rb +173 -0
  424. data/lib/2020-09-01/generated/azure_mgmt_web/models/vnet_parameters.rb +112 -0
  425. data/lib/2020-09-01/generated/azure_mgmt_web/models/vnet_route.rb +124 -0
  426. data/lib/2020-09-01/generated/azure_mgmt_web/models/vnet_validation_failure_details.rb +111 -0
  427. data/lib/2020-09-01/generated/azure_mgmt_web/models/vnet_validation_test_failure.rb +102 -0
  428. data/lib/2020-09-01/generated/azure_mgmt_web/models/web_app_collection.rb +99 -0
  429. data/lib/2020-09-01/generated/azure_mgmt_web/models/web_app_instance_status_collection.rb +99 -0
  430. data/lib/2020-09-01/generated/azure_mgmt_web/models/web_job.rb +166 -0
  431. data/lib/2020-09-01/generated/azure_mgmt_web/models/web_job_collection.rb +99 -0
  432. data/lib/2020-09-01/generated/azure_mgmt_web/models/web_job_type.rb +16 -0
  433. data/lib/2020-09-01/generated/azure_mgmt_web/models/web_site_instance_status.rb +157 -0
  434. data/lib/2020-09-01/generated/azure_mgmt_web/models/worker_pool.rb +102 -0
  435. data/lib/2020-09-01/generated/azure_mgmt_web/models/worker_pool_collection.rb +99 -0
  436. data/lib/2020-09-01/generated/azure_mgmt_web/models/worker_pool_resource.rb +158 -0
  437. data/lib/2020-09-01/generated/azure_mgmt_web/models/worker_size_options.rb +22 -0
  438. data/lib/2020-09-01/generated/azure_mgmt_web/module_definition.rb +9 -0
  439. data/lib/2020-09-01/generated/azure_mgmt_web/provider.rb +681 -0
  440. data/lib/2020-09-01/generated/azure_mgmt_web/recommendations.rb +2306 -0
  441. data/lib/2020-09-01/generated/azure_mgmt_web/resource_health_metadata_operations.rb +1194 -0
  442. data/lib/2020-09-01/generated/azure_mgmt_web/static_sites.rb +3889 -0
  443. data/lib/2020-09-01/generated/azure_mgmt_web/top_level_domains.rb +576 -0
  444. data/lib/2020-09-01/generated/azure_mgmt_web/web_apps.rb +52832 -0
  445. data/lib/2020-09-01/generated/azure_mgmt_web/web_site_management_client.rb +2884 -0
  446. data/lib/azure_mgmt_web.rb +5 -4
  447. data/lib/profiles/latest/modules/web_profile_module.rb +1200 -866
  448. data/lib/version.rb +1 -1
  449. metadata +440 -3
@@ -0,0 +1,3918 @@
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::Web::Mgmt::V2020_09_01
7
+ #
8
+ # WebSite Management Client
9
+ #
10
+ class AppServicePlans
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the AppServicePlans class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [WebSiteManagementClient] reference to the WebSiteManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get all App Service plans for a subscription.
26
+ #
27
+ # Description for Get all App Service plans for a subscription.
28
+ #
29
+ # @param detailed [Boolean] Specify <code>true</code> to return all App Service
30
+ # plan properties. The default is <code>false</code>, which returns a subset of
31
+ # the properties.
32
+ # Retrieval of all properties may increase the API latency.
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<AppServicePlan>] operation results.
37
+ #
38
+ def list(detailed:nil, custom_headers:nil)
39
+ first_page = list_as_lazy(detailed:detailed, custom_headers:custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Get all App Service plans for a subscription.
45
+ #
46
+ # Description for Get all App Service plans for a subscription.
47
+ #
48
+ # @param detailed [Boolean] Specify <code>true</code> to return all App Service
49
+ # plan properties. The default is <code>false</code>, which returns a subset of
50
+ # the properties.
51
+ # Retrieval of all properties may increase the API latency.
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_with_http_info(detailed:nil, custom_headers:nil)
58
+ list_async(detailed:detailed, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Get all App Service plans for a subscription.
63
+ #
64
+ # Description for Get all App Service plans for a subscription.
65
+ #
66
+ # @param detailed [Boolean] Specify <code>true</code> to return all App Service
67
+ # plan properties. The default is <code>false</code>, which returns a subset of
68
+ # the properties.
69
+ # Retrieval of all properties may increase the API latency.
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_async(detailed:nil, custom_headers:nil)
76
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
78
+
79
+
80
+ request_headers = {}
81
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
82
+
83
+ # Set Headers
84
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
85
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
86
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'
87
+
88
+ request_url = @base_url || @client.base_url
89
+
90
+ options = {
91
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
92
+ path_params: {'subscriptionId' => @client.subscription_id},
93
+ query_params: {'detailed' => detailed,'api-version' => @client.api_version},
94
+ headers: request_headers.merge(custom_headers || {}),
95
+ base_url: request_url
96
+ }
97
+ promise = @client.make_request_async(:get, path_template, options)
98
+
99
+ promise = promise.then do |result|
100
+ http_response = result.response
101
+ status_code = http_response.status
102
+ response_content = http_response.body
103
+ unless status_code == 200
104
+ error_model = JSON.load(response_content)
105
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
106
+ end
107
+
108
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
109
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
110
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
111
+ # Deserialize Response
112
+ if status_code == 200
113
+ begin
114
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
115
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlanCollection.mapper()
116
+ result.body = @client.deserialize(result_mapper, parsed_response)
117
+ rescue Exception => e
118
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
119
+ end
120
+ end
121
+
122
+ result
123
+ end
124
+
125
+ promise.execute
126
+ end
127
+
128
+ #
129
+ # Get all App Service plans in a resource group.
130
+ #
131
+ # Description for Get all App Service plans in a resource group.
132
+ #
133
+ # @param resource_group_name [String] Name of the resource group to which the
134
+ # resource belongs.
135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
+ # will be added to the HTTP request.
137
+ #
138
+ # @return [Array<AppServicePlan>] operation results.
139
+ #
140
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
141
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
142
+ first_page.get_all_items
143
+ end
144
+
145
+ #
146
+ # Get all App Service plans in a resource group.
147
+ #
148
+ # Description for Get all App Service plans in a resource group.
149
+ #
150
+ # @param resource_group_name [String] Name of the resource group to which the
151
+ # resource belongs.
152
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
153
+ # will be added to the HTTP request.
154
+ #
155
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
156
+ #
157
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
158
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
159
+ end
160
+
161
+ #
162
+ # Get all App Service plans in a resource group.
163
+ #
164
+ # Description for Get all App Service plans in a resource group.
165
+ #
166
+ # @param resource_group_name [String] Name of the resource group to which the
167
+ # resource belongs.
168
+ # @param [Hash{String => String}] A hash of custom headers that will be added
169
+ # to the HTTP request.
170
+ #
171
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
172
+ #
173
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
174
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
175
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
176
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
177
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
178
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
179
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
180
+
181
+
182
+ request_headers = {}
183
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
184
+
185
+ # Set Headers
186
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
187
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
188
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'
189
+
190
+ request_url = @base_url || @client.base_url
191
+
192
+ options = {
193
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
194
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
195
+ query_params: {'api-version' => @client.api_version},
196
+ headers: request_headers.merge(custom_headers || {}),
197
+ base_url: request_url
198
+ }
199
+ promise = @client.make_request_async(:get, path_template, options)
200
+
201
+ promise = promise.then do |result|
202
+ http_response = result.response
203
+ status_code = http_response.status
204
+ response_content = http_response.body
205
+ unless status_code == 200
206
+ error_model = JSON.load(response_content)
207
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
208
+ end
209
+
210
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
211
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
212
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
213
+ # Deserialize Response
214
+ if status_code == 200
215
+ begin
216
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
217
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlanCollection.mapper()
218
+ result.body = @client.deserialize(result_mapper, parsed_response)
219
+ rescue Exception => e
220
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
221
+ end
222
+ end
223
+
224
+ result
225
+ end
226
+
227
+ promise.execute
228
+ end
229
+
230
+ #
231
+ # Get an App Service plan.
232
+ #
233
+ # Description for Get an App Service plan.
234
+ #
235
+ # @param resource_group_name [String] Name of the resource group to which the
236
+ # resource belongs.
237
+ # @param name [String] Name of the App Service plan.
238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
239
+ # will be added to the HTTP request.
240
+ #
241
+ # @return [AppServicePlan] operation results.
242
+ #
243
+ def get(resource_group_name, name, custom_headers:nil)
244
+ response = get_async(resource_group_name, name, custom_headers:custom_headers).value!
245
+ response.body unless response.nil?
246
+ end
247
+
248
+ #
249
+ # Get an App Service plan.
250
+ #
251
+ # Description for Get an App Service plan.
252
+ #
253
+ # @param resource_group_name [String] Name of the resource group to which the
254
+ # resource belongs.
255
+ # @param name [String] Name of the App Service plan.
256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
+ # will be added to the HTTP request.
258
+ #
259
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
260
+ #
261
+ def get_with_http_info(resource_group_name, name, custom_headers:nil)
262
+ get_async(resource_group_name, name, custom_headers:custom_headers).value!
263
+ end
264
+
265
+ #
266
+ # Get an App Service plan.
267
+ #
268
+ # Description for Get an App Service plan.
269
+ #
270
+ # @param resource_group_name [String] Name of the resource group to which the
271
+ # resource belongs.
272
+ # @param name [String] Name of the App Service plan.
273
+ # @param [Hash{String => String}] A hash of custom headers that will be added
274
+ # to the HTTP request.
275
+ #
276
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
277
+ #
278
+ def get_async(resource_group_name, name, custom_headers:nil)
279
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
280
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
281
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
282
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
283
+ fail ArgumentError, 'name is nil' if name.nil?
284
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
285
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
286
+
287
+
288
+ request_headers = {}
289
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
290
+
291
+ # Set Headers
292
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
293
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
294
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'
295
+
296
+ request_url = @base_url || @client.base_url
297
+
298
+ options = {
299
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
300
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
301
+ query_params: {'api-version' => @client.api_version},
302
+ headers: request_headers.merge(custom_headers || {}),
303
+ base_url: request_url
304
+ }
305
+ promise = @client.make_request_async(:get, path_template, options)
306
+
307
+ promise = promise.then do |result|
308
+ http_response = result.response
309
+ status_code = http_response.status
310
+ response_content = http_response.body
311
+ unless status_code == 200 || status_code == 404
312
+ error_model = JSON.load(response_content)
313
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
314
+ end
315
+
316
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
317
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
318
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
319
+ # Deserialize Response
320
+ if status_code == 200
321
+ begin
322
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
323
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlan.mapper()
324
+ result.body = @client.deserialize(result_mapper, parsed_response)
325
+ rescue Exception => e
326
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
327
+ end
328
+ end
329
+
330
+ result
331
+ end
332
+
333
+ promise.execute
334
+ end
335
+
336
+ #
337
+ # Creates or updates an App Service Plan.
338
+ #
339
+ # Description for Creates or updates an App Service Plan.
340
+ #
341
+ # @param resource_group_name [String] Name of the resource group to which the
342
+ # resource belongs.
343
+ # @param name [String] Name of the App Service plan.
344
+ # @param app_service_plan [AppServicePlan] Details of the App Service plan.
345
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
346
+ # will be added to the HTTP request.
347
+ #
348
+ # @return [AppServicePlan] operation results.
349
+ #
350
+ def create_or_update(resource_group_name, name, app_service_plan, custom_headers:nil)
351
+ response = create_or_update_async(resource_group_name, name, app_service_plan, custom_headers:custom_headers).value!
352
+ response.body unless response.nil?
353
+ end
354
+
355
+ #
356
+ # @param resource_group_name [String] Name of the resource group to which the
357
+ # resource belongs.
358
+ # @param name [String] Name of the App Service plan.
359
+ # @param app_service_plan [AppServicePlan] Details of the App Service plan.
360
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
361
+ # will be added to the HTTP request.
362
+ #
363
+ # @return [Concurrent::Promise] promise which provides async access to http
364
+ # response.
365
+ #
366
+ def create_or_update_async(resource_group_name, name, app_service_plan, custom_headers:nil)
367
+ # Send request
368
+ promise = begin_create_or_update_async(resource_group_name, name, app_service_plan, custom_headers:custom_headers)
369
+
370
+ promise = promise.then do |response|
371
+ # Defining deserialization method.
372
+ deserialize_method = lambda do |parsed_response|
373
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlan.mapper()
374
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
375
+ end
376
+
377
+ # Waiting for response.
378
+ @client.get_long_running_operation_result(response, deserialize_method)
379
+ end
380
+
381
+ promise
382
+ end
383
+
384
+ #
385
+ # Delete an App Service plan.
386
+ #
387
+ # Description for Delete an App Service plan.
388
+ #
389
+ # @param resource_group_name [String] Name of the resource group to which the
390
+ # resource belongs.
391
+ # @param name [String] Name of the App Service plan.
392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
393
+ # will be added to the HTTP request.
394
+ #
395
+ #
396
+ def delete(resource_group_name, name, custom_headers:nil)
397
+ response = delete_async(resource_group_name, name, custom_headers:custom_headers).value!
398
+ nil
399
+ end
400
+
401
+ #
402
+ # Delete an App Service plan.
403
+ #
404
+ # Description for Delete an App Service plan.
405
+ #
406
+ # @param resource_group_name [String] Name of the resource group to which the
407
+ # resource belongs.
408
+ # @param name [String] Name of the App Service plan.
409
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
410
+ # will be added to the HTTP request.
411
+ #
412
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
413
+ #
414
+ def delete_with_http_info(resource_group_name, name, custom_headers:nil)
415
+ delete_async(resource_group_name, name, custom_headers:custom_headers).value!
416
+ end
417
+
418
+ #
419
+ # Delete an App Service plan.
420
+ #
421
+ # Description for Delete an App Service plan.
422
+ #
423
+ # @param resource_group_name [String] Name of the resource group to which the
424
+ # resource belongs.
425
+ # @param name [String] Name of the App Service plan.
426
+ # @param [Hash{String => String}] A hash of custom headers that will be added
427
+ # to the HTTP request.
428
+ #
429
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
430
+ #
431
+ def delete_async(resource_group_name, name, custom_headers:nil)
432
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
433
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
434
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
435
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
436
+ fail ArgumentError, 'name is nil' if name.nil?
437
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
438
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
439
+
440
+
441
+ request_headers = {}
442
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
443
+
444
+ # Set Headers
445
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
446
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
447
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'
448
+
449
+ request_url = @base_url || @client.base_url
450
+
451
+ options = {
452
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
453
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
454
+ query_params: {'api-version' => @client.api_version},
455
+ headers: request_headers.merge(custom_headers || {}),
456
+ base_url: request_url
457
+ }
458
+ promise = @client.make_request_async(:delete, path_template, options)
459
+
460
+ promise = promise.then do |result|
461
+ http_response = result.response
462
+ status_code = http_response.status
463
+ response_content = http_response.body
464
+ unless status_code == 200 || status_code == 204
465
+ error_model = JSON.load(response_content)
466
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
467
+ end
468
+
469
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
470
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
471
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
472
+
473
+ result
474
+ end
475
+
476
+ promise.execute
477
+ end
478
+
479
+ #
480
+ # Creates or updates an App Service Plan.
481
+ #
482
+ # Description for Creates or updates an App Service Plan.
483
+ #
484
+ # @param resource_group_name [String] Name of the resource group to which the
485
+ # resource belongs.
486
+ # @param name [String] Name of the App Service plan.
487
+ # @param app_service_plan [AppServicePlanPatchResource] Details of the App
488
+ # Service plan.
489
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
490
+ # will be added to the HTTP request.
491
+ #
492
+ # @return [AppServicePlan] operation results.
493
+ #
494
+ def update(resource_group_name, name, app_service_plan, custom_headers:nil)
495
+ response = update_async(resource_group_name, name, app_service_plan, custom_headers:custom_headers).value!
496
+ response.body unless response.nil?
497
+ end
498
+
499
+ #
500
+ # Creates or updates an App Service Plan.
501
+ #
502
+ # Description for Creates or updates an App Service Plan.
503
+ #
504
+ # @param resource_group_name [String] Name of the resource group to which the
505
+ # resource belongs.
506
+ # @param name [String] Name of the App Service plan.
507
+ # @param app_service_plan [AppServicePlanPatchResource] Details of the App
508
+ # Service plan.
509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
510
+ # will be added to the HTTP request.
511
+ #
512
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
513
+ #
514
+ def update_with_http_info(resource_group_name, name, app_service_plan, custom_headers:nil)
515
+ update_async(resource_group_name, name, app_service_plan, custom_headers:custom_headers).value!
516
+ end
517
+
518
+ #
519
+ # Creates or updates an App Service Plan.
520
+ #
521
+ # Description for Creates or updates an App Service Plan.
522
+ #
523
+ # @param resource_group_name [String] Name of the resource group to which the
524
+ # resource belongs.
525
+ # @param name [String] Name of the App Service plan.
526
+ # @param app_service_plan [AppServicePlanPatchResource] Details of the App
527
+ # Service plan.
528
+ # @param [Hash{String => String}] A hash of custom headers that will be added
529
+ # to the HTTP request.
530
+ #
531
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
532
+ #
533
+ def update_async(resource_group_name, name, app_service_plan, custom_headers:nil)
534
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
535
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
536
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
537
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
538
+ fail ArgumentError, 'name is nil' if name.nil?
539
+ fail ArgumentError, 'app_service_plan is nil' if app_service_plan.nil?
540
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
541
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
542
+
543
+
544
+ request_headers = {}
545
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
546
+
547
+ # Set Headers
548
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
549
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
550
+
551
+ # Serialize Request
552
+ request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlanPatchResource.mapper()
553
+ request_content = @client.serialize(request_mapper, app_service_plan)
554
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
555
+
556
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'
557
+
558
+ request_url = @base_url || @client.base_url
559
+
560
+ options = {
561
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
562
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
563
+ query_params: {'api-version' => @client.api_version},
564
+ body: request_content,
565
+ headers: request_headers.merge(custom_headers || {}),
566
+ base_url: request_url
567
+ }
568
+ promise = @client.make_request_async(:patch, path_template, options)
569
+
570
+ promise = promise.then do |result|
571
+ http_response = result.response
572
+ status_code = http_response.status
573
+ response_content = http_response.body
574
+ unless status_code == 200 || status_code == 202
575
+ error_model = JSON.load(response_content)
576
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
577
+ end
578
+
579
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
580
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
581
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
582
+ # Deserialize Response
583
+ if status_code == 200
584
+ begin
585
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
586
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlan.mapper()
587
+ result.body = @client.deserialize(result_mapper, parsed_response)
588
+ rescue Exception => e
589
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
590
+ end
591
+ end
592
+ # Deserialize Response
593
+ if status_code == 202
594
+ begin
595
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
596
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlan.mapper()
597
+ result.body = @client.deserialize(result_mapper, parsed_response)
598
+ rescue Exception => e
599
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
600
+ end
601
+ end
602
+
603
+ result
604
+ end
605
+
606
+ promise.execute
607
+ end
608
+
609
+ #
610
+ # List all capabilities of an App Service plan.
611
+ #
612
+ # Description for List all capabilities of an App Service plan.
613
+ #
614
+ # @param resource_group_name [String] Name of the resource group to which the
615
+ # resource belongs.
616
+ # @param name [String] Name of the App Service plan.
617
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
618
+ # will be added to the HTTP request.
619
+ #
620
+ # @return [Array] operation results.
621
+ #
622
+ def list_capabilities(resource_group_name, name, custom_headers:nil)
623
+ response = list_capabilities_async(resource_group_name, name, custom_headers:custom_headers).value!
624
+ response.body unless response.nil?
625
+ end
626
+
627
+ #
628
+ # List all capabilities of an App Service plan.
629
+ #
630
+ # Description for List all capabilities of an App Service plan.
631
+ #
632
+ # @param resource_group_name [String] Name of the resource group to which the
633
+ # resource belongs.
634
+ # @param name [String] Name of the App Service plan.
635
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
636
+ # will be added to the HTTP request.
637
+ #
638
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
639
+ #
640
+ def list_capabilities_with_http_info(resource_group_name, name, custom_headers:nil)
641
+ list_capabilities_async(resource_group_name, name, custom_headers:custom_headers).value!
642
+ end
643
+
644
+ #
645
+ # List all capabilities of an App Service plan.
646
+ #
647
+ # Description for List all capabilities of an App Service plan.
648
+ #
649
+ # @param resource_group_name [String] Name of the resource group to which the
650
+ # resource belongs.
651
+ # @param name [String] Name of the App Service plan.
652
+ # @param [Hash{String => String}] A hash of custom headers that will be added
653
+ # to the HTTP request.
654
+ #
655
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
656
+ #
657
+ def list_capabilities_async(resource_group_name, name, custom_headers:nil)
658
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
659
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
660
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
661
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
662
+ fail ArgumentError, 'name is nil' if name.nil?
663
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
664
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
665
+
666
+
667
+ request_headers = {}
668
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
669
+
670
+ # Set Headers
671
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
672
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
673
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'
674
+
675
+ request_url = @base_url || @client.base_url
676
+
677
+ options = {
678
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
679
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
680
+ query_params: {'api-version' => @client.api_version},
681
+ headers: request_headers.merge(custom_headers || {}),
682
+ base_url: request_url
683
+ }
684
+ promise = @client.make_request_async(:get, path_template, options)
685
+
686
+ promise = promise.then do |result|
687
+ http_response = result.response
688
+ status_code = http_response.status
689
+ response_content = http_response.body
690
+ unless status_code == 200
691
+ error_model = JSON.load(response_content)
692
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
693
+ end
694
+
695
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
696
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
697
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
698
+ # Deserialize Response
699
+ if status_code == 200
700
+ begin
701
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
702
+ result_mapper = {
703
+ client_side_validation: true,
704
+ required: false,
705
+ serialized_name: 'parsed_response',
706
+ type: {
707
+ name: 'Sequence',
708
+ element: {
709
+ client_side_validation: true,
710
+ required: false,
711
+ serialized_name: 'CapabilityElementType',
712
+ type: {
713
+ name: 'Composite',
714
+ class_name: 'Capability'
715
+ }
716
+ }
717
+ }
718
+ }
719
+ result.body = @client.deserialize(result_mapper, parsed_response)
720
+ rescue Exception => e
721
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
722
+ end
723
+ end
724
+
725
+ result
726
+ end
727
+
728
+ promise.execute
729
+ end
730
+
731
+ #
732
+ # Retrieve a Hybrid Connection in use in an App Service plan.
733
+ #
734
+ # Description for Retrieve a Hybrid Connection in use in an App Service plan.
735
+ #
736
+ # @param resource_group_name [String] Name of the resource group to which the
737
+ # resource belongs.
738
+ # @param name [String] Name of the App Service plan.
739
+ # @param namespace_name [String] Name of the Service Bus namespace.
740
+ # @param relay_name [String] Name of the Service Bus relay.
741
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
742
+ # will be added to the HTTP request.
743
+ #
744
+ # @return [HybridConnection] operation results.
745
+ #
746
+ def get_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
747
+ response = get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
748
+ response.body unless response.nil?
749
+ end
750
+
751
+ #
752
+ # Retrieve a Hybrid Connection in use in an App Service plan.
753
+ #
754
+ # Description for Retrieve a Hybrid Connection in use in an App Service plan.
755
+ #
756
+ # @param resource_group_name [String] Name of the resource group to which the
757
+ # resource belongs.
758
+ # @param name [String] Name of the App Service plan.
759
+ # @param namespace_name [String] Name of the Service Bus namespace.
760
+ # @param relay_name [String] Name of the Service Bus relay.
761
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
762
+ # will be added to the HTTP request.
763
+ #
764
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
765
+ #
766
+ def get_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
767
+ get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
768
+ end
769
+
770
+ #
771
+ # Retrieve a Hybrid Connection in use in an App Service plan.
772
+ #
773
+ # Description for Retrieve a Hybrid Connection in use in an App Service plan.
774
+ #
775
+ # @param resource_group_name [String] Name of the resource group to which the
776
+ # resource belongs.
777
+ # @param name [String] Name of the App Service plan.
778
+ # @param namespace_name [String] Name of the Service Bus namespace.
779
+ # @param relay_name [String] Name of the Service Bus relay.
780
+ # @param [Hash{String => String}] A hash of custom headers that will be added
781
+ # to the HTTP request.
782
+ #
783
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
784
+ #
785
+ def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
786
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
787
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
788
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
789
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
790
+ fail ArgumentError, 'name is nil' if name.nil?
791
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
792
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
793
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
794
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
795
+
796
+
797
+ request_headers = {}
798
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
799
+
800
+ # Set Headers
801
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
802
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
803
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'
804
+
805
+ request_url = @base_url || @client.base_url
806
+
807
+ options = {
808
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
809
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
810
+ query_params: {'api-version' => @client.api_version},
811
+ headers: request_headers.merge(custom_headers || {}),
812
+ base_url: request_url
813
+ }
814
+ promise = @client.make_request_async(:get, path_template, options)
815
+
816
+ promise = promise.then do |result|
817
+ http_response = result.response
818
+ status_code = http_response.status
819
+ response_content = http_response.body
820
+ unless status_code == 200
821
+ error_model = JSON.load(response_content)
822
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
823
+ end
824
+
825
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
826
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
827
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
828
+ # Deserialize Response
829
+ if status_code == 200
830
+ begin
831
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
832
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::HybridConnection.mapper()
833
+ result.body = @client.deserialize(result_mapper, parsed_response)
834
+ rescue Exception => e
835
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
836
+ end
837
+ end
838
+
839
+ result
840
+ end
841
+
842
+ promise.execute
843
+ end
844
+
845
+ #
846
+ # Delete a Hybrid Connection in use in an App Service plan.
847
+ #
848
+ # Description for Delete a Hybrid Connection in use in an App Service plan.
849
+ #
850
+ # @param resource_group_name [String] Name of the resource group to which the
851
+ # resource belongs.
852
+ # @param name [String] Name of the App Service plan.
853
+ # @param namespace_name [String] Name of the Service Bus namespace.
854
+ # @param relay_name [String] Name of the Service Bus relay.
855
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
856
+ # will be added to the HTTP request.
857
+ #
858
+ #
859
+ def delete_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
860
+ response = delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
861
+ nil
862
+ end
863
+
864
+ #
865
+ # Delete a Hybrid Connection in use in an App Service plan.
866
+ #
867
+ # Description for Delete a Hybrid Connection in use in an App Service plan.
868
+ #
869
+ # @param resource_group_name [String] Name of the resource group to which the
870
+ # resource belongs.
871
+ # @param name [String] Name of the App Service plan.
872
+ # @param namespace_name [String] Name of the Service Bus namespace.
873
+ # @param relay_name [String] Name of the Service Bus relay.
874
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
875
+ # will be added to the HTTP request.
876
+ #
877
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
878
+ #
879
+ def delete_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
880
+ delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
881
+ end
882
+
883
+ #
884
+ # Delete a Hybrid Connection in use in an App Service plan.
885
+ #
886
+ # Description for Delete a Hybrid Connection in use in an App Service plan.
887
+ #
888
+ # @param resource_group_name [String] Name of the resource group to which the
889
+ # resource belongs.
890
+ # @param name [String] Name of the App Service plan.
891
+ # @param namespace_name [String] Name of the Service Bus namespace.
892
+ # @param relay_name [String] Name of the Service Bus relay.
893
+ # @param [Hash{String => String}] A hash of custom headers that will be added
894
+ # to the HTTP request.
895
+ #
896
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
897
+ #
898
+ def delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
899
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
900
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
901
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
902
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
903
+ fail ArgumentError, 'name is nil' if name.nil?
904
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
905
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
906
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
907
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
908
+
909
+
910
+ request_headers = {}
911
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
912
+
913
+ # Set Headers
914
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
915
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
916
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'
917
+
918
+ request_url = @base_url || @client.base_url
919
+
920
+ options = {
921
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
922
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
923
+ query_params: {'api-version' => @client.api_version},
924
+ headers: request_headers.merge(custom_headers || {}),
925
+ base_url: request_url
926
+ }
927
+ promise = @client.make_request_async(:delete, path_template, options)
928
+
929
+ promise = promise.then do |result|
930
+ http_response = result.response
931
+ status_code = http_response.status
932
+ response_content = http_response.body
933
+ unless status_code == 200 || status_code == 204
934
+ error_model = JSON.load(response_content)
935
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
936
+ end
937
+
938
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
939
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
940
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
941
+
942
+ result
943
+ end
944
+
945
+ promise.execute
946
+ end
947
+
948
+ #
949
+ # Get the send key name and value of a Hybrid Connection.
950
+ #
951
+ # Description for Get the send key name and value of a Hybrid Connection.
952
+ #
953
+ # @param resource_group_name [String] Name of the resource group to which the
954
+ # resource belongs.
955
+ # @param name [String] Name of the App Service plan.
956
+ # @param namespace_name [String] The name of the Service Bus namespace.
957
+ # @param relay_name [String] The name of the Service Bus relay.
958
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
+ # will be added to the HTTP request.
960
+ #
961
+ # @return [HybridConnectionKey] operation results.
962
+ #
963
+ def list_hybrid_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
964
+ response = list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
965
+ response.body unless response.nil?
966
+ end
967
+
968
+ #
969
+ # Get the send key name and value of a Hybrid Connection.
970
+ #
971
+ # Description for Get the send key name and value of a Hybrid Connection.
972
+ #
973
+ # @param resource_group_name [String] Name of the resource group to which the
974
+ # resource belongs.
975
+ # @param name [String] Name of the App Service plan.
976
+ # @param namespace_name [String] The name of the Service Bus namespace.
977
+ # @param relay_name [String] The name of the Service Bus relay.
978
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
979
+ # will be added to the HTTP request.
980
+ #
981
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
982
+ #
983
+ def list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
984
+ list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
985
+ end
986
+
987
+ #
988
+ # Get the send key name and value of a Hybrid Connection.
989
+ #
990
+ # Description for Get the send key name and value of a Hybrid Connection.
991
+ #
992
+ # @param resource_group_name [String] Name of the resource group to which the
993
+ # resource belongs.
994
+ # @param name [String] Name of the App Service plan.
995
+ # @param namespace_name [String] The name of the Service Bus namespace.
996
+ # @param relay_name [String] The name of the Service Bus relay.
997
+ # @param [Hash{String => String}] A hash of custom headers that will be added
998
+ # to the HTTP request.
999
+ #
1000
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1001
+ #
1002
+ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
1003
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1004
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1005
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1006
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1007
+ fail ArgumentError, 'name is nil' if name.nil?
1008
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1009
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
1010
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1011
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1012
+
1013
+
1014
+ request_headers = {}
1015
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1016
+
1017
+ # Set Headers
1018
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1019
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1020
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'
1021
+
1022
+ request_url = @base_url || @client.base_url
1023
+
1024
+ options = {
1025
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1026
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
1027
+ query_params: {'api-version' => @client.api_version},
1028
+ headers: request_headers.merge(custom_headers || {}),
1029
+ base_url: request_url
1030
+ }
1031
+ promise = @client.make_request_async(:post, path_template, options)
1032
+
1033
+ promise = promise.then do |result|
1034
+ http_response = result.response
1035
+ status_code = http_response.status
1036
+ response_content = http_response.body
1037
+ unless status_code == 200
1038
+ error_model = JSON.load(response_content)
1039
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1040
+ end
1041
+
1042
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1043
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1044
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1045
+ # Deserialize Response
1046
+ if status_code == 200
1047
+ begin
1048
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1049
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::HybridConnectionKey.mapper()
1050
+ result.body = @client.deserialize(result_mapper, parsed_response)
1051
+ rescue Exception => e
1052
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1053
+ end
1054
+ end
1055
+
1056
+ result
1057
+ end
1058
+
1059
+ promise.execute
1060
+ end
1061
+
1062
+ #
1063
+ # Get all apps that use a Hybrid Connection in an App Service Plan.
1064
+ #
1065
+ # Description for Get all apps that use a Hybrid Connection in an App Service
1066
+ # Plan.
1067
+ #
1068
+ # @param resource_group_name [String] Name of the resource group to which the
1069
+ # resource belongs.
1070
+ # @param name [String] Name of the App Service plan.
1071
+ # @param namespace_name [String] Name of the Hybrid Connection namespace.
1072
+ # @param relay_name [String] Name of the Hybrid Connection relay.
1073
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1074
+ # will be added to the HTTP request.
1075
+ #
1076
+ # @return [Array<String>] operation results.
1077
+ #
1078
+ def list_web_apps_by_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
1079
+ first_page = list_web_apps_by_hybrid_connection_as_lazy(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers)
1080
+ first_page.get_all_items
1081
+ end
1082
+
1083
+ #
1084
+ # Get all apps that use a Hybrid Connection in an App Service Plan.
1085
+ #
1086
+ # Description for Get all apps that use a Hybrid Connection in an App Service
1087
+ # Plan.
1088
+ #
1089
+ # @param resource_group_name [String] Name of the resource group to which the
1090
+ # resource belongs.
1091
+ # @param name [String] Name of the App Service plan.
1092
+ # @param namespace_name [String] Name of the Hybrid Connection namespace.
1093
+ # @param relay_name [String] Name of the Hybrid Connection relay.
1094
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1095
+ # will be added to the HTTP request.
1096
+ #
1097
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1098
+ #
1099
+ def list_web_apps_by_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
1100
+ list_web_apps_by_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
1101
+ end
1102
+
1103
+ #
1104
+ # Get all apps that use a Hybrid Connection in an App Service Plan.
1105
+ #
1106
+ # Description for Get all apps that use a Hybrid Connection in an App Service
1107
+ # Plan.
1108
+ #
1109
+ # @param resource_group_name [String] Name of the resource group to which the
1110
+ # resource belongs.
1111
+ # @param name [String] Name of the App Service plan.
1112
+ # @param namespace_name [String] Name of the Hybrid Connection namespace.
1113
+ # @param relay_name [String] Name of the Hybrid Connection relay.
1114
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1115
+ # to the HTTP request.
1116
+ #
1117
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1118
+ #
1119
+ def list_web_apps_by_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
1120
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1121
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1122
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1123
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1124
+ fail ArgumentError, 'name is nil' if name.nil?
1125
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1126
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
1127
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1128
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1129
+
1130
+
1131
+ request_headers = {}
1132
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1133
+
1134
+ # Set Headers
1135
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1136
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1137
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'
1138
+
1139
+ request_url = @base_url || @client.base_url
1140
+
1141
+ options = {
1142
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1143
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
1144
+ query_params: {'api-version' => @client.api_version},
1145
+ headers: request_headers.merge(custom_headers || {}),
1146
+ base_url: request_url
1147
+ }
1148
+ promise = @client.make_request_async(:get, path_template, options)
1149
+
1150
+ promise = promise.then do |result|
1151
+ http_response = result.response
1152
+ status_code = http_response.status
1153
+ response_content = http_response.body
1154
+ unless status_code == 200
1155
+ error_model = JSON.load(response_content)
1156
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1157
+ end
1158
+
1159
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1160
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1161
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1162
+ # Deserialize Response
1163
+ if status_code == 200
1164
+ begin
1165
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1166
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceCollection.mapper()
1167
+ result.body = @client.deserialize(result_mapper, parsed_response)
1168
+ rescue Exception => e
1169
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1170
+ end
1171
+ end
1172
+
1173
+ result
1174
+ end
1175
+
1176
+ promise.execute
1177
+ end
1178
+
1179
+ #
1180
+ # Get the maximum number of Hybrid Connections allowed in an App Service plan.
1181
+ #
1182
+ # Description for Get the maximum number of Hybrid Connections allowed in an
1183
+ # App Service plan.
1184
+ #
1185
+ # @param resource_group_name [String] Name of the resource group to which the
1186
+ # resource belongs.
1187
+ # @param name [String] Name of the App Service plan.
1188
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1189
+ # will be added to the HTTP request.
1190
+ #
1191
+ # @return [HybridConnectionLimits] operation results.
1192
+ #
1193
+ def get_hybrid_connection_plan_limit(resource_group_name, name, custom_headers:nil)
1194
+ response = get_hybrid_connection_plan_limit_async(resource_group_name, name, custom_headers:custom_headers).value!
1195
+ response.body unless response.nil?
1196
+ end
1197
+
1198
+ #
1199
+ # Get the maximum number of Hybrid Connections allowed in an App Service plan.
1200
+ #
1201
+ # Description for Get the maximum number of Hybrid Connections allowed in an
1202
+ # App Service plan.
1203
+ #
1204
+ # @param resource_group_name [String] Name of the resource group to which the
1205
+ # resource belongs.
1206
+ # @param name [String] Name of the App Service plan.
1207
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1208
+ # will be added to the HTTP request.
1209
+ #
1210
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1211
+ #
1212
+ def get_hybrid_connection_plan_limit_with_http_info(resource_group_name, name, custom_headers:nil)
1213
+ get_hybrid_connection_plan_limit_async(resource_group_name, name, custom_headers:custom_headers).value!
1214
+ end
1215
+
1216
+ #
1217
+ # Get the maximum number of Hybrid Connections allowed in an App Service plan.
1218
+ #
1219
+ # Description for Get the maximum number of Hybrid Connections allowed in an
1220
+ # App Service plan.
1221
+ #
1222
+ # @param resource_group_name [String] Name of the resource group to which the
1223
+ # resource belongs.
1224
+ # @param name [String] Name of the App Service plan.
1225
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1226
+ # to the HTTP request.
1227
+ #
1228
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1229
+ #
1230
+ def get_hybrid_connection_plan_limit_async(resource_group_name, name, custom_headers:nil)
1231
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1232
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1233
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1234
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1235
+ fail ArgumentError, 'name is nil' if name.nil?
1236
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1237
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1238
+
1239
+
1240
+ request_headers = {}
1241
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1242
+
1243
+ # Set Headers
1244
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1245
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1246
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'
1247
+
1248
+ request_url = @base_url || @client.base_url
1249
+
1250
+ options = {
1251
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1252
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1253
+ query_params: {'api-version' => @client.api_version},
1254
+ headers: request_headers.merge(custom_headers || {}),
1255
+ base_url: request_url
1256
+ }
1257
+ promise = @client.make_request_async(:get, path_template, options)
1258
+
1259
+ promise = promise.then do |result|
1260
+ http_response = result.response
1261
+ status_code = http_response.status
1262
+ response_content = http_response.body
1263
+ unless status_code == 200
1264
+ error_model = JSON.load(response_content)
1265
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1266
+ end
1267
+
1268
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1269
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1270
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1271
+ # Deserialize Response
1272
+ if status_code == 200
1273
+ begin
1274
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1275
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::HybridConnectionLimits.mapper()
1276
+ result.body = @client.deserialize(result_mapper, parsed_response)
1277
+ rescue Exception => e
1278
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1279
+ end
1280
+ end
1281
+
1282
+ result
1283
+ end
1284
+
1285
+ promise.execute
1286
+ end
1287
+
1288
+ #
1289
+ # Retrieve all Hybrid Connections in use in an App Service plan.
1290
+ #
1291
+ # Description for Retrieve all Hybrid Connections in use in an App Service
1292
+ # plan.
1293
+ #
1294
+ # @param resource_group_name [String] Name of the resource group to which the
1295
+ # resource belongs.
1296
+ # @param name [String] Name of the App Service plan.
1297
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1298
+ # will be added to the HTTP request.
1299
+ #
1300
+ # @return [Array<HybridConnection>] operation results.
1301
+ #
1302
+ def list_hybrid_connections(resource_group_name, name, custom_headers:nil)
1303
+ first_page = list_hybrid_connections_as_lazy(resource_group_name, name, custom_headers:custom_headers)
1304
+ first_page.get_all_items
1305
+ end
1306
+
1307
+ #
1308
+ # Retrieve all Hybrid Connections in use in an App Service plan.
1309
+ #
1310
+ # Description for Retrieve all Hybrid Connections in use in an App Service
1311
+ # plan.
1312
+ #
1313
+ # @param resource_group_name [String] Name of the resource group to which the
1314
+ # resource belongs.
1315
+ # @param name [String] Name of the App Service plan.
1316
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1317
+ # will be added to the HTTP request.
1318
+ #
1319
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1320
+ #
1321
+ def list_hybrid_connections_with_http_info(resource_group_name, name, custom_headers:nil)
1322
+ list_hybrid_connections_async(resource_group_name, name, custom_headers:custom_headers).value!
1323
+ end
1324
+
1325
+ #
1326
+ # Retrieve all Hybrid Connections in use in an App Service plan.
1327
+ #
1328
+ # Description for Retrieve all Hybrid Connections in use in an App Service
1329
+ # plan.
1330
+ #
1331
+ # @param resource_group_name [String] Name of the resource group to which the
1332
+ # resource belongs.
1333
+ # @param name [String] Name of the App Service plan.
1334
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1335
+ # to the HTTP request.
1336
+ #
1337
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1338
+ #
1339
+ def list_hybrid_connections_async(resource_group_name, name, custom_headers:nil)
1340
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1341
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1342
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1343
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1344
+ fail ArgumentError, 'name is nil' if name.nil?
1345
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1346
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1347
+
1348
+
1349
+ request_headers = {}
1350
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1351
+
1352
+ # Set Headers
1353
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1354
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1355
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'
1356
+
1357
+ request_url = @base_url || @client.base_url
1358
+
1359
+ options = {
1360
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1361
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1362
+ query_params: {'api-version' => @client.api_version},
1363
+ headers: request_headers.merge(custom_headers || {}),
1364
+ base_url: request_url
1365
+ }
1366
+ promise = @client.make_request_async(:get, path_template, options)
1367
+
1368
+ promise = promise.then do |result|
1369
+ http_response = result.response
1370
+ status_code = http_response.status
1371
+ response_content = http_response.body
1372
+ unless status_code == 200
1373
+ error_model = JSON.load(response_content)
1374
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1375
+ end
1376
+
1377
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1378
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1379
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1380
+ # Deserialize Response
1381
+ if status_code == 200
1382
+ begin
1383
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1384
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::HybridConnectionCollection.mapper()
1385
+ result.body = @client.deserialize(result_mapper, parsed_response)
1386
+ rescue Exception => e
1387
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1388
+ end
1389
+ end
1390
+
1391
+ result
1392
+ end
1393
+
1394
+ promise.execute
1395
+ end
1396
+
1397
+ #
1398
+ # Restart all apps in an App Service plan.
1399
+ #
1400
+ # Description for Restart all apps in an App Service plan.
1401
+ #
1402
+ # @param resource_group_name [String] Name of the resource group to which the
1403
+ # resource belongs.
1404
+ # @param name [String] Name of the App Service plan.
1405
+ # @param soft_restart [Boolean] Specify <code>true</code> to perform a soft
1406
+ # restart, applies the configuration settings and restarts the apps if
1407
+ # necessary. The default is <code>false</code>, which always restarts and
1408
+ # reprovisions the apps
1409
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1410
+ # will be added to the HTTP request.
1411
+ #
1412
+ #
1413
+ def restart_web_apps(resource_group_name, name, soft_restart:nil, custom_headers:nil)
1414
+ response = restart_web_apps_async(resource_group_name, name, soft_restart:soft_restart, custom_headers:custom_headers).value!
1415
+ nil
1416
+ end
1417
+
1418
+ #
1419
+ # Restart all apps in an App Service plan.
1420
+ #
1421
+ # Description for Restart all apps in an App Service plan.
1422
+ #
1423
+ # @param resource_group_name [String] Name of the resource group to which the
1424
+ # resource belongs.
1425
+ # @param name [String] Name of the App Service plan.
1426
+ # @param soft_restart [Boolean] Specify <code>true</code> to perform a soft
1427
+ # restart, applies the configuration settings and restarts the apps if
1428
+ # necessary. The default is <code>false</code>, which always restarts and
1429
+ # reprovisions the apps
1430
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1431
+ # will be added to the HTTP request.
1432
+ #
1433
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1434
+ #
1435
+ def restart_web_apps_with_http_info(resource_group_name, name, soft_restart:nil, custom_headers:nil)
1436
+ restart_web_apps_async(resource_group_name, name, soft_restart:soft_restart, custom_headers:custom_headers).value!
1437
+ end
1438
+
1439
+ #
1440
+ # Restart all apps in an App Service plan.
1441
+ #
1442
+ # Description for Restart all apps in an App Service plan.
1443
+ #
1444
+ # @param resource_group_name [String] Name of the resource group to which the
1445
+ # resource belongs.
1446
+ # @param name [String] Name of the App Service plan.
1447
+ # @param soft_restart [Boolean] Specify <code>true</code> to perform a soft
1448
+ # restart, applies the configuration settings and restarts the apps if
1449
+ # necessary. The default is <code>false</code>, which always restarts and
1450
+ # reprovisions the apps
1451
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1452
+ # to the HTTP request.
1453
+ #
1454
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1455
+ #
1456
+ def restart_web_apps_async(resource_group_name, name, soft_restart:nil, custom_headers:nil)
1457
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1458
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1459
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1460
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1461
+ fail ArgumentError, 'name is nil' if name.nil?
1462
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1463
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1464
+
1465
+
1466
+ request_headers = {}
1467
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1468
+
1469
+ # Set Headers
1470
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1471
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1472
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'
1473
+
1474
+ request_url = @base_url || @client.base_url
1475
+
1476
+ options = {
1477
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1478
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1479
+ query_params: {'softRestart' => soft_restart,'api-version' => @client.api_version},
1480
+ headers: request_headers.merge(custom_headers || {}),
1481
+ base_url: request_url
1482
+ }
1483
+ promise = @client.make_request_async(:post, path_template, options)
1484
+
1485
+ promise = promise.then do |result|
1486
+ http_response = result.response
1487
+ status_code = http_response.status
1488
+ response_content = http_response.body
1489
+ unless status_code == 204
1490
+ error_model = JSON.load(response_content)
1491
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1492
+ end
1493
+
1494
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1495
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1496
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1497
+
1498
+ result
1499
+ end
1500
+
1501
+ promise.execute
1502
+ end
1503
+
1504
+ #
1505
+ # Get all apps associated with an App Service plan.
1506
+ #
1507
+ # Description for Get all apps associated with an App Service plan.
1508
+ #
1509
+ # @param resource_group_name [String] Name of the resource group to which the
1510
+ # resource belongs.
1511
+ # @param name [String] Name of the App Service plan.
1512
+ # @param skip_token [String] Skip to a web app in the list of webapps
1513
+ # associated with app service plan. If specified, the resulting list will
1514
+ # contain web apps starting from (including) the skipToken. Otherwise, the
1515
+ # resulting list contains web apps from the start of the list
1516
+ # @param filter [String] Supported filter: $filter=state eq running. Returns
1517
+ # only web apps that are currently running
1518
+ # @param top [String] List page size. If specified, results are paged.
1519
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1520
+ # will be added to the HTTP request.
1521
+ #
1522
+ # @return [Array<Site>] operation results.
1523
+ #
1524
+ def list_web_apps(resource_group_name, name, skip_token:nil, filter:nil, top:nil, custom_headers:nil)
1525
+ first_page = list_web_apps_as_lazy(resource_group_name, name, skip_token:skip_token, filter:filter, top:top, custom_headers:custom_headers)
1526
+ first_page.get_all_items
1527
+ end
1528
+
1529
+ #
1530
+ # Get all apps associated with an App Service plan.
1531
+ #
1532
+ # Description for Get all apps associated with an App Service plan.
1533
+ #
1534
+ # @param resource_group_name [String] Name of the resource group to which the
1535
+ # resource belongs.
1536
+ # @param name [String] Name of the App Service plan.
1537
+ # @param skip_token [String] Skip to a web app in the list of webapps
1538
+ # associated with app service plan. If specified, the resulting list will
1539
+ # contain web apps starting from (including) the skipToken. Otherwise, the
1540
+ # resulting list contains web apps from the start of the list
1541
+ # @param filter [String] Supported filter: $filter=state eq running. Returns
1542
+ # only web apps that are currently running
1543
+ # @param top [String] List page size. If specified, results are paged.
1544
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1545
+ # will be added to the HTTP request.
1546
+ #
1547
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1548
+ #
1549
+ def list_web_apps_with_http_info(resource_group_name, name, skip_token:nil, filter:nil, top:nil, custom_headers:nil)
1550
+ list_web_apps_async(resource_group_name, name, skip_token:skip_token, filter:filter, top:top, custom_headers:custom_headers).value!
1551
+ end
1552
+
1553
+ #
1554
+ # Get all apps associated with an App Service plan.
1555
+ #
1556
+ # Description for Get all apps associated with an App Service plan.
1557
+ #
1558
+ # @param resource_group_name [String] Name of the resource group to which the
1559
+ # resource belongs.
1560
+ # @param name [String] Name of the App Service plan.
1561
+ # @param skip_token [String] Skip to a web app in the list of webapps
1562
+ # associated with app service plan. If specified, the resulting list will
1563
+ # contain web apps starting from (including) the skipToken. Otherwise, the
1564
+ # resulting list contains web apps from the start of the list
1565
+ # @param filter [String] Supported filter: $filter=state eq running. Returns
1566
+ # only web apps that are currently running
1567
+ # @param top [String] List page size. If specified, results are paged.
1568
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1569
+ # to the HTTP request.
1570
+ #
1571
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1572
+ #
1573
+ def list_web_apps_async(resource_group_name, name, skip_token:nil, filter:nil, top:nil, custom_headers:nil)
1574
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1575
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1576
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1577
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1578
+ fail ArgumentError, 'name is nil' if name.nil?
1579
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1580
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1581
+
1582
+
1583
+ request_headers = {}
1584
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1585
+
1586
+ # Set Headers
1587
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1588
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1589
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'
1590
+
1591
+ request_url = @base_url || @client.base_url
1592
+
1593
+ options = {
1594
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1595
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1596
+ query_params: {'$skipToken' => skip_token,'$top' => top,'api-version' => @client.api_version},
1597
+ skip_encoding_query_params: {'$filter' => filter},
1598
+ headers: request_headers.merge(custom_headers || {}),
1599
+ base_url: request_url
1600
+ }
1601
+ promise = @client.make_request_async(:get, path_template, options)
1602
+
1603
+ promise = promise.then do |result|
1604
+ http_response = result.response
1605
+ status_code = http_response.status
1606
+ response_content = http_response.body
1607
+ unless status_code == 200
1608
+ error_model = JSON.load(response_content)
1609
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1610
+ end
1611
+
1612
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1613
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1614
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1615
+ # Deserialize Response
1616
+ if status_code == 200
1617
+ begin
1618
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1619
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper()
1620
+ result.body = @client.deserialize(result_mapper, parsed_response)
1621
+ rescue Exception => e
1622
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1623
+ end
1624
+ end
1625
+
1626
+ result
1627
+ end
1628
+
1629
+ promise.execute
1630
+ end
1631
+
1632
+ #
1633
+ # Gets all selectable SKUs for a given App Service Plan
1634
+ #
1635
+ # Description for Gets all selectable SKUs for a given App Service Plan
1636
+ #
1637
+ # @param resource_group_name [String] Name of the resource group to which the
1638
+ # resource belongs.
1639
+ # @param name [String] Name of App Service Plan
1640
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1641
+ # will be added to the HTTP request.
1642
+ #
1643
+ # @return [Object] operation results.
1644
+ #
1645
+ def get_server_farm_skus(resource_group_name, name, custom_headers:nil)
1646
+ response = get_server_farm_skus_async(resource_group_name, name, custom_headers:custom_headers).value!
1647
+ response.body unless response.nil?
1648
+ end
1649
+
1650
+ #
1651
+ # Gets all selectable SKUs for a given App Service Plan
1652
+ #
1653
+ # Description for Gets all selectable SKUs for a given App Service Plan
1654
+ #
1655
+ # @param resource_group_name [String] Name of the resource group to which the
1656
+ # resource belongs.
1657
+ # @param name [String] Name of App Service Plan
1658
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1659
+ # will be added to the HTTP request.
1660
+ #
1661
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1662
+ #
1663
+ def get_server_farm_skus_with_http_info(resource_group_name, name, custom_headers:nil)
1664
+ get_server_farm_skus_async(resource_group_name, name, custom_headers:custom_headers).value!
1665
+ end
1666
+
1667
+ #
1668
+ # Gets all selectable SKUs for a given App Service Plan
1669
+ #
1670
+ # Description for Gets all selectable SKUs for a given App Service Plan
1671
+ #
1672
+ # @param resource_group_name [String] Name of the resource group to which the
1673
+ # resource belongs.
1674
+ # @param name [String] Name of App Service Plan
1675
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1676
+ # to the HTTP request.
1677
+ #
1678
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1679
+ #
1680
+ def get_server_farm_skus_async(resource_group_name, name, custom_headers:nil)
1681
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1682
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1683
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1684
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1685
+ fail ArgumentError, 'name is nil' if name.nil?
1686
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1687
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1688
+
1689
+
1690
+ request_headers = {}
1691
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1692
+
1693
+ # Set Headers
1694
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1695
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1696
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'
1697
+
1698
+ request_url = @base_url || @client.base_url
1699
+
1700
+ options = {
1701
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1702
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1703
+ query_params: {'api-version' => @client.api_version},
1704
+ headers: request_headers.merge(custom_headers || {}),
1705
+ base_url: request_url
1706
+ }
1707
+ promise = @client.make_request_async(:get, path_template, options)
1708
+
1709
+ promise = promise.then do |result|
1710
+ http_response = result.response
1711
+ status_code = http_response.status
1712
+ response_content = http_response.body
1713
+ unless status_code == 200
1714
+ error_model = JSON.load(response_content)
1715
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1716
+ end
1717
+
1718
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1719
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1720
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1721
+
1722
+ result
1723
+ end
1724
+
1725
+ promise.execute
1726
+ end
1727
+
1728
+ #
1729
+ # Gets server farm usage information
1730
+ #
1731
+ # Description for Gets server farm usage information
1732
+ #
1733
+ # @param resource_group_name [String] Name of the resource group to which the
1734
+ # resource belongs.
1735
+ # @param name [String] Name of App Service Plan
1736
+ # @param filter [String] Return only usages/metrics specified in the filter.
1737
+ # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
1738
+ # name.value eq 'Metric2').
1739
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1740
+ # will be added to the HTTP request.
1741
+ #
1742
+ # @return [Array<CsmUsageQuota>] operation results.
1743
+ #
1744
+ def list_usages(resource_group_name, name, filter:nil, custom_headers:nil)
1745
+ first_page = list_usages_as_lazy(resource_group_name, name, filter:filter, custom_headers:custom_headers)
1746
+ first_page.get_all_items
1747
+ end
1748
+
1749
+ #
1750
+ # Gets server farm usage information
1751
+ #
1752
+ # Description for Gets server farm usage information
1753
+ #
1754
+ # @param resource_group_name [String] Name of the resource group to which the
1755
+ # resource belongs.
1756
+ # @param name [String] Name of App Service Plan
1757
+ # @param filter [String] Return only usages/metrics specified in the filter.
1758
+ # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
1759
+ # name.value eq 'Metric2').
1760
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1761
+ # will be added to the HTTP request.
1762
+ #
1763
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1764
+ #
1765
+ def list_usages_with_http_info(resource_group_name, name, filter:nil, custom_headers:nil)
1766
+ list_usages_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value!
1767
+ end
1768
+
1769
+ #
1770
+ # Gets server farm usage information
1771
+ #
1772
+ # Description for Gets server farm usage information
1773
+ #
1774
+ # @param resource_group_name [String] Name of the resource group to which the
1775
+ # resource belongs.
1776
+ # @param name [String] Name of App Service Plan
1777
+ # @param filter [String] Return only usages/metrics specified in the filter.
1778
+ # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
1779
+ # name.value eq 'Metric2').
1780
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1781
+ # to the HTTP request.
1782
+ #
1783
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1784
+ #
1785
+ def list_usages_async(resource_group_name, name, filter:nil, custom_headers:nil)
1786
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1787
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1788
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1789
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1790
+ fail ArgumentError, 'name is nil' if name.nil?
1791
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1792
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1793
+
1794
+
1795
+ request_headers = {}
1796
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1797
+
1798
+ # Set Headers
1799
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1800
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1801
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'
1802
+
1803
+ request_url = @base_url || @client.base_url
1804
+
1805
+ options = {
1806
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1807
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1808
+ query_params: {'api-version' => @client.api_version},
1809
+ skip_encoding_query_params: {'$filter' => filter},
1810
+ headers: request_headers.merge(custom_headers || {}),
1811
+ base_url: request_url
1812
+ }
1813
+ promise = @client.make_request_async(:get, path_template, options)
1814
+
1815
+ promise = promise.then do |result|
1816
+ http_response = result.response
1817
+ status_code = http_response.status
1818
+ response_content = http_response.body
1819
+ unless status_code == 200
1820
+ error_model = JSON.load(response_content)
1821
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1822
+ end
1823
+
1824
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1825
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1826
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1827
+ # Deserialize Response
1828
+ if status_code == 200
1829
+ begin
1830
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1831
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmUsageQuotaCollection.mapper()
1832
+ result.body = @client.deserialize(result_mapper, parsed_response)
1833
+ rescue Exception => e
1834
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1835
+ end
1836
+ end
1837
+
1838
+ result
1839
+ end
1840
+
1841
+ promise.execute
1842
+ end
1843
+
1844
+ #
1845
+ # Get all Virtual Networks associated with an App Service plan.
1846
+ #
1847
+ # Description for Get all Virtual Networks associated with an App Service plan.
1848
+ #
1849
+ # @param resource_group_name [String] Name of the resource group to which the
1850
+ # resource belongs.
1851
+ # @param name [String] Name of the App Service plan.
1852
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1853
+ # will be added to the HTTP request.
1854
+ #
1855
+ # @return [Array] operation results.
1856
+ #
1857
+ def list_vnets(resource_group_name, name, custom_headers:nil)
1858
+ response = list_vnets_async(resource_group_name, name, custom_headers:custom_headers).value!
1859
+ response.body unless response.nil?
1860
+ end
1861
+
1862
+ #
1863
+ # Get all Virtual Networks associated with an App Service plan.
1864
+ #
1865
+ # Description for Get all Virtual Networks associated with an App Service plan.
1866
+ #
1867
+ # @param resource_group_name [String] Name of the resource group to which the
1868
+ # resource belongs.
1869
+ # @param name [String] Name of the App Service plan.
1870
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1871
+ # will be added to the HTTP request.
1872
+ #
1873
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1874
+ #
1875
+ def list_vnets_with_http_info(resource_group_name, name, custom_headers:nil)
1876
+ list_vnets_async(resource_group_name, name, custom_headers:custom_headers).value!
1877
+ end
1878
+
1879
+ #
1880
+ # Get all Virtual Networks associated with an App Service plan.
1881
+ #
1882
+ # Description for Get all Virtual Networks associated with an App Service plan.
1883
+ #
1884
+ # @param resource_group_name [String] Name of the resource group to which the
1885
+ # resource belongs.
1886
+ # @param name [String] Name of the App Service plan.
1887
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1888
+ # to the HTTP request.
1889
+ #
1890
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1891
+ #
1892
+ def list_vnets_async(resource_group_name, name, custom_headers:nil)
1893
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1894
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1895
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1896
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1897
+ fail ArgumentError, 'name is nil' if name.nil?
1898
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1899
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1900
+
1901
+
1902
+ request_headers = {}
1903
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1904
+
1905
+ # Set Headers
1906
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1907
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1908
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'
1909
+
1910
+ request_url = @base_url || @client.base_url
1911
+
1912
+ options = {
1913
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1914
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1915
+ query_params: {'api-version' => @client.api_version},
1916
+ headers: request_headers.merge(custom_headers || {}),
1917
+ base_url: request_url
1918
+ }
1919
+ promise = @client.make_request_async(:get, path_template, options)
1920
+
1921
+ promise = promise.then do |result|
1922
+ http_response = result.response
1923
+ status_code = http_response.status
1924
+ response_content = http_response.body
1925
+ unless status_code == 200
1926
+ error_model = JSON.load(response_content)
1927
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1928
+ end
1929
+
1930
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1931
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1932
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1933
+ # Deserialize Response
1934
+ if status_code == 200
1935
+ begin
1936
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1937
+ result_mapper = {
1938
+ client_side_validation: true,
1939
+ required: false,
1940
+ serialized_name: 'parsed_response',
1941
+ type: {
1942
+ name: 'Sequence',
1943
+ element: {
1944
+ client_side_validation: true,
1945
+ required: false,
1946
+ serialized_name: 'VnetInfoElementType',
1947
+ type: {
1948
+ name: 'Composite',
1949
+ class_name: 'VnetInfo'
1950
+ }
1951
+ }
1952
+ }
1953
+ }
1954
+ result.body = @client.deserialize(result_mapper, parsed_response)
1955
+ rescue Exception => e
1956
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1957
+ end
1958
+ end
1959
+
1960
+ result
1961
+ end
1962
+
1963
+ promise.execute
1964
+ end
1965
+
1966
+ #
1967
+ # Get a Virtual Network associated with an App Service plan.
1968
+ #
1969
+ # Description for Get a Virtual Network associated with an App Service plan.
1970
+ #
1971
+ # @param resource_group_name [String] Name of the resource group to which the
1972
+ # resource belongs.
1973
+ # @param name [String] Name of the App Service plan.
1974
+ # @param vnet_name [String] Name of the Virtual Network.
1975
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1976
+ # will be added to the HTTP request.
1977
+ #
1978
+ # @return [VnetInfo] operation results.
1979
+ #
1980
+ def get_vnet_from_server_farm(resource_group_name, name, vnet_name, custom_headers:nil)
1981
+ response = get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers:custom_headers).value!
1982
+ response.body unless response.nil?
1983
+ end
1984
+
1985
+ #
1986
+ # Get a Virtual Network associated with an App Service plan.
1987
+ #
1988
+ # Description for Get a Virtual Network associated with an App Service plan.
1989
+ #
1990
+ # @param resource_group_name [String] Name of the resource group to which the
1991
+ # resource belongs.
1992
+ # @param name [String] Name of the App Service plan.
1993
+ # @param vnet_name [String] Name of the Virtual Network.
1994
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1995
+ # will be added to the HTTP request.
1996
+ #
1997
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1998
+ #
1999
+ def get_vnet_from_server_farm_with_http_info(resource_group_name, name, vnet_name, custom_headers:nil)
2000
+ get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers:custom_headers).value!
2001
+ end
2002
+
2003
+ #
2004
+ # Get a Virtual Network associated with an App Service plan.
2005
+ #
2006
+ # Description for Get a Virtual Network associated with an App Service plan.
2007
+ #
2008
+ # @param resource_group_name [String] Name of the resource group to which the
2009
+ # resource belongs.
2010
+ # @param name [String] Name of the App Service plan.
2011
+ # @param vnet_name [String] Name of the Virtual Network.
2012
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2013
+ # to the HTTP request.
2014
+ #
2015
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2016
+ #
2017
+ def get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers:nil)
2018
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2019
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2020
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2021
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2022
+ fail ArgumentError, 'name is nil' if name.nil?
2023
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2024
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2025
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2026
+
2027
+
2028
+ request_headers = {}
2029
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2030
+
2031
+ # Set Headers
2032
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2033
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2034
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'
2035
+
2036
+ request_url = @base_url || @client.base_url
2037
+
2038
+ options = {
2039
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2040
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id},
2041
+ query_params: {'api-version' => @client.api_version},
2042
+ headers: request_headers.merge(custom_headers || {}),
2043
+ base_url: request_url
2044
+ }
2045
+ promise = @client.make_request_async(:get, path_template, options)
2046
+
2047
+ promise = promise.then do |result|
2048
+ http_response = result.response
2049
+ status_code = http_response.status
2050
+ response_content = http_response.body
2051
+ unless status_code == 200 || status_code == 404
2052
+ error_model = JSON.load(response_content)
2053
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2054
+ end
2055
+
2056
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2057
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2058
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2059
+ # Deserialize Response
2060
+ if status_code == 200
2061
+ begin
2062
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2063
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VnetInfo.mapper()
2064
+ result.body = @client.deserialize(result_mapper, parsed_response)
2065
+ rescue Exception => e
2066
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2067
+ end
2068
+ end
2069
+
2070
+ result
2071
+ end
2072
+
2073
+ promise.execute
2074
+ end
2075
+
2076
+ #
2077
+ # Get a Virtual Network gateway.
2078
+ #
2079
+ # Description for Get a Virtual Network gateway.
2080
+ #
2081
+ # @param resource_group_name [String] Name of the resource group to which the
2082
+ # resource belongs.
2083
+ # @param name [String] Name of the App Service plan.
2084
+ # @param vnet_name [String] Name of the Virtual Network.
2085
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2086
+ # is supported.
2087
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2088
+ # will be added to the HTTP request.
2089
+ #
2090
+ # @return [VnetGateway] operation results.
2091
+ #
2092
+ def get_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil)
2093
+ response = get_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers:custom_headers).value!
2094
+ response.body unless response.nil?
2095
+ end
2096
+
2097
+ #
2098
+ # Get a Virtual Network gateway.
2099
+ #
2100
+ # Description for Get a Virtual Network gateway.
2101
+ #
2102
+ # @param resource_group_name [String] Name of the resource group to which the
2103
+ # resource belongs.
2104
+ # @param name [String] Name of the App Service plan.
2105
+ # @param vnet_name [String] Name of the Virtual Network.
2106
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2107
+ # is supported.
2108
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2109
+ # will be added to the HTTP request.
2110
+ #
2111
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2112
+ #
2113
+ def get_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil)
2114
+ get_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers:custom_headers).value!
2115
+ end
2116
+
2117
+ #
2118
+ # Get a Virtual Network gateway.
2119
+ #
2120
+ # Description for Get a Virtual Network gateway.
2121
+ #
2122
+ # @param resource_group_name [String] Name of the resource group to which the
2123
+ # resource belongs.
2124
+ # @param name [String] Name of the App Service plan.
2125
+ # @param vnet_name [String] Name of the Virtual Network.
2126
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2127
+ # is supported.
2128
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2129
+ # to the HTTP request.
2130
+ #
2131
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2132
+ #
2133
+ def get_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers:nil)
2134
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2135
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2136
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2137
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2138
+ fail ArgumentError, 'name is nil' if name.nil?
2139
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2140
+ fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
2141
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2142
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2143
+
2144
+
2145
+ request_headers = {}
2146
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2147
+
2148
+ # Set Headers
2149
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2150
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2151
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'
2152
+
2153
+ request_url = @base_url || @client.base_url
2154
+
2155
+ options = {
2156
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2157
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id},
2158
+ query_params: {'api-version' => @client.api_version},
2159
+ headers: request_headers.merge(custom_headers || {}),
2160
+ base_url: request_url
2161
+ }
2162
+ promise = @client.make_request_async(:get, path_template, options)
2163
+
2164
+ promise = promise.then do |result|
2165
+ http_response = result.response
2166
+ status_code = http_response.status
2167
+ response_content = http_response.body
2168
+ unless status_code == 200
2169
+ error_model = JSON.load(response_content)
2170
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2171
+ end
2172
+
2173
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2174
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2175
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2176
+ # Deserialize Response
2177
+ if status_code == 200
2178
+ begin
2179
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2180
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VnetGateway.mapper()
2181
+ result.body = @client.deserialize(result_mapper, parsed_response)
2182
+ rescue Exception => e
2183
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2184
+ end
2185
+ end
2186
+
2187
+ result
2188
+ end
2189
+
2190
+ promise.execute
2191
+ end
2192
+
2193
+ #
2194
+ # Update a Virtual Network gateway.
2195
+ #
2196
+ # Description for Update a Virtual Network gateway.
2197
+ #
2198
+ # @param resource_group_name [String] Name of the resource group to which the
2199
+ # resource belongs.
2200
+ # @param name [String] Name of the App Service plan.
2201
+ # @param vnet_name [String] Name of the Virtual Network.
2202
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2203
+ # is supported.
2204
+ # @param connection_envelope [VnetGateway] Definition of the gateway.
2205
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2206
+ # will be added to the HTTP request.
2207
+ #
2208
+ # @return [VnetGateway] operation results.
2209
+ #
2210
+ def update_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil)
2211
+ response = update_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:custom_headers).value!
2212
+ response.body unless response.nil?
2213
+ end
2214
+
2215
+ #
2216
+ # Update a Virtual Network gateway.
2217
+ #
2218
+ # Description for Update a Virtual Network gateway.
2219
+ #
2220
+ # @param resource_group_name [String] Name of the resource group to which the
2221
+ # resource belongs.
2222
+ # @param name [String] Name of the App Service plan.
2223
+ # @param vnet_name [String] Name of the Virtual Network.
2224
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2225
+ # is supported.
2226
+ # @param connection_envelope [VnetGateway] Definition of the gateway.
2227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2228
+ # will be added to the HTTP request.
2229
+ #
2230
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2231
+ #
2232
+ def update_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil)
2233
+ update_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:custom_headers).value!
2234
+ end
2235
+
2236
+ #
2237
+ # Update a Virtual Network gateway.
2238
+ #
2239
+ # Description for Update a Virtual Network gateway.
2240
+ #
2241
+ # @param resource_group_name [String] Name of the resource group to which the
2242
+ # resource belongs.
2243
+ # @param name [String] Name of the App Service plan.
2244
+ # @param vnet_name [String] Name of the Virtual Network.
2245
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2246
+ # is supported.
2247
+ # @param connection_envelope [VnetGateway] Definition of the gateway.
2248
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2249
+ # to the HTTP request.
2250
+ #
2251
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2252
+ #
2253
+ def update_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers:nil)
2254
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2255
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2256
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2257
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2258
+ fail ArgumentError, 'name is nil' if name.nil?
2259
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2260
+ fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
2261
+ fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil?
2262
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2263
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2264
+
2265
+
2266
+ request_headers = {}
2267
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2268
+
2269
+ # Set Headers
2270
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2271
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2272
+
2273
+ # Serialize Request
2274
+ request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VnetGateway.mapper()
2275
+ request_content = @client.serialize(request_mapper, connection_envelope)
2276
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2277
+
2278
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'
2279
+
2280
+ request_url = @base_url || @client.base_url
2281
+
2282
+ options = {
2283
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2284
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id},
2285
+ query_params: {'api-version' => @client.api_version},
2286
+ body: request_content,
2287
+ headers: request_headers.merge(custom_headers || {}),
2288
+ base_url: request_url
2289
+ }
2290
+ promise = @client.make_request_async(:put, path_template, options)
2291
+
2292
+ promise = promise.then do |result|
2293
+ http_response = result.response
2294
+ status_code = http_response.status
2295
+ response_content = http_response.body
2296
+ unless status_code == 200
2297
+ error_model = JSON.load(response_content)
2298
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2299
+ end
2300
+
2301
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2302
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2303
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2304
+ # Deserialize Response
2305
+ if status_code == 200
2306
+ begin
2307
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2308
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VnetGateway.mapper()
2309
+ result.body = @client.deserialize(result_mapper, parsed_response)
2310
+ rescue Exception => e
2311
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2312
+ end
2313
+ end
2314
+
2315
+ result
2316
+ end
2317
+
2318
+ promise.execute
2319
+ end
2320
+
2321
+ #
2322
+ # Get all routes that are associated with a Virtual Network in an App Service
2323
+ # plan.
2324
+ #
2325
+ # Description for Get all routes that are associated with a Virtual Network in
2326
+ # an App Service plan.
2327
+ #
2328
+ # @param resource_group_name [String] Name of the resource group to which the
2329
+ # resource belongs.
2330
+ # @param name [String] Name of the App Service plan.
2331
+ # @param vnet_name [String] Name of the Virtual Network.
2332
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2333
+ # will be added to the HTTP request.
2334
+ #
2335
+ # @return [Array] operation results.
2336
+ #
2337
+ def list_routes_for_vnet(resource_group_name, name, vnet_name, custom_headers:nil)
2338
+ response = list_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers:custom_headers).value!
2339
+ response.body unless response.nil?
2340
+ end
2341
+
2342
+ #
2343
+ # Get all routes that are associated with a Virtual Network in an App Service
2344
+ # plan.
2345
+ #
2346
+ # Description for Get all routes that are associated with a Virtual Network in
2347
+ # an App Service plan.
2348
+ #
2349
+ # @param resource_group_name [String] Name of the resource group to which the
2350
+ # resource belongs.
2351
+ # @param name [String] Name of the App Service plan.
2352
+ # @param vnet_name [String] Name of the Virtual Network.
2353
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2354
+ # will be added to the HTTP request.
2355
+ #
2356
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2357
+ #
2358
+ def list_routes_for_vnet_with_http_info(resource_group_name, name, vnet_name, custom_headers:nil)
2359
+ list_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers:custom_headers).value!
2360
+ end
2361
+
2362
+ #
2363
+ # Get all routes that are associated with a Virtual Network in an App Service
2364
+ # plan.
2365
+ #
2366
+ # Description for Get all routes that are associated with a Virtual Network in
2367
+ # an App Service plan.
2368
+ #
2369
+ # @param resource_group_name [String] Name of the resource group to which the
2370
+ # resource belongs.
2371
+ # @param name [String] Name of the App Service plan.
2372
+ # @param vnet_name [String] Name of the Virtual Network.
2373
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2374
+ # to the HTTP request.
2375
+ #
2376
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2377
+ #
2378
+ def list_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers:nil)
2379
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2380
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2381
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2382
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2383
+ fail ArgumentError, 'name is nil' if name.nil?
2384
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2385
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2386
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2387
+
2388
+
2389
+ request_headers = {}
2390
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2391
+
2392
+ # Set Headers
2393
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2394
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2395
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'
2396
+
2397
+ request_url = @base_url || @client.base_url
2398
+
2399
+ options = {
2400
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2401
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id},
2402
+ query_params: {'api-version' => @client.api_version},
2403
+ headers: request_headers.merge(custom_headers || {}),
2404
+ base_url: request_url
2405
+ }
2406
+ promise = @client.make_request_async(:get, path_template, options)
2407
+
2408
+ promise = promise.then do |result|
2409
+ http_response = result.response
2410
+ status_code = http_response.status
2411
+ response_content = http_response.body
2412
+ unless status_code == 200
2413
+ error_model = JSON.load(response_content)
2414
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2415
+ end
2416
+
2417
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2418
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2419
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2420
+ # Deserialize Response
2421
+ if status_code == 200
2422
+ begin
2423
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2424
+ result_mapper = {
2425
+ client_side_validation: true,
2426
+ required: false,
2427
+ serialized_name: 'parsed_response',
2428
+ type: {
2429
+ name: 'Sequence',
2430
+ element: {
2431
+ client_side_validation: true,
2432
+ required: false,
2433
+ serialized_name: 'VnetRouteElementType',
2434
+ type: {
2435
+ name: 'Composite',
2436
+ class_name: 'VnetRoute'
2437
+ }
2438
+ }
2439
+ }
2440
+ }
2441
+ result.body = @client.deserialize(result_mapper, parsed_response)
2442
+ rescue Exception => e
2443
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2444
+ end
2445
+ end
2446
+
2447
+ result
2448
+ end
2449
+
2450
+ promise.execute
2451
+ end
2452
+
2453
+ #
2454
+ # Get a Virtual Network route in an App Service plan.
2455
+ #
2456
+ # Description for Get a Virtual Network route in an App Service plan.
2457
+ #
2458
+ # @param resource_group_name [String] Name of the resource group to which the
2459
+ # resource belongs.
2460
+ # @param name [String] Name of the App Service plan.
2461
+ # @param vnet_name [String] Name of the Virtual Network.
2462
+ # @param route_name [String] Name of the Virtual Network route.
2463
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2464
+ # will be added to the HTTP request.
2465
+ #
2466
+ # @return [Array] operation results.
2467
+ #
2468
+ def get_route_for_vnet(resource_group_name, name, vnet_name, route_name, custom_headers:nil)
2469
+ response = get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers:custom_headers).value!
2470
+ response.body unless response.nil?
2471
+ end
2472
+
2473
+ #
2474
+ # Get a Virtual Network route in an App Service plan.
2475
+ #
2476
+ # Description for Get a Virtual Network route in an App Service plan.
2477
+ #
2478
+ # @param resource_group_name [String] Name of the resource group to which the
2479
+ # resource belongs.
2480
+ # @param name [String] Name of the App Service plan.
2481
+ # @param vnet_name [String] Name of the Virtual Network.
2482
+ # @param route_name [String] Name of the Virtual Network route.
2483
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2484
+ # will be added to the HTTP request.
2485
+ #
2486
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2487
+ #
2488
+ def get_route_for_vnet_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers:nil)
2489
+ get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers:custom_headers).value!
2490
+ end
2491
+
2492
+ #
2493
+ # Get a Virtual Network route in an App Service plan.
2494
+ #
2495
+ # Description for Get a Virtual Network route in an App Service plan.
2496
+ #
2497
+ # @param resource_group_name [String] Name of the resource group to which the
2498
+ # resource belongs.
2499
+ # @param name [String] Name of the App Service plan.
2500
+ # @param vnet_name [String] Name of the Virtual Network.
2501
+ # @param route_name [String] Name of the Virtual Network route.
2502
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2503
+ # to the HTTP request.
2504
+ #
2505
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2506
+ #
2507
+ def get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers:nil)
2508
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2509
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2510
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2511
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2512
+ fail ArgumentError, 'name is nil' if name.nil?
2513
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2514
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
2515
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2516
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2517
+
2518
+
2519
+ request_headers = {}
2520
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2521
+
2522
+ # Set Headers
2523
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2524
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2525
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
2526
+
2527
+ request_url = @base_url || @client.base_url
2528
+
2529
+ options = {
2530
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2531
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
2532
+ query_params: {'api-version' => @client.api_version},
2533
+ headers: request_headers.merge(custom_headers || {}),
2534
+ base_url: request_url
2535
+ }
2536
+ promise = @client.make_request_async(:get, path_template, options)
2537
+
2538
+ promise = promise.then do |result|
2539
+ http_response = result.response
2540
+ status_code = http_response.status
2541
+ response_content = http_response.body
2542
+ unless status_code == 200 || status_code == 404
2543
+ error_model = JSON.load(response_content)
2544
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2545
+ end
2546
+
2547
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2548
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2549
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2550
+ # Deserialize Response
2551
+ if status_code == 200
2552
+ begin
2553
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2554
+ result_mapper = {
2555
+ client_side_validation: true,
2556
+ required: false,
2557
+ serialized_name: 'parsed_response',
2558
+ type: {
2559
+ name: 'Sequence',
2560
+ element: {
2561
+ client_side_validation: true,
2562
+ required: false,
2563
+ serialized_name: 'VnetRouteElementType',
2564
+ type: {
2565
+ name: 'Composite',
2566
+ class_name: 'VnetRoute'
2567
+ }
2568
+ }
2569
+ }
2570
+ }
2571
+ result.body = @client.deserialize(result_mapper, parsed_response)
2572
+ rescue Exception => e
2573
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2574
+ end
2575
+ end
2576
+
2577
+ result
2578
+ end
2579
+
2580
+ promise.execute
2581
+ end
2582
+
2583
+ #
2584
+ # Create or update a Virtual Network route in an App Service plan.
2585
+ #
2586
+ # Description for Create or update a Virtual Network route in an App Service
2587
+ # plan.
2588
+ #
2589
+ # @param resource_group_name [String] Name of the resource group to which the
2590
+ # resource belongs.
2591
+ # @param name [String] Name of the App Service plan.
2592
+ # @param vnet_name [String] Name of the Virtual Network.
2593
+ # @param route_name [String] Name of the Virtual Network route.
2594
+ # @param route [VnetRoute] Definition of the Virtual Network route.
2595
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2596
+ # will be added to the HTTP request.
2597
+ #
2598
+ # @return [VnetRoute] operation results.
2599
+ #
2600
+ def create_or_update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers:nil)
2601
+ response = create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers:custom_headers).value!
2602
+ response.body unless response.nil?
2603
+ end
2604
+
2605
+ #
2606
+ # Create or update a Virtual Network route in an App Service plan.
2607
+ #
2608
+ # Description for Create or update a Virtual Network route in an App Service
2609
+ # plan.
2610
+ #
2611
+ # @param resource_group_name [String] Name of the resource group to which the
2612
+ # resource belongs.
2613
+ # @param name [String] Name of the App Service plan.
2614
+ # @param vnet_name [String] Name of the Virtual Network.
2615
+ # @param route_name [String] Name of the Virtual Network route.
2616
+ # @param route [VnetRoute] Definition of the Virtual Network route.
2617
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2618
+ # will be added to the HTTP request.
2619
+ #
2620
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2621
+ #
2622
+ def create_or_update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers:nil)
2623
+ create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers:custom_headers).value!
2624
+ end
2625
+
2626
+ #
2627
+ # Create or update a Virtual Network route in an App Service plan.
2628
+ #
2629
+ # Description for Create or update a Virtual Network route in an App Service
2630
+ # plan.
2631
+ #
2632
+ # @param resource_group_name [String] Name of the resource group to which the
2633
+ # resource belongs.
2634
+ # @param name [String] Name of the App Service plan.
2635
+ # @param vnet_name [String] Name of the Virtual Network.
2636
+ # @param route_name [String] Name of the Virtual Network route.
2637
+ # @param route [VnetRoute] Definition of the Virtual Network route.
2638
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2639
+ # to the HTTP request.
2640
+ #
2641
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2642
+ #
2643
+ def create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers:nil)
2644
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2645
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2646
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2647
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2648
+ fail ArgumentError, 'name is nil' if name.nil?
2649
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2650
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
2651
+ fail ArgumentError, 'route is nil' if route.nil?
2652
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2653
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2654
+
2655
+
2656
+ request_headers = {}
2657
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2658
+
2659
+ # Set Headers
2660
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2661
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2662
+
2663
+ # Serialize Request
2664
+ request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VnetRoute.mapper()
2665
+ request_content = @client.serialize(request_mapper, route)
2666
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2667
+
2668
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
2669
+
2670
+ request_url = @base_url || @client.base_url
2671
+
2672
+ options = {
2673
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2674
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
2675
+ query_params: {'api-version' => @client.api_version},
2676
+ body: request_content,
2677
+ headers: request_headers.merge(custom_headers || {}),
2678
+ base_url: request_url
2679
+ }
2680
+ promise = @client.make_request_async(:put, path_template, options)
2681
+
2682
+ promise = promise.then do |result|
2683
+ http_response = result.response
2684
+ status_code = http_response.status
2685
+ response_content = http_response.body
2686
+ unless status_code == 200 || status_code == 400 || status_code == 404
2687
+ error_model = JSON.load(response_content)
2688
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2689
+ end
2690
+
2691
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2692
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2693
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2694
+ # Deserialize Response
2695
+ if status_code == 200
2696
+ begin
2697
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2698
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VnetRoute.mapper()
2699
+ result.body = @client.deserialize(result_mapper, parsed_response)
2700
+ rescue Exception => e
2701
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2702
+ end
2703
+ end
2704
+
2705
+ result
2706
+ end
2707
+
2708
+ promise.execute
2709
+ end
2710
+
2711
+ #
2712
+ # Delete a Virtual Network route in an App Service plan.
2713
+ #
2714
+ # Description for Delete a Virtual Network route in an App Service plan.
2715
+ #
2716
+ # @param resource_group_name [String] Name of the resource group to which the
2717
+ # resource belongs.
2718
+ # @param name [String] Name of the App Service plan.
2719
+ # @param vnet_name [String] Name of the Virtual Network.
2720
+ # @param route_name [String] Name of the Virtual Network route.
2721
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2722
+ # will be added to the HTTP request.
2723
+ #
2724
+ #
2725
+ def delete_vnet_route(resource_group_name, name, vnet_name, route_name, custom_headers:nil)
2726
+ response = delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers:custom_headers).value!
2727
+ nil
2728
+ end
2729
+
2730
+ #
2731
+ # Delete a Virtual Network route in an App Service plan.
2732
+ #
2733
+ # Description for Delete a Virtual Network route in an App Service plan.
2734
+ #
2735
+ # @param resource_group_name [String] Name of the resource group to which the
2736
+ # resource belongs.
2737
+ # @param name [String] Name of the App Service plan.
2738
+ # @param vnet_name [String] Name of the Virtual Network.
2739
+ # @param route_name [String] Name of the Virtual Network route.
2740
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2741
+ # will be added to the HTTP request.
2742
+ #
2743
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2744
+ #
2745
+ def delete_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers:nil)
2746
+ delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers:custom_headers).value!
2747
+ end
2748
+
2749
+ #
2750
+ # Delete a Virtual Network route in an App Service plan.
2751
+ #
2752
+ # Description for Delete a Virtual Network route in an App Service plan.
2753
+ #
2754
+ # @param resource_group_name [String] Name of the resource group to which the
2755
+ # resource belongs.
2756
+ # @param name [String] Name of the App Service plan.
2757
+ # @param vnet_name [String] Name of the Virtual Network.
2758
+ # @param route_name [String] Name of the Virtual Network route.
2759
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2760
+ # to the HTTP request.
2761
+ #
2762
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2763
+ #
2764
+ def delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers:nil)
2765
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2766
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2767
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2768
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2769
+ fail ArgumentError, 'name is nil' if name.nil?
2770
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2771
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
2772
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2773
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2774
+
2775
+
2776
+ request_headers = {}
2777
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2778
+
2779
+ # Set Headers
2780
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2781
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2782
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
2783
+
2784
+ request_url = @base_url || @client.base_url
2785
+
2786
+ options = {
2787
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2788
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
2789
+ query_params: {'api-version' => @client.api_version},
2790
+ headers: request_headers.merge(custom_headers || {}),
2791
+ base_url: request_url
2792
+ }
2793
+ promise = @client.make_request_async(:delete, path_template, options)
2794
+
2795
+ promise = promise.then do |result|
2796
+ http_response = result.response
2797
+ status_code = http_response.status
2798
+ response_content = http_response.body
2799
+ unless status_code == 200 || status_code == 404
2800
+ error_model = JSON.load(response_content)
2801
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2802
+ end
2803
+
2804
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2805
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2806
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2807
+
2808
+ result
2809
+ end
2810
+
2811
+ promise.execute
2812
+ end
2813
+
2814
+ #
2815
+ # Create or update a Virtual Network route in an App Service plan.
2816
+ #
2817
+ # Description for Create or update a Virtual Network route in an App Service
2818
+ # plan.
2819
+ #
2820
+ # @param resource_group_name [String] Name of the resource group to which the
2821
+ # resource belongs.
2822
+ # @param name [String] Name of the App Service plan.
2823
+ # @param vnet_name [String] Name of the Virtual Network.
2824
+ # @param route_name [String] Name of the Virtual Network route.
2825
+ # @param route [VnetRoute] Definition of the Virtual Network route.
2826
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2827
+ # will be added to the HTTP request.
2828
+ #
2829
+ # @return [VnetRoute] operation results.
2830
+ #
2831
+ def update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers:nil)
2832
+ response = update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers:custom_headers).value!
2833
+ response.body unless response.nil?
2834
+ end
2835
+
2836
+ #
2837
+ # Create or update a Virtual Network route in an App Service plan.
2838
+ #
2839
+ # Description for Create or update a Virtual Network route in an App Service
2840
+ # plan.
2841
+ #
2842
+ # @param resource_group_name [String] Name of the resource group to which the
2843
+ # resource belongs.
2844
+ # @param name [String] Name of the App Service plan.
2845
+ # @param vnet_name [String] Name of the Virtual Network.
2846
+ # @param route_name [String] Name of the Virtual Network route.
2847
+ # @param route [VnetRoute] Definition of the Virtual Network route.
2848
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2849
+ # will be added to the HTTP request.
2850
+ #
2851
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2852
+ #
2853
+ def update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers:nil)
2854
+ update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers:custom_headers).value!
2855
+ end
2856
+
2857
+ #
2858
+ # Create or update a Virtual Network route in an App Service plan.
2859
+ #
2860
+ # Description for Create or update a Virtual Network route in an App Service
2861
+ # plan.
2862
+ #
2863
+ # @param resource_group_name [String] Name of the resource group to which the
2864
+ # resource belongs.
2865
+ # @param name [String] Name of the App Service plan.
2866
+ # @param vnet_name [String] Name of the Virtual Network.
2867
+ # @param route_name [String] Name of the Virtual Network route.
2868
+ # @param route [VnetRoute] Definition of the Virtual Network route.
2869
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2870
+ # to the HTTP request.
2871
+ #
2872
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2873
+ #
2874
+ def update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers:nil)
2875
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2876
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2877
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2878
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2879
+ fail ArgumentError, 'name is nil' if name.nil?
2880
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2881
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
2882
+ fail ArgumentError, 'route is nil' if route.nil?
2883
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2884
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2885
+
2886
+
2887
+ request_headers = {}
2888
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2889
+
2890
+ # Set Headers
2891
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2892
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2893
+
2894
+ # Serialize Request
2895
+ request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VnetRoute.mapper()
2896
+ request_content = @client.serialize(request_mapper, route)
2897
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2898
+
2899
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
2900
+
2901
+ request_url = @base_url || @client.base_url
2902
+
2903
+ options = {
2904
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2905
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
2906
+ query_params: {'api-version' => @client.api_version},
2907
+ body: request_content,
2908
+ headers: request_headers.merge(custom_headers || {}),
2909
+ base_url: request_url
2910
+ }
2911
+ promise = @client.make_request_async(:patch, path_template, options)
2912
+
2913
+ promise = promise.then do |result|
2914
+ http_response = result.response
2915
+ status_code = http_response.status
2916
+ response_content = http_response.body
2917
+ unless status_code == 200 || status_code == 400 || status_code == 404
2918
+ error_model = JSON.load(response_content)
2919
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2920
+ end
2921
+
2922
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2923
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2924
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2925
+ # Deserialize Response
2926
+ if status_code == 200
2927
+ begin
2928
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2929
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VnetRoute.mapper()
2930
+ result.body = @client.deserialize(result_mapper, parsed_response)
2931
+ rescue Exception => e
2932
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2933
+ end
2934
+ end
2935
+
2936
+ result
2937
+ end
2938
+
2939
+ promise.execute
2940
+ end
2941
+
2942
+ #
2943
+ # Reboot a worker machine in an App Service plan.
2944
+ #
2945
+ # Description for Reboot a worker machine in an App Service plan.
2946
+ #
2947
+ # @param resource_group_name [String] Name of the resource group to which the
2948
+ # resource belongs.
2949
+ # @param name [String] Name of the App Service plan.
2950
+ # @param worker_name [String] Name of worker machine, which typically starts
2951
+ # with RD.
2952
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2953
+ # will be added to the HTTP request.
2954
+ #
2955
+ #
2956
+ def reboot_worker(resource_group_name, name, worker_name, custom_headers:nil)
2957
+ response = reboot_worker_async(resource_group_name, name, worker_name, custom_headers:custom_headers).value!
2958
+ nil
2959
+ end
2960
+
2961
+ #
2962
+ # Reboot a worker machine in an App Service plan.
2963
+ #
2964
+ # Description for Reboot a worker machine in an App Service plan.
2965
+ #
2966
+ # @param resource_group_name [String] Name of the resource group to which the
2967
+ # resource belongs.
2968
+ # @param name [String] Name of the App Service plan.
2969
+ # @param worker_name [String] Name of worker machine, which typically starts
2970
+ # with RD.
2971
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2972
+ # will be added to the HTTP request.
2973
+ #
2974
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2975
+ #
2976
+ def reboot_worker_with_http_info(resource_group_name, name, worker_name, custom_headers:nil)
2977
+ reboot_worker_async(resource_group_name, name, worker_name, custom_headers:custom_headers).value!
2978
+ end
2979
+
2980
+ #
2981
+ # Reboot a worker machine in an App Service plan.
2982
+ #
2983
+ # Description for Reboot a worker machine in an App Service plan.
2984
+ #
2985
+ # @param resource_group_name [String] Name of the resource group to which the
2986
+ # resource belongs.
2987
+ # @param name [String] Name of the App Service plan.
2988
+ # @param worker_name [String] Name of worker machine, which typically starts
2989
+ # with RD.
2990
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2991
+ # to the HTTP request.
2992
+ #
2993
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2994
+ #
2995
+ def reboot_worker_async(resource_group_name, name, worker_name, custom_headers:nil)
2996
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2997
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2998
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2999
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
3000
+ fail ArgumentError, 'name is nil' if name.nil?
3001
+ fail ArgumentError, 'worker_name is nil' if worker_name.nil?
3002
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
3003
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
3004
+
3005
+
3006
+ request_headers = {}
3007
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3008
+
3009
+ # Set Headers
3010
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3011
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3012
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'
3013
+
3014
+ request_url = @base_url || @client.base_url
3015
+
3016
+ options = {
3017
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3018
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerName' => worker_name,'subscriptionId' => @client.subscription_id},
3019
+ query_params: {'api-version' => @client.api_version},
3020
+ headers: request_headers.merge(custom_headers || {}),
3021
+ base_url: request_url
3022
+ }
3023
+ promise = @client.make_request_async(:post, path_template, options)
3024
+
3025
+ promise = promise.then do |result|
3026
+ http_response = result.response
3027
+ status_code = http_response.status
3028
+ response_content = http_response.body
3029
+ unless status_code == 204
3030
+ error_model = JSON.load(response_content)
3031
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3032
+ end
3033
+
3034
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3035
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3036
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3037
+
3038
+ result
3039
+ end
3040
+
3041
+ promise.execute
3042
+ end
3043
+
3044
+ #
3045
+ # Creates or updates an App Service Plan.
3046
+ #
3047
+ # Description for Creates or updates an App Service Plan.
3048
+ #
3049
+ # @param resource_group_name [String] Name of the resource group to which the
3050
+ # resource belongs.
3051
+ # @param name [String] Name of the App Service plan.
3052
+ # @param app_service_plan [AppServicePlan] Details of the App Service plan.
3053
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3054
+ # will be added to the HTTP request.
3055
+ #
3056
+ # @return [AppServicePlan] operation results.
3057
+ #
3058
+ def begin_create_or_update(resource_group_name, name, app_service_plan, custom_headers:nil)
3059
+ response = begin_create_or_update_async(resource_group_name, name, app_service_plan, custom_headers:custom_headers).value!
3060
+ response.body unless response.nil?
3061
+ end
3062
+
3063
+ #
3064
+ # Creates or updates an App Service Plan.
3065
+ #
3066
+ # Description for Creates or updates an App Service Plan.
3067
+ #
3068
+ # @param resource_group_name [String] Name of the resource group to which the
3069
+ # resource belongs.
3070
+ # @param name [String] Name of the App Service plan.
3071
+ # @param app_service_plan [AppServicePlan] Details of the App Service plan.
3072
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3073
+ # will be added to the HTTP request.
3074
+ #
3075
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3076
+ #
3077
+ def begin_create_or_update_with_http_info(resource_group_name, name, app_service_plan, custom_headers:nil)
3078
+ begin_create_or_update_async(resource_group_name, name, app_service_plan, custom_headers:custom_headers).value!
3079
+ end
3080
+
3081
+ #
3082
+ # Creates or updates an App Service Plan.
3083
+ #
3084
+ # Description for Creates or updates an App Service Plan.
3085
+ #
3086
+ # @param resource_group_name [String] Name of the resource group to which the
3087
+ # resource belongs.
3088
+ # @param name [String] Name of the App Service plan.
3089
+ # @param app_service_plan [AppServicePlan] Details of the App Service plan.
3090
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3091
+ # to the HTTP request.
3092
+ #
3093
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3094
+ #
3095
+ def begin_create_or_update_async(resource_group_name, name, app_service_plan, custom_headers:nil)
3096
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
3097
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
3098
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
3099
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
3100
+ fail ArgumentError, 'name is nil' if name.nil?
3101
+ fail ArgumentError, 'app_service_plan is nil' if app_service_plan.nil?
3102
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
3103
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
3104
+
3105
+
3106
+ request_headers = {}
3107
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3108
+
3109
+ # Set Headers
3110
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3111
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3112
+
3113
+ # Serialize Request
3114
+ request_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlan.mapper()
3115
+ request_content = @client.serialize(request_mapper, app_service_plan)
3116
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
3117
+
3118
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'
3119
+
3120
+ request_url = @base_url || @client.base_url
3121
+
3122
+ options = {
3123
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3124
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
3125
+ query_params: {'api-version' => @client.api_version},
3126
+ body: request_content,
3127
+ headers: request_headers.merge(custom_headers || {}),
3128
+ base_url: request_url
3129
+ }
3130
+ promise = @client.make_request_async(:put, path_template, options)
3131
+
3132
+ promise = promise.then do |result|
3133
+ http_response = result.response
3134
+ status_code = http_response.status
3135
+ response_content = http_response.body
3136
+ unless status_code == 200 || status_code == 202
3137
+ error_model = JSON.load(response_content)
3138
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3139
+ end
3140
+
3141
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3142
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3143
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3144
+ # Deserialize Response
3145
+ if status_code == 200
3146
+ begin
3147
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3148
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlan.mapper()
3149
+ result.body = @client.deserialize(result_mapper, parsed_response)
3150
+ rescue Exception => e
3151
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3152
+ end
3153
+ end
3154
+ # Deserialize Response
3155
+ if status_code == 202
3156
+ begin
3157
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3158
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlan.mapper()
3159
+ result.body = @client.deserialize(result_mapper, parsed_response)
3160
+ rescue Exception => e
3161
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3162
+ end
3163
+ end
3164
+
3165
+ result
3166
+ end
3167
+
3168
+ promise.execute
3169
+ end
3170
+
3171
+ #
3172
+ # Get all App Service plans for a subscription.
3173
+ #
3174
+ # Description for Get all App Service plans for a subscription.
3175
+ #
3176
+ # @param next_page_link [String] The NextLink from the previous successful call
3177
+ # to List operation.
3178
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3179
+ # will be added to the HTTP request.
3180
+ #
3181
+ # @return [AppServicePlanCollection] operation results.
3182
+ #
3183
+ def list_next(next_page_link, custom_headers:nil)
3184
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
3185
+ response.body unless response.nil?
3186
+ end
3187
+
3188
+ #
3189
+ # Get all App Service plans for a subscription.
3190
+ #
3191
+ # Description for Get all App Service plans for a subscription.
3192
+ #
3193
+ # @param next_page_link [String] The NextLink from the previous successful call
3194
+ # to List operation.
3195
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3196
+ # will be added to the HTTP request.
3197
+ #
3198
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3199
+ #
3200
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
3201
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
3202
+ end
3203
+
3204
+ #
3205
+ # Get all App Service plans for a subscription.
3206
+ #
3207
+ # Description for Get all App Service plans for a subscription.
3208
+ #
3209
+ # @param next_page_link [String] The NextLink from the previous successful call
3210
+ # to List operation.
3211
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3212
+ # to the HTTP request.
3213
+ #
3214
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3215
+ #
3216
+ def list_next_async(next_page_link, custom_headers:nil)
3217
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3218
+
3219
+
3220
+ request_headers = {}
3221
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3222
+
3223
+ # Set Headers
3224
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3225
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3226
+ path_template = '{nextLink}'
3227
+
3228
+ request_url = @base_url || @client.base_url
3229
+
3230
+ options = {
3231
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3232
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3233
+ headers: request_headers.merge(custom_headers || {}),
3234
+ base_url: request_url
3235
+ }
3236
+ promise = @client.make_request_async(:get, path_template, options)
3237
+
3238
+ promise = promise.then do |result|
3239
+ http_response = result.response
3240
+ status_code = http_response.status
3241
+ response_content = http_response.body
3242
+ unless status_code == 200
3243
+ error_model = JSON.load(response_content)
3244
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3245
+ end
3246
+
3247
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3248
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3249
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3250
+ # Deserialize Response
3251
+ if status_code == 200
3252
+ begin
3253
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3254
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlanCollection.mapper()
3255
+ result.body = @client.deserialize(result_mapper, parsed_response)
3256
+ rescue Exception => e
3257
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3258
+ end
3259
+ end
3260
+
3261
+ result
3262
+ end
3263
+
3264
+ promise.execute
3265
+ end
3266
+
3267
+ #
3268
+ # Get all App Service plans in a resource group.
3269
+ #
3270
+ # Description for Get all App Service plans in a resource group.
3271
+ #
3272
+ # @param next_page_link [String] The NextLink from the previous successful call
3273
+ # to List operation.
3274
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3275
+ # will be added to the HTTP request.
3276
+ #
3277
+ # @return [AppServicePlanCollection] operation results.
3278
+ #
3279
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
3280
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
3281
+ response.body unless response.nil?
3282
+ end
3283
+
3284
+ #
3285
+ # Get all App Service plans in a resource group.
3286
+ #
3287
+ # Description for Get all App Service plans in a resource group.
3288
+ #
3289
+ # @param next_page_link [String] The NextLink from the previous successful call
3290
+ # to List operation.
3291
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3292
+ # will be added to the HTTP request.
3293
+ #
3294
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3295
+ #
3296
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
3297
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
3298
+ end
3299
+
3300
+ #
3301
+ # Get all App Service plans in a resource group.
3302
+ #
3303
+ # Description for Get all App Service plans in a resource group.
3304
+ #
3305
+ # @param next_page_link [String] The NextLink from the previous successful call
3306
+ # to List operation.
3307
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3308
+ # to the HTTP request.
3309
+ #
3310
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3311
+ #
3312
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
3313
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3314
+
3315
+
3316
+ request_headers = {}
3317
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3318
+
3319
+ # Set Headers
3320
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3321
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3322
+ path_template = '{nextLink}'
3323
+
3324
+ request_url = @base_url || @client.base_url
3325
+
3326
+ options = {
3327
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3328
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3329
+ headers: request_headers.merge(custom_headers || {}),
3330
+ base_url: request_url
3331
+ }
3332
+ promise = @client.make_request_async(:get, path_template, options)
3333
+
3334
+ promise = promise.then do |result|
3335
+ http_response = result.response
3336
+ status_code = http_response.status
3337
+ response_content = http_response.body
3338
+ unless status_code == 200
3339
+ error_model = JSON.load(response_content)
3340
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3341
+ end
3342
+
3343
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3344
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3345
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3346
+ # Deserialize Response
3347
+ if status_code == 200
3348
+ begin
3349
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3350
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlanCollection.mapper()
3351
+ result.body = @client.deserialize(result_mapper, parsed_response)
3352
+ rescue Exception => e
3353
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3354
+ end
3355
+ end
3356
+
3357
+ result
3358
+ end
3359
+
3360
+ promise.execute
3361
+ end
3362
+
3363
+ #
3364
+ # Get all apps that use a Hybrid Connection in an App Service Plan.
3365
+ #
3366
+ # Description for Get all apps that use a Hybrid Connection in an App Service
3367
+ # Plan.
3368
+ #
3369
+ # @param next_page_link [String] The NextLink from the previous successful call
3370
+ # to List operation.
3371
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3372
+ # will be added to the HTTP request.
3373
+ #
3374
+ # @return [ResourceCollection] operation results.
3375
+ #
3376
+ def list_web_apps_by_hybrid_connection_next(next_page_link, custom_headers:nil)
3377
+ response = list_web_apps_by_hybrid_connection_next_async(next_page_link, custom_headers:custom_headers).value!
3378
+ response.body unless response.nil?
3379
+ end
3380
+
3381
+ #
3382
+ # Get all apps that use a Hybrid Connection in an App Service Plan.
3383
+ #
3384
+ # Description for Get all apps that use a Hybrid Connection in an App Service
3385
+ # Plan.
3386
+ #
3387
+ # @param next_page_link [String] The NextLink from the previous successful call
3388
+ # to List operation.
3389
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3390
+ # will be added to the HTTP request.
3391
+ #
3392
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3393
+ #
3394
+ def list_web_apps_by_hybrid_connection_next_with_http_info(next_page_link, custom_headers:nil)
3395
+ list_web_apps_by_hybrid_connection_next_async(next_page_link, custom_headers:custom_headers).value!
3396
+ end
3397
+
3398
+ #
3399
+ # Get all apps that use a Hybrid Connection in an App Service Plan.
3400
+ #
3401
+ # Description for Get all apps that use a Hybrid Connection in an App Service
3402
+ # Plan.
3403
+ #
3404
+ # @param next_page_link [String] The NextLink from the previous successful call
3405
+ # to List operation.
3406
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3407
+ # to the HTTP request.
3408
+ #
3409
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3410
+ #
3411
+ def list_web_apps_by_hybrid_connection_next_async(next_page_link, custom_headers:nil)
3412
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3413
+
3414
+
3415
+ request_headers = {}
3416
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3417
+
3418
+ # Set Headers
3419
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3420
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3421
+ path_template = '{nextLink}'
3422
+
3423
+ request_url = @base_url || @client.base_url
3424
+
3425
+ options = {
3426
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3427
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3428
+ headers: request_headers.merge(custom_headers || {}),
3429
+ base_url: request_url
3430
+ }
3431
+ promise = @client.make_request_async(:get, path_template, options)
3432
+
3433
+ promise = promise.then do |result|
3434
+ http_response = result.response
3435
+ status_code = http_response.status
3436
+ response_content = http_response.body
3437
+ unless status_code == 200
3438
+ error_model = JSON.load(response_content)
3439
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3440
+ end
3441
+
3442
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3443
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3444
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3445
+ # Deserialize Response
3446
+ if status_code == 200
3447
+ begin
3448
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3449
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceCollection.mapper()
3450
+ result.body = @client.deserialize(result_mapper, parsed_response)
3451
+ rescue Exception => e
3452
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3453
+ end
3454
+ end
3455
+
3456
+ result
3457
+ end
3458
+
3459
+ promise.execute
3460
+ end
3461
+
3462
+ #
3463
+ # Retrieve all Hybrid Connections in use in an App Service plan.
3464
+ #
3465
+ # Description for Retrieve all Hybrid Connections in use in an App Service
3466
+ # plan.
3467
+ #
3468
+ # @param next_page_link [String] The NextLink from the previous successful call
3469
+ # to List operation.
3470
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3471
+ # will be added to the HTTP request.
3472
+ #
3473
+ # @return [HybridConnectionCollection] operation results.
3474
+ #
3475
+ def list_hybrid_connections_next(next_page_link, custom_headers:nil)
3476
+ response = list_hybrid_connections_next_async(next_page_link, custom_headers:custom_headers).value!
3477
+ response.body unless response.nil?
3478
+ end
3479
+
3480
+ #
3481
+ # Retrieve all Hybrid Connections in use in an App Service plan.
3482
+ #
3483
+ # Description for Retrieve all Hybrid Connections in use in an App Service
3484
+ # plan.
3485
+ #
3486
+ # @param next_page_link [String] The NextLink from the previous successful call
3487
+ # to List operation.
3488
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3489
+ # will be added to the HTTP request.
3490
+ #
3491
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3492
+ #
3493
+ def list_hybrid_connections_next_with_http_info(next_page_link, custom_headers:nil)
3494
+ list_hybrid_connections_next_async(next_page_link, custom_headers:custom_headers).value!
3495
+ end
3496
+
3497
+ #
3498
+ # Retrieve all Hybrid Connections in use in an App Service plan.
3499
+ #
3500
+ # Description for Retrieve all Hybrid Connections in use in an App Service
3501
+ # plan.
3502
+ #
3503
+ # @param next_page_link [String] The NextLink from the previous successful call
3504
+ # to List operation.
3505
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3506
+ # to the HTTP request.
3507
+ #
3508
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3509
+ #
3510
+ def list_hybrid_connections_next_async(next_page_link, custom_headers:nil)
3511
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3512
+
3513
+
3514
+ request_headers = {}
3515
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3516
+
3517
+ # Set Headers
3518
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3519
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3520
+ path_template = '{nextLink}'
3521
+
3522
+ request_url = @base_url || @client.base_url
3523
+
3524
+ options = {
3525
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3526
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3527
+ headers: request_headers.merge(custom_headers || {}),
3528
+ base_url: request_url
3529
+ }
3530
+ promise = @client.make_request_async(:get, path_template, options)
3531
+
3532
+ promise = promise.then do |result|
3533
+ http_response = result.response
3534
+ status_code = http_response.status
3535
+ response_content = http_response.body
3536
+ unless status_code == 200
3537
+ error_model = JSON.load(response_content)
3538
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3539
+ end
3540
+
3541
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3542
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3543
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3544
+ # Deserialize Response
3545
+ if status_code == 200
3546
+ begin
3547
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3548
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::HybridConnectionCollection.mapper()
3549
+ result.body = @client.deserialize(result_mapper, parsed_response)
3550
+ rescue Exception => e
3551
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3552
+ end
3553
+ end
3554
+
3555
+ result
3556
+ end
3557
+
3558
+ promise.execute
3559
+ end
3560
+
3561
+ #
3562
+ # Get all apps associated with an App Service plan.
3563
+ #
3564
+ # Description for Get all apps associated with an App Service plan.
3565
+ #
3566
+ # @param next_page_link [String] The NextLink from the previous successful call
3567
+ # to List operation.
3568
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3569
+ # will be added to the HTTP request.
3570
+ #
3571
+ # @return [WebAppCollection] operation results.
3572
+ #
3573
+ def list_web_apps_next(next_page_link, custom_headers:nil)
3574
+ response = list_web_apps_next_async(next_page_link, custom_headers:custom_headers).value!
3575
+ response.body unless response.nil?
3576
+ end
3577
+
3578
+ #
3579
+ # Get all apps associated with an App Service plan.
3580
+ #
3581
+ # Description for Get all apps associated with an App Service plan.
3582
+ #
3583
+ # @param next_page_link [String] The NextLink from the previous successful call
3584
+ # to List operation.
3585
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3586
+ # will be added to the HTTP request.
3587
+ #
3588
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3589
+ #
3590
+ def list_web_apps_next_with_http_info(next_page_link, custom_headers:nil)
3591
+ list_web_apps_next_async(next_page_link, custom_headers:custom_headers).value!
3592
+ end
3593
+
3594
+ #
3595
+ # Get all apps associated with an App Service plan.
3596
+ #
3597
+ # Description for Get all apps associated with an App Service plan.
3598
+ #
3599
+ # @param next_page_link [String] The NextLink from the previous successful call
3600
+ # to List operation.
3601
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3602
+ # to the HTTP request.
3603
+ #
3604
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3605
+ #
3606
+ def list_web_apps_next_async(next_page_link, custom_headers:nil)
3607
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3608
+
3609
+
3610
+ request_headers = {}
3611
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3612
+
3613
+ # Set Headers
3614
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3615
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3616
+ path_template = '{nextLink}'
3617
+
3618
+ request_url = @base_url || @client.base_url
3619
+
3620
+ options = {
3621
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3622
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3623
+ headers: request_headers.merge(custom_headers || {}),
3624
+ base_url: request_url
3625
+ }
3626
+ promise = @client.make_request_async(:get, path_template, options)
3627
+
3628
+ promise = promise.then do |result|
3629
+ http_response = result.response
3630
+ status_code = http_response.status
3631
+ response_content = http_response.body
3632
+ unless status_code == 200
3633
+ error_model = JSON.load(response_content)
3634
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3635
+ end
3636
+
3637
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3638
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3639
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3640
+ # Deserialize Response
3641
+ if status_code == 200
3642
+ begin
3643
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3644
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper()
3645
+ result.body = @client.deserialize(result_mapper, parsed_response)
3646
+ rescue Exception => e
3647
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3648
+ end
3649
+ end
3650
+
3651
+ result
3652
+ end
3653
+
3654
+ promise.execute
3655
+ end
3656
+
3657
+ #
3658
+ # Gets server farm usage information
3659
+ #
3660
+ # Description for Gets server farm usage information
3661
+ #
3662
+ # @param next_page_link [String] The NextLink from the previous successful call
3663
+ # to List operation.
3664
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3665
+ # will be added to the HTTP request.
3666
+ #
3667
+ # @return [CsmUsageQuotaCollection] operation results.
3668
+ #
3669
+ def list_usages_next(next_page_link, custom_headers:nil)
3670
+ response = list_usages_next_async(next_page_link, custom_headers:custom_headers).value!
3671
+ response.body unless response.nil?
3672
+ end
3673
+
3674
+ #
3675
+ # Gets server farm usage information
3676
+ #
3677
+ # Description for Gets server farm usage information
3678
+ #
3679
+ # @param next_page_link [String] The NextLink from the previous successful call
3680
+ # to List operation.
3681
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3682
+ # will be added to the HTTP request.
3683
+ #
3684
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3685
+ #
3686
+ def list_usages_next_with_http_info(next_page_link, custom_headers:nil)
3687
+ list_usages_next_async(next_page_link, custom_headers:custom_headers).value!
3688
+ end
3689
+
3690
+ #
3691
+ # Gets server farm usage information
3692
+ #
3693
+ # Description for Gets server farm usage information
3694
+ #
3695
+ # @param next_page_link [String] The NextLink from the previous successful call
3696
+ # to List operation.
3697
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3698
+ # to the HTTP request.
3699
+ #
3700
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3701
+ #
3702
+ def list_usages_next_async(next_page_link, custom_headers:nil)
3703
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3704
+
3705
+
3706
+ request_headers = {}
3707
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3708
+
3709
+ # Set Headers
3710
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3711
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3712
+ path_template = '{nextLink}'
3713
+
3714
+ request_url = @base_url || @client.base_url
3715
+
3716
+ options = {
3717
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3718
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3719
+ headers: request_headers.merge(custom_headers || {}),
3720
+ base_url: request_url
3721
+ }
3722
+ promise = @client.make_request_async(:get, path_template, options)
3723
+
3724
+ promise = promise.then do |result|
3725
+ http_response = result.response
3726
+ status_code = http_response.status
3727
+ response_content = http_response.body
3728
+ unless status_code == 200
3729
+ error_model = JSON.load(response_content)
3730
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3731
+ end
3732
+
3733
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3734
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3735
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3736
+ # Deserialize Response
3737
+ if status_code == 200
3738
+ begin
3739
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3740
+ result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmUsageQuotaCollection.mapper()
3741
+ result.body = @client.deserialize(result_mapper, parsed_response)
3742
+ rescue Exception => e
3743
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3744
+ end
3745
+ end
3746
+
3747
+ result
3748
+ end
3749
+
3750
+ promise.execute
3751
+ end
3752
+
3753
+ #
3754
+ # Get all App Service plans for a subscription.
3755
+ #
3756
+ # Description for Get all App Service plans for a subscription.
3757
+ #
3758
+ # @param detailed [Boolean] Specify <code>true</code> to return all App Service
3759
+ # plan properties. The default is <code>false</code>, which returns a subset of
3760
+ # the properties.
3761
+ # Retrieval of all properties may increase the API latency.
3762
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3763
+ # will be added to the HTTP request.
3764
+ #
3765
+ # @return [AppServicePlanCollection] which provide lazy access to pages of the
3766
+ # response.
3767
+ #
3768
+ def list_as_lazy(detailed:nil, custom_headers:nil)
3769
+ response = list_async(detailed:detailed, custom_headers:custom_headers).value!
3770
+ unless response.nil?
3771
+ page = response.body
3772
+ page.next_method = Proc.new do |next_page_link|
3773
+ list_next_async(next_page_link, custom_headers:custom_headers)
3774
+ end
3775
+ page
3776
+ end
3777
+ end
3778
+
3779
+ #
3780
+ # Get all App Service plans in a resource group.
3781
+ #
3782
+ # Description for Get all App Service plans in a resource group.
3783
+ #
3784
+ # @param resource_group_name [String] Name of the resource group to which the
3785
+ # resource belongs.
3786
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3787
+ # will be added to the HTTP request.
3788
+ #
3789
+ # @return [AppServicePlanCollection] which provide lazy access to pages of the
3790
+ # response.
3791
+ #
3792
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
3793
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
3794
+ unless response.nil?
3795
+ page = response.body
3796
+ page.next_method = Proc.new do |next_page_link|
3797
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
3798
+ end
3799
+ page
3800
+ end
3801
+ end
3802
+
3803
+ #
3804
+ # Get all apps that use a Hybrid Connection in an App Service Plan.
3805
+ #
3806
+ # Description for Get all apps that use a Hybrid Connection in an App Service
3807
+ # Plan.
3808
+ #
3809
+ # @param resource_group_name [String] Name of the resource group to which the
3810
+ # resource belongs.
3811
+ # @param name [String] Name of the App Service plan.
3812
+ # @param namespace_name [String] Name of the Hybrid Connection namespace.
3813
+ # @param relay_name [String] Name of the Hybrid Connection relay.
3814
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3815
+ # will be added to the HTTP request.
3816
+ #
3817
+ # @return [ResourceCollection] which provide lazy access to pages of the
3818
+ # response.
3819
+ #
3820
+ def list_web_apps_by_hybrid_connection_as_lazy(resource_group_name, name, namespace_name, relay_name, custom_headers:nil)
3821
+ response = list_web_apps_by_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers:custom_headers).value!
3822
+ unless response.nil?
3823
+ page = response.body
3824
+ page.next_method = Proc.new do |next_page_link|
3825
+ list_web_apps_by_hybrid_connection_next_async(next_page_link, custom_headers:custom_headers)
3826
+ end
3827
+ page
3828
+ end
3829
+ end
3830
+
3831
+ #
3832
+ # Retrieve all Hybrid Connections in use in an App Service plan.
3833
+ #
3834
+ # Description for Retrieve all Hybrid Connections in use in an App Service
3835
+ # plan.
3836
+ #
3837
+ # @param resource_group_name [String] Name of the resource group to which the
3838
+ # resource belongs.
3839
+ # @param name [String] Name of the App Service plan.
3840
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3841
+ # will be added to the HTTP request.
3842
+ #
3843
+ # @return [HybridConnectionCollection] which provide lazy access to pages of
3844
+ # the response.
3845
+ #
3846
+ def list_hybrid_connections_as_lazy(resource_group_name, name, custom_headers:nil)
3847
+ response = list_hybrid_connections_async(resource_group_name, name, custom_headers:custom_headers).value!
3848
+ unless response.nil?
3849
+ page = response.body
3850
+ page.next_method = Proc.new do |next_page_link|
3851
+ list_hybrid_connections_next_async(next_page_link, custom_headers:custom_headers)
3852
+ end
3853
+ page
3854
+ end
3855
+ end
3856
+
3857
+ #
3858
+ # Get all apps associated with an App Service plan.
3859
+ #
3860
+ # Description for Get all apps associated with an App Service plan.
3861
+ #
3862
+ # @param resource_group_name [String] Name of the resource group to which the
3863
+ # resource belongs.
3864
+ # @param name [String] Name of the App Service plan.
3865
+ # @param skip_token [String] Skip to a web app in the list of webapps
3866
+ # associated with app service plan. If specified, the resulting list will
3867
+ # contain web apps starting from (including) the skipToken. Otherwise, the
3868
+ # resulting list contains web apps from the start of the list
3869
+ # @param filter [String] Supported filter: $filter=state eq running. Returns
3870
+ # only web apps that are currently running
3871
+ # @param top [String] List page size. If specified, results are paged.
3872
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3873
+ # will be added to the HTTP request.
3874
+ #
3875
+ # @return [WebAppCollection] which provide lazy access to pages of the
3876
+ # response.
3877
+ #
3878
+ def list_web_apps_as_lazy(resource_group_name, name, skip_token:nil, filter:nil, top:nil, custom_headers:nil)
3879
+ response = list_web_apps_async(resource_group_name, name, skip_token:skip_token, filter:filter, top:top, custom_headers:custom_headers).value!
3880
+ unless response.nil?
3881
+ page = response.body
3882
+ page.next_method = Proc.new do |next_page_link|
3883
+ list_web_apps_next_async(next_page_link, custom_headers:custom_headers)
3884
+ end
3885
+ page
3886
+ end
3887
+ end
3888
+
3889
+ #
3890
+ # Gets server farm usage information
3891
+ #
3892
+ # Description for Gets server farm usage information
3893
+ #
3894
+ # @param resource_group_name [String] Name of the resource group to which the
3895
+ # resource belongs.
3896
+ # @param name [String] Name of App Service Plan
3897
+ # @param filter [String] Return only usages/metrics specified in the filter.
3898
+ # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
3899
+ # name.value eq 'Metric2').
3900
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3901
+ # will be added to the HTTP request.
3902
+ #
3903
+ # @return [CsmUsageQuotaCollection] which provide lazy access to pages of the
3904
+ # response.
3905
+ #
3906
+ def list_usages_as_lazy(resource_group_name, name, filter:nil, custom_headers:nil)
3907
+ response = list_usages_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value!
3908
+ unless response.nil?
3909
+ page = response.body
3910
+ page.next_method = Proc.new do |next_page_link|
3911
+ list_usages_next_async(next_page_link, custom_headers:custom_headers)
3912
+ end
3913
+ page
3914
+ end
3915
+ end
3916
+
3917
+ end
3918
+ end