azure_mgmt_web 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_web.rb +155 -145
  3. data/lib/generated/azure_mgmt_web/{certificate_orders.rb → app_service_certificate_orders.rb} +806 -530
  4. data/lib/generated/azure_mgmt_web/{hosting_environments.rb → app_service_environments.rb} +2528 -2077
  5. data/lib/generated/azure_mgmt_web/{server_farms.rb → app_service_plans.rb} +1964 -763
  6. data/lib/generated/azure_mgmt_web/certificates.rb +379 -105
  7. data/lib/generated/azure_mgmt_web/domains.rb +924 -249
  8. data/lib/generated/azure_mgmt_web/models/access_control_entry_action.rb +1 -1
  9. data/lib/generated/azure_mgmt_web/models/address.rb +1 -1
  10. data/lib/generated/azure_mgmt_web/models/address_response.rb +1 -1
  11. data/lib/generated/azure_mgmt_web/models/api_definition_info.rb +1 -1
  12. data/lib/generated/azure_mgmt_web/models/{certificate_order_certificate.rb → app_service_certificate.rb} +11 -9
  13. data/lib/generated/azure_mgmt_web/models/app_service_certificate_collection.rb +93 -0
  14. data/lib/generated/azure_mgmt_web/models/{certificate_order.rb → app_service_certificate_order.rb} +23 -12
  15. data/lib/generated/azure_mgmt_web/models/{classic_mobile_service_collection.rb → app_service_certificate_order_collection.rb} +11 -11
  16. data/lib/generated/azure_mgmt_web/models/{hosting_environment.rb → app_service_environment.rb} +50 -28
  17. data/lib/generated/azure_mgmt_web/models/{hosting_environment_collection.rb → app_service_environment_collection.rb} +10 -10
  18. data/lib/generated/azure_mgmt_web/models/{server_farm_with_rich_sku.rb → app_service_plan.rb} +13 -27
  19. data/lib/generated/azure_mgmt_web/models/{server_farm_collection.rb → app_service_plan_collection.rb} +10 -10
  20. data/lib/generated/azure_mgmt_web/models/application_logs_config.rb +1 -1
  21. data/lib/generated/azure_mgmt_web/models/arm_plan.rb +1 -1
  22. data/lib/generated/azure_mgmt_web/models/auto_heal_action_type.rb +1 -1
  23. data/lib/generated/azure_mgmt_web/models/auto_heal_actions.rb +1 -1
  24. data/lib/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +1 -1
  25. data/lib/generated/azure_mgmt_web/models/auto_heal_rules.rb +1 -1
  26. data/lib/generated/azure_mgmt_web/models/auto_heal_triggers.rb +3 -3
  27. data/lib/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +1 -1
  28. data/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +1 -1
  29. data/lib/generated/azure_mgmt_web/models/azure_resource_type.rb +1 -1
  30. data/lib/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +1 -1
  31. data/lib/generated/azure_mgmt_web/models/backup_item.rb +5 -5
  32. data/lib/generated/azure_mgmt_web/models/backup_item_collection.rb +1 -1
  33. data/lib/generated/azure_mgmt_web/models/backup_item_status.rb +1 -1
  34. data/lib/generated/azure_mgmt_web/models/backup_request.rb +4 -4
  35. data/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb +1 -1
  36. data/lib/generated/azure_mgmt_web/models/backup_schedule.rb +3 -3
  37. data/lib/generated/azure_mgmt_web/models/built_in_authentication_provider.rb +1 -1
  38. data/lib/generated/azure_mgmt_web/models/{conn_string_info.rb → capability.rb} +17 -19
  39. data/lib/generated/azure_mgmt_web/models/certificate.rb +3 -2
  40. data/lib/generated/azure_mgmt_web/models/certificate_collection.rb +1 -1
  41. data/lib/generated/azure_mgmt_web/models/certificate_details.rb +3 -2
  42. data/lib/generated/azure_mgmt_web/models/certificate_email.rb +3 -2
  43. data/lib/generated/azure_mgmt_web/models/certificate_order_action.rb +3 -2
  44. data/lib/generated/azure_mgmt_web/models/certificate_order_action_type.rb +1 -1
  45. data/lib/generated/azure_mgmt_web/models/certificate_order_status.rb +1 -1
  46. data/lib/generated/azure_mgmt_web/models/certificate_product_type.rb +1 -1
  47. data/lib/generated/azure_mgmt_web/models/channels.rb +1 -1
  48. data/lib/generated/azure_mgmt_web/models/check_name_resource_types.rb +17 -0
  49. data/lib/generated/azure_mgmt_web/models/classic_mobile_service.rb +3 -2
  50. data/lib/generated/azure_mgmt_web/models/clone_ability_result.rb +1 -1
  51. data/lib/generated/azure_mgmt_web/models/cloning_info.rb +6 -6
  52. data/lib/generated/azure_mgmt_web/models/compute_mode_options.rb +1 -1
  53. data/lib/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb +5 -4
  54. data/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb +3 -2
  55. data/lib/generated/azure_mgmt_web/models/connection_string_type.rb +24 -0
  56. data/lib/generated/azure_mgmt_web/models/contact.rb +1 -1
  57. data/lib/generated/azure_mgmt_web/models/cors_settings.rb +4 -5
  58. data/lib/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb +1 -1
  59. data/lib/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb +1 -1
  60. data/lib/generated/azure_mgmt_web/models/csm_site_recovery_entity.rb +4 -4
  61. data/lib/generated/azure_mgmt_web/models/csm_slot_entity.rb +1 -1
  62. data/lib/generated/azure_mgmt_web/models/csm_usage_quota.rb +1 -1
  63. data/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +1 -1
  64. data/lib/generated/azure_mgmt_web/models/csr.rb +3 -2
  65. data/lib/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +1 -1
  66. data/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb +238 -0
  67. data/lib/generated/azure_mgmt_web/models/database_backup_setting.rb +3 -5
  68. data/lib/generated/azure_mgmt_web/models/deleted_site.rb +48 -41
  69. data/lib/generated/azure_mgmt_web/models/{deleted_site_collection.rb → deleted_web_app_collection.rb} +6 -6
  70. data/lib/generated/azure_mgmt_web/models/deployment.rb +3 -2
  71. data/lib/generated/azure_mgmt_web/models/deployment_collection.rb +1 -1
  72. data/lib/generated/azure_mgmt_web/models/dns_verification_test_result.rb +17 -0
  73. data/lib/generated/azure_mgmt_web/models/domain.rb +7 -7
  74. data/lib/generated/azure_mgmt_web/models/domain_availablility_check_result.rb +1 -1
  75. data/lib/generated/azure_mgmt_web/models/domain_collection.rb +1 -1
  76. data/lib/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb +1 -1
  77. data/lib/generated/azure_mgmt_web/models/domain_purchase_consent.rb +1 -1
  78. data/lib/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +1 -1
  79. data/lib/generated/azure_mgmt_web/models/domain_registration_input.rb +7 -7
  80. data/lib/generated/azure_mgmt_web/models/domain_status.rb +1 -1
  81. data/lib/generated/azure_mgmt_web/models/domain_type.rb +1 -1
  82. data/lib/generated/azure_mgmt_web/models/enabled_config.rb +1 -1
  83. data/lib/generated/azure_mgmt_web/models/error_entity.rb +109 -0
  84. data/lib/generated/azure_mgmt_web/models/experiments.rb +1 -1
  85. data/lib/generated/azure_mgmt_web/models/file_system_application_logs_config.rb +1 -1
  86. data/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb +2 -3
  87. data/lib/generated/azure_mgmt_web/models/frequency_unit.rb +1 -1
  88. data/lib/generated/azure_mgmt_web/models/geo_region.rb +3 -2
  89. data/lib/generated/azure_mgmt_web/models/geo_region_collection.rb +1 -1
  90. data/lib/generated/azure_mgmt_web/models/handler_mapping.rb +5 -5
  91. data/lib/generated/azure_mgmt_web/models/host_name.rb +6 -6
  92. data/lib/generated/azure_mgmt_web/models/host_name_binding.rb +3 -2
  93. data/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb +1 -1
  94. data/lib/generated/azure_mgmt_web/models/host_name_ssl_state.rb +1 -1
  95. data/lib/generated/azure_mgmt_web/models/host_name_type.rb +1 -1
  96. data/lib/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb +1 -1
  97. data/lib/generated/azure_mgmt_web/models/hosting_environment_profile.rb +1 -1
  98. data/lib/generated/azure_mgmt_web/models/hosting_environment_status.rb +1 -1
  99. data/lib/generated/azure_mgmt_web/models/http_logs_config.rb +1 -1
  100. data/lib/generated/azure_mgmt_web/models/hybrid_connection.rb +158 -0
  101. data/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb +105 -0
  102. data/lib/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb +1 -1
  103. data/lib/generated/azure_mgmt_web/models/ip_security_restriction.rb +2 -2
  104. data/lib/generated/azure_mgmt_web/models/key_vault_secret_status.rb +2 -1
  105. data/lib/generated/azure_mgmt_web/models/localizable_string.rb +1 -1
  106. data/lib/generated/azure_mgmt_web/models/log_level.rb +1 -1
  107. data/lib/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +1 -1
  108. data/lib/generated/azure_mgmt_web/models/metric_availabilily.rb +1 -1
  109. data/lib/generated/azure_mgmt_web/models/metric_definition.rb +3 -2
  110. data/lib/generated/azure_mgmt_web/models/metric_definition_collection.rb +1 -1
  111. data/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb +95 -0
  112. data/lib/generated/azure_mgmt_web/models/name_identifier.rb +1 -1
  113. data/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb +1 -1
  114. data/lib/generated/azure_mgmt_web/models/name_value_pair.rb +1 -1
  115. data/lib/generated/azure_mgmt_web/models/network_access_control_entry.rb +2 -2
  116. data/lib/generated/azure_mgmt_web/models/network_features.rb +22 -2
  117. data/lib/generated/azure_mgmt_web/models/notification_level.rb +1 -1
  118. data/lib/generated/azure_mgmt_web/models/operation.rb +125 -0
  119. data/lib/generated/azure_mgmt_web/models/operation_status.rb +19 -0
  120. data/lib/generated/azure_mgmt_web/models/{certificate_order_collection.rb → perf_mon_counter_collection.rb} +11 -11
  121. data/lib/generated/azure_mgmt_web/models/perf_mon_response.rb +65 -0
  122. data/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb +64 -0
  123. data/lib/generated/azure_mgmt_web/models/perf_mon_set.rb +93 -0
  124. data/lib/generated/azure_mgmt_web/models/premier_add_on_request.rb +2 -2
  125. data/lib/generated/azure_mgmt_web/models/provisioning_state.rb +1 -1
  126. data/lib/generated/azure_mgmt_web/models/push_settings.rb +80 -0
  127. data/lib/generated/azure_mgmt_web/models/ramp_up_rule.rb +8 -9
  128. data/lib/generated/azure_mgmt_web/models/recommendation.rb +3 -3
  129. data/lib/generated/azure_mgmt_web/models/recommendation_rule.rb +1 -1
  130. data/lib/generated/azure_mgmt_web/models/recover_response.rb +95 -0
  131. data/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb +24 -2
  132. data/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb +3 -2
  133. data/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb +24 -2
  134. data/lib/generated/azure_mgmt_web/models/requests_based_trigger.rb +1 -1
  135. data/lib/generated/azure_mgmt_web/models/resource_metric.rb +23 -4
  136. data/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb +1 -1
  137. data/lib/generated/azure_mgmt_web/models/resource_metric_name.rb +3 -1
  138. data/lib/generated/azure_mgmt_web/models/{key_value_pair_string_string.rb → resource_metric_property.rb} +8 -10
  139. data/lib/generated/azure_mgmt_web/models/resource_metric_value.rb +29 -4
  140. data/lib/generated/azure_mgmt_web/models/resource_name_availability.rb +3 -3
  141. data/lib/generated/azure_mgmt_web/models/resource_name_availability_request.rb +3 -2
  142. data/lib/generated/azure_mgmt_web/models/restore_request.rb +5 -4
  143. data/lib/generated/azure_mgmt_web/models/restore_response.rb +5 -4
  144. data/lib/generated/azure_mgmt_web/models/site.rb +48 -41
  145. data/lib/generated/azure_mgmt_web/models/site_auth_settings.rb +43 -54
  146. data/lib/generated/azure_mgmt_web/models/site_availability_state.rb +1 -1
  147. data/lib/generated/azure_mgmt_web/models/site_cloneability.rb +4 -5
  148. data/lib/generated/azure_mgmt_web/models/site_cloneability_criterion.rb +1 -1
  149. data/lib/generated/azure_mgmt_web/models/site_config.rb +32 -63
  150. data/lib/generated/azure_mgmt_web/models/site_instance.rb +3 -2
  151. data/lib/generated/azure_mgmt_web/models/site_instance_collection.rb +1 -1
  152. data/lib/generated/azure_mgmt_web/models/site_limits.rb +1 -1
  153. data/lib/generated/azure_mgmt_web/models/site_load_balancing.rb +1 -1
  154. data/lib/generated/azure_mgmt_web/models/site_logs_config.rb +3 -2
  155. data/lib/generated/azure_mgmt_web/models/site_machine_key.rb +74 -0
  156. data/lib/generated/azure_mgmt_web/models/site_source_control.rb +3 -2
  157. data/lib/generated/azure_mgmt_web/models/sku_capacity.rb +1 -1
  158. data/lib/generated/azure_mgmt_web/models/sku_description.rb +48 -1
  159. data/lib/generated/azure_mgmt_web/models/sku_info.rb +1 -1
  160. data/lib/generated/azure_mgmt_web/models/sku_info_collection.rb +1 -1
  161. data/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb +3 -2
  162. data/lib/generated/azure_mgmt_web/models/slot_difference.rb +5 -4
  163. data/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb +1 -1
  164. data/lib/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +1 -1
  165. data/lib/generated/azure_mgmt_web/models/snapshot.rb +94 -0
  166. data/lib/generated/azure_mgmt_web/models/snapshot_collection.rb +94 -0
  167. data/lib/generated/azure_mgmt_web/models/source_control.rb +3 -2
  168. data/lib/generated/azure_mgmt_web/models/source_control_collection.rb +1 -1
  169. data/lib/generated/azure_mgmt_web/models/ssl_state.rb +1 -1
  170. data/lib/generated/azure_mgmt_web/models/stamp_capacity.rb +1 -1
  171. data/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +1 -1
  172. data/lib/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +1 -1
  173. data/lib/generated/azure_mgmt_web/models/status_options.rb +1 -1
  174. data/lib/generated/azure_mgmt_web/models/storage_migration_options.rb +125 -0
  175. data/lib/generated/azure_mgmt_web/models/storage_migration_response.rb +95 -0
  176. data/lib/generated/azure_mgmt_web/models/string_dictionary.rb +3 -2
  177. data/lib/generated/azure_mgmt_web/models/tld_legal_agreement.rb +1 -1
  178. data/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +1 -1
  179. data/lib/generated/azure_mgmt_web/models/top_level_domain.rb +3 -2
  180. data/lib/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb +1 -1
  181. data/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb +1 -1
  182. data/lib/generated/azure_mgmt_web/models/unauthenticated_client_action.rb +1 -1
  183. data/lib/generated/azure_mgmt_web/models/usage.rb +3 -2
  184. data/lib/generated/azure_mgmt_web/models/usage_collection.rb +1 -1
  185. data/lib/generated/azure_mgmt_web/models/usage_state.rb +1 -1
  186. data/lib/generated/azure_mgmt_web/models/user.rb +17 -7
  187. data/lib/generated/azure_mgmt_web/models/validate_properties.rb +76 -0
  188. data/lib/generated/azure_mgmt_web/models/validate_request.rb +76 -0
  189. data/lib/generated/azure_mgmt_web/models/validate_resource_types.rb +16 -0
  190. data/lib/generated/azure_mgmt_web/models/validate_response.rb +56 -0
  191. data/lib/generated/azure_mgmt_web/models/validate_response_error.rb +54 -0
  192. data/lib/generated/azure_mgmt_web/models/virtual_application.rb +7 -6
  193. data/lib/generated/azure_mgmt_web/models/virtual_directory.rb +4 -4
  194. data/lib/generated/azure_mgmt_web/models/virtual_ipmapping.rb +1 -1
  195. data/lib/generated/azure_mgmt_web/models/virtual_network_profile.rb +3 -1
  196. data/lib/generated/azure_mgmt_web/models/vnet_gateway.rb +5 -4
  197. data/lib/generated/azure_mgmt_web/models/vnet_info.rb +5 -4
  198. data/lib/generated/azure_mgmt_web/models/vnet_route.rb +9 -9
  199. data/lib/generated/azure_mgmt_web/models/{site_collection.rb → web_app_collection.rb} +6 -6
  200. data/lib/generated/azure_mgmt_web/models/worker_pool.rb +5 -4
  201. data/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb +1 -1
  202. data/lib/generated/azure_mgmt_web/models/worker_size_options.rb +1 -1
  203. data/lib/generated/azure_mgmt_web/module_definition.rb +1 -1
  204. data/lib/generated/azure_mgmt_web/recommendations.rb +128 -96
  205. data/lib/generated/azure_mgmt_web/top_level_domains.rb +118 -91
  206. data/lib/generated/azure_mgmt_web/version.rb +2 -2
  207. data/lib/generated/azure_mgmt_web/{sites.rb → web_apps.rb} +11407 -6127
  208. data/lib/generated/azure_mgmt_web/web_site_management_client.rb +1486 -51
  209. metadata +46 -36
  210. data/lib/generated/azure_mgmt_web/classic_mobile_services.rb +0 -400
  211. data/lib/generated/azure_mgmt_web/global.rb +0 -1888
  212. data/lib/generated/azure_mgmt_web/global_certificate_order.rb +0 -309
  213. data/lib/generated/azure_mgmt_web/global_domain_registration.rb +0 -699
  214. data/lib/generated/azure_mgmt_web/global_resource_groups.rb +0 -116
  215. data/lib/generated/azure_mgmt_web/managed_hosting_environments.rb +0 -1394
  216. data/lib/generated/azure_mgmt_web/models/certificate_order_certificate_collection.rb +0 -93
  217. data/lib/generated/azure_mgmt_web/models/database_server_type.rb +0 -18
  218. data/lib/generated/azure_mgmt_web/models/managed_hosting_environment.rb +0 -218
  219. data/lib/generated/azure_mgmt_web/models/managed_hosting_environment_collection.rb +0 -93
  220. data/lib/generated/azure_mgmt_web/models/managed_hosting_environment_status.rb +0 -17
  221. data/lib/generated/azure_mgmt_web/models/routing_rule.rb +0 -46
  222. data/lib/generated/azure_mgmt_web/models/site_properties.rb +0 -88
  223. data/lib/generated/azure_mgmt_web/models/slot_config_names.rb +0 -71
  224. data/lib/generated/azure_mgmt_web/provider.rb +0 -581
  225. data/lib/generated/azure_mgmt_web/usage_operations.rb +0 -122
@@ -1,25 +1,18 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Web
7
7
  #
8
- # Use these APIs to manage Azure Websites resources through the Azure
9
- # Resource Manager. All task operations conform to the HTTP/1.1 protocol
10
- # specification and each operation returns an x-ms-request-id header that
11
- # can be used to obtain information about the request. You must make sure
12
- # that requests made to these resources are secure. For more information,
13
- # see <a
14
- # href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
15
- # Azure Resource Manager requests.</a>
8
+ # Composite Swagger for WebSite Management Client
16
9
  #
17
- class ServerFarms
10
+ class AppServicePlans
18
11
  include Azure::ARM::Web::Models
19
12
  include MsRestAzure
20
13
 
21
14
  #
22
- # Creates and initializes a new instance of the ServerFarms class.
15
+ # Creates and initializes a new instance of the AppServicePlans class.
23
16
  # @param client service class for accessing basic functionality.
24
17
  #
25
18
  def initialize(client)
@@ -30,27 +23,106 @@ module Azure::ARM::Web
30
23
  attr_reader :client
31
24
 
32
25
  #
33
- # Gets collection of App Service Plans in a resource group for a given
34
- # subscription.
26
+ # Gets all App Service Plans for a subcription
35
27
  #
36
- # @param resource_group_name [String] Name of resource group
28
+ # Gets all App Service Plans for a subcription
29
+ #
30
+ # @param detailed [Boolean] False to return a subset of App Service Plan
31
+ # properties, true to return all of the properties.
32
+ # Retrieval of all properties may increase the API latency.
37
33
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
34
  # will be added to the HTTP request.
39
35
  #
40
- # @return [ServerFarmCollection] which provide lazy access to pages of the
41
- # response.
36
+ # @return [Array<AppServicePlan>] operation results.
42
37
  #
