azure_mgmt_web 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/LICENSE.txt +21 -0
  4. data/Rakefile +5 -0
  5. data/azure_mgmt_web.gemspec +35 -0
  6. data/lib/azure_mgmt_web.rb +236 -0
  7. data/lib/azure_mgmt_web/certificates.rb +693 -0
  8. data/lib/azure_mgmt_web/classic_mobile_services.rb +208 -0
  9. data/lib/azure_mgmt_web/domains.rb +459 -0
  10. data/lib/azure_mgmt_web/global.rb +793 -0
  11. data/lib/azure_mgmt_web/global_domain_registration.rb +351 -0
  12. data/lib/azure_mgmt_web/global_resource_groups.rb +91 -0
  13. data/lib/azure_mgmt_web/hosting_environments.rb +2629 -0
  14. data/lib/azure_mgmt_web/managed_hosting_environments.rb +652 -0
  15. data/lib/azure_mgmt_web/models/access_control_entry_action.rb +16 -0
  16. data/lib/azure_mgmt_web/models/address.rb +101 -0
  17. data/lib/azure_mgmt_web/models/address_response.rb +105 -0
  18. data/lib/azure_mgmt_web/models/api_definition_info.rb +56 -0
  19. data/lib/azure_mgmt_web/models/application_logs_config.rb +97 -0
  20. data/lib/azure_mgmt_web/models/arm_plan.rb +92 -0
  21. data/lib/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
  22. data/lib/azure_mgmt_web/models/auto_heal_actions.rb +89 -0
  23. data/lib/azure_mgmt_web/models/auto_heal_custom_action.rb +66 -0
  24. data/lib/azure_mgmt_web/models/auto_heal_rules.rb +80 -0
  25. data/lib/azure_mgmt_web/models/auto_heal_triggers.rb +122 -0
  26. data/lib/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +82 -0
  27. data/lib/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +78 -0
  28. data/lib/azure_mgmt_web/models/azure_resource_type.rb +16 -0
  29. data/lib/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +70 -0
  30. data/lib/azure_mgmt_web/models/backup_item.rb +92 -0
  31. data/lib/azure_mgmt_web/models/backup_item_collection.rb +85 -0
  32. data/lib/azure_mgmt_web/models/backup_item_properties.rb +215 -0
  33. data/lib/azure_mgmt_web/models/backup_item_status.rb +24 -0
  34. data/lib/azure_mgmt_web/models/backup_request.rb +92 -0
  35. data/lib/azure_mgmt_web/models/backup_request_properties.rb +136 -0
  36. data/lib/azure_mgmt_web/models/backup_restore_operation_type.rb +17 -0
  37. data/lib/azure_mgmt_web/models/backup_schedule.rb +118 -0
  38. data/lib/azure_mgmt_web/models/built_in_authentication_provider.rb +19 -0
  39. data/lib/azure_mgmt_web/models/certificate.rb +92 -0
  40. data/lib/azure_mgmt_web/models/certificate_collection.rb +85 -0
  41. data/lib/azure_mgmt_web/models/certificate_properties.rb +194 -0
  42. data/lib/azure_mgmt_web/models/channels.rb +18 -0
  43. data/lib/azure_mgmt_web/models/classic_mobile_service.rb +92 -0
  44. data/lib/azure_mgmt_web/models/classic_mobile_service_collection.rb +85 -0
  45. data/lib/azure_mgmt_web/models/classic_mobile_service_properties.rb +56 -0
  46. data/lib/azure_mgmt_web/models/clone_ability_result.rb +17 -0
  47. data/lib/azure_mgmt_web/models/cloning_info.rb +152 -0
  48. data/lib/azure_mgmt_web/models/compute_mode_options.rb +16 -0
  49. data/lib/azure_mgmt_web/models/conn_string_info.rb +79 -0
  50. data/lib/azure_mgmt_web/models/conn_string_value_type_pair.rb +70 -0
  51. data/lib/azure_mgmt_web/models/connection_string_dictionary.rb +102 -0
  52. data/lib/azure_mgmt_web/models/contact.rb +136 -0
  53. data/lib/azure_mgmt_web/models/cors_settings.rb +59 -0
  54. data/lib/azure_mgmt_web/models/csm_move_resource_envelope.rb +66 -0
  55. data/lib/azure_mgmt_web/models/csm_publishing_profile_options.rb +59 -0
  56. data/lib/azure_mgmt_web/models/csm_site_recovery_entity.rb +80 -0
  57. data/lib/azure_mgmt_web/models/csm_slot_entity.rb +67 -0
  58. data/lib/azure_mgmt_web/models/csm_usage_quota.rb +102 -0
  59. data/lib/azure_mgmt_web/models/csm_usage_quota_collection.rb +85 -0
  60. data/lib/azure_mgmt_web/models/csr.rb +92 -0
  61. data/lib/azure_mgmt_web/models/csr_properties.rb +110 -0
  62. data/lib/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +16 -0
  63. data/lib/azure_mgmt_web/models/database_backup_setting.rb +91 -0
  64. data/lib/azure_mgmt_web/models/database_server_type.rb +18 -0
  65. data/lib/azure_mgmt_web/models/deleted_site.rb +92 -0
  66. data/lib/azure_mgmt_web/models/deleted_site_collection.rb +85 -0
  67. data/lib/azure_mgmt_web/models/deleted_site_properties.rb +365 -0
  68. data/lib/azure_mgmt_web/models/deployment.rb +92 -0
  69. data/lib/azure_mgmt_web/models/deployment_collection.rb +85 -0
  70. data/lib/azure_mgmt_web/models/deployment_properties.rb +142 -0
  71. data/lib/azure_mgmt_web/models/domain.rb +92 -0
  72. data/lib/azure_mgmt_web/models/domain_availablility_check_result.rb +79 -0
  73. data/lib/azure_mgmt_web/models/domain_collection.rb +85 -0
  74. data/lib/azure_mgmt_web/models/domain_control_center_sso_request.rb +75 -0
  75. data/lib/azure_mgmt_web/models/domain_properties.rb +262 -0
  76. data/lib/azure_mgmt_web/models/domain_purchase_consent.rb +79 -0
  77. data/lib/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +67 -0
  78. data/lib/azure_mgmt_web/models/domain_registration_input.rb +92 -0
  79. data/lib/azure_mgmt_web/models/domain_registration_input_properties.rb +271 -0
  80. data/lib/azure_mgmt_web/models/domain_status.rb +35 -0
  81. data/lib/azure_mgmt_web/models/domain_type.rb +16 -0
  82. data/lib/azure_mgmt_web/models/enabled_config.rb +56 -0
  83. data/lib/azure_mgmt_web/models/experiments.rb +77 -0
  84. data/lib/azure_mgmt_web/models/file_system_application_logs_config.rb +60 -0
  85. data/lib/azure_mgmt_web/models/file_system_http_logs_config.rb +82 -0
  86. data/lib/azure_mgmt_web/models/frequency_unit.rb +16 -0
  87. data/lib/azure_mgmt_web/models/geo_region.rb +92 -0
  88. data/lib/azure_mgmt_web/models/geo_region_collection.rb +85 -0
  89. data/lib/azure_mgmt_web/models/geo_region_properties.rb +74 -0
  90. data/lib/azure_mgmt_web/models/handler_mapping.rb +79 -0
  91. data/lib/azure_mgmt_web/models/host_name.rb +120 -0
  92. data/lib/azure_mgmt_web/models/host_name_binding.rb +92 -0
  93. data/lib/azure_mgmt_web/models/host_name_binding_collection.rb +85 -0
  94. data/lib/azure_mgmt_web/models/host_name_binding_properties.rb +124 -0
  95. data/lib/azure_mgmt_web/models/host_name_ssl_state.rb +98 -0
  96. data/lib/azure_mgmt_web/models/host_name_type.rb +16 -0
  97. data/lib/azure_mgmt_web/models/hosting_environment.rb +92 -0
  98. data/lib/azure_mgmt_web/models/hosting_environment_collection.rb +85 -0
  99. data/lib/azure_mgmt_web/models/hosting_environment_diagnostics.rb +65 -0
  100. data/lib/azure_mgmt_web/models/hosting_environment_profile.rb +78 -0
  101. data/lib/azure_mgmt_web/models/hosting_environment_properties.rb +452 -0
  102. data/lib/azure_mgmt_web/models/hosting_environment_status.rb +18 -0
  103. data/lib/azure_mgmt_web/models/http_logs_config.rb +80 -0
  104. data/lib/azure_mgmt_web/models/internal_load_balancing_mode.rb +17 -0
  105. data/lib/azure_mgmt_web/models/key_value_pair_string_string.rb +65 -0
  106. data/lib/azure_mgmt_web/models/localizable_string.rb +65 -0
  107. data/lib/azure_mgmt_web/models/log_level.rb +19 -0
  108. data/lib/azure_mgmt_web/models/managed_hosting_environment.rb +92 -0
  109. data/lib/azure_mgmt_web/models/managed_hosting_environment_collection.rb +85 -0
  110. data/lib/azure_mgmt_web/models/managed_hosting_environment_properties.rb +179 -0
  111. data/lib/azure_mgmt_web/models/managed_hosting_environment_status.rb +17 -0
  112. data/lib/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
  113. data/lib/azure_mgmt_web/models/metric_availabilily.rb +66 -0
  114. data/lib/azure_mgmt_web/models/metric_definition.rb +92 -0
  115. data/lib/azure_mgmt_web/models/metric_definition_collection.rb +85 -0
  116. data/lib/azure_mgmt_web/models/metric_definition_properties.rb +113 -0
  117. data/lib/azure_mgmt_web/models/name_identifier.rb +56 -0
  118. data/lib/azure_mgmt_web/models/name_identifier_collection.rb +85 -0
  119. data/lib/azure_mgmt_web/models/name_value_pair.rb +65 -0
  120. data/lib/azure_mgmt_web/models/network_access_control_entry.rb +88 -0
  121. data/lib/azure_mgmt_web/models/network_features.rb +94 -0
  122. data/lib/azure_mgmt_web/models/network_features_properties.rb +102 -0
  123. data/lib/azure_mgmt_web/models/notification_level.rb +18 -0
  124. data/lib/azure_mgmt_web/models/premier_add_on_request.rb +107 -0
  125. data/lib/azure_mgmt_web/models/provisioning_state.rb +19 -0
  126. data/lib/azure_mgmt_web/models/ramp_up_rule.rb +147 -0
  127. data/lib/azure_mgmt_web/models/recommendation.rb +210 -0
  128. data/lib/azure_mgmt_web/models/recommendation_rule.rb +146 -0
  129. data/lib/azure_mgmt_web/models/relay_service_connection_entity.rb +92 -0
  130. data/lib/azure_mgmt_web/models/relay_service_connection_entity_properties.rb +111 -0
  131. data/lib/azure_mgmt_web/models/requests_based_trigger.rb +66 -0
  132. data/lib/azure_mgmt_web/models/resource_metric.rb +171 -0
  133. data/lib/azure_mgmt_web/models/resource_metric_collection.rb +85 -0
  134. data/lib/azure_mgmt_web/models/resource_metric_name.rb +65 -0
  135. data/lib/azure_mgmt_web/models/resource_metric_value.rb +106 -0
  136. data/lib/azure_mgmt_web/models/resource_name_availability.rb +78 -0
  137. data/lib/azure_mgmt_web/models/resource_name_availability_request.rb +74 -0
  138. data/lib/azure_mgmt_web/models/restore_request.rb +92 -0
  139. data/lib/azure_mgmt_web/models/restore_request_properties.rb +162 -0
  140. data/lib/azure_mgmt_web/models/restore_response.rb +92 -0
  141. data/lib/azure_mgmt_web/models/restore_response_properties.rb +57 -0
  142. data/lib/azure_mgmt_web/models/routing_rule.rb +58 -0
  143. data/lib/azure_mgmt_web/models/server_farm_collection.rb +85 -0
  144. data/lib/azure_mgmt_web/models/server_farm_with_rich_sku.rb +108 -0
  145. data/lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb +164 -0
  146. data/lib/azure_mgmt_web/models/site.rb +92 -0
  147. data/lib/azure_mgmt_web/models/site_auth_settings.rb +379 -0
  148. data/lib/azure_mgmt_web/models/site_availability_state.rb +17 -0
  149. data/lib/azure_mgmt_web/models/site_cloneability.rb +157 -0
  150. data/lib/azure_mgmt_web/models/site_cloneability_criterion.rb +65 -0
  151. data/lib/azure_mgmt_web/models/site_collection.rb +85 -0
  152. data/lib/azure_mgmt_web/models/site_config.rb +92 -0
  153. data/lib/azure_mgmt_web/models/site_config_properties.rb +554 -0
  154. data/lib/azure_mgmt_web/models/site_instance.rb +92 -0
  155. data/lib/azure_mgmt_web/models/site_instance_collection.rb +85 -0
  156. data/lib/azure_mgmt_web/models/site_instance_properties.rb +56 -0
  157. data/lib/azure_mgmt_web/models/site_limits.rb +77 -0
  158. data/lib/azure_mgmt_web/models/site_load_balancing.rb +19 -0
  159. data/lib/azure_mgmt_web/models/site_logs_config.rb +92 -0
  160. data/lib/azure_mgmt_web/models/site_logs_config_properties.rb +110 -0
  161. data/lib/azure_mgmt_web/models/site_properties.rb +354 -0
  162. data/lib/azure_mgmt_web/models/site_source_control.rb +92 -0
  163. data/lib/azure_mgmt_web/models/site_source_control_properties.rb +92 -0
  164. data/lib/azure_mgmt_web/models/sku_capacity.rb +89 -0
  165. data/lib/azure_mgmt_web/models/sku_description.rb +93 -0
  166. data/lib/azure_mgmt_web/models/sku_info.rb +87 -0
  167. data/lib/azure_mgmt_web/models/sku_info_collection.rb +85 -0
  168. data/lib/azure_mgmt_web/models/slot_config_names.rb +69 -0
  169. data/lib/azure_mgmt_web/models/slot_config_names_resource.rb +92 -0
  170. data/lib/azure_mgmt_web/models/slot_config_names_resource_properties.rb +66 -0
  171. data/lib/azure_mgmt_web/models/slot_difference.rb +93 -0
  172. data/lib/azure_mgmt_web/models/slot_difference_collection.rb +85 -0
  173. data/lib/azure_mgmt_web/models/slot_difference_properties.rb +113 -0
  174. data/lib/azure_mgmt_web/models/slow_requests_based_trigger.rb +75 -0
  175. data/lib/azure_mgmt_web/models/source_control.rb +92 -0
  176. data/lib/azure_mgmt_web/models/source_control_collection.rb +85 -0
  177. data/lib/azure_mgmt_web/models/source_control_properties.rb +94 -0
  178. data/lib/azure_mgmt_web/models/ssl_state.rb +17 -0
  179. data/lib/azure_mgmt_web/models/stamp_capacity.rb +155 -0
  180. data/lib/azure_mgmt_web/models/stamp_capacity_collection.rb +85 -0
  181. data/lib/azure_mgmt_web/models/status_codes_based_trigger.rb +96 -0
  182. data/lib/azure_mgmt_web/models/status_options.rb +16 -0
  183. data/lib/azure_mgmt_web/models/string_dictionary.rb +86 -0
  184. data/lib/azure_mgmt_web/models/tld_legal_agreement.rb +83 -0
  185. data/lib/azure_mgmt_web/models/tld_legal_agreement_collection.rb +85 -0
  186. data/lib/azure_mgmt_web/models/top_level_domain.rb +92 -0
  187. data/lib/azure_mgmt_web/models/top_level_domain_agreement_option.rb +57 -0
  188. data/lib/azure_mgmt_web/models/top_level_domain_collection.rb +85 -0
  189. data/lib/azure_mgmt_web/models/top_level_domain_properties.rb +66 -0
  190. data/lib/azure_mgmt_web/models/unauthenticated_client_action.rb +16 -0
  191. data/lib/azure_mgmt_web/models/usage.rb +92 -0
  192. data/lib/azure_mgmt_web/models/usage_collection.rb +85 -0
  193. data/lib/azure_mgmt_web/models/usage_properties.rb +136 -0
  194. data/lib/azure_mgmt_web/models/usage_state.rb +16 -0
  195. data/lib/azure_mgmt_web/models/user.rb +92 -0
  196. data/lib/azure_mgmt_web/models/user_properties.rb +74 -0
  197. data/lib/azure_mgmt_web/models/virtual_application.rb +103 -0
  198. data/lib/azure_mgmt_web/models/virtual_directory.rb +65 -0
  199. data/lib/azure_mgmt_web/models/virtual_ipmapping.rb +85 -0
  200. data/lib/azure_mgmt_web/models/virtual_network_profile.rb +83 -0
  201. data/lib/azure_mgmt_web/models/vnet_gateway.rb +93 -0
  202. data/lib/azure_mgmt_web/models/vnet_gateway_properties.rb +65 -0
  203. data/lib/azure_mgmt_web/models/vnet_info.rb +93 -0
  204. data/lib/azure_mgmt_web/models/vnet_info_properties.rb +106 -0
  205. data/lib/azure_mgmt_web/models/vnet_route.rb +92 -0
  206. data/lib/azure_mgmt_web/models/vnet_route_properties.rb +97 -0
  207. data/lib/azure_mgmt_web/models/worker_pool.rb +108 -0
  208. data/lib/azure_mgmt_web/models/worker_pool_collection.rb +85 -0
  209. data/lib/azure_mgmt_web/models/worker_pool_properties.rb +100 -0
  210. data/lib/azure_mgmt_web/models/worker_size_options.rb +18 -0
  211. data/lib/azure_mgmt_web/module_definition.rb +8 -0
  212. data/lib/azure_mgmt_web/provider.rb +346 -0
  213. data/lib/azure_mgmt_web/recommendations.rb +320 -0
  214. data/lib/azure_mgmt_web/server_farms.rb +1409 -0
  215. data/lib/azure_mgmt_web/sites.rb +11072 -0
  216. data/lib/azure_mgmt_web/top_level_domains.rb +226 -0
  217. data/lib/azure_mgmt_web/usage_operations.rb +88 -0
  218. data/lib/azure_mgmt_web/version.rb +8 -0
  219. data/lib/azure_mgmt_web/web_site_management_client.rb +118 -0
  220. metadata +346 -0
