class Azure::Web::Mgmt::V2018_02_01::Diagnostics
WebSite Management Client
Attributes
@return [WebSiteManagementClient] reference to the WebSiteManagementClient
Private Class Methods
Creates and initializes a new instance of the Diagnostics
class. @param client service class for accessing basic functionality.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Execute Analysis
Execute Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Category Name @param analysis_name [String] Analysis Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticAnalysis] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 934 def execute_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
Execute Analysis
Execute Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Category Name @param analysis_name [String] Analysis Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 979 def execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain: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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'analysis_name is nil' if analysis_name.nil? fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).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/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'subscriptionId' => @client.subscription_id}, query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'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 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::V2018_02_01::Models::DiagnosticAnalysis.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
Execute Analysis
Execute Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Category Name @param analysis_name [String] Analysis Resource Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticAnalysis] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2097 def execute_site_analysis_slot(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = execute_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
Execute Analysis
Execute Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Category Name @param analysis_name [String] Analysis Resource Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2144 def execute_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:nil, end_time:nil, time_grain: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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'analysis_name is nil' if analysis_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'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 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::V2018_02_01::Models::DiagnosticAnalysis.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
Execute Analysis
Execute Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Category Name @param analysis_name [String] Analysis Resource Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2121 def execute_site_analysis_slot_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) execute_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! end
Execute Analysis
Execute Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Category Name @param analysis_name [String] Analysis Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 957 def execute_site_analysis_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! end
Execute Detector
Execute Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param diagnostic_category [String] Category Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticDetectorResponse] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1282 def execute_site_detector(resource_group_name, site_name, detector_name, diagnostic_category, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = execute_site_detector_async(resource_group_name, site_name, detector_name, diagnostic_category, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
Execute Detector
Execute Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param diagnostic_category [String] Category Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1327 def execute_site_detector_async(resource_group_name, site_name, detector_name, diagnostic_category, start_time:nil, end_time:nil, time_grain: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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'detector_name is nil' if detector_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).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/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id}, query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'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 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::V2018_02_01::Models::DiagnosticDetectorResponse.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
Execute Detector
Execute Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param diagnostic_category [String] Category Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticDetectorResponse] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2457 def execute_site_detector_slot(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = execute_site_detector_slot_async(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
Execute Detector
Execute Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param diagnostic_category [String] Category Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2504 def execute_site_detector_slot_async(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:nil, end_time:nil, time_grain: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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'detector_name is nil' if detector_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'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 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::V2018_02_01::Models::DiagnosticDetectorResponse.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
Execute Detector
Execute Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param diagnostic_category [String] Category Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2481 def execute_site_detector_slot_with_http_info(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) execute_site_detector_slot_async(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! end
Execute Detector
Execute Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param diagnostic_category [String] Category Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1305 def execute_site_detector_with_http_info(resource_group_name, site_name, detector_name, diagnostic_category, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) execute_site_detector_async(resource_group_name, site_name, detector_name, diagnostic_category, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! end
Get Hosting Environment Detector Response
Get Hosting Environment Detector Response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] App Service Environment Name @param detector_name [String] Detector Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DetectorResponse] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 147 def get_hosting_environment_detector_response(resource_group_name, name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = get_hosting_environment_detector_response_async(resource_group_name, name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Hosting Environment Detector Response
Get Hosting Environment Detector Response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] App Service Environment Name @param detector_name [String] Detector Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 190 def get_hosting_environment_detector_response_async(resource_group_name, name, detector_name, start_time:nil, end_time:nil, time_grain: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, 'detector_name is nil' if detector_name.nil? fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).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}/detectors/{detectorName}' 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,'detectorName' => detector_name,'subscriptionId' => @client.subscription_id}, query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'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::V2018_02_01::Models::DetectorResponse.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 Hosting Environment Detector Response
Get Hosting Environment Detector Response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] App Service Environment Name @param detector_name [String] Detector Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 169 def get_hosting_environment_detector_response_with_http_info(resource_group_name, name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) get_hosting_environment_detector_response_async(resource_group_name, name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! end
Get Site Analysis
Get Site Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param analysis_name [String] Analysis Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticAnalysis] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 817 def get_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:nil) response = get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Site Analysis
Get Site Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param analysis_name [String] Analysis Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 856 def get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'analysis_name is nil' if analysis_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/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_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::V2018_02_01::Models::DiagnosticAnalysis.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 Site Analysis
Get Site Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param analysis_name [String] Analysis Name @param slot [String] Slot - optional @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticAnalysis] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1976 def get_site_analysis_slot(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:nil) response = get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Site Analysis
Get Site Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param analysis_name [String] Analysis Name @param slot [String] Slot - optional @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2017 def get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'analysis_name is nil' if analysis_name.nil? fail ArgumentError, 'slot is nil' if slot.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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'slot' => slot,'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::V2018_02_01::Models::DiagnosticAnalysis.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 Site Analysis
Get Site Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param analysis_name [String] Analysis Name @param slot [String] Slot - optional @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1997 def get_site_analysis_slot_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:nil) get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:custom_headers).value! end
Get Site Analysis
Get Site Analysis
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param analysis_name [String] Analysis Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 837 def get_site_analysis_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:nil) get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:custom_headers).value! end
Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DetectorDefinition>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1165 def get_site_detector(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil) first_page = get_site_detector_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers) first_page.get_all_items end
Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticDetectorCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3765 def get_site_detector_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil) response = get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| get_site_detector_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1204 def get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'detector_name is nil' if detector_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/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'detectorName' => detector_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::V2018_02_01::Models::DiagnosticDetectorCollection.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 Detector
Get Detector
@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 [DiagnosticDetectorCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3058 def get_site_detector_next(next_page_link, custom_headers:nil) response = get_site_detector_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Detector
Get Detector
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3091 def get_site_detector_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::V2018_02_01::Models::DiagnosticDetectorCollection.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 Detector
Get Detector
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3075 def get_site_detector_next_with_http_info(next_page_link, custom_headers:nil) get_site_detector_next_async(next_page_link, custom_headers:custom_headers).value! end
Get site detector response
Get site detector response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DetectorResponse] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 373 def get_site_detector_response(resource_group_name, site_name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = get_site_detector_response_async(resource_group_name, site_name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
Get site detector response
Get site detector response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 416 def get_site_detector_response_async(resource_group_name, site_name, detector_name, start_time:nil, end_time:nil, time_grain: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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'detector_name is nil' if detector_name.nil? fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).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/sites/{siteName}/detectors/{detectorName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'subscriptionId' => @client.subscription_id}, query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'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::V2018_02_01::Models::DetectorResponse.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 site detector response
Get site detector response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DetectorResponse] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1516 def get_site_detector_response_slot(resource_group_name, site_name, detector_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) response = get_site_detector_response_slot_async(resource_group_name, site_name, detector_name, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! response.body unless response.nil? end
Get site detector response
Get site detector response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1561 def get_site_detector_response_slot_async(resource_group_name, site_name, detector_name, slot, start_time:nil, end_time:nil, time_grain: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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'detector_name is nil' if detector_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).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/sites/{siteName}/slots/{slot}/detectors/{detectorName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'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::V2018_02_01::Models::DetectorResponse.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 site detector response
Get site detector response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param slot [String] Slot Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1539 def get_site_detector_response_slot_with_http_info(resource_group_name, site_name, detector_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) get_site_detector_response_slot_async(resource_group_name, site_name, detector_name, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! end
Get site detector response
Get site detector response
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param detector_name [String] Detector Resource Name @param start_time [DateTime] Start Time @param end_time [DateTime] End Time @param time_grain [String] Time Grain @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 395 def get_site_detector_response_with_http_info(resource_group_name, site_name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil) get_site_detector_response_async(resource_group_name, site_name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value! end
Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DetectorDefinition>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2336 def get_site_detector_slot(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil) first_page = get_site_detector_slot_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers) first_page.get_all_items end
Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticDetectorCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3899 def get_site_detector_slot_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil) response = get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2377 def get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'detector_name is nil' if detector_name.nil? fail ArgumentError, 'slot is nil' if slot.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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'detectorName' => detector_name,'slot' => slot,'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::V2018_02_01::Models::DiagnosticDetectorCollection.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 Detector
Get Detector
@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 [DiagnosticDetectorCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3538 def get_site_detector_slot_next(next_page_link, custom_headers:nil) response = get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Detector
Get Detector
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3571 def get_site_detector_slot_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::V2018_02_01::Models::DiagnosticDetectorCollection.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 Detector
Get Detector
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3555 def get_site_detector_slot_next_with_http_info(next_page_link, custom_headers:nil) get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2357 def get_site_detector_slot_with_http_info(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil) get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers).value! end
Get Detector
Get Detector
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param detector_name [String] Detector Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1185 def get_site_detector_with_http_info(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil) get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers).value! end
Get Diagnostics
Category
Get Diagnostics
Category
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticCategory] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 596 def get_site_diagnostic_category(resource_group_name, site_name, diagnostic_category, custom_headers:nil) response = get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Diagnostics
Category
Get Diagnostics
Category
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 633 def get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.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/sites/{siteName}/diagnostics/{diagnosticCategory}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'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::V2018_02_01::Models::DiagnosticCategory.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 Diagnostics
Category
Get Diagnostics
Category
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticCategory] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1747 def get_site_diagnostic_category_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) response = get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Diagnostics
Category
Get Diagnostics
Category
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1786 def get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'slot is nil' if slot.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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'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::V2018_02_01::Models::DiagnosticCategory.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 Diagnostics
Category
Get Diagnostics
Category
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1767 def get_site_diagnostic_category_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value! end
Get Diagnostics
Category
Get Diagnostics
Category
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 615 def get_site_diagnostic_category_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil) get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value! end
List Hosting Environment Detector Responses
List Hosting Environment Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DetectorResponse>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 37 def list_hosting_environment_detector_responses(resource_group_name, name, custom_headers:nil) first_page = list_hosting_environment_detector_responses_as_lazy(resource_group_name, name, custom_headers:custom_headers) first_page.get_all_items end
List Hosting Environment Detector Responses
List Hosting Environment Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DetectorResponseCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3636 def list_hosting_environment_detector_responses_as_lazy(resource_group_name, name, custom_headers:nil) response = list_hosting_environment_detector_responses_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_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:custom_headers) end page end end
List Hosting Environment Detector Responses
List Hosting Environment Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 72 def list_hosting_environment_detector_responses_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}/detectors' 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::V2018_02_01::Models::DetectorResponseCollection.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
List Hosting Environment Detector Responses
List Hosting Environment Detector Responses
@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 [DetectorResponseCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2578 def list_hosting_environment_detector_responses_next(next_page_link, custom_headers:nil) response = list_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List Hosting Environment Detector Responses
List Hosting Environment Detector Responses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2611 def list_hosting_environment_detector_responses_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::V2018_02_01::Models::DetectorResponseCollection.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
List Hosting Environment Detector Responses
List Hosting Environment Detector Responses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2595 def list_hosting_environment_detector_responses_next_with_http_info(next_page_link, custom_headers:nil) list_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value! end
List Hosting Environment Detector Responses
List Hosting Environment Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param name [String] Site Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 55 def list_hosting_environment_detector_responses_with_http_info(resource_group_name, name, custom_headers:nil) list_hosting_environment_detector_responses_async(resource_group_name, name, custom_headers:custom_headers).value! end
Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<AnalysisDefinition>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 706 def list_site_analyses(resource_group_name, site_name, diagnostic_category, custom_headers:nil) first_page = list_site_analyses_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers) first_page.get_all_items end
Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticAnalysisCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3712 def list_site_analyses_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:nil) response = list_site_analyses_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_analyses_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 743 def list_site_analyses_async(resource_group_name, site_name, diagnostic_category, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.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/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'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::V2018_02_01::Models::DiagnosticAnalysisCollection.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 Site Analyses
Get Site Analyses
@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 [DiagnosticAnalysisCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2866 def list_site_analyses_next(next_page_link, custom_headers:nil) response = list_site_analyses_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Site Analyses
Get Site Analyses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2899 def list_site_analyses_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::V2018_02_01::Models::DiagnosticAnalysisCollection.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 Site Analyses
Get Site Analyses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2883 def list_site_analyses_next_with_http_info(next_page_link, custom_headers:nil) list_site_analyses_next_async(next_page_link, custom_headers:custom_headers).value! end
Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<AnalysisDefinition>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1861 def list_site_analyses_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) first_page = list_site_analyses_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers) first_page.get_all_items end
Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticAnalysisCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3844 def list_site_analyses_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) response = list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1900 def list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'slot is nil' if slot.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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'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::V2018_02_01::Models::DiagnosticAnalysisCollection.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 Site Analyses
Get Site Analyses
@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 [DiagnosticAnalysisCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3346 def list_site_analyses_slot_next(next_page_link, custom_headers:nil) response = list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Site Analyses
Get Site Analyses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3379 def list_site_analyses_slot_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::V2018_02_01::Models::DiagnosticAnalysisCollection.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 Site Analyses
Get Site Analyses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3363 def list_site_analyses_slot_next_with_http_info(next_page_link, custom_headers:nil) list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1881 def list_site_analyses_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value! end
Get Site Analyses
Get Site Analyses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 725 def list_site_analyses_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil) list_site_analyses_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value! end
List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DetectorResponse>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 263 def list_site_detector_responses(resource_group_name, site_name, custom_headers:nil) first_page = list_site_detector_responses_as_lazy(resource_group_name, site_name, custom_headers:custom_headers) first_page.get_all_items end
List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DetectorResponseCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3661 def list_site_detector_responses_as_lazy(resource_group_name, site_name, custom_headers:nil) response = list_site_detector_responses_async(resource_group_name, site_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_detector_responses_next_async(next_page_link, custom_headers:custom_headers) end page end end
List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 298 def list_site_detector_responses_async(resource_group_name, site_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, 'site_name is nil' if site_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/sites/{siteName}/detectors' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_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::V2018_02_01::Models::DetectorResponseCollection.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
List Site Detector Responses
List Site Detector Responses
@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 [DetectorResponseCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2674 def list_site_detector_responses_next(next_page_link, custom_headers:nil) response = list_site_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List Site Detector Responses
List Site Detector Responses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2707 def list_site_detector_responses_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::V2018_02_01::Models::DetectorResponseCollection.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
List Site Detector Responses
List Site Detector Responses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2691 def list_site_detector_responses_next_with_http_info(next_page_link, custom_headers:nil) list_site_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value! end
List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DetectorResponse>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1402 def list_site_detector_responses_slot(resource_group_name, site_name, slot, custom_headers:nil) first_page = list_site_detector_responses_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:custom_headers) first_page.get_all_items end
List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DetectorResponseCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3791 def list_site_detector_responses_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:nil) response = list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_detector_responses_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1439 def list_site_detector_responses_slot_async(resource_group_name, site_name, slot, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'slot is nil' if slot.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/sites/{siteName}/slots/{slot}/detectors' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'slot' => slot,'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::V2018_02_01::Models::DetectorResponseCollection.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
List Site Detector Responses
List Site Detector Responses
@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 [DetectorResponseCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3154 def list_site_detector_responses_slot_next(next_page_link, custom_headers:nil) response = list_site_detector_responses_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List Site Detector Responses
List Site Detector Responses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3187 def list_site_detector_responses_slot_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::V2018_02_01::Models::DetectorResponseCollection.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
List Site Detector Responses
List Site Detector Responses
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3171 def list_site_detector_responses_slot_next_with_http_info(next_page_link, custom_headers:nil) list_site_detector_responses_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1421 def list_site_detector_responses_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil) list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value! end
List Site Detector Responses
List Site Detector Responses
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 281 def list_site_detector_responses_with_http_info(resource_group_name, site_name, custom_headers:nil) list_site_detector_responses_async(resource_group_name, site_name, custom_headers:custom_headers).value! end
Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DetectorDefinition>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1054 def list_site_detectors(resource_group_name, site_name, diagnostic_category, custom_headers:nil) first_page = list_site_detectors_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers) first_page.get_all_items end
Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticDetectorCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3738 def list_site_detectors_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:nil) response = list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_detectors_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1091 def list_site_detectors_async(resource_group_name, site_name, diagnostic_category, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.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/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'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::V2018_02_01::Models::DiagnosticDetectorCollection.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 Detectors
Get Detectors
@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 [DiagnosticDetectorCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2962 def list_site_detectors_next(next_page_link, custom_headers:nil) response = list_site_detectors_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Detectors
Get Detectors
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2995 def list_site_detectors_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::V2018_02_01::Models::DiagnosticDetectorCollection.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 Detectors
Get Detectors
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2979 def list_site_detectors_next_with_http_info(next_page_link, custom_headers:nil) list_site_detectors_next_async(next_page_link, custom_headers:custom_headers).value! end
Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DetectorDefinition>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2221 def list_site_detectors_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) first_page = list_site_detectors_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers) first_page.get_all_items end
Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticDetectorCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3871 def list_site_detectors_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) response = list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2260 def list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil? fail ArgumentError, 'slot is nil' if slot.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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'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::V2018_02_01::Models::DiagnosticDetectorCollection.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 Detectors
Get Detectors
@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 [DiagnosticDetectorCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3442 def list_site_detectors_slot_next(next_page_link, custom_headers:nil) response = list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Detectors
Get Detectors
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3475 def list_site_detectors_slot_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::V2018_02_01::Models::DiagnosticDetectorCollection.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 Detectors
Get Detectors
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3459 def list_site_detectors_slot_next_with_http_info(next_page_link, custom_headers:nil) list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2241 def list_site_detectors_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil) list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value! end
Get Detectors
Get Detectors
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param diagnostic_category [String] Diagnostic Category @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1073 def list_site_detectors_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil) list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value! end
Get Diagnostics
Categories
Get Diagnostics
Categories
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DiagnosticCategory>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 489 def list_site_diagnostic_categories(resource_group_name, site_name, custom_headers:nil) first_page = list_site_diagnostic_categories_as_lazy(resource_group_name, site_name, custom_headers:custom_headers) first_page.get_all_items end
Get Diagnostics
Categories
Get Diagnostics
Categories
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticCategoryCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3686 def list_site_diagnostic_categories_as_lazy(resource_group_name, site_name, custom_headers:nil) response = list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get Diagnostics
Categories
Get Diagnostics
Categories
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 524 def list_site_diagnostic_categories_async(resource_group_name, site_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, 'site_name is nil' if site_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/sites/{siteName}/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,'siteName' => site_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::V2018_02_01::Models::DiagnosticCategoryCollection.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 Diagnostics
Categories
Get Diagnostics
Categories
@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 [DiagnosticCategoryCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2770 def list_site_diagnostic_categories_next(next_page_link, custom_headers:nil) response = list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Diagnostics
Categories
Get Diagnostics
Categories
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2803 def list_site_diagnostic_categories_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::V2018_02_01::Models::DiagnosticCategoryCollection.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 Diagnostics
Categories
Get Diagnostics
Categories
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 2787 def list_site_diagnostic_categories_next_with_http_info(next_page_link, custom_headers:nil) list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers).value! end
Get Diagnostics
Categories
Get Diagnostics
Categories
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<DiagnosticCategory>] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1636 def list_site_diagnostic_categories_slot(resource_group_name, site_name, slot, custom_headers:nil) first_page = list_site_diagnostic_categories_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:custom_headers) first_page.get_all_items end
Get Diagnostics
Categories
Get Diagnostics
Categories
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot Name @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DiagnosticCategoryCollection] which provide lazy access to pages of the response.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3817 def list_site_diagnostic_categories_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:nil) response = list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get Diagnostics
Categories
Get Diagnostics
Categories
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1673 def list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, 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, 'site_name is nil' if site_name.nil? fail ArgumentError, 'slot is nil' if slot.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/sites/{siteName}/slots/{slot}/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,'siteName' => site_name,'slot' => slot,'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::V2018_02_01::Models::DiagnosticCategoryCollection.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 Diagnostics
Categories
Get Diagnostics
Categories
@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 [DiagnosticCategoryCollection] operation results.
# File lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3250 def list_site_diagnostic_categories_slot_next(next_page_link, custom_headers:nil) response = list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Diagnostics
Categories
Get Diagnostics
Categories
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3283 def list_site_diagnostic_categories_slot_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::V2018_02_01::Models::DiagnosticCategoryCollection.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 Diagnostics
Categories
Get Diagnostics
Categories
@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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 3267 def list_site_diagnostic_categories_slot_next_with_http_info(next_page_link, custom_headers:nil) list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers).value! end
Get Diagnostics
Categories
Get Diagnostics
Categories
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @param slot [String] Slot Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 1655 def list_site_diagnostic_categories_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil) list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value! end
Get Diagnostics
Categories
Get Diagnostics
Categories
@param resource_group_name [String] Name of the resource group to which the resource belongs. @param site_name [String] Site Name @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/2018-02-01/generated/azure_mgmt_web/diagnostics.rb, line 507 def list_site_diagnostic_categories_with_http_info(resource_group_name, site_name, custom_headers:nil) list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:custom_headers).value! end