43
- def get_server_farms_as_lazy(resource_group_name, custom_headers = nil)
44
- response = get_server_farms_async(resource_group_name, custom_headers).value!
45
- unless response.nil?
46
- page = response.body
47
- page.next_method = Proc.new do |next_page_link|
48
- get_server_farms_next_async(next_page_link, custom_headers)
38
+ def list(detailed = nil, custom_headers = nil)
39
+ first_page = list_as_lazy(detailed, custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Gets all App Service Plans for a subcription
45
+ #
46
+ # Gets all App Service Plans for a subcription
47
+ #
48
+ # @param detailed [Boolean] False to return a subset of App Service Plan
49
+ # properties, true to return all of the properties.
50
+ # Retrieval of all properties may increase the API latency.
51
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
52
+ # will be added to the HTTP request.
53
+ #
54
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
+ #
56
+ def list_with_http_info(detailed = nil, custom_headers = nil)
57
+ list_async(detailed, custom_headers).value!
58
+ end
59
+
60
+ #
61
+ # Gets all App Service Plans for a subcription
62
+ #
63
+ # Gets all App Service Plans for a subcription
64
+ #
65
+ # @param detailed [Boolean] False to return a subset of App Service Plan
66
+ # properties, true to return all of the properties.
67
+ # Retrieval of all properties may increase the API latency.
68
+ # @param [Hash{String => String}] A hash of custom headers that will be added
69
+ # to the HTTP request.
70
+ #
71
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
72
+ #
73
+ def list_async(detailed = nil, custom_headers = nil)
74
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
+ api_version = '2016-09-01'
76
+
77
+
78
+ request_headers = {}
79
+
80
+ # Set Headers
81
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
+ path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'
84
+
85
+ request_url = @base_url || @client.base_url
86
+
87
+ options = {
88
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
+ path_params: {'subscriptionId' => @client.subscription_id},
90
+ query_params: {'detailed' => detailed,'api-version' => api_version},
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:get, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
49
103
  end
50
- page
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ # Deserialize Response
107
+ if status_code == 200
108
+ begin
109
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
+ result_mapper = AppServicePlanCollection.mapper()
111
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
112
+ rescue Exception => e
113
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
114
+ end
115
+ end
116
+
117
+ result
51
118
  end
119
+
120
+ promise.execute
52
121
  end
53
122
 
123
+ #
124
+ # Gets collection of App Service Plans in a resource group for a given
125
+ # subscription.
54
126
  #
55
127
  # Gets collection of App Service Plans in a resource group for a given
56
128
  # subscription.
@@ -59,13 +131,16 @@ module Azure::ARM::Web
59
131
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
60
132
  # will be added to the HTTP request.
61
133
  #
62
- # @return [Array<ServerFarmWithRichSku>] operation results.
134
+ # @return [Array<AppServicePlan>] operation results.
63
135
  #
64
- def get_server_farms(resource_group_name, custom_headers = nil)
65
- first_page = get_server_farms_as_lazy(resource_group_name, custom_headers)
136
+ def list_by_resource_group(resource_group_name, custom_headers = nil)
137
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
66
138
  first_page.get_all_items
67
139
  end
68
140
 
141
+ #
142
+ # Gets collection of App Service Plans in a resource group for a given
143
+ # subscription.
69
144
  #
70
145
  # Gets collection of App Service Plans in a resource group for a given
71
146
  # subscription.
@@ -76,10 +151,13 @@ module Azure::ARM::Web
76
151
  #
77
152
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
78
153
  #
79
- def get_server_farms_with_http_info(resource_group_name, custom_headers = nil)
80
- get_server_farms_async(resource_group_name, custom_headers).value!
154
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
155
+ list_by_resource_group_async(resource_group_name, custom_headers).value!
81
156
  end
82
157
 
158
+ #
159
+ # Gets collection of App Service Plans in a resource group for a given
160
+ # subscription.
83
161
  #
84
162
  # Gets collection of App Service Plans in a resource group for a given
85
163
  # subscription.
@@ -90,10 +168,10 @@ module Azure::ARM::Web
90
168
  #
91
169
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
92
170
  #
93
- def get_server_farms_async(resource_group_name, custom_headers = nil)
171
+ def list_by_resource_group_async(resource_group_name, custom_headers = nil)
94
172
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
95
173
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
96
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
174
+ api_version = '2016-09-01'
97
175
 
98
176
 
99
177
  request_headers = {}
@@ -108,7 +186,7 @@ module Azure::ARM::Web
108
186
  options = {
109
187
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
110
188
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
111
- query_params: {'api-version' => @client.api_version},
189
+ query_params: {'api-version' => api_version},
112
190
  headers: request_headers.merge(custom_headers || {}),
113
191
  base_url: request_url
114
192
  }
@@ -128,7 +206,7 @@ module Azure::ARM::Web
128
206
  if status_code == 200
129
207
  begin
130
208
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
131
- result_mapper = ServerFarmCollection.mapper()
209
+ result_mapper = AppServicePlanCollection.mapper()
132
210
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
133
211
  rescue Exception => e
134
212
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -141,6 +219,8 @@ module Azure::ARM::Web
141
219
  promise.execute
142
220
  end
143
221
 
222
+ #
223
+ # Gets specified App Service Plan in a resource group
144
224
  #
145
225
  # Gets specified App Service Plan in a resource group
146
226
  #
@@ -149,13 +229,15 @@ module Azure::ARM::Web
149
229
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
150
230
  # will be added to the HTTP request.
151
231
  #
152
- # @return [ServerFarmWithRichSku] operation results.
232
+ # @return [AppServicePlan] operation results.
153
233
  #
154
- def get_server_farm(resource_group_name, name, custom_headers = nil)
155
- response = get_server_farm_async(resource_group_name, name, custom_headers).value!
234
+ def get(resource_group_name, name, custom_headers = nil)
235
+ response = get_async(resource_group_name, name, custom_headers).value!
156
236
  response.body unless response.nil?
157
237
  end
158
238
 
239
+ #
240
+ # Gets specified App Service Plan in a resource group
159
241
  #
160
242
  # Gets specified App Service Plan in a resource group
161
243
  #
@@ -166,10 +248,12 @@ module Azure::ARM::Web
166
248
  #
167
249
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
168
250
  #
169
- def get_server_farm_with_http_info(resource_group_name, name, custom_headers = nil)
170
- get_server_farm_async(resource_group_name, name, custom_headers).value!
251
+ def get_with_http_info(resource_group_name, name, custom_headers = nil)
252
+ get_async(resource_group_name, name, custom_headers).value!
171
253
  end
172
254
 
255
+ #
256
+ # Gets specified App Service Plan in a resource group
173
257
  #
174
258
  # Gets specified App Service Plan in a resource group
175
259
  #
@@ -180,11 +264,11 @@ module Azure::ARM::Web
180
264
  #
181
265
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
182
266
  #
183
- def get_server_farm_async(resource_group_name, name, custom_headers = nil)
267
+ def get_async(resource_group_name, name, custom_headers = nil)
184
268
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
185
269
  fail ArgumentError, 'name is nil' if name.nil?
186
270
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
187
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
271
+ api_version = '2016-09-01'
188
272
 
189
273
 
190
274
  request_headers = {}
@@ -199,7 +283,7 @@ module Azure::ARM::Web
199
283
  options = {
200
284
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
201
285
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
202
- query_params: {'api-version' => @client.api_version},
286
+ query_params: {'api-version' => api_version},
203
287
  headers: request_headers.merge(custom_headers || {}),
204
288
  base_url: request_url
205
289
  }
@@ -219,7 +303,7 @@ module Azure::ARM::Web
219
303
  if status_code == 200
220
304
  begin
221
305
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
222
- result_mapper = ServerFarmWithRichSku.mapper()
306
+ result_mapper = AppServicePlan.mapper()
223
307
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
224
308
  rescue Exception => e
225
309
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -232,30 +316,30 @@ module Azure::ARM::Web
232
316
  promise.execute
233
317
  end
234
318
 
319
+ #
320
+ # Creates or updates an App Service Plan
235
321
  #
236
322
  # Creates or updates an App Service Plan
237
323
  #
238
324
  # @param resource_group_name [String] Name of resource group
239
325
  # @param name [String] Name of App Service Plan
240
- # @param server_farm_envelope [ServerFarmWithRichSku] Details of App Service
241
- # Plan
326
+ # @param app_service_plan [AppServicePlan] Details of App Service Plan
242
327
  # @param allow_pending_state [Boolean] OBSOLETE: If true, allow pending state
243
328
  # for App Service Plan
244
329
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
245
330
  # will be added to the HTTP request.
246
331
  #
247
- # @return [ServerFarmWithRichSku] operation results.
332
+ # @return [AppServicePlan] operation results.
248
333
  #
249
- def create_or_update_server_farm(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil)
250
- response = create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state, custom_headers).value!
334
+ def create_or_update(resource_group_name, name, app_service_plan, allow_pending_state = nil, custom_headers = nil)
335
+ response = create_or_update_async(resource_group_name, name, app_service_plan, allow_pending_state, custom_headers).value!
251
336
  response.body unless response.nil?
252
337
  end
253
338
 
254
339
  #
255
340
  # @param resource_group_name [String] Name of resource group
256
341
  # @param name [String] Name of App Service Plan
257
- # @param server_farm_envelope [ServerFarmWithRichSku] Details of App Service
258
- # Plan
342
+ # @param app_service_plan [AppServicePlan] Details of App Service Plan
259
343
  # @param allow_pending_state [Boolean] OBSOLETE: If true, allow pending state
260
344
  # for App Service Plan
261
345
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -264,14 +348,14 @@ module Azure::ARM::Web
264
348
  # @return [Concurrent::Promise] promise which provides async access to http
265
349
  # response.
266
350
  #
267
- def create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil)
351
+ def create_or_update_async(resource_group_name, name, app_service_plan, allow_pending_state = nil, custom_headers = nil)
268
352
  # Send request
269
- promise = begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state, custom_headers)
353
+ promise = begin_create_or_update_async(resource_group_name, name, app_service_plan, allow_pending_state, custom_headers)
270
354
 
271
355
  promise = promise.then do |response|
272
356
  # Defining deserialization method.
273
357
  deserialize_method = lambda do |parsed_response|
274
- result_mapper = ServerFarmWithRichSku.mapper()
358
+ result_mapper = AppServicePlan.mapper()
275
359
  parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
276
360
  end
277
361
 
@@ -283,62 +367,55 @@ module Azure::ARM::Web
283
367
  end
284
368
 
285
369
  #
286
- # Creates or updates an App Service Plan
370
+ # Deletes a App Service Plan
371
+ #
372
+ # Deletes a App Service Plan
287
373
  #
288
374
  # @param resource_group_name [String] Name of resource group
289
375
  # @param name [String] Name of App Service Plan
290
- # @param server_farm_envelope [ServerFarmWithRichSku] Details of App Service
291
- # Plan
292
- # @param allow_pending_state [Boolean] OBSOLETE: If true, allow pending state
293
- # for App Service Plan
294
376
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
295
377
  # will be added to the HTTP request.
296
378
  #
297
- # @return [ServerFarmWithRichSku] operation results.
379
+ # @return [Object] operation results.
298
380
  #
299
- def begin_create_or_update_server_farm(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil)
300
- response = begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state, custom_headers).value!
381
+ def delete(resource_group_name, name, custom_headers = nil)
382
+ response = delete_async(resource_group_name, name, custom_headers).value!
301
383
  response.body unless response.nil?
302
384
  end
303
385
 
304
386
  #
305
- # Creates or updates an App Service Plan
387
+ # Deletes a App Service Plan
388
+ #
389
+ # Deletes a App Service Plan
306
390
  #
307
391
  # @param resource_group_name [String] Name of resource group
308
392
  # @param name [String] Name of App Service Plan
309
- # @param server_farm_envelope [ServerFarmWithRichSku] Details of App Service
310
- # Plan
311
- # @param allow_pending_state [Boolean] OBSOLETE: If true, allow pending state
312
- # for App Service Plan
313
393
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
314
394
  # will be added to the HTTP request.
315
395
  #
316
396
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
317
397
  #
318
- def begin_create_or_update_server_farm_with_http_info(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil)
319
- begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state, custom_headers).value!
398
+ def delete_with_http_info(resource_group_name, name, custom_headers = nil)
399
+ delete_async(resource_group_name, name, custom_headers).value!
320
400
  end
321
401
 
322
402
  #
323
- # Creates or updates an App Service Plan
403
+ # Deletes a App Service Plan
404
+ #
405
+ # Deletes a App Service Plan
324
406
  #
325
407
  # @param resource_group_name [String] Name of resource group
326
408
  # @param name [String] Name of App Service Plan
327
- # @param server_farm_envelope [ServerFarmWithRichSku] Details of App Service
328
- # Plan
329
- # @param allow_pending_state [Boolean] OBSOLETE: If true, allow pending state
330
- # for App Service Plan
331
409
  # @param [Hash{String => String}] A hash of custom headers that will be added
332
410
  # to the HTTP request.
333
411
  #
334
412
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
335
413
  #
336
- def begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil)
414
+ def delete_async(resource_group_name, name, custom_headers = nil)
337
415
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
338
416
  fail ArgumentError, 'name is nil' if name.nil?
339
- fail ArgumentError, 'server_farm_envelope is nil' if server_farm_envelope.nil?
340
417
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
341
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
418
+ api_version = '2016-09-01'
342
419
 
343
420
 
344
421
  request_headers = {}
@@ -346,14 +423,6 @@ module Azure::ARM::Web
346
423
  # Set Headers
347
424
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
348
425
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
349
-
350
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
351
-
352
- # Serialize Request
353
- request_mapper = ServerFarmWithRichSku.mapper()
354
- request_content = @client.serialize(request_mapper, server_farm_envelope, 'server_farm_envelope')
355
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
356
-
357
426
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'
358
427
 
359
428
  request_url = @base_url || @client.base_url
@@ -361,43 +430,22 @@ module Azure::ARM::Web
361
430
  options = {
362
431
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
363
432
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
364
- query_params: {'allowPendingState' => allow_pending_state,'api-version' => @client.api_version},
365
- body: request_content,
433
+ query_params: {'api-version' => api_version},
366
434
  headers: request_headers.merge(custom_headers || {}),
367
435
  base_url: request_url
368
436
  }
369
- promise = @client.make_request_async(:put, path_template, options)
437
+ promise = @client.make_request_async(:delete, path_template, options)
370
438
 
371
439
  promise = promise.then do |result|
372
440
  http_response = result.response
373
441
  status_code = http_response.status
374
442
  response_content = http_response.body
375
- unless status_code == 200 || status_code == 202
443
+ unless status_code == 200
376
444
  error_model = JSON.load(response_content)
377
445
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
378
446
  end
379
447
 
380
448
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
381
- # Deserialize Response
382
- if status_code == 200
383
- begin
384
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
385
- result_mapper = ServerFarmWithRichSku.mapper()
386
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
387
- rescue Exception => e
388
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
389
- end
390
- end
391
- # Deserialize Response
392
- if status_code == 202
393
- begin
394
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
395
- result_mapper = ServerFarmWithRichSku.mapper()
396
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
397
- rescue Exception => e
398
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
399
- end
400
- end
401
449
 
402
450
  result
403
451
  end
@@ -406,49 +454,55 @@ module Azure::ARM::Web
406
454
  end
407
455
 
408
456
  #
409
- # Deletes a App Service Plan
457
+ # List serverfarm capabilities
410
458
  #
411
- # @param resource_group_name [String] Name of resource group
412
- # @param name [String] Name of App Service Plan
459
+ # List serverfarm capabilities
460
+ #
461
+ # @param resource_group_name [String] The resource group name
462
+ # @param name [String] The name of the App Service Plan
413
463
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
414
464
  # will be added to the HTTP request.
415
465
  #
416
- # @return [Object] operation results.
466
+ # @return [Array] operation results.
417
467
  #
418
- def delete_server_farm(resource_group_name, name, custom_headers = nil)
419
- response = delete_server_farm_async(resource_group_name, name, custom_headers).value!
468
+ def list_capabilities(resource_group_name, name, custom_headers = nil)
469
+ response = list_capabilities_async(resource_group_name, name, custom_headers).value!
420
470
  response.body unless response.nil?
421
471
  end
422
472
 
423
473
  #
424
- # Deletes a App Service Plan
474
+ # List serverfarm capabilities
425
475
  #
426
- # @param resource_group_name [String] Name of resource group
427
- # @param name [String] Name of App Service Plan
476
+ # List serverfarm capabilities
477
+ #
478
+ # @param resource_group_name [String] The resource group name
479
+ # @param name [String] The name of the App Service Plan
428
480
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
429
481
  # will be added to the HTTP request.
430
482
  #
431
483
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
432
484
  #
433
- def delete_server_farm_with_http_info(resource_group_name, name, custom_headers = nil)
434
- delete_server_farm_async(resource_group_name, name, custom_headers).value!
485
+ def list_capabilities_with_http_info(resource_group_name, name, custom_headers = nil)
486
+ list_capabilities_async(resource_group_name, name, custom_headers).value!
435
487
  end
436
488
 
437
489
  #
438
- # Deletes a App Service Plan
490
+ # List serverfarm capabilities
439
491
  #
440
- # @param resource_group_name [String] Name of resource group
441
- # @param name [String] Name of App Service Plan
492
+ # List serverfarm capabilities
493
+ #
494
+ # @param resource_group_name [String] The resource group name
495
+ # @param name [String] The name of the App Service Plan
442
496
  # @param [Hash{String => String}] A hash of custom headers that will be added
443
497
  # to the HTTP request.
444
498
  #
445
499
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
446
500
  #
447
- def delete_server_farm_async(resource_group_name, name, custom_headers = nil)
501
+ def list_capabilities_async(resource_group_name, name, custom_headers = nil)
448
502
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
449
503
  fail ArgumentError, 'name is nil' if name.nil?
450
504
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
451
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
505
+ api_version = '2016-09-01'
452
506
 
453
507
 
454
508
  request_headers = {}
@@ -456,18 +510,18 @@ module Azure::ARM::Web
456
510
  # Set Headers
457
511
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
458
512
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
459
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'
513
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'
460
514
 
461
515
  request_url = @base_url || @client.base_url
462
516
 
463
517
  options = {
464
518
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
465
519
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
466
- query_params: {'api-version' => @client.api_version},
520
+ query_params: {'api-version' => api_version},
467
521
  headers: request_headers.merge(custom_headers || {}),
468
522
  base_url: request_url
469
523
  }
470
- promise = @client.make_request_async(:delete, path_template, options)
524
+ promise = @client.make_request_async(:get, path_template, options)
471
525
 
472
526
  promise = promise.then do |result|
473
527
  http_response = result.response
@@ -479,6 +533,30 @@ module Azure::ARM::Web
479
533
  end
480
534
 
481
535
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
536
+ # Deserialize Response
537
+ if status_code == 200
538
+ begin
539
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
540
+ result_mapper = {
541
+ required: false,
542
+ serialized_name: 'parsed_response',
543
+ type: {
544
+ name: 'Sequence',
545
+ element: {
546
+ required: false,
547
+ serialized_name: 'CapabilityElementType',
548
+ type: {
549
+ name: 'Composite',
550
+ class_name: 'Capability'
551
+ }
552
+ }
553
+ }
554
+ }
555
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
556
+ rescue Exception => e
557
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
558
+ end
559
+ end
482
560
 
483
561
  result
484
562
  end
@@ -487,99 +565,69 @@ module Azure::ARM::Web
487
565
  end
488
566
 
489
567
  #
