Class: Azure::ARM::Web::ServerFarms
- Inherits:
-
Object
- Object
- Azure::ARM::Web::ServerFarms
- Includes:
- Models, MsRestAzure
- Defined in:
- lib/azure_mgmt_web/server_farms.rb
Overview
Use these APIs to manage Azure Websites resources through the Azure Resource Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests made to these resources are secure. For more information, see <a href=“msdn.microsoft.com/en-us/library/azure/dn790557.aspx”>Authenticating Azure Resource Manager requests.</a>
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Reference to the WebSiteManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update_server_farm(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) ⇒ ServerFarmWithRichSku
Creates or updates an App Service Plan.
-
#begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) ⇒ Concurrent::Promise
Creates or updates an App Service Plan.
-
#begin_create_or_update_server_farm_with_http_info(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates an App Service Plan.
-
#create_or_update_server_farm(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) ⇒ Concurrent::Promise
Creates or updates an App Service Plan.
-
#create_or_update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ VnetRoute
Creates a new route or updates an existing route for a vnet in an app service plan.
-
#create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ Concurrent::Promise
Creates a new route or updates an existing route for a vnet in an app service plan.
-
#create_or_update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new route or updates an existing route for a vnet in an app service plan.
-
#delete_server_farm(resource_group_name, name, custom_headers = nil) ⇒ Object
Deletes a App Service Plan.
-
#delete_server_farm_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Deletes a App Service Plan.
-
#delete_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a App Service Plan.
-
#delete_vnet_route(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ Object
Deletes an existing route for a vnet in an app service plan.
-
#delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ Concurrent::Promise
Deletes an existing route for a vnet in an app service plan.
-
#delete_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes an existing route for a vnet in an app service plan.
-
#get_route_for_vnet(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ Array
Gets a specific route associated with a vnet, in an app service plan.
-
#get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets a specific route associated with a vnet, in an app service plan.
-
#get_route_for_vnet_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a specific route associated with a vnet, in an app service plan.
-
#get_routes_for_vnet(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ Array
Gets a list of all routes associated with a vnet, in an app service plan.
-
#get_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of all routes associated with a vnet, in an app service plan.
-
#get_routes_for_vnet_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all routes associated with a vnet, in an app service plan.
-
#get_server_farm(resource_group_name, name, custom_headers = nil) ⇒ ServerFarmWithRichSku
Gets specified App Service Plan in a resource group.
-
#get_server_farm_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Gets specified App Service Plan in a resource group.
-
#get_server_farm_metric_defintions(resource_group_name, name, custom_headers = nil) ⇒ MetricDefinitionCollection
List of metrics that can be queried for an App Service Plan.
-
#get_server_farm_metric_defintions_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
List of metrics that can be queried for an App Service Plan.
-
#get_server_farm_metric_defintions_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List of metrics that can be queried for an App Service Plan.
-
#get_server_farm_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ ResourceMetricCollection
Queries for App Serice Plan metrics.
-
#get_server_farm_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise
Queries for App Serice Plan metrics.
-
#get_server_farm_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Queries for App Serice Plan metrics.
-
#get_server_farm_operation(resource_group_name, name, operation_id, custom_headers = nil) ⇒ ServerFarmWithRichSku
Gets a server farm operation.
-
#get_server_farm_operation_async(resource_group_name, name, operation_id, custom_headers = nil) ⇒ Concurrent::Promise
Gets a server farm operation.
-
#get_server_farm_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a server farm operation.
-
#get_server_farm_sites(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) ⇒ SiteCollection
Gets list of Apps associated with an App Service Plan.
-
#get_server_farm_sites_async(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) ⇒ Concurrent::Promise
Gets list of Apps associated with an App Service Plan.
-
#get_server_farm_sites_next(next_page_link, custom_headers = nil) ⇒ SiteCollection
Gets list of Apps associated with an App Service Plan.
-
#get_server_farm_sites_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Gets list of Apps associated with an App Service Plan.
-
#get_server_farm_sites_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of Apps associated with an App Service Plan.
-
#get_server_farm_sites_with_http_info(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of Apps associated with an App Service Plan.
-
#get_server_farm_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) ⇒ VnetGateway
Gets the vnet gateway.
-
#get_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets the vnet gateway.
-
#get_server_farm_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the vnet gateway.
-
#get_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets specified App Service Plan in a resource group.
-
#get_server_farms(resource_group_name, custom_headers = nil) ⇒ ServerFarmCollection
Gets collection of App Service Plans in a resource group for a given subscription.
-
#get_server_farms_async(resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets collection of App Service Plans in a resource group for a given subscription.
-
#get_server_farms_with_http_info(resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets collection of App Service Plans in a resource group for a given subscription.
-
#get_vnet_from_server_farm(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ VnetInfo
Gets a vnet associated with an App Service Plan.
-
#get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets a vnet associated with an App Service Plan.
-
#get_vnet_from_server_farm_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a vnet associated with an App Service Plan.
-
#get_vnets_for_server_farm(resource_group_name, name, custom_headers = nil) ⇒ Array
Gets list of vnets associated with App Service Plan.
-
#get_vnets_for_server_farm_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Gets list of vnets associated with App Service Plan.
-
#get_vnets_for_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of vnets associated with App Service Plan.
-
#initialize(client) ⇒ ServerFarms
constructor
Creates and initializes a new instance of the ServerFarms class.
-
#reboot_worker_for_server_farm(resource_group_name, name, worker_name, custom_headers = nil) ⇒ Object
Submit a reboot request for a worker machine in the specified server farm.
-
#reboot_worker_for_server_farm_async(resource_group_name, name, worker_name, custom_headers = nil) ⇒ Concurrent::Promise
Submit a reboot request for a worker machine in the specified server farm.
-
#reboot_worker_for_server_farm_with_http_info(resource_group_name, name, worker_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Submit a reboot request for a worker machine in the specified server farm.
-
#restart_sites_for_server_farm(resource_group_name, name, soft_restart = nil, custom_headers = nil) ⇒ Object
Restarts web apps in a specified App Service Plan.
-
#restart_sites_for_server_farm_async(resource_group_name, name, soft_restart = nil, custom_headers = nil) ⇒ Concurrent::Promise
Restarts web apps in a specified App Service Plan.
-
#restart_sites_for_server_farm_with_http_info(resource_group_name, name, soft_restart = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Restarts web apps in a specified App Service Plan.
-
#update_server_farm_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) ⇒ VnetGateway
Updates the vnet gateway.
-
#update_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) ⇒ Concurrent::Promise
Updates the vnet gateway.
-
#update_server_farm_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates the vnet gateway.
-
#update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ VnetRoute
Creates a new route or updates an existing route for a vnet in an app service plan.
-
#update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ Concurrent::Promise
Creates a new route or updates an existing route for a vnet in an app service plan.
-
#update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new route or updates an existing route for a vnet in an app service plan.
Constructor Details
#initialize(client) ⇒ ServerFarms
Creates and initializes a new instance of the ServerFarms class.
25 26 27 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 25 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns reference to the WebSiteManagementClient.
30 31 32 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 30 def client @client end |
Instance Method Details
#begin_create_or_update_server_farm(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) ⇒ ServerFarmWithRichSku
Creates or updates an App Service Plan
Plan for App Service Plan will be added to the HTTP request.
269 270 271 272 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 269 def begin_create_or_update_server_farm(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) response = begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state, custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) ⇒ Concurrent::Promise
Creates or updates an App Service Plan
Plan for App Service Plan to the HTTP request.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 306 def begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'server_farm_envelope is nil' if server_farm_envelope.nil? server_farm_envelope.validate unless server_farm_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_headers['Content-Type'] = 'application/json; charset=utf-8' unless server_farm_envelope.nil? server_farm_envelope = ServerFarmWithRichSku.serialize_object(server_farm_envelope) end request_content = server_farm_envelope != nil ? JSON.generate(server_farm_envelope, quirks_mode: true) : nil path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'allowPendingState' => allow_pending_state,'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = ServerFarmWithRichSku.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = ServerFarmWithRichSku.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_or_update_server_farm_with_http_info(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates an App Service Plan
Plan for App Service Plan will be added to the HTTP request.
288 289 290 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 288 def begin_create_or_update_server_farm_with_http_info(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state, custom_headers).value! end |
#create_or_update_server_farm(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) ⇒ Concurrent::Promise
Creates or updates an App Service Plan
Plan for App Service Plan for the response.
response.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 236 def create_or_update_server_farm(resource_group_name, name, server_farm_envelope, allow_pending_state = nil, custom_headers = nil) # Send request promise = begin_create_or_update_server_farm_async(resource_group_name, name, server_farm_envelope, allow_pending_state, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| unless parsed_response.nil? parsed_response = ServerFarmWithRichSku.deserialize_object(parsed_response) end end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#create_or_update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ VnetRoute
Creates a new route or updates an existing route for a vnet in an app service plan.
will be added to the HTTP request.
1101 1102 1103 1104 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1101 def create_or_update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) response = create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value! response.body unless response.nil? end |
#create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ Concurrent::Promise
Creates a new route or updates an existing route for a vnet in an app service plan.
to the HTTP request.
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1138 def create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? fail ArgumentError, 'route is nil' if route.nil? route.validate unless route.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_headers['Content-Type'] = 'application/json; charset=utf-8' unless route.nil? route = VnetRoute.serialize_object(route) end request_content = route != nil ? JSON.generate(route, quirks_mode: true) : nil path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 400 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = VnetRoute.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#create_or_update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new route or updates an existing route for a vnet in an app service plan.
will be added to the HTTP request.
1120 1121 1122 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1120 def create_or_update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) create_or_update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value! end |
#delete_server_farm(resource_group_name, name, custom_headers = nil) ⇒ Object
Deletes a App Service Plan
will be added to the HTTP request.
393 394 395 396 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 393 def delete_server_farm(resource_group_name, name, custom_headers = nil) response = delete_server_farm_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end |
#delete_server_farm_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Deletes a App Service Plan
to the HTTP request.
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 422 def delete_server_farm_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#delete_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a App Service Plan
will be added to the HTTP request.
408 409 410 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 408 def delete_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) delete_server_farm_async(resource_group_name, name, custom_headers).value! end |
#delete_vnet_route(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ Object
Deletes an existing route for a vnet in an app service plan.
will be added to the HTTP request.
1217 1218 1219 1220 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1217 def delete_vnet_route(resource_group_name, name, vnet_name, route_name, custom_headers = nil) response = delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers).value! response.body unless response.nil? end |
#delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ Concurrent::Promise
Deletes an existing route for a vnet in an app service plan.
to the HTTP request.
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1250 def delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#delete_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes an existing route for a vnet in an app service plan.
will be added to the HTTP request.
1234 1235 1236 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1234 def delete_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil) delete_vnet_route_async(resource_group_name, name, vnet_name, route_name, custom_headers).value! end |
#get_route_for_vnet(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ Array
Gets a specific route associated with a vnet, in an app service plan
will be added to the HTTP request.
990 991 992 993 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 990 def get_route_for_vnet(resource_group_name, name, vnet_name, route_name, custom_headers = nil) response = get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers).value! response.body unless response.nil? end |
#get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets a specific route associated with a vnet, in an app service plan
to the HTTP request.
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1023 def get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? deserialized_array = [] parsed_response.each do |element| unless element.nil? element = VnetRoute.deserialize_object(element) end deserialized_array.push(element) end parsed_response = deserialized_array end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_route_for_vnet_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a specific route associated with a vnet, in an app service plan
will be added to the HTTP request.
1007 1008 1009 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1007 def get_route_for_vnet_with_http_info(resource_group_name, name, vnet_name, route_name, custom_headers = nil) get_route_for_vnet_async(resource_group_name, name, vnet_name, route_name, custom_headers).value! end |
#get_routes_for_vnet(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ Array
Gets a list of all routes associated with a vnet, in an app service plan
will be added to the HTTP request.
884 885 886 887 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 884 def get_routes_for_vnet(resource_group_name, name, vnet_name, custom_headers = nil) response = get_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers).value! response.body unless response.nil? end |
#get_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets a list of all routes associated with a vnet, in an app service plan
to the HTTP request.
915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 915 def get_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? deserialized_array = [] parsed_response.each do |element| unless element.nil? element = VnetRoute.deserialize_object(element) end deserialized_array.push(element) end parsed_response = deserialized_array end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_routes_for_vnet_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all routes associated with a vnet, in an app service plan
will be added to the HTTP request.
900 901 902 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 900 def get_routes_for_vnet_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) get_routes_for_vnet_async(resource_group_name, name, vnet_name, custom_headers).value! end |
#get_server_farm(resource_group_name, name, custom_headers = nil) ⇒ ServerFarmWithRichSku
Gets specified App Service Plan in a resource group
will be added to the HTTP request.
135 136 137 138 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 135 def get_server_farm(resource_group_name, name, custom_headers = nil) response = get_server_farm_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end |
#get_server_farm_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Gets specified App Service Plan in a resource group
to the HTTP request.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 164 def get_server_farm_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = ServerFarmWithRichSku.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_server_farm_metric_defintions(resource_group_name, name, custom_headers = nil) ⇒ MetricDefinitionCollection
List of metrics that can be queried for an App Service Plan
will be added to the HTTP request.
590 591 592 593 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 590 def get_server_farm_metric_defintions(resource_group_name, name, custom_headers = nil) response = get_server_farm_metric_defintions_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end |
#get_server_farm_metric_defintions_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
List of metrics that can be queried for an App Service Plan
to the HTTP request.
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 619 def get_server_farm_metric_defintions_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = MetricDefinitionCollection.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_server_farm_metric_defintions_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
List of metrics that can be queried for an App Service Plan
will be added to the HTTP request.
605 606 607 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 605 def get_server_farm_metric_defintions_with_http_info(resource_group_name, name, custom_headers = nil) get_server_farm_metric_defintions_async(resource_group_name, name, custom_headers).value! end |
#get_server_farm_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ ResourceMetricCollection
Queries for App Serice Plan metrics
Plan instance Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.
482 483 484 485 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 482 def get_server_farm_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) response = get_server_farm_metrics_async(resource_group_name, name, details, filter, custom_headers).value! response.body unless response.nil? end |
#get_server_farm_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ Concurrent::Promise
Queries for App Serice Plan metrics
Plan instance Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. to the HTTP request.
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 525 def get_server_farm_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'details' => details,'$filter' => filter,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = ResourceMetricCollection.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_server_farm_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Queries for App Serice Plan metrics
Plan instance Filter conforms to odata syntax. Example: $filter=(name.value eq ‘Metric1’ or name.value eq ‘Metric2’) and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’‘. will be added to the HTTP request.
504 505 506 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 504 def get_server_farm_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) get_server_farm_metrics_async(resource_group_name, name, details, filter, custom_headers).value! end |
#get_server_farm_operation(resource_group_name, name, operation_id, custom_headers = nil) ⇒ ServerFarmWithRichSku
Gets a server farm operation
will be added to the HTTP request.
1939 1940 1941 1942 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1939 def get_server_farm_operation(resource_group_name, name, operation_id, custom_headers = nil) response = get_server_farm_operation_async(resource_group_name, name, operation_id, custom_headers).value! response.body unless response.nil? end |
#get_server_farm_operation_async(resource_group_name, name, operation_id, custom_headers = nil) ⇒ Concurrent::Promise
Gets a server farm operation
to the HTTP request.
1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1970 def get_server_farm_operation_async(resource_group_name, name, operation_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'operation_id is nil' if operation_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/operationresults/{operationId}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = ServerFarmWithRichSku.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_server_farm_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a server farm operation
will be added to the HTTP request.
1955 1956 1957 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1955 def get_server_farm_operation_with_http_info(resource_group_name, name, operation_id, custom_headers = nil) get_server_farm_operation_async(resource_group_name, name, operation_id, custom_headers).value! end |
#get_server_farm_sites(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) ⇒ SiteCollection
Gets list of Apps associated with an App Service Plan
resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list only web apps that are currently running will be added to the HTTP request.
1653 1654 1655 1656 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1653 def get_server_farm_sites(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) response = get_server_farm_sites_async(resource_group_name, name, skip_token, filter, top, custom_headers).value! response.body unless response.nil? end |
#get_server_farm_sites_async(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) ⇒ Concurrent::Promise
Gets list of Apps associated with an App Service Plan
resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list only web apps that are currently running to the HTTP request.
1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1696 def get_server_farm_sites_async(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'$skipToken' => skip_token,'$filter' => filter,'$top' => top,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = SiteCollection.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_server_farm_sites_next(next_page_link, custom_headers = nil) ⇒ SiteCollection
Gets list of Apps associated with an App Service Plan
call to List operation. will be added to the HTTP request.
2036 2037 2038 2039 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 2036 def get_server_farm_sites_next(next_page_link, custom_headers = nil) response = get_server_farm_sites_next_async(next_page_link, custom_headers).value! response.body unless response.nil? end |
#get_server_farm_sites_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise
Gets list of Apps associated with an App Service Plan
call to List operation. to the HTTP request.
2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 2065 def get_server_farm_sites_next_async(next_page_link, custom_headers = nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = SiteCollection.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_server_farm_sites_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of Apps associated with an App Service Plan
call to List operation. will be added to the HTTP request.
2051 2052 2053 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 2051 def get_server_farm_sites_next_with_http_info(next_page_link, custom_headers = nil) get_server_farm_sites_next_async(next_page_link, custom_headers).value! end |
#get_server_farm_sites_with_http_info(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of Apps associated with an App Service Plan
resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list only web apps that are currently running will be added to the HTTP request.
1675 1676 1677 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1675 def get_server_farm_sites_with_http_info(resource_group_name, name, skip_token = nil, filter = nil, top = nil, custom_headers = nil) get_server_farm_sites_async(resource_group_name, name, skip_token, filter, top, custom_headers).value! end |
#get_server_farm_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) ⇒ VnetGateway
Gets the vnet gateway.
is supported. will be added to the HTTP request.
1426 1427 1428 1429 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1426 def get_server_farm_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) response = get_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value! response.body unless response.nil? end |
#get_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets the vnet gateway.
is supported. to the HTTP request.
1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1461 def get_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = VnetGateway.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_server_farm_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the vnet gateway.
is supported. will be added to the HTTP request.
1444 1445 1446 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1444 def get_server_farm_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, custom_headers = nil) get_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, custom_headers).value! end |
#get_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets specified App Service Plan in a resource group
will be added to the HTTP request.
150 151 152 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 150 def get_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) get_server_farm_async(resource_group_name, name, custom_headers).value! end |
#get_server_farms(resource_group_name, custom_headers = nil) ⇒ ServerFarmCollection
Gets collection of App Service Plans in a resource group for a given subscription.
will be added to the HTTP request.
42 43 44 45 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 42 def get_server_farms(resource_group_name, custom_headers = nil) response = get_server_farms_async(resource_group_name, custom_headers).value! response.body unless response.nil? end |
#get_server_farms_async(resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets collection of App Service Plans in a resource group for a given subscription.
to the HTTP request.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 71 def get_server_farms_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = ServerFarmCollection.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_server_farms_with_http_info(resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets collection of App Service Plans in a resource group for a given subscription.
will be added to the HTTP request.
57 58 59 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 57 def get_server_farms_with_http_info(resource_group_name, custom_headers = nil) get_server_farms_async(resource_group_name, custom_headers).value! end |
#get_vnet_from_server_farm(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ VnetInfo
Gets a vnet associated with an App Service Plan
will be added to the HTTP request.
786 787 788 789 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 786 def get_vnet_from_server_farm(resource_group_name, name, vnet_name, custom_headers = nil) response = get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers).value! response.body unless response.nil? end |
#get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ Concurrent::Promise
Gets a vnet associated with an App Service Plan
to the HTTP request.
817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 817 def get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = VnetInfo.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_vnet_from_server_farm_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a vnet associated with an App Service Plan
will be added to the HTTP request.
802 803 804 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 802 def get_vnet_from_server_farm_with_http_info(resource_group_name, name, vnet_name, custom_headers = nil) get_vnet_from_server_farm_async(resource_group_name, name, vnet_name, custom_headers).value! end |
#get_vnets_for_server_farm(resource_group_name, name, custom_headers = nil) ⇒ Array
Gets list of vnets associated with App Service Plan
will be added to the HTTP request.
684 685 686 687 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 684 def get_vnets_for_server_farm(resource_group_name, name, custom_headers = nil) response = get_vnets_for_server_farm_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end |
#get_vnets_for_server_farm_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise
Gets list of vnets associated with App Service Plan
to the HTTP request.
713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 713 def get_vnets_for_server_farm_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? deserialized_array = [] parsed_response.each do |element| unless element.nil? element = VnetInfo.deserialize_object(element) end deserialized_array.push(element) end parsed_response = deserialized_array end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_vnets_for_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of vnets associated with App Service Plan
will be added to the HTTP request.
699 700 701 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 699 def get_vnets_for_server_farm_with_http_info(resource_group_name, name, custom_headers = nil) get_vnets_for_server_farm_async(resource_group_name, name, custom_headers).value! end |
#reboot_worker_for_server_farm(resource_group_name, name, worker_name, custom_headers = nil) ⇒ Object
Submit a reboot request for a worker machine in the specified server farm
will be added to the HTTP request.
1762 1763 1764 1765 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1762 def reboot_worker_for_server_farm(resource_group_name, name, worker_name, custom_headers = nil) response = reboot_worker_for_server_farm_async(resource_group_name, name, worker_name, custom_headers).value! response.body unless response.nil? end |
#reboot_worker_for_server_farm_async(resource_group_name, name, worker_name, custom_headers = nil) ⇒ Concurrent::Promise
Submit a reboot request for a worker machine in the specified server farm
to the HTTP request.
1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1793 def reboot_worker_for_server_farm_async(resource_group_name, name, worker_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'worker_name is nil' if worker_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerName' => worker_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#reboot_worker_for_server_farm_with_http_info(resource_group_name, name, worker_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Submit a reboot request for a worker machine in the specified server farm
will be added to the HTTP request.
1778 1779 1780 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1778 def reboot_worker_for_server_farm_with_http_info(resource_group_name, name, worker_name, custom_headers = nil) reboot_worker_for_server_farm_async(resource_group_name, name, worker_name, custom_headers).value! end |
#restart_sites_for_server_farm(resource_group_name, name, soft_restart = nil, custom_headers = nil) ⇒ Object
Restarts web apps in a specified App Service Plan
settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps will be added to the HTTP request.
1850 1851 1852 1853 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1850 def restart_sites_for_server_farm(resource_group_name, name, soft_restart = nil, custom_headers = nil) response = restart_sites_for_server_farm_async(resource_group_name, name, soft_restart, custom_headers).value! response.body unless response.nil? end |
#restart_sites_for_server_farm_async(resource_group_name, name, soft_restart = nil, custom_headers = nil) ⇒ Concurrent::Promise
Restarts web apps in a specified App Service Plan
settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps to the HTTP request.
1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1885 def restart_sites_for_server_farm_async(resource_group_name, name, soft_restart = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'softRestart' => soft_restart,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#restart_sites_for_server_farm_with_http_info(resource_group_name, name, soft_restart = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Restarts web apps in a specified App Service Plan
settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps will be added to the HTTP request.
1868 1869 1870 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1868 def restart_sites_for_server_farm_with_http_info(resource_group_name, name, soft_restart = nil, custom_headers = nil) restart_sites_for_server_farm_async(resource_group_name, name, soft_restart, custom_headers).value! end |
#update_server_farm_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) ⇒ VnetGateway
Updates the vnet gateway
supported. will be added to the HTTP request.
1532 1533 1534 1535 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1532 def update_server_farm_vnet_gateway(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) response = update_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! response.body unless response.nil? end |
#update_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) ⇒ Concurrent::Promise
Updates the vnet gateway
supported. to the HTTP request.
1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1569 def update_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'gateway_name is nil' if gateway_name.nil? fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? connection_envelope.validate unless connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_headers['Content-Type'] = 'application/json; charset=utf-8' unless connection_envelope.nil? connection_envelope = VnetGateway.serialize_object(connection_envelope) end request_content = connection_envelope != nil ? JSON.generate(connection_envelope, quirks_mode: true) : nil path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'gatewayName' => gateway_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = VnetGateway.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#update_server_farm_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Updates the vnet gateway
supported. will be added to the HTTP request.
1551 1552 1553 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1551 def update_server_farm_vnet_gateway_with_http_info(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers = nil) update_server_farm_vnet_gateway_async(resource_group_name, name, vnet_name, gateway_name, connection_envelope, custom_headers).value! end |
#update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ VnetRoute
Creates a new route or updates an existing route for a vnet in an app service plan.
will be added to the HTTP request.
1309 1310 1311 1312 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1309 def update_vnet_route(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) response = update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value! response.body unless response.nil? end |
#update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ Concurrent::Promise
Creates a new route or updates an existing route for a vnet in an app service plan.
to the HTTP request.
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1346 def update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_name is nil' if vnet_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? fail ArgumentError, 'route is nil' if route.nil? route.validate unless route.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_headers['Content-Type'] = 'application/json; charset=utf-8' unless route.nil? route = VnetRoute.serialize_object(route) end request_content = route != nil ? JSON.generate(route, quirks_mode: true) : nil path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}' = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'vnetName' => vnet_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}) } request_url = @base_url || @client.base_url request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, ) promise = request.run_promise do |req| @client.credentials.sign_request(req) unless @client.credentials.nil? end promise = promise.then do |http_response| status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 400 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(request, http_response, error_model) end # Create Result result = MsRestAzure::AzureOperationResponse.new(request, http_response) result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) unless parsed_response.nil? parsed_response = VnetRoute.deserialize_object(parsed_response) end result.body = parsed_response rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new route or updates an existing route for a vnet in an app service plan.
will be added to the HTTP request.
1328 1329 1330 |
# File 'lib/azure_mgmt_web/server_farms.rb', line 1328 def update_vnet_route_with_http_info(resource_group_name, name, vnet_name, route_name, route, custom_headers = nil) update_vnet_route_async(resource_group_name, name, vnet_name, route_name, route, custom_headers).value! end |