class Azure::StreamAnalytics::Mgmt::V2016_03_01::Outputs
Stream Analytics Client
Attributes
@return [StreamAnalyticsManagementClient] reference to the StreamAnalyticsManagementClient
Private Class Methods
Creates and initializes a new instance of the Outputs
class. @param client service class for accessing basic functionality.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Tests whether an output’s datasource is reachable and usable by the Azure
Stream Analytics service.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param output [Output] If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceTestStatus] operation results.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 698 def begin_test(resource_group_name, job_name, output_name, output:nil, custom_headers:nil) response = begin_test_async(resource_group_name, job_name, output_name, output:output, custom_headers:custom_headers).value! response.body unless response.nil? end
Tests whether an output’s datasource is reachable and usable by the Azure
Stream Analytics service.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param output [Output] If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 747 def begin_test_async(resource_group_name, job_name, output_name, output:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, 'output_name is nil' if output_name.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output.mapper() request_content = @client.serialize(request_mapper, output) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'outputName' => output_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ResourceTestStatus.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
Tests whether an output’s datasource is reachable and usable by the Azure
Stream Analytics service.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param output [Output] If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 723 def begin_test_with_http_info(resource_group_name, job_name, output_name, output:nil, custom_headers:nil) begin_test_async(resource_group_name, job_name, output_name, output:output, custom_headers:custom_headers).value! end
Creates an output or replaces an already existing output under an existing streaming job.
@param output [Output] The definition of the output that will be used to create a new output or replace the existing one under the streaming job. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param if_match [String] The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. @param if_none_match [String] Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Output] operation results.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 46 def create_or_replace(output, resource_group_name, job_name, output_name, if_match:nil, if_none_match:nil, custom_headers:nil) response = create_or_replace_async(output, resource_group_name, job_name, output_name, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates an output or replaces an already existing output under an existing streaming job.
@param output [Output] The definition of the output that will be used to create a new output or replace the existing one under the streaming job. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param if_match [String] The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. @param if_none_match [String] Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 99 def create_or_replace_async(output, resource_group_name, job_name, output_name, if_match:nil, if_none_match:nil, custom_headers:nil) fail ArgumentError, 'output is nil' if output.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, 'output_name is nil' if output_name.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['If-Match'] = if_match unless if_match.nil? request_headers['If-None-Match'] = if_none_match unless if_none_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output.mapper() request_content = @client.serialize(request_mapper, output) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'outputName' => output_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output.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
Creates an output or replaces an already existing output under an existing streaming job.
@param output [Output] The definition of the output that will be used to create a new output or replace the existing one under the streaming job. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param if_match [String] The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. @param if_none_match [String] Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 73 def create_or_replace_with_http_info(output, resource_group_name, job_name, output_name, if_match:nil, if_none_match:nil, custom_headers:nil) create_or_replace_async(output, resource_group_name, job_name, output_name, if_match:if_match, if_none_match:if_none_match, custom_headers:custom_headers).value! end
Deletes an output from the streaming job.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 326 def delete(resource_group_name, job_name, output_name, custom_headers:nil) response = delete_async(resource_group_name, job_name, output_name, custom_headers:custom_headers).value! nil end
Deletes an output from the streaming job.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 361 def delete_async(resource_group_name, job_name, output_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, 'output_name is nil' if output_name.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.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'outputName' => output_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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 end promise.execute end
Deletes an output from the streaming job.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 344 def delete_with_http_info(resource_group_name, job_name, output_name, custom_headers:nil) delete_async(resource_group_name, job_name, output_name, custom_headers:custom_headers).value! end
Gets details about the specified output.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Output] operation results.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 418 def get(resource_group_name, job_name, output_name, custom_headers:nil) response = get_async(resource_group_name, job_name, output_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets details about the specified output.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 453 def get_async(resource_group_name, job_name, output_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, 'output_name is nil' if output_name.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.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'outputName' => output_name}, 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 MsRestAzure::AzureOperationError.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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output.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
Gets details about the specified output.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 436 def get_with_http_info(resource_group_name, job_name, output_name, custom_headers:nil) get_async(resource_group_name, job_name, output_name, custom_headers:custom_headers).value! end
Lists all of the outputs under the specified streaming job.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param select [String] The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<Output>] operation results.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 523 def list_by_streaming_job(resource_group_name, job_name, select:nil, custom_headers:nil) first_page = list_by_streaming_job_as_lazy(resource_group_name, job_name, select:select, custom_headers:custom_headers) first_page.get_all_items end
Lists all of the outputs under the specified streaming job.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param select [String] The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [OutputListResult] which provide lazy access to pages of the response.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 913 def list_by_streaming_job_as_lazy(resource_group_name, job_name, select:nil, custom_headers:nil) response = list_by_streaming_job_async(resource_group_name, job_name, select:select, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_streaming_job_next_async(next_page_link, custom_headers:custom_headers) end page end end
Lists all of the outputs under the specified streaming job.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param select [String] The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 564 def list_by_streaming_job_async(resource_group_name, job_name, select:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'job_name is nil' if job_name.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.StreamAnalytics/streamingjobs/{jobName}/outputs' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name}, query_params: {'$select' => select,'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 MsRestAzure::AzureOperationError.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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputListResult.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
Lists all of the outputs under the specified streaming job.
@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 [OutputListResult] operation results.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 818 def list_by_streaming_job_next(next_page_link, custom_headers:nil) response = list_by_streaming_job_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Lists all of the outputs under the specified streaming job.
@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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 847 def list_by_streaming_job_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 MsRestAzure::AzureOperationError.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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::OutputListResult.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
Lists all of the outputs under the specified streaming job.
@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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 833 def list_by_streaming_job_next_with_http_info(next_page_link, custom_headers:nil) list_by_streaming_job_next_async(next_page_link, custom_headers:custom_headers).value! end
Lists all of the outputs under the specified streaming job.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param select [String] The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a valid value. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 544 def list_by_streaming_job_with_http_info(resource_group_name, job_name, select:nil, custom_headers:nil) list_by_streaming_job_async(resource_group_name, job_name, select:select, custom_headers:custom_headers).value! end
Tests whether an output’s datasource is reachable and usable by the Azure
Stream Analytics service.
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param output [Output] If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [ResourceTestStatus] operation results.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 637 def test(resource_group_name, job_name, output_name, output:nil, custom_headers:nil) response = test_async(resource_group_name, job_name, output_name, output:output, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param output [Output] If the output specified does not already exist, this parameter must contain the full output definition intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly like a PATCH operation) and the resulting output will be tested. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 660 def test_async(resource_group_name, job_name, output_name, output:nil, custom_headers:nil) # Send request promise = begin_test_async(resource_group_name, job_name, output_name, output:output, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::ResourceTestStatus.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.
@param output [Output] An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param if_match [String] The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Output] operation results.
# File lib/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 196 def update(output, resource_group_name, job_name, output_name, if_match:nil, custom_headers:nil) response = update_async(output, resource_group_name, job_name, output_name, if_match:if_match, custom_headers:custom_headers).value! response.body unless response.nil? end
Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.
@param output [Output] An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param if_match [String] The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 251 def update_async(output, resource_group_name, job_name, output_name, if_match:nil, custom_headers:nil) fail ArgumentError, 'output is nil' if output.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, 'output_name is nil' if output_name.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['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output.mapper() request_content = @client.serialize(request_mapper, output) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'outputName' => output_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::StreamAnalytics::Mgmt::V2016_03_01::Models::Output.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
Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.
@param output [Output] An Output object. The properties specified here will overwrite the corresponding properties in the existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing output will remain the same and not change as a result of this PATCH operation. @param resource_group_name [String] The name of the resource group that contains the resource. You can obtain this value from the Azure
Resource Manager API or the portal. @param job_name [String] The name of the streaming job. @param output_name [String] The name of the output. @param if_match [String] The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. @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/2016-03-01/generated/azure_mgmt_stream_analytics/outputs.rb, line 224 def update_with_http_info(output, resource_group_name, job_name, output_name, if_match:nil, custom_headers:nil) update_async(output, resource_group_name, job_name, output_name, if_match:if_match, custom_headers:custom_headers).value! end