Class: Azure::ARM::StreamAnalytics::StreamingJobs

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb

Overview

Stream Analytics Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ StreamingJobs

Creates and initializes a new instance of the StreamingJobs class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientStreamAnalyticsManagementClient (readonly)

Returns reference to the StreamAnalyticsManagementClient.

Returns:



22
23
24
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 22

def client
  @client
end

Instance Method Details

#begin_create_or_replace(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil) ⇒ StreamingJob

Creates a streaming job or replaces an already existing streaming job.

will be used to create a new streaming job or replace the existing one. contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. will be added to the HTTP request.

Parameters:

  • streaming_job (StreamingJob)

    The definition of the streaming job that

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • if_match (String) (defaults to: nil)

    The ETag of the streaming job. Omit this value to

  • if_none_match (String) (defaults to: nil)

    Set to ‘*’ to allow a new streaming job to be

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StreamingJob)

    operation results.



697
698
699
700
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 697

def begin_create_or_replace(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil)
  response = begin_create_or_replace_async(streaming_job, resource_group_name, job_name, if_match, if_none_match, custom_headers).value!
  response.body unless response.nil?
end

#begin_create_or_replace_async(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil) ⇒ Concurrent::Promise

Creates a streaming job or replaces an already existing streaming job.

will be used to create a new streaming job or replace the existing one. contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. to the HTTP request.

Parameters:

  • streaming_job (StreamingJob)

    The definition of the streaming job that

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • if_match (String) (defaults to: nil)

    The ETag of the streaming job. Omit this value to

  • if_none_match (String) (defaults to: nil)

    Set to ‘*’ to allow a new streaming job to be

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 746