490
- # Queries for App Serice Plan metrics
491
- #
492
- # @param resource_group_name [String] Name of resource group
493
- # @param name [String] Name of App Service Plan
494
- # @param details [Boolean] If true, metrics are broken down per App Service
495
- # Plan instance
496
- # @param filter [String] Return only usages/metrics specified in the filter.
497
- # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1'
498
- # or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and
499
- # endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
500
- # duration'[Hour|Minute|Day]'.
501
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
502
- # will be added to the HTTP request.
503
- #
504
- # @return [ResourceMetricCollection] which provide lazy access to pages of the
505
- # response.
506
- #
507
- def get_server_farm_metrics_as_lazy(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
508
- response = get_server_farm_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
509
- unless response.nil?
510
- page = response.body
511
- page.next_method = Proc.new do |next_page_link|
512
- get_server_farm_metrics_next_async(next_page_link, custom_headers)
513
- end
514
- page
515
- end
516
- end
517
-
568
+ # Retrieves a specific Service Bus Hybrid Connection in use on this App Service
569
+ # Plan.
518
570
  #
519
- # Queries for App Serice Plan metrics
571
+ # Retrieves a specific Service Bus Hybrid Connection in use on this App Service
572
+ # Plan.
520
573
  #
521
- # @param resource_group_name [String] Name of resource group
522
- # @param name [String] Name of App Service Plan
523
- # @param details [Boolean] If true, metrics are broken down per App Service
524
- # Plan instance
525
- # @param filter [String] Return only usages/metrics specified in the filter.
526
- # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1'
527
- # or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and
528
- # endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
529
- # duration'[Hour|Minute|Day]'.
574
+ # @param resource_group_name [String] The resource group name
575
+ # @param name [String] The name of the App Service Plan
576
+ # @param namespace_name [String] The name of the Service Bus Namespace
577
+ # @param relay_name [String] The name of the Service Bus Relay
530
578
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
531
579
  # will be added to the HTTP request.
532
580
  #
533
- # @return [Array<ResourceMetric>] operation results.
581
+ # @return [HybridConnection] operation results.
534
582
  #
535
- def get_server_farm_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
536
- first_page = get_server_farm_metrics_as_lazy(resource_group_name, name, details, filter, custom_headers)
537
- first_page.get_all_items
583
+ def get_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
584
+ response = get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value!
585
+ response.body unless response.nil?
538
586
  end
539
587
 
540
588
  #
541
- # Queries for App Serice Plan metrics
589
+ # Retrieves a specific Service Bus Hybrid Connection in use on this App Service
590
+ # Plan.
542
591
  #
543
- # @param resource_group_name [String] Name of resource group
544
- # @param name [String] Name of App Service Plan
545
- # @param details [Boolean] If true, metrics are broken down per App Service
546
- # Plan instance
547
- # @param filter [String] Return only usages/metrics specified in the filter.
548
- # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1'
549
- # or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and
550
- # endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
551
- # duration'[Hour|Minute|Day]'.
592
+ # Retrieves a specific Service Bus Hybrid Connection in use on this App Service
593
+ # Plan.
594
+ #
595
+ # @param resource_group_name [String] The resource group name
596
+ # @param name [String] The name of the App Service Plan
597
+ # @param namespace_name [String] The name of the Service Bus Namespace
598
+ # @param relay_name [String] The name of the Service Bus Relay
552
599
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
553
600
  # will be added to the HTTP request.
554
601
  #
555
602
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
556
603
  #
557
- def get_server_farm_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
558
- get_server_farm_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
604
+ def get_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
605
+ get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value!
559
606
  end
560
607
 
561
608
  #
562
- # Queries for App Serice Plan metrics
609
+ # Retrieves a specific Service Bus Hybrid Connection in use on this App Service
610
+ # Plan.
563
611
  #
564
- # @param resource_group_name [String] Name of resource group
565
- # @param name [String] Name of App Service Plan
566
- # @param details [Boolean] If true, metrics are broken down per App Service
567
- # Plan instance
568
- # @param filter [String] Return only usages/metrics specified in the filter.
569
- # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1'
570
- # or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and
571
- # endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
572
- # duration'[Hour|Minute|Day]'.
612
+ # Retrieves a specific Service Bus Hybrid Connection in use on this App Service
613
+ # Plan.
614
+ #
615
+ # @param resource_group_name [String] The resource group name
616
+ # @param name [String] The name of the App Service Plan
617
+ # @param namespace_name [String] The name of the Service Bus Namespace
618
+ # @param relay_name [String] The name of the Service Bus Relay
573
619
  # @param [Hash{String => String}] A hash of custom headers that will be added
574
620
  # to the HTTP request.
575
621
  #
576
622
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
577
623
  #
578
- def get_server_farm_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
624
+ def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
579
625
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
580
626
  fail ArgumentError, 'name is nil' if name.nil?
627
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
628
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
581
629
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
582
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
630
+ api_version = '2016-09-01'
583
631
 
584
632
 
585
633
  request_headers = {}
@@ -587,14 +635,14 @@ module Azure::ARM::Web
587
635
  # Set Headers
588
636
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
589
637
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
590
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'
638
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'
591
639
 
592
640
  request_url = @base_url || @client.base_url
593
641
 
594
642
  options = {
595
643
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
596
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
597
- query_params: {'details' => details,'$filter' => filter,'api-version' => @client.api_version},
644
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
645
+ query_params: {'api-version' => api_version},
598
646
  headers: request_headers.merge(custom_headers || {}),
599
647
  base_url: request_url
600
648
  }
@@ -614,7 +662,7 @@ module Azure::ARM::Web
614
662
  if status_code == 200
615
663
  begin
616
664
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
617
- result_mapper = ResourceMetricCollection.mapper()
665
+ result_mapper = HybridConnection.mapper()
618
666
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
619
667
  rescue Exception => e
620
668
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -628,71 +676,73 @@ module Azure::ARM::Web
628
676
  end
629
677
 
630
678
  #
631
- # List of metrics that can be queried for an App Service Plan
679
+ # Updates an existing Service Bus Hybrid Connection in use on this App Service
680
+ # Plan. This will fail if the Hybrid Connection does not already exist.
632
681
  #
633
- # @param resource_group_name [String] Name of resource group
634
- # @param name [String] Name of App Service Plan
682
+ # Updates an existing Service Bus Hybrid Connection in use on this App Service
683
+ # Plan. This will fail if the Hybrid Connection does not already exist.
684
+ #
685
+ # @param resource_group_name [String] The resource group name
686
+ # @param name [String] The name of the App Service Plan
687
+ # @param namespace_name [String] The name of the Service Bus Namespace
688
+ # @param relay_name [String] The name of the Service Bus Relay
689
+ # @param connection [HybridConnection] The hybrid connection entity
635
690
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
636
691
  # will be added to the HTTP request.
637
692
  #
638
- # @return [MetricDefinitionCollection] which provide lazy access to pages of
639
- # the response.
693
+ # @return [HybridConnection] operation results.
640
694
  #
641
- def get_server_farm_metric_defintions_as_lazy(resource_group_name, name, custom_headers = nil)
642
- response = get_server_farm_metric_defintions_async(resource_group_name, name, custom_headers).value!
643
- unless response.nil?
644
- page = response.body
645
- page.next_method = Proc.new do |next_page_link|
646
- get_server_farm_metric_defintions_next_async(next_page_link, custom_headers)
647
- end
648
- page
649
- end
695
+ def update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection, custom_headers = nil)
696
+ response = update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection, custom_headers).value!
697
+ response.body unless response.nil?
650
698
  end
651
699
 
652
700
  #
653
- # List of metrics that can be queried for an App Service Plan
701
+ # Updates an existing Service Bus Hybrid Connection in use on this App Service
702
+ # Plan. This will fail if the Hybrid Connection does not already exist.
654
703
  #
655
- # @param resource_group_name [String] Name of resource group
656
- # @param name [String] Name of App Service Plan
704
+ # Updates an existing Service Bus Hybrid Connection in use on this App Service
705
+ # Plan. This will fail if the Hybrid Connection does not already exist.
706
+ #
707
+ # @param resource_group_name [String] The resource group name
708
+ # @param name [String] The name of the App Service Plan
709
+ # @param namespace_name [String] The name of the Service Bus Namespace
710
+ # @param relay_name [String] The name of the Service Bus Relay
711
+ # @param connection [HybridConnection] The hybrid connection entity
657
712
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
658
713
  # will be added to the HTTP request.
659
714
  #
660
- # @return [Array<MetricDefinition>] operation results.
715
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
661
716
  #
662
- def get_server_farm_metric_defintions(resource_group_name, name, custom_headers = nil)
663
- first_page = get_server_farm_metric_defintions_as_lazy(resource_group_name, name, custom_headers)
664
- first_page.get_all_items
717
+ def update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection, custom_headers = nil)
718
+ update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection, custom_headers).value!
665
719
  end
666
720
 
667
721
  #
668
- # List of metrics that can be queried for an App Service Plan
669
- #
670
- # @param resource_group_name [String] Name of resource group
671
- # @param name [String] Name of App Service Plan
672
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
673
- # will be added to the HTTP request.
722
+ # Updates an existing Service Bus Hybrid Connection in use on this App Service
723
+ # Plan. This will fail if the Hybrid Connection does not already exist.
674
724
  #
675
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
725
+ # Updates an existing Service Bus Hybrid Connection in use on this App Service
726
+ # Plan. This will fail if the Hybrid Connection does not already exist.
676
727
  #
677
- def get_server_farm_metric_defintions_with_http_info(resource_group_name, name, custom_headers = nil)
678
- get_server_farm_metric_defintions_async(resource_group_name, name, custom_headers).value!
679
- end
680
-
681
- #
682
- # List of metrics that can be queried for an App Service Plan
683
- #
684
- # @param resource_group_name [String] Name of resource group
685
- # @param name [String] Name of App Service Plan
728
+ # @param resource_group_name [String] The resource group name
729
+ # @param name [String] The name of the App Service Plan
730
+ # @param namespace_name [String] The name of the Service Bus Namespace
731
+ # @param relay_name [String] The name of the Service Bus Relay
732
+ # @param connection [HybridConnection] The hybrid connection entity
686
733
  # @param [Hash{String => String}] A hash of custom headers that will be added
687
734
  # to the HTTP request.
688
735
  #
689
736
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
690
737
  #
691
- def get_server_farm_metric_defintions_async(resource_group_name, name, custom_headers = nil)
738
+ def update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection, custom_headers = nil)
692
739
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
693
740
  fail ArgumentError, 'name is nil' if name.nil?
741
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
742
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
743
+ fail ArgumentError, 'connection is nil' if connection.nil?
694
744
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
695
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
745
+ api_version = '2016-09-01'
696
746
 
697
747
 
698
748
  request_headers = {}
@@ -700,18 +750,27 @@ module Azure::ARM::Web
700
750
  # Set Headers
701
751
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
702
752
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
703
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'
753
+
754
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
755
+
756
+ # Serialize Request
757
+ request_mapper = HybridConnection.mapper()
758
+ request_content = @client.serialize(request_mapper, connection, 'connection')
759
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
760
+
761
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'
704
762
 
705
763
  request_url = @base_url || @client.base_url
706
764
 
707
765
  options = {
708
766
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
709
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
710
- query_params: {'api-version' => @client.api_version},
767
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
768
+ query_params: {'api-version' => api_version},
769
+ body: request_content,
711
770
  headers: request_headers.merge(custom_headers || {}),
712
771
  base_url: request_url
713
772
  }
714
- promise = @client.make_request_async(:get, path_template, options)
773
+ promise = @client.make_request_async(:put, path_template, options)
715
774
 
716
775
  promise = promise.then do |result|
717
776
  http_response = result.response
@@ -727,7 +786,7 @@ module Azure::ARM::Web
727
786
  if status_code == 200
728
787
  begin
729
788
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
730
- result_mapper = MetricDefinitionCollection.mapper()
789
+ result_mapper = HybridConnection.mapper()
731
790
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
732
791
  rescue Exception => e
733
792
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -741,49 +800,69 @@ module Azure::ARM::Web
741
800
  end
742
801
 
743
802
  #
744
- # Gets list of vnets associated with App Service Plan
803
+ # Deletes an existing Service Bus Hybrid Connection in use on this App Service
804
+ # Plan.
745
805
  #
746
- # @param resource_group_name [String] Name of resource group
747
- # @param name [String] Name of App Service Plan
806
+ # Deletes an existing Service Bus Hybrid Connection in use on this App Service
807
+ # Plan.
808
+ #
809
+ # @param resource_group_name [String] The resource group name
810
+ # @param name [String] The name of the App Service Plan
811
+ # @param namespace_name [String] The name of the Service Bus Namespace
812
+ # @param relay_name [String] The name of the Service Bus Relay
748
813
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
749
814
  # will be added to the HTTP request.
750
815
  #
751
- # @return [Array] operation results.
816
+ # @return [Object] operation results.
752
817
  #
753
- def get_vnets_for_server_farm(resource_group_name, name, custom_headers = nil)
754
- response = get_vnets_for_server_farm_async(resource_group_name, name, custom_headers).value!
818
+ def delete_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
819
+ response = delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value!
755
820
  response.body unless response.nil?
756
821
  end
757
822
 
758
823
  #
759
- # Gets list of vnets associated with App Service Plan
824
+ # Deletes an existing Service Bus Hybrid Connection in use on this App Service
825
+ # Plan.
760
826
  #
761
- # @param resource_group_name [String] Name of resource group
762
- # @param name [String] Name of App Service Plan
827
+ # Deletes an existing Service Bus Hybrid Connection in use on this App Service
828
+ # Plan.
829
+ #
830
+ # @param resource_group_name [String] The resource group name
831
+ # @param name [String] The name of the App Service Plan
832
+ # @param namespace_name [String] The name of the Service Bus Namespace
833
+ # @param relay_name [String] The name of the Service Bus Relay
763
834
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
764
835
  # will be added to the HTTP request.
765
836
  #
766
837
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
767
838
  #
768
- def get_vnets_for_server_farm_with_http_info(resource_group_name, name, custom_headers = nil)
769
- get_vnets_for_server_farm_async(resource_group_name, name, custom_headers).value!
839
+ def delete_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
840
+ delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value!
770
841
  end
771
842
 
772
843
  #
773
- # Gets list of vnets associated with App Service Plan
844
+ # Deletes an existing Service Bus Hybrid Connection in use on this App Service
845
+ # Plan.
774
846
  #
775
- # @param resource_group_name [String] Name of resource group
776
- # @param name [String] Name of App Service Plan
847
+ # Deletes an existing Service Bus Hybrid Connection in use on this App Service
848
+ # Plan.
849
+ #
850
+ # @param resource_group_name [String] The resource group name
851
+ # @param name [String] The name of the App Service Plan
852
+ # @param namespace_name [String] The name of the Service Bus Namespace
853
+ # @param relay_name [String] The name of the Service Bus Relay
777
854
  # @param [Hash{String => String}] A hash of custom headers that will be added
778
855
  # to the HTTP request.
779
856
  #
780
857
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
781
858
  #
782
- def get_vnets_for_server_farm_async(resource_group_name, name, custom_headers = nil)
859
+ def delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
783
860
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
784
861
  fail ArgumentError, 'name is nil' if name.nil?
862
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
863
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
785
864
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
786
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
865
+ api_version = '2016-09-01'
787
866
 
788
867
 
789
868
  request_headers = {}
@@ -791,18 +870,18 @@ module Azure::ARM::Web
791
870
  # Set Headers
792
871
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
793
872
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
794
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'
873
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'
795
874
 
796
875
  request_url = @base_url || @client.base_url
797
876
 
798
877
  options = {
799
878
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
800
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
801
- query_params: {'api-version' => @client.api_version},
879
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
880
+ query_params: {'api-version' => api_version},
802
881
  headers: request_headers.merge(custom_headers || {}),
803
882
  base_url: request_url
804
883
  }
805
- promise = @client.make_request_async(:get, path_template, options)
884
+ promise = @client.make_request_async(:delete, path_template, options)
806
885
 
807
886
  promise = promise.then do |result|
808
887
  http_response = result.response
@@ -814,30 +893,6 @@ module Azure::ARM::Web
814
893
  end
815
894
 
816
895
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
817
- # Deserialize Response
818
- if status_code == 200
819
- begin
820
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
821
- result_mapper = {
822
- required: false,
823
- serialized_name: 'parsed_response',
824
- type: {
825
- name: 'Sequence',
826
- element: {
827
- required: false,
828
- serialized_name: 'VnetInfoElementType',
829
- type: {
830
- name: 'Composite',
831
- class_name: 'VnetInfo'
832
- }
833
- }
834
- }
835
- }
836
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
837
- rescue Exception => e
838
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
839
- end
840
- end
841
896
 
842
897
  result
843
898
  end
@@ -846,53 +901,63 @@ module Azure::ARM::Web
846
901
  end
847
902
 
848
903
  #
849
- # Gets a vnet associated with an App Service Plan
904
+ # Gets the send key name and value for this Hybrid Connection
850
905
  #
851
- # @param resource_group_name [String] Name of resource group
852
- # @param name [String] Name of App Service Plan
853
- # @param vnet_name [String] Name of virtual network
906
+ # Gets the send key name and value for this Hybrid Connection
907
+ #
908
+ # @param resource_group_name [String] The resource group name
909
+ # @param name [String] The name of the App Service Plan
910
+ # @param namespace_name [String] The name of the Service Bus Namespace
911
+ # @param relay_name [String] The name of the Service Bus Relay
854
912
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
855
913
  # will be added to the HTTP request.
856
914
  #
857
- # @return [VnetInfo] operation results.
915
+ # @return [HybridConnectionKey] operation results.
858
916
  #
859
- def get_vnet_from_server_farm(resource_group_name, name, vnet_name, custom_headers = nil)
860
- response = get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers).value!
917
+ def list_hybrid_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
918
+ response = list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value!
861
919
  response.body unless response.nil?
862
920
  end
863
921
 
864
922
  #
865
- # Gets a vnet associated with an App Service Plan
923
+ # Gets the send key name and value for this Hybrid Connection
866
924
  #
867
- # @param resource_group_name [String] Name of resource group
868
- # @param name [String] Name of App Service Plan
869
- # @param vnet_name [String] Name of virtual network
925
+ # Gets the send key name and value for this Hybrid Connection
926
+ #
927
+ # @param resource_group_name [String] The resource group name
928
+ # @param name [String] The name of the App Service Plan
929
+ # @param namespace_name [String] The name of the Service Bus Namespace
930
+ # @param relay_name [String] The name of the Service Bus Relay
870
931
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
871
932
  # will be added to the HTTP request.
872
933
  #
873
934
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
874
935
  #
875
- def get_vnet_from_server_farm_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil)
876
- get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers).value!
936
+ def list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
937
+ list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value!
877
938
  end
878
939
 
879
940
  #
880
- # Gets a vnet associated with an App Service Plan
941
+ # Gets the send key name and value for this Hybrid Connection
881
942
  #
882
- # @param resource_group_name [String] Name of resource group
883
- # @param name [String] Name of App Service Plan
884
- # @param vnet_name [String] Name of virtual network
943
+ # Gets the send key name and value for this Hybrid Connection
944
+ #
945
+ # @param resource_group_name [String] The resource group name
946
+ # @param name [String] The name of the App Service Plan
947
+ # @param namespace_name [String] The name of the Service Bus Namespace
948
+ # @param relay_name [String] The name of the Service Bus Relay
885
949
  # @param [Hash{String => String}] A hash of custom headers that will be added
886
950
  # to the HTTP request.
887
951
  #
888
952
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
889
953
  #
890
- def get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers = nil)
954
+ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
891
955
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
892
956
  fail ArgumentError, 'name is nil' if name.nil?
893
- fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
957
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
958
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
894
959
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
895
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
960
+ api_version = '2016-09-01'
896
961
 
897
962
 
898
963
  request_headers = {}
@@ -900,24 +965,24 @@ module Azure::ARM::Web
900
965
  # Set Headers
901
966
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
902
967
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
903
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'
968
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'
904
969
 
905
970
  request_url = @base_url || @client.base_url
906
971
 
907
972
  options = {
908
973
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
909
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id},
910
- query_params: {'api-version' => @client.api_version},
974
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
975
+ query_params: {'api-version' => api_version},
911
976
  headers: request_headers.merge(custom_headers || {}),
912
977
  base_url: request_url
913
978
  }
914
- promise = @client.make_request_async(:get, path_template, options)
979
+ promise = @client.make_request_async(:post, path_template, options)
915
980
 
916
981
  promise = promise.then do |result|
917
982
  http_response = result.response
918
983
  status_code = http_response.status
919
984
  response_content = http_response.body
920
- unless status_code == 200 || status_code == 404
985
+ unless status_code == 200
921
986
  error_model = JSON.load(response_content)
922
987
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
923
988
  end
@@ -927,7 +992,7 @@ module Azure::ARM::Web
927
992
  if status_code == 200
928
993
  begin
929
994
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
930
- result_mapper = VnetInfo.mapper()
995
+ result_mapper = HybridConnectionKey.mapper()
931
996
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
932
997
  rescue Exception => e
933
998
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -941,53 +1006,69 @@ module Azure::ARM::Web
941
1006
  end
942
1007
 
943
1008
  #
944
- # Gets a list of all routes associated with a vnet, in an app service plan
1009
+ # Gets a list of sites that are using a particular Hybrid Connection on an App
1010
+ # Service Plan
945
1011
  #
946
- # @param resource_group_name [String] Name of resource group
947
- # @param name [String] Name of App Service Plan
948
- # @param vnet_name [String] Name of virtual network
1012
+ # Gets a list of sites that are using a particular Hybrid Connection on an App
1013
+ # Service Plan
1014
+ #
1015
+ # @param resource_group_name [String] The resource group
1016
+ # @param name [String] The name of the App Service Plan
1017
+ # @param namespace_name [String] The Hybrid Connection namespace
1018
+ # @param relay_name [String] The Hybrid Connection relay name
949
1019
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
950
1020
  # will be added to the HTTP request.
951
1021
  #