@@ -0,0 +1,652 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Web
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>
16
+ #
17
+ class ManagedHostingEnvironments
18
+ include Azure::ARM::Web::Models
19
+ include MsRestAzure
20
+
21
+ #
22
+ # Creates and initializes a new instance of the ManagedHostingEnvironments class.
23
+ # @param client service class for accessing basic functionality.
24
+ #
25
+ def initialize(client)
26
+ @client = client
27
+ end
28
+
29
+ # @return reference to the WebSiteManagementClient
30
+ attr_reader :client
31
+
32
+ #
33
+ # Get properties of a managed hosting environment.
34
+ #
35
+ # @param resource_group_name [String] Name of resource group
36
+ # @param name [String] Name of managed hosting environment
37
+ # @param [Hash{String => String}] The hash of custom headers need to be
38
+ # applied to HTTP request.
39
+ #
40
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
41
+ # response.
42
+ #
43
+ def get_managed_hosting_environment(resource_group_name, name, custom_headers = nil)
44
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
45
+ fail ArgumentError, 'name is nil' if name.nil?
46
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
47
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
48
+ request_headers = {}
49
+
50
+ # Set Headers
51
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
52
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
53
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}'
54
+ options = {
55
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
56
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
57
+ query_params: {'api-version' => @client.api_version},
58
+ headers: request_headers.merge(custom_headers || {})
59
+ }
60
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
61
+ promise = request.run_promise do |req|
62
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
63
+ end
64
+
65
+ promise = promise.then do |http_response|
66
+ status_code = http_response.status
67
+ response_content = http_response.body
68
+ unless status_code == 200
69
+ error_model = JSON.load(response_content)
70
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
71
+ end
72
+
73
+ # Create Result
74
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
75
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
76
+ # Deserialize Response
77
+ if status_code == 200
78
+ begin
79
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
80
+ unless parsed_response.nil?
81
+ parsed_response = ManagedHostingEnvironment.deserialize_object(parsed_response)
82
+ end
83
+ result.body = parsed_response
84
+ rescue Exception => e
85
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
86
+ end
87
+ end
88
+
89
+ result
90
+ end
91
+
92
+ promise.execute
93
+ end
94
+
95
+ #
96
+ # Create or update a managed hosting environment.
97
+ #
98
+ # @param resource_group_name [String] Name of resource group
99
+ # @param name [String] Name of managed hosting environment
100
+ # @param managed_hosting_environment_envelope [HostingEnvironment] Properties
101
+ # of managed hosting environment
102
+ # @param @client.subscription_id [String] Subscription Id
103
+ # @param @client.api_version [String] API Version
104
+ # @param @client.accept_language [String] Gets or sets the preferred language
105
+ # for the response.
106
+ #
107
+ # @return [Concurrent::Promise] promise which provides async access to http
108
+ # response.
109
+ #
110
+ def create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil)
111
+ # Send request
112
+ promise = begin_create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers)
113
+
114
+ promise = promise.then do |response|
115
+ # Defining deserialization method.
116
+ deserialize_method = lambda do |parsed_response|
117
+ unless parsed_response.nil?
118
+ parsed_response = HostingEnvironment.deserialize_object(parsed_response)
119
+ end
120
+ end
121
+
122
+ # Waiting for response.
123
+ @client.get_put_operation_result(response, deserialize_method)
124
+ end
125
+
126
+ promise
127
+ end
128
+
129
+ #
130
+ # Create or update a managed hosting environment.
131
+ #
132
+ # @param resource_group_name [String] Name of resource group
133
+ # @param name [String] Name of managed hosting environment
134
+ # @param managed_hosting_environment_envelope [HostingEnvironment] Properties
135
+ # of managed hosting environment
136
+ # @param [Hash{String => String}] The hash of custom headers need to be
137
+ # applied to HTTP request.
138
+ #
139
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
140
+ # response.
141
+ #
142
+ def begin_create_or_update_managed_hosting_environment(resource_group_name, name, managed_hosting_environment_envelope, custom_headers = nil)
143
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
144
+ fail ArgumentError, 'name is nil' if name.nil?
145
+ fail ArgumentError, 'managed_hosting_environment_envelope is nil' if managed_hosting_environment_envelope.nil?
146
+ managed_hosting_environment_envelope.validate unless managed_hosting_environment_envelope.nil?
147
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
148
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
149
+ request_headers = {}
150
+
151
+ # Set Headers
152
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
153
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
154
+
155
+ # Serialize Request
156
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
157
+ unless managed_hosting_environment_envelope.nil?
158
+ managed_hosting_environment_envelope = HostingEnvironment.serialize_object(managed_hosting_environment_envelope)
159
+ end
160
+ request_content = JSON.generate(managed_hosting_environment_envelope, quirks_mode: true)
161
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}'
162
+ options = {
163
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
164
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
165
+ query_params: {'api-version' => @client.api_version},
166
+ body: request_content,
167
+ headers: request_headers.merge(custom_headers || {})
168
+ }
169
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
170
+ promise = request.run_promise do |req|
171
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
172
+ end
173
+
174
+ promise = promise.then do |http_response|
175
+ status_code = http_response.status
176
+ response_content = http_response.body
177
+ unless status_code == 202 || status_code == 400 || status_code == 404 || status_code == 409
178
+ error_model = JSON.load(response_content)
179
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
180
+ end
181
+
182
+ # Create Result
183
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
184
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
185
+ # Deserialize Response
186
+ if status_code == 202
187
+ begin
188
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
189
+ unless parsed_response.nil?
190
+ parsed_response = HostingEnvironment.deserialize_object(parsed_response)
191
+ end
192
+ result.body = parsed_response
193
+ rescue Exception => e
194
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
195
+ end
196
+ end
197
+
198
+ result
199
+ end
200
+
201
+ promise.execute
202
+ end
203
+
204
+ #
205
+ # Delete a managed hosting environment.
206
+ #
207
+ # @param resource_group_name [String] Name of resource group
208
+ # @param name [String] Name of managed hosting environment
209
+ # @param force_delete [Boolean] Delete even if the managed hosting environment
210
+ # contains resources
211
+ # @return [Concurrent::Promise] promise which provides async access to http
212
+ # response.
213
+ #
214
+ def delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil)
215
+ # Send request
216
+ promise = begin_delete_managed_hosting_environment(resource_group_name, name, force_delete, custom_headers)
217
+
218
+ promise = promise.then do |response|
219
+ # Defining deserialization method.
220
+ deserialize_method = lambda do |parsed_response|
221
+ end
222
+
223
+ # Waiting for response.
224
+ @client.get_post_or_delete_operation_result(response, deserialize_method)
225
+ end
226
+
227
+ promise
228
+ end
229
+
230
+ #
231
+ # Delete a managed hosting environment.
232
+ #
233
+ # @param resource_group_name [String] Name of resource group
234
+ # @param name [String] Name of managed hosting environment
235
+ # @param force_delete [Boolean] Delete even if the managed hosting environment
236
+ # contains resources
237
+ # @param [Hash{String => String}] The hash of custom headers need to be
238
+ # applied to HTTP request.
239
+ #
240
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
241
+ # response.
242
+ #
243
+ def begin_delete_managed_hosting_environment(resource_group_name, name, force_delete = nil, custom_headers = nil)
244
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
245
+ fail ArgumentError, 'name is nil' if name.nil?
246
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
247
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
248
+ request_headers = {}
249
+
250
+ # Set Headers
251
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
252
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
253
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}'
254
+ options = {
255
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
256
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
257
+ query_params: {'forceDelete' => force_delete,'api-version' => @client.api_version},
258
+ headers: request_headers.merge(custom_headers || {})
259
+ }
260
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
261
+ promise = request.run_promise do |req|
262
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
263
+ end
264
+
265
+ promise = promise.then do |http_response|
266
+ status_code = http_response.status
267
+ response_content = http_response.body
268
+ unless status_code == 202 || status_code == 400 || status_code == 404 || status_code == 409
269
+ error_model = JSON.load(response_content)
270
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
271
+ end
272
+
273
+ # Create Result
274
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
275
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
276
+
277
+ result
278
+ end
279
+
280
+ promise.execute
281
+ end
282
+
283
+ #
284
+ # Get all managed hosting environments in a resource group.
285
+ #
286
+ # @param resource_group_name [String] Name of resource group
287
+ # @param [Hash{String => String}] The hash of custom headers need to be
288
+ # applied to HTTP request.
289
+ #
290
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
291
+ # response.
292
+ #
293
+ def get_managed_hosting_environments(resource_group_name, custom_headers = nil)
294
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
295
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
296
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
297
+ request_headers = {}
298
+
299
+ # Set Headers
300
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
301
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
302
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments'
303
+ options = {
304
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
305
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
306
+ query_params: {'api-version' => @client.api_version},
307
+ headers: request_headers.merge(custom_headers || {})
308
+ }
309
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
310
+ promise = request.run_promise do |req|
311
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
312
+ end
313
+
314
+ promise = promise.then do |http_response|
315
+ status_code = http_response.status
316
+ response_content = http_response.body
317
+ unless status_code == 200
318
+ error_model = JSON.load(response_content)
319
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
320
+ end
321
+
322
+ # Create Result
323
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
324
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
325
+ # Deserialize Response
326
+ if status_code == 200
327
+ begin
328
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
329
+ unless parsed_response.nil?
330
+ parsed_response = HostingEnvironmentCollection.deserialize_object(parsed_response)
331
+ end
332
+ result.body = parsed_response
333
+ rescue Exception => e
334
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
335
+ end
336
+ end
337
+
338
+ result
339
+ end
340
+
341
+ promise.execute
342
+ end
343
+
344
+ #
345
+ # Get list of ip addresses assigned to a managed hosting environment
346
+ #
347
+ # @param resource_group_name [String] Name of resource group
348
+ # @param name [String] Name of managed hosting environment
349
+ # @param [Hash{String => String}] The hash of custom headers need to be
350
+ # applied to HTTP request.
351
+ #
352
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
353
+ # response.
354
+ #
355
+ def get_managed_hosting_environment_vips(resource_group_name, name, custom_headers = nil)
356
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
357
+ fail ArgumentError, 'name is nil' if name.nil?
358
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
359
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
360
+ request_headers = {}
361
+
362
+ # Set Headers
363
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
364
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
365
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/capacities/virtualip'
366
+ options = {
367
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
368
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
369
+ query_params: {'api-version' => @client.api_version},
370
+ headers: request_headers.merge(custom_headers || {})
371
+ }
372
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
373
+ promise = request.run_promise do |req|
374
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
375
+ end
376
+
377
+ promise = promise.then do |http_response|
378
+ status_code = http_response.status
379
+ response_content = http_response.body
380
+ unless status_code == 200
381
+ error_model = JSON.load(response_content)
382
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
383
+ end
384
+
385
+ # Create Result
386
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
387
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
388
+ # Deserialize Response
389
+ if status_code == 200
390
+ begin
391
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
392
+ unless parsed_response.nil?
393
+ parsed_response = AddressResponse.deserialize_object(parsed_response)
394
+ end
395
+ result.body = parsed_response
396
+ rescue Exception => e
397
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
398
+ end
399
+ end
400
+
401
+ result
402
+ end
403
+
404
+ promise.execute
405
+ end
406
+
407
+ #
408
+ # Get status of an operation on a managed hosting environment.
409
+ #
410
+ # @param resource_group_name [String] Name of resource group
411
+ # @param name [String] Name of managed hosting environment
412
+ # @param operation_id [String] operation identifier GUID
413
+ # @param [Hash{String => String}] The hash of custom headers need to be
414
+ # applied to HTTP request.
415
+ #
416
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
417
+ # response.
418
+ #
419
+ def get_managed_hosting_environment_operation(resource_group_name, name, operation_id, custom_headers = nil)
420
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
421
+ fail ArgumentError, 'name is nil' if name.nil?
422
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
423
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
424
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
425
+ request_headers = {}
426
+
427
+ # Set Headers
428
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
429
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
430
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/operations/{operationId}'
431
+ options = {
432
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
433
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
434
+ query_params: {'api-version' => @client.api_version},
435
+ headers: request_headers.merge(custom_headers || {})
436
+ }
437
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
438
+ promise = request.run_promise do |req|
439
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
440
+ end
441
+
442
+ promise = promise.then do |http_response|
443
+ status_code = http_response.status
444
+ response_content = http_response.body
445
+ unless status_code == 200 || status_code == 202 || status_code == 404 || status_code == 500
446
+ error_model = JSON.load(response_content)
447
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
448
+ end
449
+
450
+ # Create Result
451
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
452
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
453
+
454
+ result
455
+ end
456
+
457
+ promise.execute
458
+ end
459
+
460
+ #
461
+ # Get all sites on the managed hosting environment.
462
+ #
463
+ # @param resource_group_name [String] Name of resource group
464
+ # @param name [String] Name of managed hosting environment
465
+ # @param properties_to_include [String] Comma separated list of site
466
+ # properties to include
467
+ # @param [Hash{String => String}] The hash of custom headers need to be
468
+ # applied to HTTP request.
469
+ #
470
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
471
+ # response.
472
+ #
473
+ def get_managed_hosting_environment_sites(resource_group_name, name, properties_to_include = nil, custom_headers = nil)
474
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
475
+ fail ArgumentError, 'name is nil' if name.nil?
476
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
477
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
478
+ request_headers = {}
479
+
480
+ # Set Headers
481
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
482
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
483
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/sites'
484
+ options = {
485
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
486
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
487
+ query_params: {'propertiesToInclude' => properties_to_include,'api-version' => @client.api_version},
488
+ headers: request_headers.merge(custom_headers || {})
489
+ }
490
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
491
+ promise = request.run_promise do |req|
492
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
493
+ end
494
+
495
+ promise = promise.then do |http_response|
496
+ status_code = http_response.status
497
+ response_content = http_response.body
498
+ unless status_code == 200
499
+ error_model = JSON.load(response_content)
500
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
501
+ end
502
+
503
+ # Create Result
504
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
505
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
506
+ # Deserialize Response
507
+ if status_code == 200
508
+ begin
509
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
510
+ unless parsed_response.nil?
511
+ parsed_response = SiteCollection.deserialize_object(parsed_response)
512
+ end
513
+ result.body = parsed_response
514
+ rescue Exception => e
515
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
516
+ end
517
+ end
518
+
519
+ result
520
+ end
521
+
522
+ promise.execute
523
+ end
524
+
525
+ #
526
+ # Get all serverfarms (App Service Plans) on the managed hosting environment.
527
+ #
528
+ # @param resource_group_name [String] Name of resource group
529
+ # @param name [String] Name of managed hosting environment
530
+ # @param [Hash{String => String}] The hash of custom headers need to be
531
+ # applied to HTTP request.
532
+ #
533
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
534
+ # response.
535
+ #
536
+ def get_managed_hosting_environment_server_farms(resource_group_name, name, custom_headers = nil)
537
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
538
+ fail ArgumentError, 'name is nil' if name.nil?
539
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
540
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
541
+ request_headers = {}
542
+
543
+ # Set Headers
544
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
545
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
546
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/serverfarms'
547
+ options = {
548
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
549
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
550
+ query_params: {'api-version' => @client.api_version},
551
+ headers: request_headers.merge(custom_headers || {})
552
+ }
553
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
554
+ promise = request.run_promise do |req|
555
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
556
+ end
557
+
558
+ promise = promise.then do |http_response|
559
+ status_code = http_response.status
560
+ response_content = http_response.body
561
+ unless status_code == 200
562
+ error_model = JSON.load(response_content)
563
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
564
+ end
565
+
566
+ # Create Result
567
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
568
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
569
+ # Deserialize Response
570
+ if status_code == 200
571
+ begin
572
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
573
+ unless parsed_response.nil?
574
+ parsed_response = ServerFarmCollection.deserialize_object(parsed_response)
575
+ end
576
+ result.body = parsed_response
577
+ rescue Exception => e
578
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
579
+ end
580
+ end
581
+
582
+ result
583
+ end
584
+
585
+ promise.execute
586
+ end
587
+
588
+ #
589
+ # Get all serverfarms (App Service Plans) on the managed hosting environment.
590
+ #
591
+ # @param resource_group_name [String] Name of resource group
592
+ # @param name [String] Name of managed hosting environment
593
+ # @param [Hash{String => String}] The hash of custom headers need to be
594
+ # applied to HTTP request.
595
+ #
596
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
597
+ # response.
598
+ #
599
+ def get_managed_hosting_environment_web_hosting_plans(resource_group_name, name, custom_headers = nil)
600
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
601
+ fail ArgumentError, 'name is nil' if name.nil?
602
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
603
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
604
+ request_headers = {}
605
+
606
+ # Set Headers
607
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
608
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
609
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/webhostingplans'
610
+ options = {
611
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
612
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
613
+ query_params: {'api-version' => @client.api_version},
614
+ headers: request_headers.merge(custom_headers || {})
615
+ }
616
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
617
+ promise = request.run_promise do |req|
618
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
619
+ end
620
+
621
+ promise = promise.then do |http_response|
622
+ status_code = http_response.status
623
+ response_content = http_response.body
624
+ unless status_code == 200
625
+ error_model = JSON.load(response_content)
626
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
627
+ end
628
+
629
+ # Create Result
630
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
631
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
632
+ # Deserialize Response
633
+ if status_code == 200
634
+ begin
635
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
636
+ unless parsed_response.nil?
637
+ parsed_response = ServerFarmCollection.deserialize_object(parsed_response)
638
+ end
639
+ result.body = parsed_response
640
+ rescue Exception => e
641
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
642
+ end
643
+ end
644
+
645
+ result
646
+ end
647
+
648
+ promise.execute
649
+ end
650
+
651
+ end
652
+ end