class Azure::Web::Mgmt::V2020_09_01::AppServiceEnvironments
WebSite Management Client
Attributes
@return [WebSiteManagementClient] reference to the WebSiteManagementClient
Private Class Methods
Creates and initializes a new instance of the AppServiceEnvironments
class. @param client service class for accessing basic functionality.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param vnet_info [VirtualNetworkProfile] Details for the new virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3951 def begin_change_vnet(resource_group_name, name, vnet_info, custom_headers:nil) first_page = begin_change_vnet_as_lazy(resource_group_name, name, vnet_info, custom_headers:custom_headers) first_page.get_all_items end
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param vnet_info [VirtualNetworkProfile] Details for the new virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7265 def begin_change_vnet_as_lazy(resource_group_name, name, vnet_info, custom_headers:nil) response = begin_change_vnet_async(resource_group_name, name, vnet_info, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| begin_change_vnet_next_async(next_page_link, custom_headers:custom_headers) end page end end
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param vnet_info [VirtualNetworkProfile] Details for the new virtual network. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3988 def begin_change_vnet_async(resource_group_name, name, vnet_info, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'vnet_info is nil' if vnet_info.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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::Web::Mgmt::V2020_09_01::Models::VirtualNetworkProfile.mapper() request_content = @client.serialize(request_mapper, vnet_info) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork' request_url = @base_url || @client.base_url options = { 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}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6474 def begin_change_vnet_next(next_page_link, custom_headers:nil) response = begin_change_vnet_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6507 def begin_change_vnet_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6491 def begin_change_vnet_next_with_http_info(next_page_link, custom_headers:nil) begin_change_vnet_next_async(next_page_link, custom_headers:custom_headers).value! end
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param vnet_info [VirtualNetworkProfile] Details for the new virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3970 def begin_change_vnet_with_http_info(resource_group_name, name, vnet_info, custom_headers:nil) begin_change_vnet_async(resource_group_name, name, vnet_info, custom_headers:custom_headers).value! end
Create or update an App Service Environment.
Description for Create or update an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param hosting_environment_envelope [AppServiceEnvironmentResource] Configuration details of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServiceEnvironmentResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3708 def begin_create_or_update(resource_group_name, name, hosting_environment_envelope, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Create or update an App Service Environment.
Description for Create or update an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param hosting_environment_envelope [AppServiceEnvironmentResource] Configuration details of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3747 def begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'hosting_environment_envelope is nil' if hosting_environment_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() request_content = @client.serialize(request_mapper, hosting_environment_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}' request_url = @base_url || @client.base_url options = { 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}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create or update a multi-role pool.
Description for Create or update a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4079 def begin_create_or_update_multi_role_pool(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) response = begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Create or update a multi-role pool.
Description for Create or update a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4118 def begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'multi_role_pool_envelope is nil' if multi_role_pool_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() request_content = @client.serialize(request_mapper, multi_role_pool_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default' request_url = @base_url || @client.base_url options = { 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}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create or update a multi-role pool.
Description for Create or update a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4099 def begin_create_or_update_multi_role_pool_with_http_info(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value! end
Create or update an App Service Environment.
Description for Create or update an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param hosting_environment_envelope [AppServiceEnvironmentResource] Configuration details of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3728 def begin_create_or_update_with_http_info(resource_group_name, name, hosting_environment_envelope, custom_headers:nil) begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:custom_headers).value! end
Create or update a worker pool.
Description for Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param worker_pool_envelope [WorkerPoolResource] Properties of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4442 def begin_create_or_update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil) response = begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Create or update a worker pool.
Description for Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param worker_pool_envelope [WorkerPoolResource] Properties of the worker pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4483 def begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil? fail ArgumentError, 'worker_pool_envelope is nil' if worker_pool_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() request_content = @client.serialize(request_mapper, worker_pool_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create or update a worker pool.
Description for Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param worker_pool_envelope [WorkerPoolResource] Properties of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4463 def begin_create_or_update_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil) begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value! end
Delete an App Service Environment.
Description for Delete an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param force_delete [Boolean] Specify true
to force the deletion even if the App Service Environment contains resources. The default is false
. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3848 def begin_delete(resource_group_name, name, force_delete:nil, custom_headers:nil) response = begin_delete_async(resource_group_name, name, force_delete:force_delete, custom_headers:custom_headers).value! nil end
Delete an App Service Environment.
Description for Delete an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param force_delete [Boolean] Specify true
to force the deletion even if the App Service Environment contains resources. The default is false
. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3889 def begin_delete_async(resource_group_name, name, force_delete:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'forceDelete' => force_delete,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete an App Service Environment.
Description for Delete an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param force_delete [Boolean] Specify true
to force the deletion even if the App Service Environment contains resources. The default is false
. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3869 def begin_delete_with_http_info(resource_group_name, name, force_delete:nil, custom_headers:nil) begin_delete_async(resource_group_name, name, force_delete:force_delete, custom_headers:custom_headers).value! end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4207 def begin_resume(resource_group_name, name, custom_headers:nil) first_page = begin_resume_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7290 def begin_resume_as_lazy(resource_group_name, name, custom_headers:nil) response = begin_resume_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| begin_resume_next_async(next_page_link, custom_headers:custom_headers) end page end end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4242 def begin_resume_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/resume' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6580 def begin_resume_next(next_page_link, custom_headers:nil) response = begin_resume_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6613 def begin_resume_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6597 def begin_resume_next_with_http_info(next_page_link, custom_headers:nil) begin_resume_next_async(next_page_link, custom_headers:custom_headers).value! end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4225 def begin_resume_with_http_info(resource_group_name, name, custom_headers:nil) begin_resume_async(resource_group_name, name, custom_headers:custom_headers).value! end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4323 def begin_suspend(resource_group_name, name, custom_headers:nil) first_page = begin_suspend_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7315 def begin_suspend_as_lazy(resource_group_name, name, custom_headers:nil) response = begin_suspend_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| begin_suspend_next_async(next_page_link, custom_headers:custom_headers) end page end end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4358 def begin_suspend_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/suspend' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6686 def begin_suspend_next(next_page_link, custom_headers:nil) response = begin_suspend_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6719 def begin_suspend_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6703 def begin_suspend_next_with_http_info(next_page_link, custom_headers:nil) begin_suspend_next_async(next_page_link, custom_headers:custom_headers).value! end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4341 def begin_suspend_with_http_info(resource_group_name, name, custom_headers:nil) begin_suspend_async(resource_group_name, name, custom_headers:custom_headers).value! end
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param vnet_info [VirtualNetworkProfile] Details for the new virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 794 def change_vnet(resource_group_name, name, vnet_info, custom_headers:nil) response = change_vnet_async(resource_group_name, name, vnet_info, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| change_vnet_next_async(next_page_link, custom_headers:custom_headers) end page end end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param vnet_info [VirtualNetworkProfile] Details for the new virtual network. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 834 def change_vnet_async(resource_group_name, name, vnet_info, custom_headers:nil) # Send request promise = begin_change_vnet_async(resource_group_name, name, vnet_info, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Move an App Service Environment to a different VNET.
Description for Move an App Service Environment to a different VNET.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4866 def change_vnet_next(next_page_link, custom_headers:nil) response = change_vnet_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4880 def change_vnet_next_async(next_page_link, custom_headers:nil) # Send request promise = begin_change_vnet_next_async(next_page_link, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Create or update an App Service Environment.
Description for Create or update an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param hosting_environment_envelope [AppServiceEnvironmentResource] Configuration details of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServiceEnvironmentResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 339 def create_or_update(resource_group_name, name, hosting_environment_envelope, custom_headers:nil) response = create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param hosting_environment_envelope [AppServiceEnvironmentResource] Configuration details of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 356 def create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Create or update a multi-role pool.
Description for Create or update a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1423 def create_or_update_multi_role_pool(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) response = create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1440 def create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) # Send request promise = begin_create_or_update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Create or update a worker pool.
Description for Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param worker_pool_envelope [WorkerPoolResource] Properties of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3067 def create_or_update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil) response = create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param worker_pool_envelope [WorkerPoolResource] Properties of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3085 def create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil) # Send request promise = begin_create_or_update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Delete an App Service Environment.
Description for Delete an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param force_delete [Boolean] Specify true
to force the deletion even if the App Service Environment contains resources. The default is false
. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 388 def delete(resource_group_name, name, force_delete:nil, custom_headers:nil) response = delete_async(resource_group_name, name, force_delete:force_delete, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param force_delete [Boolean] Specify true
to force the deletion even if the App Service Environment contains resources. The default is false
. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 406 def delete_async(resource_group_name, name, force_delete:nil, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, name, force_delete:force_delete, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Get the properties of an App Service Environment.
Description for Get the properties of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServiceEnvironmentResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 231 def get(resource_group_name, name, custom_headers:nil) response = get_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the properties of an App Service Environment.
Description for Get the properties of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 266 def get_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a diagnostics item for an App Service Environment.
Description for Get a diagnostics item for an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param diagnostics_name [String] Name of the diagnostics item. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HostingEnvironmentDiagnostics] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 988 def get_diagnostics_item(resource_group_name, name, diagnostics_name, custom_headers:nil) response = get_diagnostics_item_async(resource_group_name, name, diagnostics_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get a diagnostics item for an App Service Environment.
Description for Get a diagnostics item for an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param diagnostics_name [String] Name of the diagnostics item. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1025 def get_diagnostics_item_async(resource_group_name, name, diagnostics_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'diagnostics_name is nil' if diagnostics_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/diagnostics/{diagnosticsName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'diagnosticsName' => diagnostics_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::HostingEnvironmentDiagnostics.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get a diagnostics item for an App Service Environment.
Description for Get a diagnostics item for an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param diagnostics_name [String] Name of the diagnostics item. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1007 def get_diagnostics_item_with_http_info(resource_group_name, name, diagnostics_name, custom_headers:nil) get_diagnostics_item_async(resource_group_name, name, diagnostics_name, custom_headers:custom_headers).value! end
Get the network endpoints of all inbound dependencies of an App Service Environment.
Description for Get the network endpoints of all inbound dependencies of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<InboundEnvironmentEndpoint>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1099 def get_inbound_network_dependencies_endpoints(resource_group_name, name, custom_headers:nil) first_page = get_inbound_network_dependencies_endpoints_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get the network endpoints of all inbound dependencies of an App Service Environment.
Description for Get the network endpoints of all inbound dependencies of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [InboundEnvironmentEndpointCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6869 def get_inbound_network_dependencies_endpoints_as_lazy(resource_group_name, name, custom_headers:nil) response = get_inbound_network_dependencies_endpoints_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| get_inbound_network_dependencies_endpoints_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get the network endpoints of all inbound dependencies of an App Service Environment.
Description for Get the network endpoints of all inbound dependencies of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1138 def get_inbound_network_dependencies_endpoints_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::InboundEnvironmentEndpointCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the network endpoints of all inbound dependencies of an App Service Environment.
Description for Get the network endpoints of all inbound dependencies of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [InboundEnvironmentEndpointCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4912 def get_inbound_network_dependencies_endpoints_next(next_page_link, custom_headers:nil) response = get_inbound_network_dependencies_endpoints_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the network endpoints of all inbound dependencies of an App Service Environment.
Description for Get the network endpoints of all inbound dependencies of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4949 def get_inbound_network_dependencies_endpoints_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::InboundEnvironmentEndpointCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the network endpoints of all inbound dependencies of an App Service Environment.
Description for Get the network endpoints of all inbound dependencies of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4931 def get_inbound_network_dependencies_endpoints_next_with_http_info(next_page_link, custom_headers:nil) get_inbound_network_dependencies_endpoints_next_async(next_page_link, custom_headers:custom_headers).value! end
Get the network endpoints of all inbound dependencies of an App Service Environment.
Description for Get the network endpoints of all inbound dependencies of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1119 def get_inbound_network_dependencies_endpoints_with_http_info(resource_group_name, name, custom_headers:nil) get_inbound_network_dependencies_endpoints_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get properties of a multi-role pool.
Description for Get properties of a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1315 def get_multi_role_pool(resource_group_name, name, custom_headers:nil) response = get_multi_role_pool_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get properties of a multi-role pool.
Description for Get properties of a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1350 def get_multi_role_pool_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/multiRolePools/default' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get properties of a multi-role pool.
Description for Get properties of a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1333 def get_multi_role_pool_with_http_info(resource_group_name, name, custom_headers:nil) get_multi_role_pool_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get the network endpoints of all outbound dependencies of an App Service Environment.
Description for Get the network endpoints of all outbound dependencies of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<OutboundEnvironmentEndpoint>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2168 def get_outbound_network_dependencies_endpoints(resource_group_name, name, custom_headers:nil) first_page = get_outbound_network_dependencies_endpoints_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get the network endpoints of all outbound dependencies of an App Service Environment.
Description for Get the network endpoints of all outbound dependencies of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [OutboundEnvironmentEndpointCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7025 def get_outbound_network_dependencies_endpoints_as_lazy(resource_group_name, name, custom_headers:nil) response = get_outbound_network_dependencies_endpoints_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| get_outbound_network_dependencies_endpoints_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get the network endpoints of all outbound dependencies of an App Service Environment.
Description for Get the network endpoints of all outbound dependencies of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2207 def get_outbound_network_dependencies_endpoints_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::OutboundEnvironmentEndpointCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the network endpoints of all outbound dependencies of an App Service Environment.
Description for Get the network endpoints of all outbound dependencies of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [OutboundEnvironmentEndpointCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5506 def get_outbound_network_dependencies_endpoints_next(next_page_link, custom_headers:nil) response = get_outbound_network_dependencies_endpoints_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the network endpoints of all outbound dependencies of an App Service Environment.
Description for Get the network endpoints of all outbound dependencies of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5543 def get_outbound_network_dependencies_endpoints_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::OutboundEnvironmentEndpointCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the network endpoints of all outbound dependencies of an App Service Environment.
Description for Get the network endpoints of all outbound dependencies of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5525 def get_outbound_network_dependencies_endpoints_next_with_http_info(next_page_link, custom_headers:nil) get_outbound_network_dependencies_endpoints_next_async(next_page_link, custom_headers:custom_headers).value! end
Get the network endpoints of all outbound dependencies of an App Service Environment.
Description for Get the network endpoints of all outbound dependencies of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2188 def get_outbound_network_dependencies_endpoints_with_http_info(resource_group_name, name, custom_headers:nil) get_outbound_network_dependencies_endpoints_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get IP addresses assigned to an App Service Environment.
Description for Get IP addresses assigned to an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AddressResponse] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 687 def get_vip_info(resource_group_name, name, custom_headers:nil) response = get_vip_info_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get IP addresses assigned to an App Service Environment.
Description for Get IP addresses assigned to an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 722 def get_vip_info_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/capacities/virtualip' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AddressResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get IP addresses assigned to an App Service Environment.
Description for Get IP addresses assigned to an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 705 def get_vip_info_with_http_info(resource_group_name, name, custom_headers:nil) get_vip_info_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get the properties of an App Service Environment.
Description for Get the properties of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 249 def get_with_http_info(resource_group_name, name, custom_headers:nil) get_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get properties of a worker pool.
Description for Get properties of a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2955 def get_worker_pool(resource_group_name, name, worker_pool_name, custom_headers:nil) response = get_worker_pool_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get properties of a worker pool.
Description for Get properties of a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2992 def get_worker_pool_async(resource_group_name, name, worker_pool_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'worker_pool_name is nil' if worker_pool_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/workerPools/{workerPoolName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get properties of a worker pool.
Description for Get properties of a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2974 def get_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, custom_headers:nil) get_worker_pool_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! end
Get all App Service Environments for a subscription.
Description for Get all App Service Environments for a subscription.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<AppServiceEnvironmentResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 34 def list(custom_headers:nil) first_page = list_as_lazy(custom_headers:custom_headers) first_page.get_all_items end
Get all App Service plans in an App Service Environment.
Description for Get all App Service plans in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<AppServicePlan>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2442 def list_app_service_plans(resource_group_name, name, custom_headers:nil) first_page = list_app_service_plans_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get all App Service plans in an App Service Environment.
Description for Get all App Service plans in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServicePlanCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7050 def list_app_service_plans_as_lazy(resource_group_name, name, custom_headers:nil) response = list_app_service_plans_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_app_service_plans_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get all App Service plans in an App Service Environment.
Description for Get all App Service plans in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2477 def list_app_service_plans_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/serverfarms' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlanCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all App Service plans in an App Service Environment.
Description for Get all App Service plans in an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServicePlanCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5650 def list_app_service_plans_next(next_page_link, custom_headers:nil) response = list_app_service_plans_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get all App Service plans in an App Service Environment.
Description for Get all App Service plans in an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5683 def list_app_service_plans_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServicePlanCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all App Service plans in an App Service Environment.
Description for Get all App Service plans in an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5667 def list_app_service_plans_next_with_http_info(next_page_link, custom_headers:nil) list_app_service_plans_next_async(next_page_link, custom_headers:custom_headers).value! end
Get all App Service plans in an App Service Environment.
Description for Get all App Service plans in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2460 def list_app_service_plans_with_http_info(resource_group_name, name, custom_headers:nil) list_app_service_plans_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get all App Service Environments for a subscription.
Description for Get all App Service Environments for a subscription.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServiceEnvironmentCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6791 def list_as_lazy(custom_headers:nil) response = list_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get all App Service Environments for a subscription.
Description for Get all App Service Environments for a subscription.
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 63 def list_async(custom_headers: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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}/providers/Microsoft.Web/hostingEnvironments' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all App Service Environments in a resource group.
Description for Get all App Service Environments in a resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<AppServiceEnvironmentResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 128 def list_by_resource_group(resource_group_name, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers) first_page.get_all_items end
Get all App Service Environments in a resource group.
Description for Get all App Service Environments in a resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServiceEnvironmentCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6815 def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get all App Service Environments in a resource group.
Description for Get all App Service Environments in a resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 161 def list_by_resource_group_async(resource_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all App Service Environments in a resource group.
Description for Get all App Service Environments in a resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServiceEnvironmentCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4668 def list_by_resource_group_next(next_page_link, custom_headers:nil) response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get all App Service Environments in a resource group.
Description for Get all App Service Environments in a resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4701 def list_by_resource_group_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all App Service Environments in a resource group.
Description for Get all App Service Environments in a resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4685 def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end
Get all App Service Environments in a resource group.
Description for Get all App Service Environments in a resource group.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 145 def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! end
Get the used, available, and total worker capacity an App Service Environment.
Description for Get the used, available, and total worker capacity an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<StampCapacity>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 577 def list_capacities(resource_group_name, name, custom_headers:nil) first_page = list_capacities_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get the used, available, and total worker capacity an App Service Environment.
Description for Get the used, available, and total worker capacity an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StampCapacityCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6842 def list_capacities_as_lazy(resource_group_name, name, custom_headers:nil) response = list_capacities_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_capacities_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get the used, available, and total worker capacity an App Service Environment.
Description for Get the used, available, and total worker capacity an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 616 def list_capacities_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/capacities/compute' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StampCapacityCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the used, available, and total worker capacity an App Service Environment.
Description for Get the used, available, and total worker capacity an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [StampCapacityCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4766 def list_capacities_next(next_page_link, custom_headers:nil) response = list_capacities_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get the used, available, and total worker capacity an App Service Environment.
Description for Get the used, available, and total worker capacity an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4803 def list_capacities_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::StampCapacityCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get the used, available, and total worker capacity an App Service Environment.
Description for Get the used, available, and total worker capacity an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4785 def list_capacities_next_with_http_info(next_page_link, custom_headers:nil) list_capacities_next_async(next_page_link, custom_headers:custom_headers).value! end
Get the used, available, and total worker capacity an App Service Environment.
Description for Get the used, available, and total worker capacity an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 597 def list_capacities_with_http_info(resource_group_name, name, custom_headers:nil) list_capacities_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get diagnostic information for an App Service Environment.
Description for Get diagnostic information for an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 865 def list_diagnostics(resource_group_name, name, custom_headers:nil) response = list_diagnostics_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get diagnostic information for an App Service Environment.
Description for Get diagnostic information for an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 900 def list_diagnostics_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/diagnostics' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'HostingEnvironmentDiagnosticsElementType', type: { name: 'Composite', class_name: 'HostingEnvironmentDiagnostics' } } } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get diagnostic information for an App Service Environment.
Description for Get diagnostic information for an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 883 def list_diagnostics_with_http_info(resource_group_name, name, custom_headers:nil) list_diagnostics_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get metric definitions for a multi-role pool of an App Service Environment.
Description for Get metric definitions for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ResourceMetricDefinition>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1718 def list_multi_role_metric_definitions(resource_group_name, name, custom_headers:nil) first_page = list_multi_role_metric_definitions_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get metric definitions for a multi-role pool of an App Service Environment.
Description for Get metric definitions for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6948 def list_multi_role_metric_definitions_as_lazy(resource_group_name, name, custom_headers:nil) response = list_multi_role_metric_definitions_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_multi_role_metric_definitions_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get metric definitions for a multi-role pool of an App Service Environment.
Description for Get metric definitions for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1755 def list_multi_role_metric_definitions_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get metric definitions for a multi-role pool of an App Service Environment.
Description for Get metric definitions for a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5211 def list_multi_role_metric_definitions_next(next_page_link, custom_headers:nil) response = list_multi_role_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get metric definitions for a multi-role pool of an App Service Environment.
Description for Get metric definitions for a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5246 def list_multi_role_metric_definitions_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get metric definitions for a multi-role pool of an App Service Environment.
Description for Get metric definitions for a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5229 def list_multi_role_metric_definitions_next_with_http_info(next_page_link, custom_headers:nil) list_multi_role_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! end
Get metric definitions for a multi-role pool of an App Service Environment.
Description for Get metric definitions for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1737 def list_multi_role_metric_definitions_with_http_info(resource_group_name, name, custom_headers:nil) list_multi_role_metric_definitions_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param instance [String] Name of the instance in the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ResourceMetricDefinition>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1604 def list_multi_role_pool_instance_metric_definitions(resource_group_name, name, instance, custom_headers:nil) first_page = list_multi_role_pool_instance_metric_definitions_as_lazy(resource_group_name, name, instance, custom_headers:custom_headers) first_page.get_all_items end
Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param instance [String] Name of the instance in the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6922 def list_multi_role_pool_instance_metric_definitions_as_lazy(resource_group_name, name, instance, custom_headers:nil) response = list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param instance [String] Name of the instance in the multi-role pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1645 def list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'instance is nil' if instance.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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instance' => instance,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5110 def list_multi_role_pool_instance_metric_definitions_next(next_page_link, custom_headers:nil) response = list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5147 def list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5129 def list_multi_role_pool_instance_metric_definitions_next_with_http_info(next_page_link, custom_headers:nil) list_multi_role_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! end
Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param instance [String] Name of the instance in the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1625 def list_multi_role_pool_instance_metric_definitions_with_http_info(resource_group_name, name, instance, custom_headers:nil) list_multi_role_pool_instance_metric_definitions_async(resource_group_name, name, instance, custom_headers:custom_headers).value! end
Get available SKUs for scaling a multi-role pool.
Description for Get available SKUs for scaling a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SkuInfo>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1826 def list_multi_role_pool_skus(resource_group_name, name, custom_headers:nil) first_page = list_multi_role_pool_skus_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get available SKUs for scaling a multi-role pool.
Description for Get available SKUs for scaling a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SkuInfoCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6973 def list_multi_role_pool_skus_as_lazy(resource_group_name, name, custom_headers:nil) response = list_multi_role_pool_skus_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_multi_role_pool_skus_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get available SKUs for scaling a multi-role pool.
Description for Get available SKUs for scaling a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1861 def list_multi_role_pool_skus_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/multiRolePools/default/skus' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SkuInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get available SKUs for scaling a multi-role pool.
Description for Get available SKUs for scaling a multi-role pool.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SkuInfoCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5309 def list_multi_role_pool_skus_next(next_page_link, custom_headers:nil) response = list_multi_role_pool_skus_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get available SKUs for scaling a multi-role pool.
Description for Get available SKUs for scaling a multi-role pool.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5342 def list_multi_role_pool_skus_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SkuInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get available SKUs for scaling a multi-role pool.
Description for Get available SKUs for scaling a multi-role pool.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5326 def list_multi_role_pool_skus_next_with_http_info(next_page_link, custom_headers:nil) list_multi_role_pool_skus_next_async(next_page_link, custom_headers:custom_headers).value! end
Get available SKUs for scaling a multi-role pool.
Description for Get available SKUs for scaling a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1844 def list_multi_role_pool_skus_with_http_info(resource_group_name, name, custom_headers:nil) list_multi_role_pool_skus_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get all multi-role pools.
Description for Get all multi-role pools.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<WorkerPoolResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1209 def list_multi_role_pools(resource_group_name, name, custom_headers:nil) first_page = list_multi_role_pools_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get all multi-role pools.
Description for Get all multi-role pools.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6894 def list_multi_role_pools_as_lazy(resource_group_name, name, custom_headers:nil) response = list_multi_role_pools_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_multi_role_pools_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get all multi-role pools.
Description for Get all multi-role pools.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1244 def list_multi_role_pools_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/multiRolePools' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all multi-role pools.
Description for Get all multi-role pools.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5012 def list_multi_role_pools_next(next_page_link, custom_headers:nil) response = list_multi_role_pools_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get all multi-role pools.
Description for Get all multi-role pools.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5045 def list_multi_role_pools_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all multi-role pools.
Description for Get all multi-role pools.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5029 def list_multi_role_pools_next_with_http_info(next_page_link, custom_headers:nil) list_multi_role_pools_next_async(next_page_link, custom_headers:custom_headers).value! end
Get all multi-role pools.
Description for Get all multi-role pools.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1227 def list_multi_role_pools_with_http_info(resource_group_name, name, custom_headers:nil) list_multi_role_pools_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get usage metrics for a multi-role pool of an App Service Environment.
Description for Get usage metrics for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Usage>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1933 def list_multi_role_usages(resource_group_name, name, custom_headers:nil) first_page = list_multi_role_usages_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get usage metrics for a multi-role pool of an App Service Environment.
Description for Get usage metrics for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [UsageCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6998 def list_multi_role_usages_as_lazy(resource_group_name, name, custom_headers:nil) response = list_multi_role_usages_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_multi_role_usages_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get usage metrics for a multi-role pool of an App Service Environment.
Description for Get usage metrics for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1970 def list_multi_role_usages_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/multiRolePools/default/usages' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::UsageCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get usage metrics for a multi-role pool of an App Service Environment.
Description for Get usage metrics for a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [UsageCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5406 def list_multi_role_usages_next(next_page_link, custom_headers:nil) response = list_multi_role_usages_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get usage metrics for a multi-role pool of an App Service Environment.
Description for Get usage metrics for a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5441 def list_multi_role_usages_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::UsageCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get usage metrics for a multi-role pool of an App Service Environment.
Description for Get usage metrics for a multi-role pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5424 def list_multi_role_usages_next_with_http_info(next_page_link, custom_headers:nil) list_multi_role_usages_next_async(next_page_link, custom_headers:custom_headers).value! end
Get usage metrics for a multi-role pool of an App Service Environment.
Description for Get usage metrics for a multi-role pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1952 def list_multi_role_usages_with_http_info(resource_group_name, name, custom_headers:nil) list_multi_role_usages_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get all App Service Environments for a subscription.
Description for Get all App Service Environments for a subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServiceEnvironmentCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4572 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get all App Service Environments for a subscription.
Description for Get all App Service Environments for a subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4605 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all App Service Environments for a subscription.
Description for Get all App Service Environments for a subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 4589 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end
List all currently running operations on the App Service Environment.
Description for List all currently running operations on the App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2042 def list_operations(resource_group_name, name, custom_headers:nil) response = list_operations_async(resource_group_name, name, custom_headers:custom_headers).value! response.body unless response.nil? end
List all currently running operations on the App Service Environment.
Description for List all currently running operations on the App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2079 def list_operations_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/operations' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'OperationElementType', type: { name: 'Composite', class_name: 'Operation' } } } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all currently running operations on the App Service Environment.
Description for List all currently running operations on the App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2061 def list_operations_with_http_info(resource_group_name, name, custom_headers:nil) list_operations_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get global usage metrics of an App Service Environment.
Description for Get global usage metrics of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param filter [String] Return only usages/metrics specified in the filter. 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<CsmUsageQuota>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2733 def list_usages(resource_group_name, name, filter:nil, custom_headers:nil) first_page = list_usages_as_lazy(resource_group_name, name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end
Get global usage metrics of an App Service Environment.
Description for Get global usage metrics of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param filter [String] Return only usages/metrics specified in the filter. 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CsmUsageQuotaCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7106 def list_usages_as_lazy(resource_group_name, name, filter:nil, custom_headers:nil) response = list_usages_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_usages_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get global usage metrics of an App Service Environment.
Description for Get global usage metrics of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param filter [String] Return only usages/metrics specified in the filter. 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’'. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2776 def list_usages_async(resource_group_name, name, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/usages' request_url = @base_url || @client.base_url options = { 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}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmUsageQuotaCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get global usage metrics of an App Service Environment.
Description for Get global usage metrics of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [CsmUsageQuotaCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5886 def list_usages_next(next_page_link, custom_headers:nil) response = list_usages_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get global usage metrics of an App Service Environment.
Description for Get global usage metrics of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5919 def list_usages_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::CsmUsageQuotaCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get global usage metrics of an App Service Environment.
Description for Get global usage metrics of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5903 def list_usages_next_with_http_info(next_page_link, custom_headers:nil) list_usages_next_async(next_page_link, custom_headers:custom_headers).value! end
Get global usage metrics of an App Service Environment.
Description for Get global usage metrics of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param filter [String] Return only usages/metrics specified in the filter. 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’'. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2755 def list_usages_with_http_info(resource_group_name, name, filter:nil, custom_headers:nil) list_usages_async(resource_group_name, name, filter:filter, custom_headers:custom_headers).value! end
Get all apps in an App Service Environment.
Description for Get all apps in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param properties_to_include [String] Comma separated list of app properties to include. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2550 def list_web_apps(resource_group_name, name, properties_to_include:nil, custom_headers:nil) first_page = list_web_apps_as_lazy(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers) first_page.get_all_items end
Get all apps in an App Service Environment.
Description for Get all apps in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param properties_to_include [String] Comma separated list of app properties to include. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7077 def list_web_apps_as_lazy(resource_group_name, name, properties_to_include:nil, custom_headers:nil) response = list_web_apps_async(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_apps_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get all apps in an App Service Environment.
Description for Get all apps in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param properties_to_include [String] Comma separated list of app properties to include. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2589 def list_web_apps_async(resource_group_name, name, properties_to_include:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/sites' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'propertiesToInclude' => properties_to_include,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all apps in an App Service Environment.
Description for Get all apps in an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5746 def list_web_apps_next(next_page_link, custom_headers:nil) response = list_web_apps_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get all apps in an App Service Environment.
Description for Get all apps in an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5779 def list_web_apps_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all apps in an App Service Environment.
Description for Get all apps in an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5763 def list_web_apps_next_with_http_info(next_page_link, custom_headers:nil) list_web_apps_next_async(next_page_link, custom_headers:custom_headers).value! end
Get all apps in an App Service Environment.
Description for Get all apps in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param properties_to_include [String] Comma separated list of app properties to include. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2570 def list_web_apps_with_http_info(resource_group_name, name, properties_to_include:nil, custom_headers:nil) list_web_apps_async(resource_group_name, name, properties_to_include:properties_to_include, custom_headers:custom_headers).value! end
Get metric definitions for a worker pool of an App Service Environment.
Description for Get metric definitions for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ResourceMetricDefinition>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3372 def list_web_worker_metric_definitions(resource_group_name, name, worker_pool_name, custom_headers:nil) first_page = list_web_worker_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:custom_headers) first_page.get_all_items end
Get metric definitions for a worker pool of an App Service Environment.
Description for Get metric definitions for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7187 def list_web_worker_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:nil) response = list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_worker_metric_definitions_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get metric definitions for a worker pool of an App Service Environment.
Description for Get metric definitions for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3411 def list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'worker_pool_name is nil' if worker_pool_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get metric definitions for a worker pool of an App Service Environment.
Description for Get metric definitions for a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6181 def list_web_worker_metric_definitions_next(next_page_link, custom_headers:nil) response = list_web_worker_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get metric definitions for a worker pool of an App Service Environment.
Description for Get metric definitions for a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6216 def list_web_worker_metric_definitions_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get metric definitions for a worker pool of an App Service Environment.
Description for Get metric definitions for a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6199 def list_web_worker_metric_definitions_next_with_http_info(next_page_link, custom_headers:nil) list_web_worker_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! end
Get metric definitions for a worker pool of an App Service Environment.
Description for Get metric definitions for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3392 def list_web_worker_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, custom_headers:nil) list_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! end
Get usage metrics for a worker pool of an App Service Environment.
Description for Get usage metrics for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Usage>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3595 def list_web_worker_usages(resource_group_name, name, worker_pool_name, custom_headers:nil) first_page = list_web_worker_usages_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:custom_headers) first_page.get_all_items end
Get usage metrics for a worker pool of an App Service Environment.
Description for Get usage metrics for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [UsageCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7239 def list_web_worker_usages_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:nil) response = list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get usage metrics for a worker pool of an App Service Environment.
Description for Get usage metrics for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3634 def list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'worker_pool_name is nil' if worker_pool_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::UsageCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get usage metrics for a worker pool of an App Service Environment.
Description for Get usage metrics for a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [UsageCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6376 def list_web_worker_usages_next(next_page_link, custom_headers:nil) response = list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get usage metrics for a worker pool of an App Service Environment.
Description for Get usage metrics for a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6411 def list_web_worker_usages_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::UsageCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get usage metrics for a worker pool of an App Service Environment.
Description for Get usage metrics for a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6394 def list_web_worker_usages_next_with_http_info(next_page_link, custom_headers:nil) list_web_worker_usages_next_async(next_page_link, custom_headers:custom_headers).value! end
Get usage metrics for a worker pool of an App Service Environment.
Description for Get usage metrics for a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3615 def list_web_worker_usages_with_http_info(resource_group_name, name, worker_pool_name, custom_headers:nil) list_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! end
Get all App Service Environments for a subscription.
Description for Get all App Service Environments for a subscription.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 49 def list_with_http_info(custom_headers:nil) list_async(custom_headers:custom_headers).value! end
Get metric definitions for a specific instance of a worker pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param instance [String] Name of the instance in the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<ResourceMetricDefinition>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3254 def list_worker_pool_instance_metric_definitions(resource_group_name, name, worker_pool_name, instance, custom_headers:nil) first_page = list_worker_pool_instance_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, instance, custom_headers:custom_headers) first_page.get_all_items end
Get metric definitions for a specific instance of a worker pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param instance [String] Name of the instance in the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7160 def list_worker_pool_instance_metric_definitions_as_lazy(resource_group_name, name, worker_pool_name, instance, custom_headers:nil) response = list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get metric definitions for a specific instance of a worker pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param instance [String] Name of the instance in the worker pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3297 def list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil? fail ArgumentError, 'instance is nil' if instance.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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'instance' => instance,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get metric definitions for a specific instance of a worker pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceMetricDefinitionCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6080 def list_worker_pool_instance_metric_definitions_next(next_page_link, custom_headers:nil) response = list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get metric definitions for a specific instance of a worker pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6117 def list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get metric definitions for a specific instance of a worker pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6099 def list_worker_pool_instance_metric_definitions_next_with_http_info(next_page_link, custom_headers:nil) list_worker_pool_instance_metric_definitions_next_async(next_page_link, custom_headers:custom_headers).value! end
Get metric definitions for a specific instance of a worker pool of an App Service Environment.
Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param instance [String] Name of the instance in the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3276 def list_worker_pool_instance_metric_definitions_with_http_info(resource_group_name, name, worker_pool_name, instance, custom_headers:nil) list_worker_pool_instance_metric_definitions_async(resource_group_name, name, worker_pool_name, instance, custom_headers:custom_headers).value! end
Get available SKUs for scaling a worker pool.
Description for Get available SKUs for scaling a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SkuInfo>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3484 def list_worker_pool_skus(resource_group_name, name, worker_pool_name, custom_headers:nil) first_page = list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:custom_headers) first_page.get_all_items end
Get available SKUs for scaling a worker pool.
Description for Get available SKUs for scaling a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SkuInfoCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7213 def list_worker_pool_skus_as_lazy(resource_group_name, name, worker_pool_name, custom_headers:nil) response = list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_worker_pool_skus_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get available SKUs for scaling a worker pool.
Description for Get available SKUs for scaling a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3521 def list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'worker_pool_name is nil' if worker_pool_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SkuInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get available SKUs for scaling a worker pool.
Description for Get available SKUs for scaling a worker pool.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SkuInfoCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6279 def list_worker_pool_skus_next(next_page_link, custom_headers:nil) response = list_worker_pool_skus_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get available SKUs for scaling a worker pool.
Description for Get available SKUs for scaling a worker pool.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6312 def list_worker_pool_skus_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::SkuInfoCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get available SKUs for scaling a worker pool.
Description for Get available SKUs for scaling a worker pool.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6296 def list_worker_pool_skus_next_with_http_info(next_page_link, custom_headers:nil) list_worker_pool_skus_next_async(next_page_link, custom_headers:custom_headers).value! end
Get available SKUs for scaling a worker pool.
Description for Get available SKUs for scaling a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3503 def list_worker_pool_skus_with_http_info(resource_group_name, name, worker_pool_name, custom_headers:nil) list_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers:custom_headers).value! end
Get all worker pools of an App Service Environment.
Description for Get all worker pools of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<WorkerPoolResource>] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2848 def list_worker_pools(resource_group_name, name, custom_headers:nil) first_page = list_worker_pools_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
Get all worker pools of an App Service Environment.
Description for Get all worker pools of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolCollection] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 7131 def list_worker_pools_as_lazy(resource_group_name, name, custom_headers:nil) response = list_worker_pools_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_worker_pools_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get all worker pools of an App Service Environment.
Description for Get all worker pools of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2883 def list_worker_pools_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/workerPools' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all worker pools of an App Service Environment.
Description for Get all worker pools of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5982 def list_worker_pools_next(next_page_link, custom_headers:nil) response = list_worker_pools_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get all worker pools of an App Service Environment.
Description for Get all worker pools of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 6015 def list_worker_pools_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get all worker pools of an App Service Environment.
Description for Get all worker pools of an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5999 def list_worker_pools_next_with_http_info(next_page_link, custom_headers:nil) list_worker_pools_next_async(next_page_link, custom_headers:custom_headers).value! end
Get all worker pools of an App Service Environment.
Description for Get all worker pools of an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2866 def list_worker_pools_with_http_info(resource_group_name, name, custom_headers:nil) list_worker_pools_async(resource_group_name, name, custom_headers:custom_headers).value! end
Reboot all machines in an App Service Environment.
Description for Reboot all machines in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2277 def reboot(resource_group_name, name, custom_headers:nil) response = reboot_async(resource_group_name, name, custom_headers:custom_headers).value! nil end
Reboot all machines in an App Service Environment.
Description for Reboot all machines in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2312 def reboot_async(resource_group_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/hostingEnvironments/{name}/reboot' request_url = @base_url || @client.base_url options = { 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 || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Reboot all machines in an App Service Environment.
Description for Reboot all machines in an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2295 def reboot_with_http_info(resource_group_name, name, custom_headers:nil) reboot_async(resource_group_name, name, custom_headers:custom_headers).value! end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2373 def resume(resource_group_name, name, custom_headers:nil) response = resume_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| resume_next_async(next_page_link, custom_headers:custom_headers) end page end end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2411 def resume_async(resource_group_name, name, custom_headers:nil) # Send request promise = begin_resume_async(resource_group_name, name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Resume an App Service Environment.
Description for Resume an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5606 def resume_next(next_page_link, custom_headers:nil) response = resume_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5620 def resume_next_async(next_page_link, custom_headers:nil) # Send request promise = begin_resume_next_async(next_page_link, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Site>] which provide lazy access to pages of the response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2660 def suspend(resource_group_name, name, custom_headers:nil) response = suspend_async(resource_group_name, name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| suspend_next_async(next_page_link, custom_headers:custom_headers) end page end end
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 2698 def suspend_async(resource_group_name, name, custom_headers:nil) # Send request promise = begin_suspend_async(resource_group_name, name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Suspend an App Service Environment.
Description for Suspend an App Service Environment.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WebAppCollection] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5842 def suspend_next(next_page_link, custom_headers:nil) response = suspend_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 5856 def suspend_next_async(next_page_link, custom_headers:nil) # Send request promise = begin_suspend_next_async(next_page_link, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WebAppCollection.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Create or update an App Service Environment.
Description for Create or update an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param hosting_environment_envelope [AppServiceEnvironmentPatchResource] Configuration details of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [AppServiceEnvironmentResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 437 def update(resource_group_name, name, hosting_environment_envelope, custom_headers:nil) response = update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Create or update an App Service Environment.
Description for Create or update an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param hosting_environment_envelope [AppServiceEnvironmentPatchResource] Configuration details of the App Service Environment. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 476 def update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'hosting_environment_envelope is nil' if hosting_environment_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentPatchResource.mapper() request_content = @client.serialize(request_mapper, hosting_environment_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}' request_url = @base_url || @client.base_url options = { 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}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::AppServiceEnvironmentResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create or update a multi-role pool.
Description for Create or update a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1473 def update_multi_role_pool(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) response = update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Create or update a multi-role pool.
Description for Create or update a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1512 def update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'multi_role_pool_envelope is nil' if multi_role_pool_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() request_content = @client.serialize(request_mapper, multi_role_pool_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default' request_url = @base_url || @client.base_url options = { 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}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create or update a multi-role pool.
Description for Create or update a multi-role pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param multi_role_pool_envelope [WorkerPoolResource] Properties of the multi-role pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 1493 def update_multi_role_pool_with_http_info(resource_group_name, name, multi_role_pool_envelope, custom_headers:nil) update_multi_role_pool_async(resource_group_name, name, multi_role_pool_envelope, custom_headers:custom_headers).value! end
Create or update an App Service Environment.
Description for Create or update an App Service Environment.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param hosting_environment_envelope [AppServiceEnvironmentPatchResource] Configuration details of the App Service Environment. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 457 def update_with_http_info(resource_group_name, name, hosting_environment_envelope, custom_headers:nil) update_async(resource_group_name, name, hosting_environment_envelope, custom_headers:custom_headers).value! end
Create or update a worker pool.
Description for Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param worker_pool_envelope [WorkerPoolResource] Properties of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [WorkerPoolResource] operation results.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3119 def update_worker_pool(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil) response = update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value! response.body unless response.nil? end
Create or update a worker pool.
Description for Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param worker_pool_envelope [WorkerPoolResource] Properties of the worker pool. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3160 def update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'worker_pool_name is nil' if worker_pool_name.nil? fail ArgumentError, 'worker_pool_envelope is nil' if worker_pool_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 = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() request_content = @client.serialize(request_mapper, worker_pool_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.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 MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2020_09_01::Models::WorkerPoolResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create or update a worker pool.
Description for Create or update a worker pool.
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Name of the App Service Environment. @param worker_pool_name [String] Name of the worker pool. @param worker_pool_envelope [WorkerPoolResource] Properties of the worker pool. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-09-01/generated/azure_mgmt_web/app_service_environments.rb, line 3140 def update_worker_pool_with_http_info(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:nil) update_worker_pool_async(resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers:custom_headers).value! end