952
- # @return [Array] operation results.
1022
+ # @return [Object] operation results.
953
1023
  #
954
- def get_routes_for_vnet(resource_group_name, name, vnet_name, custom_headers = nil)
955
- response = get_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers).value!
1024
+ def list_hybrid_connection_web_apps(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
1025
+ response = list_hybrid_connection_web_apps_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value!
956
1026
  response.body unless response.nil?
957
1027
  end
958
1028
 
959
1029
  #
960
- # Gets a list of all routes associated with a vnet, in an app service plan
1030
+ # Gets a list of sites that are using a particular Hybrid Connection on an App
1031
+ # Service Plan
961
1032
  #
962
- # @param resource_group_name [String] Name of resource group
963
- # @param name [String] Name of App Service Plan
964
- # @param vnet_name [String] Name of virtual network
1033
+ # Gets a list of sites that are using a particular Hybrid Connection on an App
1034
+ # Service Plan
1035
+ #
1036
+ # @param resource_group_name [String] The resource group
1037
+ # @param name [String] The name of the App Service Plan
1038
+ # @param namespace_name [String] The Hybrid Connection namespace
1039
+ # @param relay_name [String] The Hybrid Connection relay name
965
1040
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
966
1041
  # will be added to the HTTP request.
967
1042
  #
968
1043
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
969
1044
  #
970
- def get_routes_for_vnet_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil)
971
- get_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers).value!
1045
+ def list_hybrid_connection_web_apps_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
1046
+ list_hybrid_connection_web_apps_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value!
972
1047
  end
973
1048
 
974
1049
  #
975
- # Gets a list of all routes associated with a vnet, in an app service plan
1050
+ # Gets a list of sites that are using a particular Hybrid Connection on an App
1051
+ # Service Plan
976
1052
  #
977
- # @param resource_group_name [String] Name of resource group
978
- # @param name [String] Name of App Service Plan
979
- # @param vnet_name [String] Name of virtual network
1053
+ # Gets a list of sites that are using a particular Hybrid Connection on an App
1054
+ # Service Plan
1055
+ #
1056
+ # @param resource_group_name [String] The resource group
1057
+ # @param name [String] The name of the App Service Plan
1058
+ # @param namespace_name [String] The Hybrid Connection namespace
1059
+ # @param relay_name [String] The Hybrid Connection relay name
980
1060
  # @param [Hash{String => String}] A hash of custom headers that will be added
981
1061
  # to the HTTP request.
982
1062
  #
983
1063
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
984
1064
  #
985
- def get_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers = nil)
1065
+ def list_hybrid_connection_web_apps_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil)
986
1066
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
987
1067
  fail ArgumentError, 'name is nil' if name.nil?
988
- fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
1068
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1069
+ fail ArgumentError, 'relay_name is nil' if relay_name.nil?
989
1070
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
990
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1071
+ api_version = '2016-09-01'
991
1072
 
992
1073
 
993
1074
  request_headers = {}
@@ -995,14 +1076,14 @@ module Azure::ARM::Web
995
1076
  # Set Headers
996
1077
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
997
1078
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
998
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'
1079
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'
999
1080
 
1000
1081
  request_url = @base_url || @client.base_url
1001
1082
 
1002
1083
  options = {
1003
1084
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1004
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id},
1005
- query_params: {'api-version' => @client.api_version},
1085
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id},
1086
+ query_params: {'api-version' => api_version},
1006
1087
  headers: request_headers.merge(custom_headers || {}),
1007
1088
  base_url: request_url
1008
1089
  }
@@ -1018,30 +1099,6 @@ module Azure::ARM::Web
1018
1099
  end
1019
1100
 
1020
1101
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1021
- # Deserialize Response
1022
- if status_code == 200
1023
- begin
1024
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1025
- result_mapper = {
1026
- required: false,
1027
- serialized_name: 'parsed_response',
1028
- type: {
1029
- name: 'Sequence',
1030
- element: {
1031
- required: false,
1032
- serialized_name: 'VnetRouteElementType',
1033
- type: {
1034
- name: 'Composite',
1035
- class_name: 'VnetRoute'
1036
- }
1037
- }
1038
- }
1039
- }
1040
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1041
- rescue Exception => e
1042
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1043
- end
1044
- end
1045
1102
 
1046
1103
  result
1047
1104
  end
@@ -1050,57 +1107,61 @@ module Azure::ARM::Web
1050
1107
  end
1051
1108
 
1052
1109
  #
1053
- # Gets a specific route associated with a vnet, in an app service plan
1110
+ # Gets the maximum number of Hybrid Connections allowed on a specified App
1111
+ # Service Plan
1054
1112
  #
1055
- # @param resource_group_name [String] Name of resource group
1056
- # @param name [String] Name of App Service Plan
1057
- # @param vnet_name [String] Name of virtual network
1058
- # @param route_name [String] Name of the virtual network route
1113
+ # Gets the maximum number of Hybrid Connections allowed on a specified App
1114
+ # Service Plan
1115
+ #
1116
+ # @param resource_group_name [String] The resource group
1117
+ # @param name [String] The name of the App Service Plan
1059
1118
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1060
1119
  # will be added to the HTTP request.
1061
1120
  #
1062
- # @return [Array] operation results.
1121
+ # @return [Object] operation results.
1063
1122
  #
1064
- def get_route_for_vnet(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
1065
- response = get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers).value!
1123
+ def get_hybrid_connection_plan_limit(resource_group_name, name, custom_headers = nil)
1124
+ response = get_hybrid_connection_plan_limit_async(resource_group_name, name, custom_headers).value!
1066
1125
  response.body unless response.nil?
1067
1126
  end
1068
1127
 
1069
1128
  #
1070
- # Gets a specific route associated with a vnet, in an app service plan
1129
+ # Gets the maximum number of Hybrid Connections allowed on a specified App
1130
+ # Service Plan
1071
1131
  #
1072
- # @param resource_group_name [String] Name of resource group
1073
- # @param name [String] Name of App Service Plan
1074
- # @param vnet_name [String] Name of virtual network
1075
- # @param route_name [String] Name of the virtual network route
1132
+ # Gets the maximum number of Hybrid Connections allowed on a specified App
1133
+ # Service Plan
1134
+ #
1135
+ # @param resource_group_name [String] The resource group
1136
+ # @param name [String] The name of the App Service Plan
1076
1137
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1077
1138
  # will be added to the HTTP request.
1078
1139
  #
1079
1140
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1080
1141
  #
1081
- def get_route_for_vnet_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
1082
- get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers).value!
1142
+ def get_hybrid_connection_plan_limit_with_http_info(resource_group_name, name, custom_headers = nil)
1143
+ get_hybrid_connection_plan_limit_async(resource_group_name, name, custom_headers).value!
1083
1144
  end
1084
1145
 
1085
1146
  #
1086
- # Gets a specific route associated with a vnet, in an app service plan
1147
+ # Gets the maximum number of Hybrid Connections allowed on a specified App
1148
+ # Service Plan
1087
1149
  #
1088
- # @param resource_group_name [String] Name of resource group
1089
- # @param name [String] Name of App Service Plan
1090
- # @param vnet_name [String] Name of virtual network
1091
- # @param route_name [String] Name of the virtual network route
1150
+ # Gets the maximum number of Hybrid Connections allowed on a specified App
1151
+ # Service Plan
1152
+ #
1153
+ # @param resource_group_name [String] The resource group
1154
+ # @param name [String] The name of the App Service Plan
1092
1155
  # @param [Hash{String => String}] A hash of custom headers that will be added
1093
1156
  # to the HTTP request.
1094
1157
  #
1095
1158
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1096
1159
  #
1097
- def get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
1160
+ def get_hybrid_connection_plan_limit_async(resource_group_name, name, custom_headers = nil)
1098
1161
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1099
1162
  fail ArgumentError, 'name is nil' if name.nil?
1100
- fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
1101
- fail ArgumentError, 'route_name is nil' if route_name.nil?
1102
1163
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1103
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1164
+ api_version = '2016-09-01'
1104
1165
 
1105
1166
 
1106
1167
  request_headers = {}
@@ -1108,14 +1169,14 @@ module Azure::ARM::Web
1108
1169
  # Set Headers
1109
1170
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1110
1171
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1111
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
1172
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'
1112
1173
 
1113
1174
  request_url = @base_url || @client.base_url
1114
1175
 
1115
1176
  options = {
1116
1177
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1117
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
1118
- query_params: {'api-version' => @client.api_version},
1178
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1179
+ query_params: {'api-version' => api_version},
1119
1180
  headers: request_headers.merge(custom_headers || {}),
1120
1181
  base_url: request_url
1121
1182
  }
@@ -1125,36 +1186,12 @@ module Azure::ARM::Web
1125
1186
  http_response = result.response
1126
1187
  status_code = http_response.status
1127
1188
  response_content = http_response.body
1128
- unless status_code == 200 || status_code == 404
1189
+ unless status_code == 200
1129
1190
  error_model = JSON.load(response_content)
1130
1191
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1131
1192
  end
1132
1193
 
1133
1194
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1134
- # Deserialize Response
1135
- if status_code == 200
1136
- begin
1137
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1138
- result_mapper = {
1139
- required: false,
1140
- serialized_name: 'parsed_response',
1141
- type: {
1142
- name: 'Sequence',
1143
- element: {
1144
- required: false,
1145
- serialized_name: 'VnetRouteElementType',
1146
- type: {
1147
- name: 'Composite',
1148
- class_name: 'VnetRoute'
1149
- }
1150
- }
1151
- }
1152
- }
1153
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1154
- rescue Exception => e
1155
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1156
- end
1157
- end
1158
1195
 
1159
1196
  result
1160
1197
  end
@@ -1163,64 +1200,55 @@ module Azure::ARM::Web
1163
1200
  end
1164
1201
 
1165
1202
  #
1166
- # Creates a new route or updates an existing route for a vnet in an app
1167
- # service plan.
1203
+ # Retrieves all Service Bus Hybrid Connections in use on this App Service Plan
1168
1204
  #
1169
- # @param resource_group_name [String] Name of resource group
1170
- # @param name [String] Name of App Service Plan
1171
- # @param vnet_name [String] Name of virtual network
1172
- # @param route_name [String] Name of the virtual network route
1173
- # @param route [VnetRoute] The route object
1205
+ # Retrieves all Service Bus Hybrid Connections in use on this App Service Plan
1206
+ #
1207
+ # @param resource_group_name [String] The resource group name
1208
+ # @param name [String] The name of the App Service Plan
1174
1209
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1175
1210
  # will be added to the HTTP request.
1176
1211
  #
1177
- # @return [VnetRoute] operation results.
1212
+ # @return [HybridConnection] operation results.
1178
1213
  #
1179
- def create_or_update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
1180
- response = create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value!
1214
+ def list_hybrid_connections(resource_group_name, name, custom_headers = nil)
1215
+ response = list_hybrid_connections_async(resource_group_name, name, custom_headers).value!
1181
1216
  response.body unless response.nil?
1182
1217
  end
1183
1218
 
1184
1219
  #
1185
- # Creates a new route or updates an existing route for a vnet in an app
1186
- # service plan.
1220
+ # Retrieves all Service Bus Hybrid Connections in use on this App Service Plan
1187
1221
  #
1188
- # @param resource_group_name [String] Name of resource group
1189
- # @param name [String] Name of App Service Plan
1190
- # @param vnet_name [String] Name of virtual network
1191
- # @param route_name [String] Name of the virtual network route
1192
- # @param route [VnetRoute] The route object
1222
+ # Retrieves all Service Bus Hybrid Connections in use on this App Service Plan
1223
+ #
1224
+ # @param resource_group_name [String] The resource group name
1225
+ # @param name [String] The name of the App Service Plan
1193
1226
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1194
1227
  # will be added to the HTTP request.
1195
1228
  #
1196
1229
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1197
1230
  #
1198
- def create_or_update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
1199
- create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value!
1231
+ def list_hybrid_connections_with_http_info(resource_group_name, name, custom_headers = nil)
1232
+ list_hybrid_connections_async(resource_group_name, name, custom_headers).value!
1200
1233
  end
1201
1234
 
1202
1235
  #
1203
- # Creates a new route or updates an existing route for a vnet in an app
1204
- # service plan.
1236
+ # Retrieves all Service Bus Hybrid Connections in use on this App Service Plan
1205
1237
  #
1206
- # @param resource_group_name [String] Name of resource group
1207
- # @param name [String] Name of App Service Plan
1208
- # @param vnet_name [String] Name of virtual network
1209
- # @param route_name [String] Name of the virtual network route
1210
- # @param route [VnetRoute] The route object
1238
+ # Retrieves all Service Bus Hybrid Connections in use on this App Service Plan
1239
+ #
1240
+ # @param resource_group_name [String] The resource group name
1241
+ # @param name [String] The name of the App Service Plan
1211
1242
  # @param [Hash{String => String}] A hash of custom headers that will be added
1212
1243
  # to the HTTP request.
1213
1244
  #
1214
1245
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1215
1246
  #
1216
- def create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
1247
+ def list_hybrid_connections_async(resource_group_name, name, custom_headers = nil)
1217
1248
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1218
1249
  fail ArgumentError, 'name is nil' if name.nil?
1219
- fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
1220
- fail ArgumentError, 'route_name is nil' if route_name.nil?
1221
- fail ArgumentError, 'route is nil' if route.nil?
1222
1250
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1223
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1251
+ api_version = '2016-09-01'
1224
1252
 
1225
1253
 
1226
1254
  request_headers = {}
@@ -1228,33 +1256,24 @@ module Azure::ARM::Web
1228
1256
  # Set Headers
1229
1257
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1230
1258
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1231
-
1232
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1233
-
1234
- # Serialize Request
1235
- request_mapper = VnetRoute.mapper()
1236
- request_content = @client.serialize(request_mapper, route, 'route')
1237
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1238
-
1239
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
1259
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'
1240
1260
 
1241
1261
  request_url = @base_url || @client.base_url
1242
1262
 
1243
1263
  options = {
1244
1264
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1245
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
1246
- query_params: {'api-version' => @client.api_version},
1247
- body: request_content,
1265
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1266
+ query_params: {'api-version' => api_version},
1248
1267
  headers: request_headers.merge(custom_headers || {}),
1249
1268
  base_url: request_url
1250
1269
  }
1251
- promise = @client.make_request_async(:put, path_template, options)
1270
+ promise = @client.make_request_async(:get, path_template, options)
1252
1271
 
1253
1272
  promise = promise.then do |result|
1254
1273
  http_response = result.response
1255
1274
  status_code = http_response.status
1256
1275
  response_content = http_response.body
1257
- unless status_code == 200 || status_code == 400 || status_code == 404
1276
+ unless status_code == 200
1258
1277
  error_model = JSON.load(response_content)
1259
1278
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1260
1279
  end
@@ -1264,7 +1283,7 @@ module Azure::ARM::Web
1264
1283
  if status_code == 200
1265
1284
  begin
1266
1285
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1267
- result_mapper = VnetRoute.mapper()
1286
+ result_mapper = HybridConnection.mapper()
1268
1287
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1269
1288
  rescue Exception => e
1270
1289
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1278,57 +1297,55 @@ module Azure::ARM::Web
1278
1297
  end
1279
1298
 
1280
1299
  #
1281
- # Deletes an existing route for a vnet in an app service plan.
1300
+ # List of metrics that can be queried for an App Service Plan
1301
+ #
1302
+ # List of metrics that can be queried for an App Service Plan
1282
1303
  #
1283
1304
  # @param resource_group_name [String] Name of resource group
1284
1305
  # @param name [String] Name of App Service Plan
1285
- # @param vnet_name [String] Name of virtual network
1286
- # @param route_name [String] Name of the virtual network route
1287
1306
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1288
1307
  # will be added to the HTTP request.
1289
1308
  #
1290
- # @return [Object] operation results.
1309
+ # @return [Array<MetricDefinition>] operation results.
1291
1310
  #
1292
- def delete_vnet_route(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
1293
- response = delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers).value!
1294
- response.body unless response.nil?
1311
+ def list_metric_defintions(resource_group_name, name, custom_headers = nil)
1312
+ first_page = list_metric_defintions_as_lazy(resource_group_name, name, custom_headers)
1313
+ first_page.get_all_items
1295
1314
  end
1296
1315
 
1297
1316
  #
1298
- # Deletes an existing route for a vnet in an app service plan.
1317
+ # List of metrics that can be queried for an App Service Plan
1318
+ #
1319
+ # List of metrics that can be queried for an App Service Plan
1299
1320
  #
1300
1321
  # @param resource_group_name [String] Name of resource group
1301
1322
  # @param name [String] Name of App Service Plan
1302
- # @param vnet_name [String] Name of virtual network
1303
- # @param route_name [String] Name of the virtual network route
1304
1323
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1305
1324
  # will be added to the HTTP request.
1306
1325
  #
1307
1326
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1308
1327
  #
1309
- def delete_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
1310
- delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers).value!
1328
+ def list_metric_defintions_with_http_info(resource_group_name, name, custom_headers = nil)
1329
+ list_metric_defintions_async(resource_group_name, name, custom_headers).value!
1311
1330
  end
1312
1331
 
1313
1332
  #
1314
- # Deletes an existing route for a vnet in an app service plan.
1333
+ # List of metrics that can be queried for an App Service Plan
1334
+ #
1335
+ # List of metrics that can be queried for an App Service Plan
1315
1336
  #
1316
1337
  # @param resource_group_name [String] Name of resource group
1317
1338
  # @param name [String] Name of App Service Plan
1318
- # @param vnet_name [String] Name of virtual network
1319
- # @param route_name [String] Name of the virtual network route
1320
1339
  # @param [Hash{String => String}] A hash of custom headers that will be added
1321
1340
  # to the HTTP request.
1322
1341
  #
1323
1342
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1324
1343
  #
1325
- def delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
1344
+ def list_metric_defintions_async(resource_group_name, name, custom_headers = nil)
1326
1345
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1327
1346
  fail ArgumentError, 'name is nil' if name.nil?
1328
- fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
1329
- fail ArgumentError, 'route_name is nil' if route_name.nil?
1330
1347
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1331
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1348
+ api_version = '2016-09-01'
1332
1349
 
1333
1350
 
1334
1351
  request_headers = {}
@@ -1336,29 +1353,39 @@ module Azure::ARM::Web
1336
1353
  # Set Headers
1337
1354
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1338
1355
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1339
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
1356
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'
1340
1357
 
1341
1358
  request_url = @base_url || @client.base_url
1342
1359
 
1343
1360
  options = {
1344
1361
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1345
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
1346
- query_params: {'api-version' => @client.api_version},
1362
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1363
+ query_params: {'api-version' => api_version},
1347
1364
  headers: request_headers.merge(custom_headers || {}),
1348
1365
  base_url: request_url
1349
1366
  }
1350
- promise = @client.make_request_async(:delete, path_template, options)
1367
+ promise = @client.make_request_async(:get, path_template, options)
1351
1368
 
1352
1369
  promise = promise.then do |result|
1353
1370
  http_response = result.response
1354
1371
  status_code = http_response.status
1355
1372
  response_content = http_response.body
1356
- unless status_code == 200 || status_code == 404
1373
+ unless status_code == 200
1357
1374
  error_model = JSON.load(response_content)
1358
1375
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1359
1376
  end
1360
1377
 
1361
1378
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1379
+ # Deserialize Response
1380
+ if status_code == 200
1381
+ begin
1382
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1383
+ result_mapper = MetricDefinitionCollection.mapper()
1384
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1385
+ rescue Exception => e
1386
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1387
+ end
1388
+ end
1362
1389
 
1363
1390
  result
1364
1391
  end
@@ -1367,64 +1394,73 @@ module Azure::ARM::Web
1367
1394
  end
1368
1395
 
1369
1396
  #
1370
- # Creates a new route or updates an existing route for a vnet in an app
1371
- # service plan.
1397
+ # Queries for App Serice Plan metrics
1398
+ #
1399
+ # Queries for App Serice Plan metrics
1372
1400
  #
1373
1401
  # @param resource_group_name [String] Name of resource group
1374
1402
  # @param name [String] Name of App Service Plan
1375
- # @param vnet_name [String] Name of virtual network
1376
- # @param route_name [String] Name of the virtual network route
1377
- # @param route [VnetRoute] The route object
1403
+ # @param details [Boolean] If true, metrics are broken down per App Service
1404
+ # Plan instance
1405
+ # @param filter [String] Return only usages/metrics specified in the filter.
1406
+ # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
1407
+ # name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime
1408
+ # eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
1378
1409
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1379
1410
  # will be added to the HTTP request.
1380
1411
  #
1381
- # @return [VnetRoute] operation results.
1412
+ # @return [Array<ResourceMetric>] operation results.
1382
1413
  #