def begin_create_or_replace_async(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil)
  fail ArgumentError, 'streaming_job is nil' if streaming_job.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 = {}

  # 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?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = Azure::ARM::StreamAnalytics::Models::StreamingJob.mapper()
  request_content = @client.serialize(request_mapper,  streaming_job)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}'

  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: {'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::ARM::StreamAnalytics::Models::StreamingJob.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::ARM::StreamAnalytics::Models::StreamingJob.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

#begin_create_or_replace_with_http_info(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Creates a streaming job or replaces an already existing streaming job.

will be used to create a new streaming job or replace the existing one. contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. will be added to the HTTP request.

Parameters:

  • streaming_job (StreamingJob)

    The definition of the streaming job that

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • if_match (String) (defaults to: nil)

    The ETag of the streaming job. Omit this value to

  • if_none_match (String) (defaults to: nil)

    Set to ‘*’ to allow a new streaming job to be

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



722
723
724
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 722

def begin_create_or_replace_with_http_info(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil)
  begin_create_or_replace_async(streaming_job, resource_group_name, job_name, if_match, if_none_match, custom_headers).value!
end

#begin_delete(resource_group_name, job_name, custom_headers = nil) ⇒ Object

Deletes a streaming job.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



831
832
833
834
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 831

def begin_delete(resource_group_name, job_name, custom_headers = nil)
  response = begin_delete_async(resource_group_name, job_name, custom_headers).value!
  nil
end

#begin_delete_async(resource_group_name, job_name, custom_headers = nil) ⇒ Concurrent::Promise

Deletes a streaming job.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 864

def begin_delete_async(resource_group_name, job_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?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}'

  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: {'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 == 202 || 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

#begin_delete_with_http_info(resource_group_name, job_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes a streaming job.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



848
849
850
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 848

def begin_delete_with_http_info(resource_group_name, job_name, custom_headers = nil)
  begin_delete_async(resource_group_name, job_name, custom_headers).value!
end

#begin_start(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil) ⇒ Object

Starts a streaming job. Once a job is started it will start processing input events and produce output.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. applicable to a start streaming job operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • start_job_parameters (StartStreamingJobParameters) (defaults to: nil)

    Parameters

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



920
921
922
923
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 920

def begin_start(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil)
  response = begin_start_async(resource_group_name, job_name, start_job_parameters, custom_headers).value!
  nil
end

#begin_start_async(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil) ⇒ Concurrent::Promise

Starts a streaming job. Once a job is started it will start processing input events and produce output.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. applicable to a start streaming job operation. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • start_job_parameters (StartStreamingJobParameters) (defaults to: nil)

    Parameters

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 959

def begin_start_async(resource_group_name, job_name, start_job_parameters = 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 = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = Azure::ARM::StreamAnalytics::Models::StartStreamingJobParameters.mapper()
  request_content = @client.serialize(request_mapper,  start_job_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start'

  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: {'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?

    result
  end

  promise.execute
end

#begin_start_with_http_info(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Starts a streaming job. Once a job is started it will start processing input events and produce output.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. applicable to a start streaming job operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • start_job_parameters (StartStreamingJobParameters) (defaults to: nil)

    Parameters

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



940
941
942
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 940

def begin_start_with_http_info(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil)
  begin_start_async(resource_group_name, job_name, start_job_parameters, custom_headers).value!
end

#begin_stop(resource_group_name, job_name, custom_headers = nil) ⇒ Object

Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



1022
1023
1024
1025
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1022

def begin_stop(resource_group_name, job_name, custom_headers = nil)
  response = begin_stop_async(resource_group_name, job_name, custom_headers).value!
  nil
end

#begin_stop_async(resource_group_name, job_name, custom_headers = nil) ⇒ Concurrent::Promise

Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1057

def begin_stop_async(resource_group_name, job_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?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/stop'

  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: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail 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

#begin_stop_with_http_info(resource_group_name, job_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1040
1041
1042
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1040

def begin_stop_with_http_info(resource_group_name, job_name, custom_headers = nil)
  begin_stop_async(resource_group_name, job_name, custom_headers).value!
end

#create_or_replace(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil) ⇒ StreamingJob

Creates a streaming job or replaces an already existing streaming job.

will be used to create a new streaming job or replace the existing one. contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. will be added to the HTTP request.

Parameters:

  • streaming_job (StreamingJob)

    The definition of the streaming job that

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • if_match (String) (defaults to: nil)

    The ETag of the streaming job. Omit this value to

  • if_none_match (String) (defaults to: nil)

    Set to ‘*’ to allow a new streaming job to be

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StreamingJob)

    operation results.



44
45
46
47
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 44

def create_or_replace(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil)
  response = create_or_replace_async(streaming_job, resource_group_name, job_name, if_match, if_none_match, custom_headers).value!
  response.body unless response.nil?
end

#create_or_replace_async(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil) ⇒ Concurrent::Promise

will be used to create a new streaming job or replace the existing one. contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. will be added to the HTTP request.

response.

Parameters:

  • streaming_job (StreamingJob)

    The definition of the streaming job that

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • if_match (String) (defaults to: nil)

    The ETag of the streaming job. Omit this value to

  • if_none_match (String) (defaults to: nil)

    Set to ‘*’ to allow a new streaming job to be

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 68

def create_or_replace_async(streaming_job, resource_group_name, job_name, if_match = nil, if_none_match = nil, custom_headers = nil)
  # Send request
  promise = begin_create_or_replace_async(streaming_job, resource_group_name, job_name, if_match, if_none_match, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::ARM::StreamAnalytics::Models::StreamingJob.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#delete(resource_group_name, job_name, custom_headers = nil) ⇒ Object

Deletes a streaming job.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



237
238
239
240
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 237

def delete(resource_group_name, job_name, custom_headers = nil)
  response = delete_async(resource_group_name, job_name, custom_headers).value!
  nil
end

#delete_async(resource_group_name, job_name, custom_headers = nil) ⇒ Concurrent::Promise

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 253

def delete_async(resource_group_name, job_name, custom_headers = nil)
  # Send request
  promise = begin_delete_async(resource_group_name, job_name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#get(resource_group_name, job_name, expand = nil, custom_headers = nil) ⇒ StreamingJob

Gets details about the specified streaming job.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StreamingJob)

    operation results.



286
287
288
289
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 286

def get(resource_group_name, job_name, expand = nil, custom_headers = nil)
  response = get_async(resource_group_name, job_name, expand, custom_headers).value!
  response.body unless response.nil?
end

#get_async(resource_group_name, job_name, expand = nil, custom_headers = nil) ⇒ Concurrent::Promise

Gets details about the specified streaming job.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 329

def get_async(resource_group_name, job_name, expand = 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 = {}

  # 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}'

  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: {'$expand' => expand,'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::ARM::StreamAnalytics::Models::StreamingJob.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_with_http_info(resource_group_name, job_name, expand = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Gets details about the specified streaming job.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



308
309
310
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 308

def get_with_http_info(resource_group_name, job_name, expand = nil, custom_headers = nil)
  get_async(resource_group_name, job_name, expand, custom_headers).value!
end

#list(expand = nil, custom_headers = nil) ⇒ Array<StreamingJob>

Lists all of the streaming jobs in the given subscription.

comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. will be added to the HTTP request.

Parameters:

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<StreamingJob>)

    operation results.



502
503
504
505
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 502

def list(expand = nil, custom_headers = nil)
  first_page = list_as_lazy(expand, custom_headers)
  first_page.get_all_items
end

#list_as_lazy(expand = nil, custom_headers = nil) ⇒ StreamingJobListResult

Lists all of the streaming jobs in the given subscription.

comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. will be added to the HTTP request.

response.

Parameters:

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StreamingJobListResult)

    which provide lazy access to pages of the



1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1315

def list_as_lazy(expand = nil, custom_headers = nil)
  response = list_async(expand, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_async(expand = nil, custom_headers = nil) ⇒ Concurrent::Promise

Lists all of the streaming jobs in the given subscription.

comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. to the HTTP request.

Parameters:

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 537

def list_async(expand = 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?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/streamingjobs'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'$expand' => expand,'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::ARM::StreamAnalytics::Models::StreamingJobListResult.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_by_resource_group(resource_group_name, expand = nil, custom_headers = nil) ⇒ Array<StreamingJob>

Lists all of the streaming jobs in the specified resource group.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<StreamingJob>)

    operation results.



397
398
399
400
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 397

def list_by_resource_group(resource_group_name, expand = nil, custom_headers = nil)
  first_page = list_by_resource_group_as_lazy(resource_group_name, expand, custom_headers)
  first_page.get_all_items
end

#list_by_resource_group_as_lazy(resource_group_name, expand = nil, custom_headers = nil) ⇒ StreamingJobListResult

Lists all of the streaming jobs in the specified resource group.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StreamingJobListResult)

    which provide lazy access to pages of the



1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1290

def list_by_resource_group_as_lazy(resource_group_name, expand = nil, custom_headers = nil)
  response = list_by_resource_group_async(resource_group_name, expand, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_by_resource_group_next_async(next_page_link, custom_headers)
    end
    page
  end
end

#list_by_resource_group_async(resource_group_name, expand = nil, custom_headers = nil) ⇒ Concurrent::Promise

Lists all of the streaming jobs in the specified resource group.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 438

def list_by_resource_group_async(resource_group_name, expand = 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?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs'

  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},
      query_params: {'$expand' => expand,'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::ARM::StreamAnalytics::Models::StreamingJobListResult.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_by_resource_group_next(next_page_link, custom_headers = nil) ⇒ StreamingJobListResult

Lists all of the streaming jobs in the specified resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StreamingJobListResult)

    operation results.



1109
1110
1111
1112
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1109

def list_by_resource_group_next(next_page_link, custom_headers = nil)
  response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_by_resource_group_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Lists all of the streaming jobs in the specified resource group.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1138

def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

  # 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::ARM::StreamAnalytics::Models::StreamingJobListResult.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_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists all of the streaming jobs in the specified resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1124
1125
1126
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1124

def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
  list_by_resource_group_next_async(next_page_link, custom_headers).value!
end

#list_by_resource_group_with_http_info(resource_group_name, expand = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists all of the streaming jobs in the specified resource group.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



418
419
420
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 418

def list_by_resource_group_with_http_info(resource_group_name, expand = nil, custom_headers = nil)
  list_by_resource_group_async(resource_group_name, expand, custom_headers).value!
end

#list_next(next_page_link, custom_headers = nil) ⇒ StreamingJobListResult

Lists all of the streaming jobs in the given subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StreamingJobListResult)

    operation results.



1196
1197
1198
1199
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1196

def list_next(next_page_link, custom_headers = nil)
  response = list_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Lists all of the streaming jobs in the given subscription.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1225

def list_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  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::ARM::StreamAnalytics::Models::StreamingJobListResult.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_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists all of the streaming jobs in the given subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1211
1212
1213
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 1211

def list_next_with_http_info(next_page_link, custom_headers = nil)
  list_next_async(next_page_link, custom_headers).value!
end

#list_with_http_info(expand = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Lists all of the streaming jobs in the given subscription.

comma-separated list of additional streaming job properties to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming job properties other than ‘inputs’, ‘transformation’, ‘outputs’, and ‘functions’. will be added to the HTTP request.

Parameters:

  • expand (String) (defaults to: nil)

    The $expand OData query parameter. This is a

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



520
521
522
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 520

def list_with_http_info(expand = nil, custom_headers = nil)
  list_async(expand, custom_headers).value!
end

#start(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil) ⇒ Object

Starts a streaming job. Once a job is started it will start processing input events and produce output.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. applicable to a start streaming job operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • start_job_parameters (StartStreamingJobParameters) (defaults to: nil)

    Parameters

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



600
601
602
603
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 600

def start(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil)
  response = start_async(resource_group_name, job_name, start_job_parameters, custom_headers).value!
  nil
end

#start_async(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil) ⇒ Concurrent::Promise

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. applicable to a start streaming job operation. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • start_job_parameters (StartStreamingJobParameters) (defaults to: nil)

    Parameters

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 618

def start_async(resource_group_name, job_name, start_job_parameters = nil, custom_headers = nil)
  # Send request
  promise = begin_start_async(resource_group_name, job_name, start_job_parameters, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#stop(resource_group_name, job_name, custom_headers = nil) ⇒ Object

Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output.

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



645
646
647
648
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 645

def stop(resource_group_name, job_name, custom_headers = nil)
  response = stop_async(resource_group_name, job_name, custom_headers).value!
  nil
end

#stop_async(resource_group_name, job_name, custom_headers = nil) ⇒ Concurrent::Promise

contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 661

def stop_async(resource_group_name, job_name, custom_headers = nil)
  # Send request
  promise = begin_stop_async(resource_group_name, job_name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#update(streaming_job, resource_group_name, job_name, if_match = nil, custom_headers = nil) ⇒ StreamingJob

Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.

specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. will be added to the HTTP request.

Parameters:

  • streaming_job (StreamingJob)

    A streaming job object. The properties

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • if_match (String) (defaults to: nil)

    The ETag of the streaming job. Omit this value to

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (StreamingJob)

    operation results.



109
110
111
112
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 109

def update(streaming_job, resource_group_name, job_name, if_match = nil, custom_headers = nil)
  response = update_async(streaming_job, resource_group_name, job_name, if_match, custom_headers).value!
  response.body unless response.nil?
end

#update_async(streaming_job, resource_group_name, job_name, if_match = nil, custom_headers = nil) ⇒ Concurrent::Promise

Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.

specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. to the HTTP request.

Parameters:

  • streaming_job (StreamingJob)

    A streaming job object. The properties

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • if_match (String) (defaults to: nil)

    The ETag of the streaming job. Omit this value to

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 164

def update_async(streaming_job, resource_group_name, job_name, if_match = nil, custom_headers = nil)
  fail ArgumentError, 'streaming_job is nil' if streaming_job.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 = {}

  # 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?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = Azure::ARM::StreamAnalytics::Models::StreamingJob.mapper()
  request_content = @client.serialize(request_mapper,  streaming_job)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}'

  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: {'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::ARM::StreamAnalytics::Models::StreamingJob.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

#update_with_http_info(streaming_job, resource_group_name, job_name, if_match = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.

specified here will overwrite the corresponding properties in the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. will be added to the HTTP request.

Parameters:

  • streaming_job (StreamingJob)

    A streaming job object. The properties

  • resource_group_name (String)

    The name of the resource group that

  • job_name (String)

    The name of the streaming job.

  • if_match (String) (defaults to: nil)

    The ETag of the streaming job. Omit this value to

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



137
138
139
# File 'lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb', line 137

def update_with_http_info(streaming_job, resource_group_name, job_name, if_match = nil, custom_headers = nil)
  update_async(streaming_job, resource_group_name, job_name, if_match, custom_headers).value!
end