1383
- def update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
1384
- response = update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value!
1385
- response.body unless response.nil?
1414
+ def list_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
1415
+ first_page = list_metrics_as_lazy(resource_group_name, name, details, filter, custom_headers)
1416
+ first_page.get_all_items
1386
1417
  end
1387
1418
 
1388
1419
  #
1389
- # Creates a new route or updates an existing route for a vnet in an app
1390
- # service plan.
1420
+ # Queries for App Serice Plan metrics
1421
+ #
1422
+ # Queries for App Serice Plan metrics
1391
1423
  #
1392
1424
  # @param resource_group_name [String] Name of resource group
1393
1425
  # @param name [String] Name of App Service Plan
1394
- # @param vnet_name [String] Name of virtual network
1395
- # @param route_name [String] Name of the virtual network route
1396
- # @param route [VnetRoute] The route object
1426
+ # @param details [Boolean] If true, metrics are broken down per App Service
1427
+ # Plan instance
1428
+ # @param filter [String] Return only usages/metrics specified in the filter.
1429
+ # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
1430
+ # name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime
1431
+ # eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
1397
1432
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1398
1433
  # will be added to the HTTP request.
1399
1434
  #
1400
1435
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1401
1436
  #
1402
- def update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
1403
- update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value!
1437
+ def list_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
1438
+ list_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
1404
1439
  end
1405
1440
 
1406
1441
  #
1407
- # Creates a new route or updates an existing route for a vnet in an app
1408
- # service plan.
1442
+ # Queries for App Serice Plan metrics
1443
+ #
1444
+ # Queries for App Serice Plan metrics
1409
1445
  #
1410
1446
  # @param resource_group_name [String] Name of resource group
1411
1447
  # @param name [String] Name of App Service Plan
1412
- # @param vnet_name [String] Name of virtual network
1413
- # @param route_name [String] Name of the virtual network route
1414
- # @param route [VnetRoute] The route object
1448
+ # @param details [Boolean] If true, metrics are broken down per App Service
1449
+ # Plan instance
1450
+ # @param filter [String] Return only usages/metrics specified in the filter.
1451
+ # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
1452
+ # name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime
1453
+ # eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
1415
1454
  # @param [Hash{String => String}] A hash of custom headers that will be added
1416
1455
  # to the HTTP request.
1417
1456
  #
1418
1457
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1419
1458
  #
1420
- def update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
1459
+ def list_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
1421
1460
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1422
1461
  fail ArgumentError, 'name is nil' if name.nil?
1423
- fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
1424
- fail ArgumentError, 'route_name is nil' if route_name.nil?
1425
- fail ArgumentError, 'route is nil' if route.nil?
1426
1462
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1427
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1463
+ api_version = '2016-09-01'
1428
1464
 
1429
1465
 
1430
1466
  request_headers = {}
@@ -1432,33 +1468,24 @@ module Azure::ARM::Web
1432
1468
  # Set Headers
1433
1469
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1434
1470
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1435
-
1436
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1437
-
1438
- # Serialize Request
1439
- request_mapper = VnetRoute.mapper()
1440
- request_content = @client.serialize(request_mapper, route, 'route')
1441
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1442
-
1443
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
1471
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'
1444
1472
 
1445
1473
  request_url = @base_url || @client.base_url
1446
1474
 
1447
1475
  options = {
1448
1476
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1449
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
1450
- query_params: {'api-version' => @client.api_version},
1451
- body: request_content,
1477
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1478
+ query_params: {'details' => details,'$filter' => filter,'api-version' => api_version},
1452
1479
  headers: request_headers.merge(custom_headers || {}),
1453
1480
  base_url: request_url
1454
1481
  }
1455
- promise = @client.make_request_async(:patch, path_template, options)
1482
+ promise = @client.make_request_async(:get, path_template, options)
1456
1483
 
1457
1484
  promise = promise.then do |result|
1458
1485
  http_response = result.response
1459
1486
  status_code = http_response.status
1460
1487
  response_content = http_response.body
1461
- unless status_code == 200 || status_code == 400 || status_code == 404
1488
+ unless status_code == 200
1462
1489
  error_model = JSON.load(response_content)
1463
1490
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1464
1491
  end
@@ -1468,7 +1495,7 @@ module Azure::ARM::Web
1468
1495
  if status_code == 200
1469
1496
  begin
1470
1497
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1471
- result_mapper = VnetRoute.mapper()
1498
+ result_mapper = ResourceMetricCollection.mapper()
1472
1499
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1473
1500
  rescue Exception => e
1474
1501
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1482,60 +1509,59 @@ module Azure::ARM::Web
1482
1509
  end
1483
1510
 
1484
1511
  #
1485
- # Gets the vnet gateway.
1512
+ # Gets a server farm operation
1513
+ #
1514
+ # Gets a server farm operation
1486
1515
  #
1487
1516
  # @param resource_group_name [String] Name of resource group
1488
- # @param name [String] Name of the App Service Plan
1489
- # @param vnet_name [String] Name of the virtual network
1490
- # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
1491
- # is supported.
1517
+ # @param name [String] Name of server farm
1518
+ # @param operation_id [String] Id of Server farm operation"&gt;
1492
1519
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1493
1520
  # will be added to the HTTP request.
1494
1521
  #
1495
- # @return [VnetGateway] operation results.
1522
+ # @return [AppServicePlan] operation results.
1496
1523
  #
1497
- def get_server_farm_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil)
1498
- response = get_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value!
1524
+ def get_operation(resource_group_name, name, operation_id, custom_headers = nil)
1525
+ response = get_operation_async(resource_group_name, name, operation_id, custom_headers).value!
1499
1526
  response.body unless response.nil?
1500
1527
  end
1501
1528
 
1502
1529
  #
1503
- # Gets the vnet gateway.
1530
+ # Gets a server farm operation
1531
+ #
1532
+ # Gets a server farm operation
1504
1533
  #
1505
1534
  # @param resource_group_name [String] Name of resource group
1506
- # @param name [String] Name of the App Service Plan
1507
- # @param vnet_name [String] Name of the virtual network
1508
- # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
1509
- # is supported.
1535
+ # @param name [String] Name of server farm
1536
+ # @param operation_id [String] Id of Server farm operation"&gt;
1510
1537
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1511
1538
  # will be added to the HTTP request.
1512
1539
  #
1513
1540
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1514
1541
  #
1515
- def get_server_farm_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil)
1516
- get_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value!
1542
+ def get_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil)
1543
+ get_operation_async(resource_group_name, name, operation_id, custom_headers).value!
1517
1544
  end
1518
1545
 
1519
1546
  #
1520
- # Gets the vnet gateway.
1547
+ # Gets a server farm operation
1548
+ #
1549
+ # Gets a server farm operation
1521
1550
  #
1522
1551
  # @param resource_group_name [String] Name of resource group
1523
- # @param name [String] Name of the App Service Plan
1524
- # @param vnet_name [String] Name of the virtual network
1525
- # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
1526
- # is supported.
1552
+ # @param name [String] Name of server farm
1553
+ # @param operation_id [String] Id of Server farm operation"&gt;
1527
1554
  # @param [Hash{String => String}] A hash of custom headers that will be added
1528
1555
  # to the HTTP request.
1529
1556
  #
1530
1557
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1531
1558
  #
1532
- def get_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil)
1559
+ def get_operation_async(resource_group_name, name, operation_id, custom_headers = nil)
1533
1560
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1534
1561
  fail ArgumentError, 'name is nil' if name.nil?
1535
- fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
1536
- fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
1562
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
1537
1563
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1538
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1564
+ api_version = '2016-09-01'
1539
1565
 
1540
1566
 
1541
1567
  request_headers = {}
@@ -1543,14 +1569,14 @@ module Azure::ARM::Web
1543
1569
  # Set Headers
1544
1570
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1545
1571
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1546
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'
1572
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/operationresults/{operationId}'
1547
1573
 
1548
1574
  request_url = @base_url || @client.base_url
1549
1575
 
1550
1576
  options = {
1551
1577
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1552
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id},
1553
- query_params: {'api-version' => @client.api_version},
1578
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
1579
+ query_params: {'api-version' => api_version},
1554
1580
  headers: request_headers.merge(custom_headers || {}),
1555
1581
  base_url: request_url
1556
1582
  }
@@ -1570,7 +1596,7 @@ module Azure::ARM::Web
1570
1596
  if status_code == 200
1571
1597
  begin
1572
1598
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1573
- result_mapper = VnetGateway.mapper()
1599
+ result_mapper = AppServicePlan.mapper()
1574
1600
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1575
1601
  rescue Exception => e
1576
1602
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1584,64 +1610,64 @@ module Azure::ARM::Web
1584
1610
  end
1585
1611
 
1586
1612
  #
1587
- # Updates the vnet gateway
1613
+ # Restarts web apps in a specified App Service Plan
1588
1614
  #
1589
- # @param resource_group_name [String] The resource group
1590
- # @param name [String] The name of the App Service Plan
1591
- # @param vnet_name [String] The name of the virtual network
1592
- # @param gateway_name [String] The name of the gateway. Only 'primary' is
1593
- # supported.
1594
- # @param connection_envelope [VnetGateway] The gateway entity.
1615
+ # Restarts web apps in a specified App Service Plan
1616
+ #
1617
+ # @param resource_group_name [String] Name of resource group
1618
+ # @param name [String] Name of App Service Plan
1619
+ # @param soft_restart [Boolean] Soft restart applies the configuration settings
1620
+ # and restarts the apps if necessary. Hard restart always restarts and
1621
+ # reprovisions the apps
1595
1622
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1596
1623
  # will be added to the HTTP request.
1597
1624
  #
1598
- # @return [VnetGateway] operation results.
1625
+ # @return [Object] operation results.
1599
1626
  #
1600
- def update_server_farm_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil)
1601
- response = update_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value!
1627
+ def restart_web_apps(resource_group_name, name, soft_restart = nil, custom_headers = nil)
1628
+ response = restart_web_apps_async(resource_group_name, name, soft_restart, custom_headers).value!
1602
1629
  response.body unless response.nil?
1603
1630
  end
1604
1631
 
1605
1632
  #
1606
- # Updates the vnet gateway
1633
+ # Restarts web apps in a specified App Service Plan
1607
1634
  #
1608
- # @param resource_group_name [String] The resource group
1609
- # @param name [String] The name of the App Service Plan
1610
- # @param vnet_name [String] The name of the virtual network
1611
- # @param gateway_name [String] The name of the gateway. Only 'primary' is
1612
- # supported.
1613
- # @param connection_envelope [VnetGateway] The gateway entity.
1635
+ # Restarts web apps in a specified App Service Plan
1636
+ #
1637
+ # @param resource_group_name [String] Name of resource group
1638
+ # @param name [String] Name of App Service Plan
1639
+ # @param soft_restart [Boolean] Soft restart applies the configuration settings
1640
+ # and restarts the apps if necessary. Hard restart always restarts and
1641
+ # reprovisions the apps
1614
1642
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1615
1643
  # will be added to the HTTP request.
1616
1644
  #
1617
1645
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1618
1646
  #
1619
- def update_server_farm_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil)
1620
- update_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value!
1647
+ def restart_web_apps_with_http_info(resource_group_name, name, soft_restart = nil, custom_headers = nil)
1648
+ restart_web_apps_async(resource_group_name, name, soft_restart, custom_headers).value!
1621
1649
  end
1622
1650
 
1623
1651
  #
1624
- # Updates the vnet gateway
1652
+ # Restarts web apps in a specified App Service Plan
1625
1653
  #
1626
- # @param resource_group_name [String] The resource group
1627
- # @param name [String] The name of the App Service Plan
1628
- # @param vnet_name [String] The name of the virtual network
1629
- # @param gateway_name [String] The name of the gateway. Only 'primary' is
1630
- # supported.
1631
- # @param connection_envelope [VnetGateway] The gateway entity.
1654
+ # Restarts web apps in a specified App Service Plan
1655
+ #
1656
+ # @param resource_group_name [String] Name of resource group
1657
+ # @param name [String] Name of App Service Plan
1658
+ # @param soft_restart [Boolean] Soft restart applies the configuration settings
1659
+ # and restarts the apps if necessary. Hard restart always restarts and
1660
+ # reprovisions the apps
1632
1661
  # @param [Hash{String => String}] A hash of custom headers that will be added
1633
1662
  # to the HTTP request.
1634
1663
  #
1635
1664
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1636
1665
  #
1637
- def update_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil)
1666
+ def restart_web_apps_async(resource_group_name, name, soft_restart = nil, custom_headers = nil)
1638
1667
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1639
1668
  fail ArgumentError, 'name is nil' if name.nil?
1640
- fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
1641
- fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
1642
- fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil?
1643
1669
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1644
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1670
+ api_version = '2016-09-01'
1645
1671
 
1646
1672
 
1647
1673
  request_headers = {}
@@ -1649,27 +1675,18 @@ module Azure::ARM::Web
1649
1675
  # Set Headers
1650
1676
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1651
1677
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1652
-
1653
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1654
-
1655
- # Serialize Request
1656
- request_mapper = VnetGateway.mapper()
1657
- request_content = @client.serialize(request_mapper, connection_envelope, 'connection_envelope')
1658
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1659
-
1660
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'
1678
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'
1661
1679
 
1662
1680
  request_url = @base_url || @client.base_url
1663
1681
 
1664
1682
  options = {
1665
1683
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1666
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id},
1667
- query_params: {'api-version' => @client.api_version},
1668
- body: request_content,
1684
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1685
+ query_params: {'softRestart' => soft_restart,'api-version' => api_version},
1669
1686
  headers: request_headers.merge(custom_headers || {}),
1670
1687
  base_url: request_url
1671
1688
  }
1672
- promise = @client.make_request_async(:put, path_template, options)
1689
+ promise = @client.make_request_async(:post, path_template, options)
1673
1690
 
1674
1691
  promise = promise.then do |result|
1675
1692
  http_response = result.response
@@ -1681,16 +1698,6 @@ module Azure::ARM::Web
1681
1698
  end
1682
1699
 
1683
1700
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1684
- # Deserialize Response
1685
- if status_code == 200
1686
- begin
1687
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1688
- result_mapper = VnetGateway.mapper()
1689
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1690
- rescue Exception => e
1691
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1692
- end
1693
- end
1694
1701
 
1695
1702
  result
1696
1703
  end
@@ -1700,41 +1707,14 @@ module Azure::ARM::Web
1700
1707
 
1701
1708
  #
1702
1709
  # Gets list of Apps associated with an App Service Plan
1703
- #
1704
- # @param resource_group_name [String] Name of resource group
1705
- # @param name [String] Name of App Service Plan
1706
- # @param skip_token [String] Skip to of web apps in a list. If specified, the
1707
- # resulting list will contain web apps starting from (including) the
1708
- # skipToken. Else, the resulting list contains web apps from the start of the
1709
- # list
1710
- # @param filter [String] Supported filter: $filter=state eq running. Returns
1711
- # only web apps that are currently running
1712
- # @param top [String] List page size. If specified, results are paged.
1713
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1714
- # will be added to the HTTP request.
1715
- #
1716
- # @return [SiteCollection] which provide lazy access to pages of the response.
1717
- #
1718
- def get_server_farm_sites_as_lazy(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil)
1719
- response = get_server_farm_sites_async(resource_group_name, name, skip_token, filter, top, custom_headers).value!
1720
- unless response.nil?
1721
- page = response.body
1722
- page.next_method = Proc.new do |next_page_link|
1723
- get_server_farm_sites_next_async(next_page_link, custom_headers)
1724
- end
1725
- page
1726
- end
1727
- end
1728
-
1729
1710
  #
1730
1711
  # Gets list of Apps associated with an App Service Plan
1731
1712
  #
1732
1713
  # @param resource_group_name [String] Name of resource group
1733
1714
  # @param name [String] Name of App Service Plan
1734
1715
  # @param skip_token [String] Skip to of web apps in a list. If specified, the
1735
- # resulting list will contain web apps starting from (including) the
1736
- # skipToken. Else, the resulting list contains web apps from the start of the
1737
- # list
1716
+ # resulting list will contain web apps starting from (including) the skipToken.
1717
+ # Else, the resulting list contains web apps from the start of the list
1738
1718
  # @param filter [String] Supported filter: $filter=state eq running. Returns
1739
1719
  # only web apps that are currently running
1740
1720
  # @param top [String] List page size. If specified, results are paged.
@@ -1743,20 +1723,21 @@ module Azure::ARM::Web
1743
1723
  #
1744
1724
  # @return [Array<Site>] operation results.
1745
1725
  #
1746
- def get_server_farm_sites(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil)
1747
- first_page = get_server_farm_sites_as_lazy(resource_group_name, name, skip_token, filter, top, custom_headers)
1726
+ def list_web_apps(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil)
1727
+ first_page = list_web_apps_as_lazy(resource_group_name, name, skip_token, filter, top, custom_headers)
1748
1728
  first_page.get_all_items
1749
1729
  end
1750
1730
 
1731
+ #
1732
+ # Gets list of Apps associated with an App Service Plan
1751
1733
  #
1752
1734
  # Gets list of Apps associated with an App Service Plan
1753
1735
  #
1754
1736
  # @param resource_group_name [String] Name of resource group
1755
1737
  # @param name [String] Name of App Service Plan
1756
1738
  # @param skip_token [String] Skip to of web apps in a list. If specified, the
1757
- # resulting list will contain web apps starting from (including) the
1758
- # skipToken. Else, the resulting list contains web apps from the start of the
1759
- # list
1739
+ # resulting list will contain web apps starting from (including) the skipToken.
1740
+ # Else, the resulting list contains web apps from the start of the list
1760
1741
  # @param filter [String] Supported filter: $filter=state eq running. Returns
1761
1742
  # only web apps that are currently running
1762
1743
  # @param top [String] List page size. If specified, results are paged.
@@ -1765,19 +1746,20 @@ module Azure::ARM::Web
1765
1746
  #
1766
1747
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1767
1748
  #
1768
- def get_server_farm_sites_with_http_info(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil)
1769
- get_server_farm_sites_async(resource_group_name, name, skip_token, filter, top, custom_headers).value!
1749
+ def list_web_apps_with_http_info(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil)
1750
+ list_web_apps_async(resource_group_name, name, skip_token, filter, top, custom_headers).value!
1770
1751
  end
1771
1752
 
1753
+ #
1754
+ # Gets list of Apps associated with an App Service Plan
1772
1755
  #
1773
1756
  # Gets list of Apps associated with an App Service Plan
1774
1757
  #
1775
1758
  # @param resource_group_name [String] Name of resource group
1776
1759
  # @param name [String] Name of App Service Plan
1777
1760
  # @param skip_token [String] Skip to of web apps in a list. If specified, the
1778
- # resulting list will contain web apps starting from (including) the
1779
- # skipToken. Else, the resulting list contains web apps from the start of the
1780
- # list
1761
+ # resulting list will contain web apps starting from (including) the skipToken.
1762
+ # Else, the resulting list contains web apps from the start of the list
1781
1763
  # @param filter [String] Supported filter: $filter=state eq running. Returns
1782
1764
  # only web apps that are currently running
1783
1765
  # @param top [String] List page size. If specified, results are paged.
@@ -1786,11 +1768,1020 @@ module Azure::ARM::Web
1786
1768
  #
1787
1769
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1788
1770
  #
1789
- def get_server_farm_sites_async(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil)
1771
+ def list_web_apps_async(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil)
1772
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1773
+ fail ArgumentError, 'name is nil' if name.nil?
1774
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1775
+ api_version = '2016-09-01'
1776
+
1777
+
1778
+ request_headers = {}
1779
+
1780
+ # Set Headers
1781
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1782
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1783
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'
1784
+
1785
+ request_url = @base_url || @client.base_url
1786
+
1787
+ options = {
1788
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1789
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1790
+ query_params: {'$skipToken' => skip_token,'$filter' => filter,'$top' => top,'api-version' => api_version},
1791
+ headers: request_headers.merge(custom_headers || {}),
1792
+ base_url: request_url
1793
+ }
1794
+ promise = @client.make_request_async(:get, path_template, options)
1795
+
1796
+ promise = promise.then do |result|
1797
+ http_response = result.response
1798
+ status_code = http_response.status
1799
+ response_content = http_response.body
1800
+ unless status_code == 200
1801
+ error_model = JSON.load(response_content)
1802
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1803
+ end
1804
+
1805
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1806
+ # Deserialize Response
1807
+ if status_code == 200
1808
+ begin
1809
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1810
+ result_mapper = WebAppCollection.mapper()
1811
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1812
+ rescue Exception => e
1813
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1814
+ end
1815
+ end
1816
+
1817
+ result
1818
+ end
1819
+
1820
+ promise.execute
1821
+ end
1822
+
1823
+ #
1824
+ # Gets list of vnets associated with App Service Plan
1825
+ #
1826
+ # Gets list of vnets associated with App Service Plan
1827
+ #
1828
+ # @param resource_group_name [String] Name of resource group
1829
+ # @param name [String] Name of App Service Plan
1830
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1831
+ # will be added to the HTTP request.
1832
+ #
1833
+ # @return [Array] operation results.
1834
+ #
1835
+ def list_vnets(resource_group_name, name, custom_headers = nil)
1836
+ response = list_vnets_async(resource_group_name, name, custom_headers).value!
1837
+ response.body unless response.nil?
1838
+ end
1839
+
1840
+ #
1841
+ # Gets list of vnets associated with App Service Plan
1842
+ #
1843
+ # Gets list of vnets associated with App Service Plan
1844
+ #
1845
+ # @param resource_group_name [String] Name of resource group
1846
+ # @param name [String] Name of App Service Plan
1847
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1848
+ # will be added to the HTTP request.
1849
+ #
1850
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1851
+ #
1852
+ def list_vnets_with_http_info(resource_group_name, name, custom_headers = nil)
1853
+ list_vnets_async(resource_group_name, name, custom_headers).value!
1854
+ end
1855
+
1856
+ #
1857
+ # Gets list of vnets associated with App Service Plan
1858
+ #
1859
+ # Gets list of vnets associated with App Service Plan
1860
+ #
1861
+ # @param resource_group_name [String] Name of resource group
1862
+ # @param name [String] Name of App Service Plan
1863
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1864
+ # to the HTTP request.
1865
+ #
1866
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1867
+ #
1868
+ def list_vnets_async(resource_group_name, name, custom_headers = nil)
1869
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1870
+ fail ArgumentError, 'name is nil' if name.nil?
1871
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1872
+ api_version = '2016-09-01'
1873
+
1874
+
1875
+ request_headers = {}
1876
+
1877
+ # Set Headers
1878
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1879
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1880
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'
1881
+
1882
+ request_url = @base_url || @client.base_url
1883
+
1884
+ options = {
1885
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1886
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1887
+ query_params: {'api-version' => api_version},
1888
+ headers: request_headers.merge(custom_headers || {}),
1889
+ base_url: request_url
1890
+ }
1891
+ promise = @client.make_request_async(:get, path_template, options)
1892
+
1893
+ promise = promise.then do |result|
1894
+ http_response = result.response
1895
+ status_code = http_response.status
1896
+ response_content = http_response.body
1897
+ unless status_code == 200
1898
+ error_model = JSON.load(response_content)
1899
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1900
+ end
1901
+
1902
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1903
+ # Deserialize Response
1904
+ if status_code == 200
1905
+ begin
1906
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1907
+ result_mapper = {
1908
+ required: false,
1909
+ serialized_name: 'parsed_response',
1910
+ type: {
1911
+ name: 'Sequence',
1912
+ element: {
1913
+ required: false,
1914
+ serialized_name: 'VnetInfoElementType',
1915
+ type: {
1916
+ name: 'Composite',
1917
+ class_name: 'VnetInfo'
1918
+ }
1919
+ }
1920
+ }
1921
+ }
1922
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1923
+ rescue Exception => e
1924
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1925
+ end
1926
+ end
1927
+
1928
+ result
1929
+ end
1930
+
1931
+ promise.execute
1932
+ end
1933
+
1934
+ #
1935
+ # Gets a vnet associated with an App Service Plan
1936
+ #
1937
+ # Gets a vnet associated with an App Service Plan
1938
+ #
1939
+ # @param resource_group_name [String] Name of resource group
1940
+ # @param name [String] Name of App Service Plan
1941
+ # @param vnet_name [String] Name of virtual network
1942
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1943
+ # will be added to the HTTP request.
1944
+ #
1945
+ # @return [VnetInfo] operation results.
1946
+ #
1947
+ def get_vnet_from_server_farm(resource_group_name, name, vnet_name, custom_headers = nil)
1948
+ response = get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers).value!
1949
+ response.body unless response.nil?
1950
+ end
1951
+
1952
+ #
1953
+ # Gets a vnet associated with an App Service Plan
1954
+ #
1955
+ # Gets a vnet associated with an App Service Plan
1956
+ #
1957
+ # @param resource_group_name [String] Name of resource group
1958
+ # @param name [String] Name of App Service Plan
1959
+ # @param vnet_name [String] Name of virtual network
1960
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1961
+ # will be added to the HTTP request.
1962
+ #
1963
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1964
+ #
1965
+ def get_vnet_from_server_farm_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil)
1966
+ get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers).value!
1967
+ end
1968
+
1969
+ #
1970
+ # Gets a vnet associated with an App Service Plan
1971
+ #
1972
+ # Gets a vnet associated with an App Service Plan
1973
+ #
1974
+ # @param resource_group_name [String] Name of resource group
1975
+ # @param name [String] Name of App Service Plan
1976
+ # @param vnet_name [String] Name of virtual network
1977
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1978
+ # to the HTTP request.
1979
+ #
1980
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1981
+ #
1982
+ def get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers = nil)
1983
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1984
+ fail ArgumentError, 'name is nil' if name.nil?
1985
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
1986
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1987
+ api_version = '2016-09-01'
1988
+
1989
+
1990
+ request_headers = {}
1991
+
1992
+ # Set Headers
1993
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1994
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1995
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'
1996
+
1997
+ request_url = @base_url || @client.base_url
1998
+
1999
+ options = {
2000
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2001
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id},
2002
+ query_params: {'api-version' => api_version},
2003
+ headers: request_headers.merge(custom_headers || {}),
2004
+ base_url: request_url
2005
+ }
2006
+ promise = @client.make_request_async(:get, path_template, options)
2007
+
2008
+ promise = promise.then do |result|
2009
+ http_response = result.response
2010
+ status_code = http_response.status
2011
+ response_content = http_response.body
2012
+ unless status_code == 200 || status_code == 404
2013
+ error_model = JSON.load(response_content)
2014
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2015
+ end
2016
+
2017
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2018
+ # Deserialize Response
2019
+ if status_code == 200
2020
+ begin
2021
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2022
+ result_mapper = VnetInfo.mapper()
2023
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2024
+ rescue Exception => e
2025
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2026
+ end
2027
+ end
2028
+
2029
+ result
2030
+ end
2031
+
2032
+ promise.execute
2033
+ end
2034
+
2035
+ #
2036
+ # Gets the vnet gateway.
2037
+ #
2038
+ # Gets the vnet gateway.
2039
+ #
2040
+ # @param resource_group_name [String] Name of resource group
2041
+ # @param name [String] Name of the App Service Plan
2042
+ # @param vnet_name [String] Name of the virtual network
2043
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2044
+ # is supported.
2045
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2046
+ # will be added to the HTTP request.
2047
+ #
2048
+ # @return [VnetGateway] operation results.
2049
+ #
2050
+ def get_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil)
2051
+ response = get_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value!
2052
+ response.body unless response.nil?
2053
+ end
2054
+
2055
+ #
2056
+ # Gets the vnet gateway.
2057
+ #
2058
+ # Gets the vnet gateway.
2059
+ #
2060
+ # @param resource_group_name [String] Name of resource group
2061
+ # @param name [String] Name of the App Service Plan
2062
+ # @param vnet_name [String] Name of the virtual network
2063
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2064
+ # is supported.
2065
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2066
+ # will be added to the HTTP request.
2067
+ #
2068
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2069
+ #
2070
+ def get_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil)
2071
+ get_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value!
2072
+ end
2073
+
2074
+ #
2075
+ # Gets the vnet gateway.
2076
+ #
2077
+ # Gets the vnet gateway.
2078
+ #
2079
+ # @param resource_group_name [String] Name of resource group
2080
+ # @param name [String] Name of the App Service Plan
2081
+ # @param vnet_name [String] Name of the virtual network
2082
+ # @param gateway_name [String] Name of the gateway. Only the 'primary' gateway
2083
+ # is supported.
2084
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2085
+ # to the HTTP request.
2086
+ #
2087
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2088
+ #
2089
+ def get_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil)
2090
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2091
+ fail ArgumentError, 'name is nil' if name.nil?
2092
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2093
+ fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
2094
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2095
+ api_version = '2016-09-01'
2096
+
2097
+
2098
+ request_headers = {}
2099
+
2100
+ # Set Headers
2101
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2102
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2103
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'
2104
+
2105
+ request_url = @base_url || @client.base_url
2106
+
2107
+ options = {
2108
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2109
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id},
2110
+ query_params: {'api-version' => api_version},
2111
+ headers: request_headers.merge(custom_headers || {}),
2112
+ base_url: request_url
2113
+ }
2114
+ promise = @client.make_request_async(:get, path_template, options)
2115
+
2116
+ promise = promise.then do |result|
2117
+ http_response = result.response
2118
+ status_code = http_response.status
2119
+ response_content = http_response.body
2120
+ unless status_code == 200
2121
+ error_model = JSON.load(response_content)
2122
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2123
+ end
2124
+
2125
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2126
+ # Deserialize Response
2127
+ if status_code == 200
2128
+ begin
2129
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2130
+ result_mapper = VnetGateway.mapper()
2131
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2132
+ rescue Exception => e
2133
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2134
+ end
2135
+ end
2136
+
2137
+ result
2138
+ end
2139
+
2140
+ promise.execute
2141
+ end
2142
+
2143
+ #
2144
+ # Updates the vnet gateway
2145
+ #
2146
+ # Updates the vnet gateway
2147
+ #
2148
+ # @param resource_group_name [String] The resource group
2149
+ # @param name [String] The name of the App Service Plan
2150
+ # @param vnet_name [String] The name of the virtual network
2151
+ # @param gateway_name [String] The name of the gateway. Only 'primary' is
2152
+ # supported.
2153
+ # @param connection_envelope [VnetGateway] The gateway entity.
2154
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2155
+ # will be added to the HTTP request.
2156
+ #
2157
+ # @return [VnetGateway] operation results.
2158
+ #
2159
+ def update_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil)
2160
+ response = update_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value!
2161
+ response.body unless response.nil?
2162
+ end
2163
+
2164
+ #
2165
+ # Updates the vnet gateway
2166
+ #
2167
+ # Updates the vnet gateway
2168
+ #
2169
+ # @param resource_group_name [String] The resource group
2170
+ # @param name [String] The name of the App Service Plan
2171
+ # @param vnet_name [String] The name of the virtual network
2172
+ # @param gateway_name [String] The name of the gateway. Only 'primary' is
2173
+ # supported.
2174
+ # @param connection_envelope [VnetGateway] The gateway entity.
2175
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2176
+ # will be added to the HTTP request.
2177
+ #
2178
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2179
+ #
2180
+ def update_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil)
2181
+ update_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value!
2182
+ end
2183
+
2184
+ #
2185
+ # Updates the vnet gateway
2186
+ #
2187
+ # Updates the vnet gateway
2188
+ #
2189
+ # @param resource_group_name [String] The resource group
2190
+ # @param name [String] The name of the App Service Plan
2191
+ # @param vnet_name [String] The name of the virtual network
2192
+ # @param gateway_name [String] The name of the gateway. Only 'primary' is
2193
+ # supported.
2194
+ # @param connection_envelope [VnetGateway] The gateway entity.
2195
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2196
+ # to the HTTP request.
2197
+ #
2198
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2199
+ #
2200
+ def update_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil)
2201
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2202
+ fail ArgumentError, 'name is nil' if name.nil?
2203
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2204
+ fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
2205
+ fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil?
2206
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2207
+ api_version = '2016-09-01'
2208
+
2209
+
2210
+ request_headers = {}
2211
+
2212
+ # Set Headers
2213
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2214
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2215
+
2216
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2217
+
2218
+ # Serialize Request
2219
+ request_mapper = VnetGateway.mapper()
2220
+ request_content = @client.serialize(request_mapper, connection_envelope, 'connection_envelope')
2221
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2222
+
2223
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'
2224
+
2225
+ request_url = @base_url || @client.base_url
2226
+
2227
+ options = {
2228
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2229
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id},
2230
+ query_params: {'api-version' => api_version},
2231
+ body: request_content,
2232
+ headers: request_headers.merge(custom_headers || {}),
2233
+ base_url: request_url
2234
+ }
2235
+ promise = @client.make_request_async(:put, path_template, options)
2236
+
2237
+ promise = promise.then do |result|
2238
+ http_response = result.response
2239
+ status_code = http_response.status
2240
+ response_content = http_response.body
2241
+ unless status_code == 200
2242
+ error_model = JSON.load(response_content)
2243
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2244
+ end
2245
+
2246
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2247
+ # Deserialize Response
2248
+ if status_code == 200
2249
+ begin
2250
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2251
+ result_mapper = VnetGateway.mapper()
2252
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2253
+ rescue Exception => e
2254
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2255
+ end
2256
+ end
2257
+
2258
+ result
2259
+ end
2260
+
2261
+ promise.execute
2262
+ end
2263
+
2264
+ #
2265
+ # Gets a list of all routes associated with a vnet, in an app service plan
2266
+ #
2267
+ # Gets a list of all routes associated with a vnet, in an app service plan
2268
+ #
2269
+ # @param resource_group_name [String] Name of resource group
2270
+ # @param name [String] Name of App Service Plan
2271
+ # @param vnet_name [String] Name of virtual network
2272
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2273
+ # will be added to the HTTP request.
2274
+ #
2275
+ # @return [Array] operation results.
2276
+ #
2277
+ def listt_routes_for_vnet(resource_group_name, name, vnet_name, custom_headers = nil)
2278
+ response = listt_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers).value!
2279
+ response.body unless response.nil?
2280
+ end
2281
+
2282
+ #
2283
+ # Gets a list of all routes associated with a vnet, in an app service plan
2284
+ #
2285
+ # Gets a list of all routes associated with a vnet, in an app service plan
2286
+ #
2287
+ # @param resource_group_name [String] Name of resource group
2288
+ # @param name [String] Name of App Service Plan
2289
+ # @param vnet_name [String] Name of virtual network
2290
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2291
+ # will be added to the HTTP request.
2292
+ #
2293
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2294
+ #
2295
+ def listt_routes_for_vnet_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil)
2296
+ listt_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers).value!
2297
+ end
2298
+
2299
+ #
2300
+ # Gets a list of all routes associated with a vnet, in an app service plan
2301
+ #
2302
+ # Gets a list of all routes associated with a vnet, in an app service plan
2303
+ #
2304
+ # @param resource_group_name [String] Name of resource group
2305
+ # @param name [String] Name of App Service Plan
2306
+ # @param vnet_name [String] Name of virtual network
2307
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2308
+ # to the HTTP request.
2309
+ #
2310
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2311
+ #
2312
+ def listt_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers = nil)
2313
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2314
+ fail ArgumentError, 'name is nil' if name.nil?
2315
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2316
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2317
+ api_version = '2016-09-01'
2318
+
2319
+
2320
+ request_headers = {}
2321
+
2322
+ # Set Headers
2323
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2324
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2325
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'
2326
+
2327
+ request_url = @base_url || @client.base_url
2328
+
2329
+ options = {
2330
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2331
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id},
2332
+ query_params: {'api-version' => api_version},
2333
+ headers: request_headers.merge(custom_headers || {}),
2334
+ base_url: request_url
2335
+ }
2336
+ promise = @client.make_request_async(:get, path_template, options)
2337
+
2338
+ promise = promise.then do |result|
2339
+ http_response = result.response
2340
+ status_code = http_response.status
2341
+ response_content = http_response.body
2342
+ unless status_code == 200
2343
+ error_model = JSON.load(response_content)
2344
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2345
+ end
2346
+
2347
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2348
+ # Deserialize Response
2349
+ if status_code == 200
2350
+ begin
2351
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2352
+ result_mapper = {
2353
+ required: false,
2354
+ serialized_name: 'parsed_response',
2355
+ type: {
2356
+ name: 'Sequence',
2357
+ element: {
2358
+ required: false,
2359
+ serialized_name: 'VnetRouteElementType',
2360
+ type: {
2361
+ name: 'Composite',
2362
+ class_name: 'VnetRoute'
2363
+ }
2364
+ }
2365
+ }
2366
+ }
2367
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2368
+ rescue Exception => e
2369
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2370
+ end
2371
+ end
2372
+
2373
+ result
2374
+ end
2375
+
2376
+ promise.execute
2377
+ end
2378
+
2379
+ #
2380
+ # Gets a specific route associated with a vnet, in an app service plan
2381
+ #
2382
+ # Gets a specific route associated with a vnet, in an app service plan
2383
+ #
2384
+ # @param resource_group_name [String] Name of resource group
2385
+ # @param name [String] Name of App Service Plan
2386
+ # @param vnet_name [String] Name of virtual network
2387
+ # @param route_name [String] Name of the virtual network route
2388
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2389
+ # will be added to the HTTP request.
2390
+ #
2391
+ # @return [Array] operation results.
2392
+ #
2393
+ def get_route_for_vnet(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
2394
+ response = get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers).value!
2395
+ response.body unless response.nil?
2396
+ end
2397
+
2398
+ #
2399
+ # Gets a specific route associated with a vnet, in an app service plan
2400
+ #
2401
+ # Gets a specific route associated with a vnet, in an app service plan
2402
+ #
2403
+ # @param resource_group_name [String] Name of resource group
2404
+ # @param name [String] Name of App Service Plan
2405
+ # @param vnet_name [String] Name of virtual network
2406
+ # @param route_name [String] Name of the virtual network route
2407
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2408
+ # will be added to the HTTP request.
2409
+ #
2410
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2411
+ #
2412
+ def get_route_for_vnet_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
2413
+ get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers).value!
2414
+ end
2415
+
2416
+ #
2417
+ # Gets a specific route associated with a vnet, in an app service plan
2418
+ #
2419
+ # Gets a specific route associated with a vnet, in an app service plan
2420
+ #
2421
+ # @param resource_group_name [String] Name of resource group
2422
+ # @param name [String] Name of App Service Plan
2423
+ # @param vnet_name [String] Name of virtual network
2424
+ # @param route_name [String] Name of the virtual network route
2425
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2426
+ # to the HTTP request.
2427
+ #
2428
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2429
+ #
2430
+ def get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
2431
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2432
+ fail ArgumentError, 'name is nil' if name.nil?
2433
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2434
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
2435
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2436
+ api_version = '2016-09-01'
2437
+
2438
+
2439
+ request_headers = {}
2440
+
2441
+ # Set Headers
2442
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2443
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2444
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
2445
+
2446
+ request_url = @base_url || @client.base_url
2447
+
2448
+ options = {
2449
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2450
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
2451
+ query_params: {'api-version' => api_version},
2452
+ headers: request_headers.merge(custom_headers || {}),
2453
+ base_url: request_url
2454
+ }
2455
+ promise = @client.make_request_async(:get, path_template, options)
2456
+
2457
+ promise = promise.then do |result|
2458
+ http_response = result.response
2459
+ status_code = http_response.status
2460
+ response_content = http_response.body
2461
+ unless status_code == 200 || status_code == 404
2462
+ error_model = JSON.load(response_content)
2463
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2464
+ end
2465
+
2466
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2467
+ # Deserialize Response
2468
+ if status_code == 200
2469
+ begin
2470
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2471
+ result_mapper = {
2472
+ required: false,
2473
+ serialized_name: 'parsed_response',
2474
+ type: {
2475
+ name: 'Sequence',
2476
+ element: {
2477
+ required: false,
2478
+ serialized_name: 'VnetRouteElementType',
2479
+ type: {
2480
+ name: 'Composite',
2481
+ class_name: 'VnetRoute'
2482
+ }
2483
+ }
2484
+ }
2485
+ }
2486
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2487
+ rescue Exception => e
2488
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2489
+ end
2490
+ end
2491
+
2492
+ result
2493
+ end
2494
+
2495
+ promise.execute
2496
+ end
2497
+
2498
+ #
2499
+ # Creates a new route or updates an existing route for a vnet in an app service
2500
+ # plan.
2501
+ #
2502
+ # Creates a new route or updates an existing route for a vnet in an app service
2503
+ # plan.
2504
+ #
2505
+ # @param resource_group_name [String] Name of resource group
2506
+ # @param name [String] Name of App Service Plan
2507
+ # @param vnet_name [String] Name of virtual network
2508
+ # @param route_name [String] Name of the virtual network route
2509
+ # @param route [VnetRoute] The route object
2510
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2511
+ # will be added to the HTTP request.
2512
+ #
2513
+ # @return [VnetRoute] operation results.
2514
+ #
2515
+ def create_or_update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
2516
+ response = create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value!
2517
+ response.body unless response.nil?
2518
+ end
2519
+
2520
+ #
2521
+ # Creates a new route or updates an existing route for a vnet in an app service
2522
+ # plan.
2523
+ #
2524
+ # Creates a new route or updates an existing route for a vnet in an app service
2525
+ # plan.
2526
+ #
2527
+ # @param resource_group_name [String] Name of resource group
2528
+ # @param name [String] Name of App Service Plan
2529
+ # @param vnet_name [String] Name of virtual network
2530
+ # @param route_name [String] Name of the virtual network route
2531
+ # @param route [VnetRoute] The route object
2532
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2533
+ # will be added to the HTTP request.
2534
+ #
2535
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2536
+ #
2537
+ def create_or_update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
2538
+ create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value!
2539
+ end
2540
+
2541
+ #
2542
+ # Creates a new route or updates an existing route for a vnet in an app service
2543
+ # plan.
2544
+ #
2545
+ # Creates a new route or updates an existing route for a vnet in an app service
2546
+ # plan.
2547
+ #
2548
+ # @param resource_group_name [String] Name of resource group
2549
+ # @param name [String] Name of App Service Plan
2550
+ # @param vnet_name [String] Name of virtual network
2551
+ # @param route_name [String] Name of the virtual network route
2552
+ # @param route [VnetRoute] The route object
2553
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2554
+ # to the HTTP request.
2555
+ #
2556
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2557
+ #
2558
+ def create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
2559
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2560
+ fail ArgumentError, 'name is nil' if name.nil?
2561
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2562
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
2563
+ fail ArgumentError, 'route is nil' if route.nil?
2564
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2565
+ api_version = '2016-09-01'
2566
+
2567
+
2568
+ request_headers = {}
2569
+
2570
+ # Set Headers
2571
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2572
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2573
+
2574
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2575
+
2576
+ # Serialize Request
2577
+ request_mapper = VnetRoute.mapper()
2578
+ request_content = @client.serialize(request_mapper, route, 'route')
2579
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2580
+
2581
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
2582
+
2583
+ request_url = @base_url || @client.base_url
2584
+
2585
+ options = {
2586
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2587
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
2588
+ query_params: {'api-version' => api_version},
2589
+ body: request_content,
2590
+ headers: request_headers.merge(custom_headers || {}),
2591
+ base_url: request_url
2592
+ }
2593
+ promise = @client.make_request_async(:put, path_template, options)
2594
+
2595
+ promise = promise.then do |result|
2596
+ http_response = result.response
2597
+ status_code = http_response.status
2598
+ response_content = http_response.body
2599
+ unless status_code == 200 || status_code == 400 || status_code == 404
2600
+ error_model = JSON.load(response_content)
2601
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2602
+ end
2603
+
2604
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2605
+ # Deserialize Response
2606
+ if status_code == 200
2607
+ begin
2608
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2609
+ result_mapper = VnetRoute.mapper()
2610
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2611
+ rescue Exception => e
2612
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2613
+ end
2614
+ end
2615
+
2616
+ result
2617
+ end
2618
+
2619
+ promise.execute
2620
+ end
2621
+
2622
+ #
2623
+ # Deletes an existing route for a vnet in an app service plan.
2624
+ #
2625
+ # Deletes an existing route for a vnet in an app service plan.
2626
+ #
2627
+ # @param resource_group_name [String] Name of resource group
2628
+ # @param name [String] Name of App Service Plan
2629
+ # @param vnet_name [String] Name of virtual network
2630
+ # @param route_name [String] Name of the virtual network route
2631
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2632
+ # will be added to the HTTP request.
2633
+ #
2634
+ # @return [Object] operation results.
2635
+ #
2636
+ def delete_vnet_route(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
2637
+ response = delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers).value!
2638
+ response.body unless response.nil?
2639
+ end
2640
+
2641
+ #
2642
+ # Deletes an existing route for a vnet in an app service plan.
2643
+ #
2644
+ # Deletes an existing route for a vnet in an app service plan.
2645
+ #
2646
+ # @param resource_group_name [String] Name of resource group
2647
+ # @param name [String] Name of App Service Plan
2648
+ # @param vnet_name [String] Name of virtual network
2649
+ # @param route_name [String] Name of the virtual network route
2650
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2651
+ # will be added to the HTTP request.
2652
+ #
2653
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2654
+ #
2655
+ def delete_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
2656
+ delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers).value!
2657
+ end
2658
+
2659
+ #
2660
+ # Deletes an existing route for a vnet in an app service plan.
2661
+ #
2662
+ # Deletes an existing route for a vnet in an app service plan.
2663
+ #
2664
+ # @param resource_group_name [String] Name of resource group
2665
+ # @param name [String] Name of App Service Plan
2666
+ # @param vnet_name [String] Name of virtual network
2667
+ # @param route_name [String] Name of the virtual network route
2668
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2669
+ # to the HTTP request.
2670
+ #
2671
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2672
+ #
2673
+ def delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil)
2674
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2675
+ fail ArgumentError, 'name is nil' if name.nil?
2676
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2677
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
2678
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2679
+ api_version = '2016-09-01'
2680
+
2681
+
2682
+ request_headers = {}
2683
+
2684
+ # Set Headers
2685
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2686
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2687
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
2688
+
2689
+ request_url = @base_url || @client.base_url
2690
+
2691
+ options = {
2692
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2693
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
2694
+ query_params: {'api-version' => api_version},
2695
+ headers: request_headers.merge(custom_headers || {}),
2696
+ base_url: request_url
2697
+ }
2698
+ promise = @client.make_request_async(:delete, path_template, options)
2699
+
2700
+ promise = promise.then do |result|
2701
+ http_response = result.response
2702
+ status_code = http_response.status
2703
+ response_content = http_response.body
2704
+ unless status_code == 200 || status_code == 404
2705
+ error_model = JSON.load(response_content)
2706
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2707
+ end
2708
+
2709
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2710
+
2711
+ result
2712
+ end
2713
+
2714
+ promise.execute
2715
+ end
2716
+
2717
+ #
2718
+ # Creates a new route or updates an existing route for a vnet in an app service
2719
+ # plan.
2720
+ #
2721
+ # Creates a new route or updates an existing route for a vnet in an app service
2722
+ # plan.
2723
+ #
2724
+ # @param resource_group_name [String] Name of resource group
2725
+ # @param name [String] Name of App Service Plan
2726
+ # @param vnet_name [String] Name of virtual network
2727
+ # @param route_name [String] Name of the virtual network route
2728
+ # @param route [VnetRoute] The route object
2729
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2730
+ # will be added to the HTTP request.
2731
+ #
2732
+ # @return [VnetRoute] operation results.
2733
+ #
2734
+ def update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
2735
+ response = update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value!
2736
+ response.body unless response.nil?
2737
+ end
2738
+
2739
+ #
2740
+ # Creates a new route or updates an existing route for a vnet in an app service
2741
+ # plan.
2742
+ #
2743
+ # Creates a new route or updates an existing route for a vnet in an app service
2744
+ # plan.
2745
+ #
2746
+ # @param resource_group_name [String] Name of resource group
2747
+ # @param name [String] Name of App Service Plan
2748
+ # @param vnet_name [String] Name of virtual network
2749
+ # @param route_name [String] Name of the virtual network route
2750
+ # @param route [VnetRoute] The route object
2751
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2752
+ # will be added to the HTTP request.
2753
+ #
2754
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2755
+ #
2756
+ def update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
2757
+ update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value!
2758
+ end
2759
+
2760
+ #
2761
+ # Creates a new route or updates an existing route for a vnet in an app service
2762
+ # plan.
2763
+ #
2764
+ # Creates a new route or updates an existing route for a vnet in an app service
2765
+ # plan.
2766
+ #
2767
+ # @param resource_group_name [String] Name of resource group
2768
+ # @param name [String] Name of App Service Plan
2769
+ # @param vnet_name [String] Name of virtual network
2770
+ # @param route_name [String] Name of the virtual network route
2771
+ # @param route [VnetRoute] The route object
2772
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2773
+ # to the HTTP request.
2774
+ #
2775
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2776
+ #
2777
+ def update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil)
1790
2778
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1791
2779
  fail ArgumentError, 'name is nil' if name.nil?
2780
+ fail ArgumentError, 'vnet_name is nil' if vnet_name.nil?
2781
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
2782
+ fail ArgumentError, 'route is nil' if route.nil?
1792
2783
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1793
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2784
+ api_version = '2016-09-01'
1794
2785
 
1795
2786
 
1796
2787
  request_headers = {}
@@ -1798,24 +2789,33 @@ module Azure::ARM::Web
1798
2789
  # Set Headers
1799
2790
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1800
2791
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1801
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'
2792
+
2793
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2794
+
2795
+ # Serialize Request
2796
+ request_mapper = VnetRoute.mapper()
2797
+ request_content = @client.serialize(request_mapper, route, 'route')
2798
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2799
+
2800
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'
1802
2801
 
1803
2802
  request_url = @base_url || @client.base_url
1804
2803
 
1805
2804
  options = {
1806
2805
  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: {'$skipToken' => skip_token,'$filter' => filter,'$top' => top,'api-version' => @client.api_version},
2806
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
2807
+ query_params: {'api-version' => api_version},
2808
+ body: request_content,
1809
2809
  headers: request_headers.merge(custom_headers || {}),
1810
2810
  base_url: request_url
1811
2811
  }
1812
- promise = @client.make_request_async(:get, path_template, options)
2812
+ promise = @client.make_request_async(:patch, path_template, options)
1813
2813
 
1814
2814
  promise = promise.then do |result|
1815
2815
  http_response = result.response
1816
2816
  status_code = http_response.status
1817
2817
  response_content = http_response.body
1818
- unless status_code == 200
2818
+ unless status_code == 200 || status_code == 400 || status_code == 404
1819
2819
  error_model = JSON.load(response_content)
1820
2820
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1821
2821
  end
@@ -1825,7 +2825,7 @@ module Azure::ARM::Web
1825
2825
  if status_code == 200
1826
2826
  begin
1827
2827
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1828
- result_mapper = SiteCollection.mapper()
2828
+ result_mapper = VnetRoute.mapper()
1829
2829
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1830
2830
  rescue Exception => e
1831
2831
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1838,6 +2838,8 @@ module Azure::ARM::Web
1838
2838
  promise.execute
1839
2839
  end
1840
2840
 
2841
+ #
2842
+ # Submit a reboot request for a worker machine in the specified server farm
1841
2843
  #
1842
2844
  # Submit a reboot request for a worker machine in the specified server farm
1843
2845
  #
@@ -1849,11 +2851,13 @@ module Azure::ARM::Web
1849
2851
  #
1850
2852
  # @return [Object] operation results.
1851
2853
  #
1852
- def reboot_worker_for_server_farm(resource_group_name, name, worker_name, custom_headers = nil)
1853
- response = reboot_worker_for_server_farm_async(resource_group_name, name, worker_name, custom_headers).value!
2854
+ def reboot_worker(resource_group_name, name, worker_name, custom_headers = nil)
2855
+ response = reboot_worker_async(resource_group_name, name, worker_name, custom_headers).value!
1854
2856
  response.body unless response.nil?
1855
2857
  end
1856
2858
 
2859
+ #
2860
+ # Submit a reboot request for a worker machine in the specified server farm
1857
2861
  #
1858
2862
  # Submit a reboot request for a worker machine in the specified server farm
1859
2863
  #
@@ -1865,10 +2869,12 @@ module Azure::ARM::Web
1865
2869
  #
1866
2870
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1867
2871
  #
1868
- def reboot_worker_for_server_farm_with_http_info(resource_group_name, name, worker_name, custom_headers = nil)
1869
- reboot_worker_for_server_farm_async(resource_group_name, name, worker_name, custom_headers).value!
2872
+ def reboot_worker_with_http_info(resource_group_name, name, worker_name, custom_headers = nil)
2873
+ reboot_worker_async(resource_group_name, name, worker_name, custom_headers).value!
1870
2874
  end
1871
2875
 
2876
+ #
2877
+ # Submit a reboot request for a worker machine in the specified server farm
1872
2878
  #
1873
2879
  # Submit a reboot request for a worker machine in the specified server farm
1874
2880
  #
@@ -1880,12 +2886,12 @@ module Azure::ARM::Web
1880
2886
  #
1881
2887
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1882
2888
  #
1883
- def reboot_worker_for_server_farm_async(resource_group_name, name, worker_name, custom_headers = nil)
2889
+ def reboot_worker_async(resource_group_name, name, worker_name, custom_headers = nil)
1884
2890
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1885
2891
  fail ArgumentError, 'name is nil' if name.nil?
1886
2892
  fail ArgumentError, 'worker_name is nil' if worker_name.nil?
1887
2893
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1888
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2894
+ api_version = '2016-09-01'
1889
2895
 
1890
2896
 
1891
2897
  request_headers = {}
@@ -1900,7 +2906,7 @@ module Azure::ARM::Web
1900
2906
  options = {
1901
2907
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1902
2908
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerName' => worker_name,'subscriptionId' => @client.subscription_id},
1903
- query_params: {'api-version' => @client.api_version},
2909
+ query_params: {'api-version' => api_version},
1904
2910
  headers: request_headers.merge(custom_headers || {}),
1905
2911
  base_url: request_url
1906
2912
  }
@@ -1924,58 +2930,65 @@ module Azure::ARM::Web
1924
2930
  end
1925
2931
 
1926
2932
  #
1927
- # Restarts web apps in a specified App Service Plan
2933
+ # Creates or updates an App Service Plan
2934
+ #
2935
+ # Creates or updates an App Service Plan
1928
2936
  #
1929
2937
  # @param resource_group_name [String] Name of resource group
1930
2938
  # @param name [String] Name of App Service Plan
1931
- # @param soft_restart [Boolean] Soft restart applies the configuration
1932
- # settings and restarts the apps if necessary. Hard restart always restarts
1933
- # and reprovisions the apps
2939
+ # @param app_service_plan [AppServicePlan] Details of App Service Plan
2940
+ # @param allow_pending_state [Boolean] OBSOLETE: If true, allow pending state
2941
+ # for App Service Plan
1934
2942
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1935
2943
  # will be added to the HTTP request.
1936
2944
  #
1937
- # @return [Object] operation results.
2945
+ # @return [AppServicePlan] operation results.
1938
2946
  #
1939
- def restart_sites_for_server_farm(resource_group_name, name, soft_restart = nil, custom_headers = nil)
1940
- response = restart_sites_for_server_farm_async(resource_group_name, name, soft_restart, custom_headers).value!
2947
+ def begin_create_or_update(resource_group_name, name, app_service_plan, allow_pending_state = nil, custom_headers = nil)
2948
+ response = begin_create_or_update_async(resource_group_name, name, app_service_plan, allow_pending_state, custom_headers).value!
1941
2949
  response.body unless response.nil?
1942
2950
  end
1943
2951
 
1944
2952
  #
1945
- # Restarts web apps in a specified App Service Plan
2953
+ # Creates or updates an App Service Plan
2954
+ #
2955
+ # Creates or updates an App Service Plan
1946
2956
  #
1947
2957
  # @param resource_group_name [String] Name of resource group
1948
2958
  # @param name [String] Name of App Service Plan
1949
- # @param soft_restart [Boolean] Soft restart applies the configuration
1950
- # settings and restarts the apps if necessary. Hard restart always restarts
1951
- # and reprovisions the apps
2959
+ # @param app_service_plan [AppServicePlan] Details of App Service Plan
2960
+ # @param allow_pending_state [Boolean] OBSOLETE: If true, allow pending state
2961
+ # for App Service Plan
1952
2962
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1953
2963
  # will be added to the HTTP request.
1954
2964
  #
1955
2965
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1956
2966
  #
1957
- def restart_sites_for_server_farm_with_http_info(resource_group_name, name, soft_restart = nil, custom_headers = nil)
1958
- restart_sites_for_server_farm_async(resource_group_name, name, soft_restart, custom_headers).value!
2967
+ def begin_create_or_update_with_http_info(resource_group_name, name, app_service_plan, allow_pending_state = nil, custom_headers = nil)
2968
+ begin_create_or_update_async(resource_group_name, name, app_service_plan, allow_pending_state, custom_headers).value!
1959
2969
  end
1960
2970
 
1961
2971
  #
1962
- # Restarts web apps in a specified App Service Plan
2972
+ # Creates or updates an App Service Plan
2973
+ #
2974
+ # Creates or updates an App Service Plan
1963
2975
  #
1964
2976
  # @param resource_group_name [String] Name of resource group
1965
2977
  # @param name [String] Name of App Service Plan
1966
- # @param soft_restart [Boolean] Soft restart applies the configuration
1967
- # settings and restarts the apps if necessary. Hard restart always restarts
1968
- # and reprovisions the apps
2978
+ # @param app_service_plan [AppServicePlan] Details of App Service Plan
2979
+ # @param allow_pending_state [Boolean] OBSOLETE: If true, allow pending state
2980
+ # for App Service Plan
1969
2981
  # @param [Hash{String => String}] A hash of custom headers that will be added
1970
2982
  # to the HTTP request.
1971
2983
  #
1972
2984
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1973
2985
  #
1974
- def restart_sites_for_server_farm_async(resource_group_name, name, soft_restart = nil, custom_headers = nil)
2986
+ def begin_create_or_update_async(resource_group_name, name, app_service_plan, allow_pending_state = nil, custom_headers = nil)
1975
2987
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1976
2988
  fail ArgumentError, 'name is nil' if name.nil?
2989
+ fail ArgumentError, 'app_service_plan is nil' if app_service_plan.nil?
1977
2990
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1978
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2991
+ api_version = '2016-09-01'
1979
2992
 
1980
2993
 
1981
2994
  request_headers = {}
@@ -1983,29 +2996,58 @@ module Azure::ARM::Web
1983
2996
  # Set Headers
1984
2997
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1985
2998
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1986
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'
2999
+
3000
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3001
+
3002
+ # Serialize Request
3003
+ request_mapper = AppServicePlan.mapper()
3004
+ request_content = @client.serialize(request_mapper, app_service_plan, 'app_service_plan')
3005
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
3006
+
3007
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'
1987
3008
 
1988
3009
  request_url = @base_url || @client.base_url
1989
3010
 
1990
3011
  options = {
1991
3012
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1992
3013
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1993
- query_params: {'softRestart' => soft_restart,'api-version' => @client.api_version},
3014
+ query_params: {'allowPendingState' => allow_pending_state,'api-version' => api_version},
3015
+ body: request_content,
1994
3016
  headers: request_headers.merge(custom_headers || {}),
1995
3017
  base_url: request_url
1996
3018
  }
1997
- promise = @client.make_request_async(:post, path_template, options)
3019
+ promise = @client.make_request_async(:put, path_template, options)
1998
3020
 
1999
3021
  promise = promise.then do |result|
2000
3022
  http_response = result.response
2001
3023
  status_code = http_response.status
2002
3024
  response_content = http_response.body
2003
- unless status_code == 200
3025
+ unless status_code == 200 || status_code == 202
2004
3026
  error_model = JSON.load(response_content)
2005
3027
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2006
3028
  end
2007
3029
 
2008
3030
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3031
+ # Deserialize Response
3032
+ if status_code == 200
3033
+ begin
3034
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3035
+ result_mapper = AppServicePlan.mapper()
3036
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
3037
+ rescue Exception => e
3038
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3039
+ end
3040
+ end
3041
+ # Deserialize Response
3042
+ if status_code == 202
3043
+ begin
3044
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3045
+ result_mapper = AppServicePlan.mapper()
3046
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
3047
+ rescue Exception => e
3048
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3049
+ end
3050
+ end
2009
3051
 
2010
3052
  result
2011
3053
  end
@@ -2014,53 +3056,52 @@ module Azure::ARM::Web
2014
3056
  end
2015
3057
 
2016
3058
  #
2017
- # Gets a server farm operation
3059
+ # Gets all App Service Plans for a subcription
2018
3060
  #
2019
- # @param resource_group_name [String] Name of resource group
2020
- # @param name [String] Name of server farm
2021
- # @param operation_id [String] Id of Server farm operation"&gt;
3061
+ # Gets all App Service Plans for a subcription
3062
+ #
3063
+ # @param next_page_link [String] The NextLink from the previous successful call
3064
+ # to List operation.
2022
3065
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2023
3066
  # will be added to the HTTP request.
2024
3067
  #
2025
- # @return [ServerFarmWithRichSku] operation results.
3068
+ # @return [AppServicePlanCollection] operation results.
2026
3069
  #
2027
- def get_server_farm_operation(resource_group_name, name, operation_id, custom_headers = nil)
2028
- response = get_server_farm_operation_async(resource_group_name, name, operation_id, custom_headers).value!
3070
+ def list_next(next_page_link, custom_headers = nil)
3071
+ response = list_next_async(next_page_link, custom_headers).value!
2029
3072
  response.body unless response.nil?
2030
3073
  end
2031
3074
 
2032
3075
  #
2033
- # Gets a server farm operation
3076
+ # Gets all App Service Plans for a subcription
2034
3077
  #
2035
- # @param resource_group_name [String] Name of resource group
2036
- # @param name [String] Name of server farm
2037
- # @param operation_id [String] Id of Server farm operation"&gt;
3078
+ # Gets all App Service Plans for a subcription
3079
+ #
3080
+ # @param next_page_link [String] The NextLink from the previous successful call
3081
+ # to List operation.
2038
3082
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2039
3083
  # will be added to the HTTP request.
2040
3084
  #
2041
3085
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2042
3086
  #
2043
- def get_server_farm_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil)
2044
- get_server_farm_operation_async(resource_group_name, name, operation_id, custom_headers).value!
3087
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
3088
+ list_next_async(next_page_link, custom_headers).value!
2045
3089
  end
2046
3090
 
2047
3091
  #
2048
- # Gets a server farm operation
3092
+ # Gets all App Service Plans for a subcription
2049
3093
  #
2050
- # @param resource_group_name [String] Name of resource group
2051
- # @param name [String] Name of server farm
2052
- # @param operation_id [String] Id of Server farm operation"&gt;
3094
+ # Gets all App Service Plans for a subcription
3095
+ #
3096
+ # @param next_page_link [String] The NextLink from the previous successful call
3097
+ # to List operation.
2053
3098
  # @param [Hash{String => String}] A hash of custom headers that will be added
2054
3099
  # to the HTTP request.
2055
3100
  #
2056
3101
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2057
3102
  #
2058
- def get_server_farm_operation_async(resource_group_name, name, operation_id, custom_headers = nil)
2059
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2060
- fail ArgumentError, 'name is nil' if name.nil?
2061
- fail ArgumentError, 'operation_id is nil' if operation_id.nil?
2062
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2063
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
3103
+ def list_next_async(next_page_link, custom_headers = nil)
3104
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2064
3105
 
2065
3106
 
2066
3107
  request_headers = {}
@@ -2068,14 +3109,13 @@ module Azure::ARM::Web
2068
3109
  # Set Headers
2069
3110
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2070
3111
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2071
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/operationresults/{operationId}'
3112
+ path_template = '{nextLink}'
2072
3113
 
2073
3114
  request_url = @base_url || @client.base_url
2074
3115
 
2075
3116
  options = {
2076
3117
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2077
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
2078
- query_params: {'api-version' => @client.api_version},
3118
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2079
3119
  headers: request_headers.merge(custom_headers || {}),
2080
3120
  base_url: request_url
2081
3121
  }
@@ -2095,7 +3135,7 @@ module Azure::ARM::Web
2095
3135
  if status_code == 200
2096
3136
  begin
2097
3137
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2098
- result_mapper = ServerFarmWithRichSku.mapper()
3138
+ result_mapper = AppServicePlanCollection.mapper()
2099
3139
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2100
3140
  rescue Exception => e
2101
3141
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2112,15 +3152,18 @@ module Azure::ARM::Web
2112
3152
  # Gets collection of App Service Plans in a resource group for a given
2113
3153
  # subscription.
2114
3154
  #
2115
- # @param next_page_link [String] The NextLink from the previous successful
2116
- # call to List operation.
3155
+ # Gets collection of App Service Plans in a resource group for a given
3156
+ # subscription.
3157
+ #
3158
+ # @param next_page_link [String] The NextLink from the previous successful call
3159
+ # to List operation.
2117
3160
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2118
3161
  # will be added to the HTTP request.
2119
3162
  #
2120
- # @return [ServerFarmCollection] operation results.
3163
+ # @return [AppServicePlanCollection] operation results.
2121
3164
  #
2122
- def get_server_farms_next(next_page_link, custom_headers = nil)
2123
- response = get_server_farms_next_async(next_page_link, custom_headers).value!
3165
+ def list_by_resource_group_next(next_page_link, custom_headers = nil)
3166
+ response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
2124
3167
  response.body unless response.nil?
2125
3168
  end
2126
3169
 
@@ -2128,29 +3171,35 @@ module Azure::ARM::Web
2128
3171
  # Gets collection of App Service Plans in a resource group for a given
2129
3172
  # subscription.
2130
3173
  #
2131
- # @param next_page_link [String] The NextLink from the previous successful
2132
- # call to List operation.
3174
+ # Gets collection of App Service Plans in a resource group for a given
3175
+ # subscription.
3176
+ #
3177
+ # @param next_page_link [String] The NextLink from the previous successful call
3178
+ # to List operation.
2133
3179
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2134
3180
  # will be added to the HTTP request.
2135
3181
  #
2136
3182
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2137
3183
  #
2138
- def get_server_farms_next_with_http_info(next_page_link, custom_headers = nil)
2139
- get_server_farms_next_async(next_page_link, custom_headers).value!
3184
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
3185
+ list_by_resource_group_next_async(next_page_link, custom_headers).value!
2140
3186
  end
2141
3187
 
2142
3188
  #
2143
3189
  # Gets collection of App Service Plans in a resource group for a given
2144
3190
  # subscription.
2145
3191
  #
2146
- # @param next_page_link [String] The NextLink from the previous successful
2147
- # call to List operation.
3192
+ # Gets collection of App Service Plans in a resource group for a given
3193
+ # subscription.
3194
+ #
3195
+ # @param next_page_link [String] The NextLink from the previous successful call
3196
+ # to List operation.
2148
3197
  # @param [Hash{String => String}] A hash of custom headers that will be added
2149
3198
  # to the HTTP request.
2150
3199
  #
2151
3200
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2152
3201
  #
2153
- def get_server_farms_next_async(next_page_link, custom_headers = nil)
3202
+ def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
2154
3203
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2155
3204
 
2156
3205
 
@@ -2185,7 +3234,7 @@ module Azure::ARM::Web
2185
3234
  if status_code == 200
2186
3235
  begin
2187
3236
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2188
- result_mapper = ServerFarmCollection.mapper()
3237
+ result_mapper = AppServicePlanCollection.mapper()
2189
3238
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2190
3239
  rescue Exception => e
2191
3240
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2199,45 +3248,51 @@ module Azure::ARM::Web
2199
3248
  end
2200
3249
 
2201
3250
  #
2202
- # Queries for App Serice Plan metrics
3251
+ # List of metrics that can be queried for an App Service Plan
3252
+ #
3253
+ # List of metrics that can be queried for an App Service Plan
2203
3254
  #
2204
- # @param next_page_link [String] The NextLink from the previous successful
2205
- # call to List operation.
3255
+ # @param next_page_link [String] The NextLink from the previous successful call
3256
+ # to List operation.
2206
3257
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2207
3258
  # will be added to the HTTP request.
2208
3259
  #
2209
- # @return [ResourceMetricCollection] operation results.
3260
+ # @return [MetricDefinitionCollection] operation results.
2210
3261
  #
2211
- def get_server_farm_metrics_next(next_page_link, custom_headers = nil)
2212
- response = get_server_farm_metrics_next_async(next_page_link, custom_headers).value!
3262
+ def list_metric_defintions_next(next_page_link, custom_headers = nil)
3263
+ response = list_metric_defintions_next_async(next_page_link, custom_headers).value!
2213
3264
  response.body unless response.nil?
2214
3265
  end
2215
3266
 
2216
3267
  #
2217
- # Queries for App Serice Plan metrics
3268
+ # List of metrics that can be queried for an App Service Plan
2218
3269
  #
2219
- # @param next_page_link [String] The NextLink from the previous successful
2220
- # call to List operation.
3270
+ # List of metrics that can be queried for an App Service Plan
3271
+ #
3272
+ # @param next_page_link [String] The NextLink from the previous successful call
3273
+ # to List operation.
2221
3274
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2222
3275
  # will be added to the HTTP request.
2223
3276
  #
2224
3277
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2225
3278
  #
2226
- def get_server_farm_metrics_next_with_http_info(next_page_link, custom_headers = nil)
2227
- get_server_farm_metrics_next_async(next_page_link, custom_headers).value!
3279
+ def list_metric_defintions_next_with_http_info(next_page_link, custom_headers = nil)
3280
+ list_metric_defintions_next_async(next_page_link, custom_headers).value!
2228
3281
  end
2229
3282
 
2230
3283
  #
2231
- # Queries for App Serice Plan metrics
3284
+ # List of metrics that can be queried for an App Service Plan
2232
3285
  #
2233
- # @param next_page_link [String] The NextLink from the previous successful
2234
- # call to List operation.
3286
+ # List of metrics that can be queried for an App Service Plan
3287
+ #
3288
+ # @param next_page_link [String] The NextLink from the previous successful call
3289
+ # to List operation.
2235
3290
  # @param [Hash{String => String}] A hash of custom headers that will be added
2236
3291
  # to the HTTP request.
2237
3292
  #
2238
3293
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2239
3294
  #
2240
- def get_server_farm_metrics_next_async(next_page_link, custom_headers = nil)
3295
+ def list_metric_defintions_next_async(next_page_link, custom_headers = nil)
2241
3296
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2242
3297
 
2243
3298
 
@@ -2272,7 +3327,7 @@ module Azure::ARM::Web
2272
3327
  if status_code == 200
2273
3328
  begin
2274
3329
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2275
- result_mapper = ResourceMetricCollection.mapper()
3330
+ result_mapper = MetricDefinitionCollection.mapper()
2276
3331
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2277
3332
  rescue Exception => e
2278
3333
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2286,45 +3341,51 @@ module Azure::ARM::Web
2286
3341
  end
2287
3342
 
2288
3343
  #
2289
- # List of metrics that can be queried for an App Service Plan
3344
+ # Queries for App Serice Plan metrics
3345
+ #
3346
+ # Queries for App Serice Plan metrics
2290
3347
  #
2291
- # @param next_page_link [String] The NextLink from the previous successful
2292
- # call to List operation.
3348
+ # @param next_page_link [String] The NextLink from the previous successful call
3349
+ # to List operation.
2293
3350
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2294
3351
  # will be added to the HTTP request.
2295
3352
  #
2296
- # @return [MetricDefinitionCollection] operation results.
3353
+ # @return [ResourceMetricCollection] operation results.
2297
3354
  #
2298
- def get_server_farm_metric_defintions_next(next_page_link, custom_headers = nil)
2299
- response = get_server_farm_metric_defintions_next_async(next_page_link, custom_headers).value!
3355
+ def list_metrics_next(next_page_link, custom_headers = nil)
3356
+ response = list_metrics_next_async(next_page_link, custom_headers).value!
2300
3357
  response.body unless response.nil?
2301
3358
  end
2302
3359
 
2303
3360
  #
2304
- # List of metrics that can be queried for an App Service Plan
3361
+ # Queries for App Serice Plan metrics
2305
3362
  #
2306
- # @param next_page_link [String] The NextLink from the previous successful
2307
- # call to List operation.
3363
+ # Queries for App Serice Plan metrics
3364
+ #
3365
+ # @param next_page_link [String] The NextLink from the previous successful call
3366
+ # to List operation.
2308
3367
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2309
3368
  # will be added to the HTTP request.
2310
3369
  #
2311
3370
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2312
3371
  #
2313
- def get_server_farm_metric_defintions_next_with_http_info(next_page_link, custom_headers = nil)
2314
- get_server_farm_metric_defintions_next_async(next_page_link, custom_headers).value!
3372
+ def list_metrics_next_with_http_info(next_page_link, custom_headers = nil)
3373
+ list_metrics_next_async(next_page_link, custom_headers).value!
2315
3374
  end
2316
3375
 
2317
3376
  #
2318
- # List of metrics that can be queried for an App Service Plan
3377
+ # Queries for App Serice Plan metrics
2319
3378
  #
2320
- # @param next_page_link [String] The NextLink from the previous successful
2321
- # call to List operation.
3379
+ # Queries for App Serice Plan metrics
3380
+ #
3381
+ # @param next_page_link [String] The NextLink from the previous successful call
3382
+ # to List operation.
2322
3383
  # @param [Hash{String => String}] A hash of custom headers that will be added
2323
3384
  # to the HTTP request.
2324
3385
  #
2325
3386
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2326
3387
  #
2327
- def get_server_farm_metric_defintions_next_async(next_page_link, custom_headers = nil)
3388
+ def list_metrics_next_async(next_page_link, custom_headers = nil)
2328
3389
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2329
3390
 
2330
3391
 
@@ -2359,7 +3420,7 @@ module Azure::ARM::Web
2359
3420
  if status_code == 200
2360
3421
  begin
2361
3422
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2362
- result_mapper = MetricDefinitionCollection.mapper()
3423
+ result_mapper = ResourceMetricCollection.mapper()
2363
3424
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2364
3425
  rescue Exception => e
2365
3426
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2375,43 +3436,49 @@ module Azure::ARM::Web
2375
3436
  #
2376
3437
  # Gets list of Apps associated with an App Service Plan
2377
3438
  #
2378
- # @param next_page_link [String] The NextLink from the previous successful
2379
- # call to List operation.
3439
+ # Gets list of Apps associated with an App Service Plan
3440
+ #
3441
+ # @param next_page_link [String] The NextLink from the previous successful call
3442
+ # to List operation.
2380
3443
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2381
3444
  # will be added to the HTTP request.
2382
3445
  #
2383
- # @return [SiteCollection] operation results.
3446
+ # @return [WebAppCollection] operation results.
2384
3447
  #
2385
- def get_server_farm_sites_next(next_page_link, custom_headers = nil)
2386
- response = get_server_farm_sites_next_async(next_page_link, custom_headers).value!
3448
+ def list_web_apps_next(next_page_link, custom_headers = nil)
3449
+ response = list_web_apps_next_async(next_page_link, custom_headers).value!
2387
3450
  response.body unless response.nil?
2388
3451
  end
2389
3452
 
2390
3453
  #
2391
3454
  # Gets list of Apps associated with an App Service Plan
2392
3455
  #
2393
- # @param next_page_link [String] The NextLink from the previous successful
2394
- # call to List operation.
3456
+ # Gets list of Apps associated with an App Service Plan
3457
+ #
3458
+ # @param next_page_link [String] The NextLink from the previous successful call
3459
+ # to List operation.
2395
3460
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2396
3461
  # will be added to the HTTP request.
2397
3462
  #
2398
3463
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2399
3464
  #
2400
- def get_server_farm_sites_next_with_http_info(next_page_link, custom_headers = nil)
2401
- get_server_farm_sites_next_async(next_page_link, custom_headers).value!
3465
+ def list_web_apps_next_with_http_info(next_page_link, custom_headers = nil)
3466
+ list_web_apps_next_async(next_page_link, custom_headers).value!
2402
3467
  end
2403
3468
 
2404
3469
  #
2405
3470
  # Gets list of Apps associated with an App Service Plan
2406
3471
  #
2407
- # @param next_page_link [String] The NextLink from the previous successful
2408
- # call to List operation.
3472
+ # Gets list of Apps associated with an App Service Plan
3473
+ #
3474
+ # @param next_page_link [String] The NextLink from the previous successful call
3475
+ # to List operation.
2409
3476
  # @param [Hash{String => String}] A hash of custom headers that will be added
2410
3477
  # to the HTTP request.
2411
3478
  #
2412
3479
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2413
3480
  #
2414
- def get_server_farm_sites_next_async(next_page_link, custom_headers = nil)
3481
+ def list_web_apps_next_async(next_page_link, custom_headers = nil)
2415
3482
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2416
3483
 
2417
3484
 
@@ -2446,7 +3513,7 @@ module Azure::ARM::Web
2446
3513
  if status_code == 200
2447
3514
  begin
2448
3515
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2449
- result_mapper = SiteCollection.mapper()
3516
+ result_mapper = WebAppCollection.mapper()
2450
3517
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2451
3518
  rescue Exception => e
2452
3519
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2459,5 +3526,139 @@ module Azure::ARM::Web
2459
3526
  promise.execute
2460
3527
  end
2461
3528
 
3529
+ #
3530
+ # Gets all App Service Plans for a subcription
3531
+ #
3532
+ # Gets all App Service Plans for a subcription
3533
+ #
3534
+ # @param detailed [Boolean] False to return a subset of App Service Plan
3535
+ # properties, true to return all of the properties.
3536
+ # Retrieval of all properties may increase the API latency.
3537
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3538
+ # will be added to the HTTP request.
3539
+ #
3540
+ # @return [AppServicePlanCollection] which provide lazy access to pages of the
3541
+ # response.
3542
+ #
3543
+ def list_as_lazy(detailed = nil, custom_headers = nil)
3544
+ response = list_async(detailed, custom_headers).value!
3545
+ unless response.nil?
3546
+ page = response.body
3547
+ page.next_method = Proc.new do |next_page_link|
3548
+ list_next_async(next_page_link, custom_headers)
3549
+ end
3550
+ page
3551
+ end
3552
+ end
3553
+
3554
+ #
3555
+ # Gets collection of App Service Plans in a resource group for a given
3556
+ # subscription.
3557
+ #
3558
+ # Gets collection of App Service Plans in a resource group for a given
3559
+ # subscription.
3560
+ #
3561
+ # @param resource_group_name [String] Name of resource group
3562
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3563
+ # will be added to the HTTP request.
3564
+ #
3565
+ # @return [AppServicePlanCollection] which provide lazy access to pages of the
3566
+ # response.
3567
+ #
3568
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
3569
+ response = list_by_resource_group_async(resource_group_name, custom_headers).value!
3570
+ unless response.nil?
3571
+ page = response.body
3572
+ page.next_method = Proc.new do |next_page_link|
3573
+ list_by_resource_group_next_async(next_page_link, custom_headers)
3574
+ end
3575
+ page
3576
+ end
3577
+ end
3578
+
3579
+ #
3580
+ # List of metrics that can be queried for an App Service Plan
3581
+ #
3582
+ # List of metrics that can be queried for an App Service Plan
3583
+ #
3584
+ # @param resource_group_name [String] Name of resource group
3585
+ # @param name [String] Name of App Service Plan
3586
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3587
+ # will be added to the HTTP request.
3588
+ #
3589
+ # @return [MetricDefinitionCollection] which provide lazy access to pages of
3590
+ # the response.
3591
+ #
3592
+ def list_metric_defintions_as_lazy(resource_group_name, name, custom_headers = nil)
3593
+ response = list_metric_defintions_async(resource_group_name, name, custom_headers).value!
3594
+ unless response.nil?
3595
+ page = response.body
3596
+ page.next_method = Proc.new do |next_page_link|
3597
+ list_metric_defintions_next_async(next_page_link, custom_headers)
3598
+ end
3599
+ page
3600
+ end
3601
+ end
3602
+
3603
+ #
3604
+ # Queries for App Serice Plan metrics
3605
+ #
3606
+ # Queries for App Serice Plan metrics
3607
+ #
3608
+ # @param resource_group_name [String] Name of resource group
3609
+ # @param name [String] Name of App Service Plan
3610
+ # @param details [Boolean] If true, metrics are broken down per App Service
3611
+ # Plan instance
3612
+ # @param filter [String] Return only usages/metrics specified in the filter.
3613
+ # Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or
3614
+ # name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime
3615
+ # eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
3616
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3617
+ # will be added to the HTTP request.
3618
+ #
3619
+ # @return [ResourceMetricCollection] which provide lazy access to pages of the
3620
+ # response.
3621
+ #
3622
+ def list_metrics_as_lazy(resource_group_name, name, details = nil, filter = nil, custom_headers = nil)
3623
+ response = list_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
3624
+ unless response.nil?
3625
+ page = response.body
3626
+ page.next_method = Proc.new do |next_page_link|
3627
+ list_metrics_next_async(next_page_link, custom_headers)
3628
+ end
3629
+ page
3630
+ end
3631
+ end
3632
+
3633
+ #
3634
+ # Gets list of Apps associated with an App Service Plan
3635
+ #
3636
+ # Gets list of Apps associated with an App Service Plan
3637
+ #
3638
+ # @param resource_group_name [String] Name of resource group
3639
+ # @param name [String] Name of App Service Plan
3640
+ # @param skip_token [String] Skip to of web apps in a list. If specified, the
3641
+ # resulting list will contain web apps starting from (including) the skipToken.
3642
+ # Else, the resulting list contains web apps from the start of the list
3643
+ # @param filter [String] Supported filter: $filter=state eq running. Returns
3644
+ # only web apps that are currently running
3645
+ # @param top [String] List page size. If specified, results are paged.
3646
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3647
+ # will be added to the HTTP request.
3648
+ #
3649
+ # @return [WebAppCollection] which provide lazy access to pages of the
3650
+ # response.
3651
+ #
3652
+ def list_web_apps_as_lazy(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil)
3653
+ response = list_web_apps_async(resource_group_name, name, skip_token, filter, top, custom_headers).value!
3654
+ unless response.nil?
3655
+ page = response.body
3656
+ page.next_method = Proc.new do |next_page_link|
3657
+ list_web_apps_next_async(next_page_link, custom_headers)
3658
+ end
3659
+ page
3660
+ end
3661
+ end
3662
+
2462
3663
  end
2463
3664
  end