azure_mgmt_stream_analytics 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/azure_mgmt_stream_analytics.rb +5 -0
- data/lib/generated/azure_mgmt_stream_analytics.rb +102 -0
- data/lib/generated/azure_mgmt_stream_analytics/functions.rb +1055 -0
- data/lib/generated/azure_mgmt_stream_analytics/inputs.rb +923 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/avro_serialization.rb +61 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_binding.rb +115 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_retrieve_default_definition_parameters.rb +75 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_input_column.rb +71 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_inputs.rb +65 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb +60 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb +91 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_output_data_source.rb +104 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/azure_table_output_data_source.rb +135 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/blob_data_source_properties.rb +107 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/blob_output_data_source.rb +121 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/blob_reference_input_data_source.rb +121 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/blob_stream_input_data_source.rb +132 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/compatibility_level.rb +15 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/csv_serialization.rb +79 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb +72 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/diagnostics.rb +57 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/document_db_output_data_source.rb +121 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/encoding.rb +15 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/error_response.rb +57 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/event_hub_data_source_properties.rb +67 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/event_hub_output_data_source.rb +106 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/event_hub_stream_input_data_source.rb +109 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/events_out_of_order_policy.rb +16 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/function.rb +73 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/function_binding.rb +48 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/function_input.rb +60 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/function_list_result.rb +97 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/function_output.rb +48 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/function_properties.rb +60 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/function_retrieve_default_definition_parameters.rb +49 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/input.rb +73 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/input_list_result.rb +97 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/input_properties.rb +89 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/io_thub_stream_input_data_source.rb +106 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_binding.rb +60 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_retrieve_default_definition_parameters.rb +73 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/json_output_serialization_format.rb +16 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/json_serialization.rb +80 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/operation.rb +60 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/operation_display.rb +82 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/operation_list_result.rb +99 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/output.rb +115 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/output_data_source.rb +52 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/output_error_policy.rb +16 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/output_list_result.rb +97 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/output_start_mode.rb +17 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/reference_input_data_source.rb +46 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/reference_input_properties.rb +91 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/resource_test_status.rb +59 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/scalar_function_properties.rb +102 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/serialization.rb +49 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb +71 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/service_bus_queue_output_data_source.rb +113 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/service_bus_topic_output_data_source.rb +113 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/sku.rb +46 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/sku_name.rb +15 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb +64 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/storage_account.rb +57 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb +48 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/stream_input_properties.rb +90 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/streaming_job.rb +353 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb +97 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/sub_resource.rb +64 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/subscription_quota.rb +80 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/subscription_quotas_list_result.rb +56 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/transformation.rb +98 -0
- data/lib/generated/azure_mgmt_stream_analytics/models/udf_type.rb +15 -0
- data/lib/generated/azure_mgmt_stream_analytics/module_definition.rb +8 -0
- data/lib/generated/azure_mgmt_stream_analytics/operations.rb +213 -0
- data/lib/generated/azure_mgmt_stream_analytics/outputs.rb +924 -0
- data/lib/generated/azure_mgmt_stream_analytics/stream_analytics_management_client.rb +155 -0
- data/lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb +1327 -0
- data/lib/generated/azure_mgmt_stream_analytics/subscriptions.rb +121 -0
- data/lib/generated/azure_mgmt_stream_analytics/transformations.rb +427 -0
- data/lib/generated/azure_mgmt_stream_analytics/version.rb +8 -0
- metadata +195 -0
@@ -0,0 +1,121 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::StreamAnalytics
|
7
|
+
#
|
8
|
+
# Stream Analytics Client
|
9
|
+
#
|
10
|
+
class Subscriptions
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Subscriptions class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [StreamAnalyticsManagementClient] reference to the StreamAnalyticsManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Retrieves the subscription's current quota information in a particular
|
26
|
+
# region.
|
27
|
+
#
|
28
|
+
# @param location [String] The region in which to retrieve the subscription's
|
29
|
+
# quota information. You can find out which regions Azure Stream Analytics is
|
30
|
+
# supported in here: https://azure.microsoft.com/en-us/regions/
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
# @return [SubscriptionQuotasListResult] operation results.
|
35
|
+
#
|
36
|
+
def list_quotas(location, custom_headers = nil)
|
37
|
+
response = list_quotas_async(location, custom_headers).value!
|
38
|
+
response.body unless response.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Retrieves the subscription's current quota information in a particular
|
43
|
+
# region.
|
44
|
+
#
|
45
|
+
# @param location [String] The region in which to retrieve the subscription's
|
46
|
+
# quota information. You can find out which regions Azure Stream Analytics is
|
47
|
+
# supported in here: https://azure.microsoft.com/en-us/regions/
|
48
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
49
|
+
# will be added to the HTTP request.
|
50
|
+
#
|
51
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
52
|
+
#
|
53
|
+
def list_quotas_with_http_info(location, custom_headers = nil)
|
54
|
+
list_quotas_async(location, custom_headers).value!
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Retrieves the subscription's current quota information in a particular
|
59
|
+
# region.
|
60
|
+
#
|
61
|
+
# @param location [String] The region in which to retrieve the subscription's
|
62
|
+
# quota information. You can find out which regions Azure Stream Analytics is
|
63
|
+
# supported in here: https://azure.microsoft.com/en-us/regions/
|
64
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
65
|
+
# to the HTTP request.
|
66
|
+
#
|
67
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
68
|
+
#
|
69
|
+
def list_quotas_async(location, custom_headers = nil)
|
70
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
71
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
72
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
73
|
+
|
74
|
+
|
75
|
+
request_headers = {}
|
76
|
+
|
77
|
+
# Set Headers
|
78
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
79
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
80
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/locations/{location}/quotas'
|
81
|
+
|
82
|
+
request_url = @base_url || @client.base_url
|
83
|
+
|
84
|
+
options = {
|
85
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
86
|
+
path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
|
87
|
+
query_params: {'api-version' => @client.api_version},
|
88
|
+
headers: request_headers.merge(custom_headers || {}),
|
89
|
+
base_url: request_url
|
90
|
+
}
|
91
|
+
promise = @client.make_request_async(:get, path_template, options)
|
92
|
+
|
93
|
+
promise = promise.then do |result|
|
94
|
+
http_response = result.response
|
95
|
+
status_code = http_response.status
|
96
|
+
response_content = http_response.body
|
97
|
+
unless status_code == 200
|
98
|
+
error_model = JSON.load(response_content)
|
99
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
100
|
+
end
|
101
|
+
|
102
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
103
|
+
# Deserialize Response
|
104
|
+
if status_code == 200
|
105
|
+
begin
|
106
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
107
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::SubscriptionQuotasListResult.mapper()
|
108
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
109
|
+
rescue Exception => e
|
110
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
result
|
115
|
+
end
|
116
|
+
|
117
|
+
promise.execute
|
118
|
+
end
|
119
|
+
|
120
|
+
end
|
121
|
+
end
|
@@ -0,0 +1,427 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::StreamAnalytics
|
7
|
+
#
|
8
|
+
# Stream Analytics Client
|
9
|
+
#
|
10
|
+
class Transformations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Transformations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [StreamAnalyticsManagementClient] reference to the StreamAnalyticsManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Creates a transformation or replaces an already existing transformation under
|
26
|
+
# an existing streaming job.
|
27
|
+
#
|
28
|
+
# @param transformation [Transformation] The definition of the transformation
|
29
|
+
# that will be used to create a new transformation or replace the existing one
|
30
|
+
# under the streaming job.
|
31
|
+
# @param resource_group_name [String] The name of the resource group that
|
32
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
33
|
+
# Manager API or the portal.
|
34
|
+
# @param job_name [String] The name of the streaming job.
|
35
|
+
# @param transformation_name [String] The name of the transformation.
|
36
|
+
# @param if_match [String] The ETag of the transformation. Omit this value to
|
37
|
+
# always overwrite the current transformation. Specify the last-seen ETag value
|
38
|
+
# to prevent accidentally overwritting concurrent changes.
|
39
|
+
# @param if_none_match [String] Set to '*' to allow a new transformation to be
|
40
|
+
# created, but to prevent updating an existing transformation. Other values
|
41
|
+
# will result in a 412 Pre-condition Failed response.
|
42
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
43
|
+
# will be added to the HTTP request.
|
44
|
+
#
|
45
|
+
# @return [Transformation] operation results.
|
46
|
+
#
|
47
|
+
def create_or_replace(transformation, resource_group_name, job_name, transformation_name, if_match = nil, if_none_match = nil, custom_headers = nil)
|
48
|
+
response = create_or_replace_async(transformation, resource_group_name, job_name, transformation_name, if_match, if_none_match, custom_headers).value!
|
49
|
+
response.body unless response.nil?
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Creates a transformation or replaces an already existing transformation under
|
54
|
+
# an existing streaming job.
|
55
|
+
#
|
56
|
+
# @param transformation [Transformation] The definition of the transformation
|
57
|
+
# that will be used to create a new transformation or replace the existing one
|
58
|
+
# under the streaming job.
|
59
|
+
# @param resource_group_name [String] The name of the resource group that
|
60
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
61
|
+
# Manager API or the portal.
|
62
|
+
# @param job_name [String] The name of the streaming job.
|
63
|
+
# @param transformation_name [String] The name of the transformation.
|
64
|
+
# @param if_match [String] The ETag of the transformation. Omit this value to
|
65
|
+
# always overwrite the current transformation. Specify the last-seen ETag value
|
66
|
+
# to prevent accidentally overwritting concurrent changes.
|
67
|
+
# @param if_none_match [String] Set to '*' to allow a new transformation to be
|
68
|
+
# created, but to prevent updating an existing transformation. Other values
|
69
|
+
# will result in a 412 Pre-condition Failed response.
|
70
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
71
|
+
# will be added to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
74
|
+
#
|
75
|
+
def create_or_replace_with_http_info(transformation, resource_group_name, job_name, transformation_name, if_match = nil, if_none_match = nil, custom_headers = nil)
|
76
|
+
create_or_replace_async(transformation, resource_group_name, job_name, transformation_name, if_match, if_none_match, custom_headers).value!
|
77
|
+
end
|
78
|
+
|
79
|
+
#
|
80
|
+
# Creates a transformation or replaces an already existing transformation under
|
81
|
+
# an existing streaming job.
|
82
|
+
#
|
83
|
+
# @param transformation [Transformation] The definition of the transformation
|
84
|
+
# that will be used to create a new transformation or replace the existing one
|
85
|
+
# under the streaming job.
|
86
|
+
# @param resource_group_name [String] The name of the resource group that
|
87
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
88
|
+
# Manager API or the portal.
|
89
|
+
# @param job_name [String] The name of the streaming job.
|
90
|
+
# @param transformation_name [String] The name of the transformation.
|
91
|
+
# @param if_match [String] The ETag of the transformation. Omit this value to
|
92
|
+
# always overwrite the current transformation. Specify the last-seen ETag value
|
93
|
+
# to prevent accidentally overwritting concurrent changes.
|
94
|
+
# @param if_none_match [String] Set to '*' to allow a new transformation to be
|
95
|
+
# created, but to prevent updating an existing transformation. Other values
|
96
|
+
# will result in a 412 Pre-condition Failed response.
|
97
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
98
|
+
# to the HTTP request.
|
99
|
+
#
|
100
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
101
|
+
#
|
102
|
+
def create_or_replace_async(transformation, resource_group_name, job_name, transformation_name, if_match = nil, if_none_match = nil, custom_headers = nil)
|
103
|
+
fail ArgumentError, 'transformation is nil' if transformation.nil?
|
104
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
105
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
106
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
107
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
108
|
+
fail ArgumentError, 'transformation_name is nil' if transformation_name.nil?
|
109
|
+
|
110
|
+
|
111
|
+
request_headers = {}
|
112
|
+
|
113
|
+
# Set Headers
|
114
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
115
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
116
|
+
request_headers['If-None-Match'] = if_none_match unless if_none_match.nil?
|
117
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
118
|
+
|
119
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
120
|
+
|
121
|
+
# Serialize Request
|
122
|
+
request_mapper = Azure::ARM::StreamAnalytics::Models::Transformation.mapper()
|
123
|
+
request_content = @client.serialize(request_mapper, transformation)
|
124
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
125
|
+
|
126
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'
|
127
|
+
|
128
|
+
request_url = @base_url || @client.base_url
|
129
|
+
|
130
|
+
options = {
|
131
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
132
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'transformationName' => transformation_name},
|
133
|
+
query_params: {'api-version' => @client.api_version},
|
134
|
+
body: request_content,
|
135
|
+
headers: request_headers.merge(custom_headers || {}),
|
136
|
+
base_url: request_url
|
137
|
+
}
|
138
|
+
promise = @client.make_request_async(:put, path_template, options)
|
139
|
+
|
140
|
+
promise = promise.then do |result|
|
141
|
+
http_response = result.response
|
142
|
+
status_code = http_response.status
|
143
|
+
response_content = http_response.body
|
144
|
+
unless status_code == 200 || status_code == 201
|
145
|
+
error_model = JSON.load(response_content)
|
146
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
147
|
+
end
|
148
|
+
|
149
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
150
|
+
# Deserialize Response
|
151
|
+
if status_code == 200
|
152
|
+
begin
|
153
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
154
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Transformation.mapper()
|
155
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
156
|
+
rescue Exception => e
|
157
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
# Deserialize Response
|
161
|
+
if status_code == 201
|
162
|
+
begin
|
163
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
164
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Transformation.mapper()
|
165
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
166
|
+
rescue Exception => e
|
167
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
result
|
172
|
+
end
|
173
|
+
|
174
|
+
promise.execute
|
175
|
+
end
|
176
|
+
|
177
|
+
#
|
178
|
+
# Updates an existing transformation under an existing streaming job. This can
|
179
|
+
# be used to partially update (ie. update one or two properties) a
|
180
|
+
# transformation without affecting the rest the job or transformation
|
181
|
+
# definition.
|
182
|
+
#
|
183
|
+
# @param transformation [Transformation] A Transformation object. The
|
184
|
+
# properties specified here will overwrite the corresponding properties in the
|
185
|
+
# existing transformation (ie. Those properties will be updated). Any
|
186
|
+
# properties that are set to null here will mean that the corresponding
|
187
|
+
# property in the existing transformation will remain the same and not change
|
188
|
+
# as a result of this PATCH operation.
|
189
|
+
# @param resource_group_name [String] The name of the resource group that
|
190
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
191
|
+
# Manager API or the portal.
|
192
|
+
# @param job_name [String] The name of the streaming job.
|
193
|
+
# @param transformation_name [String] The name of the transformation.
|
194
|
+
# @param if_match [String] The ETag of the transformation. Omit this value to
|
195
|
+
# always overwrite the current transformation. Specify the last-seen ETag value
|
196
|
+
# to prevent accidentally overwritting concurrent changes.
|
197
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
198
|
+
# will be added to the HTTP request.
|
199
|
+
#
|
200
|
+
# @return [Transformation] operation results.
|
201
|
+
#
|
202
|
+
def update(transformation, resource_group_name, job_name, transformation_name, if_match = nil, custom_headers = nil)
|
203
|
+
response = update_async(transformation, resource_group_name, job_name, transformation_name, if_match, custom_headers).value!
|
204
|
+
response.body unless response.nil?
|
205
|
+
end
|
206
|
+
|
207
|
+
#
|
208
|
+
# Updates an existing transformation under an existing streaming job. This can
|
209
|
+
# be used to partially update (ie. update one or two properties) a
|
210
|
+
# transformation without affecting the rest the job or transformation
|
211
|
+
# definition.
|
212
|
+
#
|
213
|
+
# @param transformation [Transformation] A Transformation object. The
|
214
|
+
# properties specified here will overwrite the corresponding properties in the
|
215
|
+
# existing transformation (ie. Those properties will be updated). Any
|
216
|
+
# properties that are set to null here will mean that the corresponding
|
217
|
+
# property in the existing transformation will remain the same and not change
|
218
|
+
# as a result of this PATCH operation.
|
219
|
+
# @param resource_group_name [String] The name of the resource group that
|
220
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
221
|
+
# Manager API or the portal.
|
222
|
+
# @param job_name [String] The name of the streaming job.
|
223
|
+
# @param transformation_name [String] The name of the transformation.
|
224
|
+
# @param if_match [String] The ETag of the transformation. Omit this value to
|
225
|
+
# always overwrite the current transformation. Specify the last-seen ETag value
|
226
|
+
# to prevent accidentally overwritting concurrent changes.
|
227
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
228
|
+
# will be added to the HTTP request.
|
229
|
+
#
|
230
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
231
|
+
#
|
232
|
+
def update_with_http_info(transformation, resource_group_name, job_name, transformation_name, if_match = nil, custom_headers = nil)
|
233
|
+
update_async(transformation, resource_group_name, job_name, transformation_name, if_match, custom_headers).value!
|
234
|
+
end
|
235
|
+
|
236
|
+
#
|
237
|
+
# Updates an existing transformation under an existing streaming job. This can
|
238
|
+
# be used to partially update (ie. update one or two properties) a
|
239
|
+
# transformation without affecting the rest the job or transformation
|
240
|
+
# definition.
|
241
|
+
#
|
242
|
+
# @param transformation [Transformation] A Transformation object. The
|
243
|
+
# properties specified here will overwrite the corresponding properties in the
|
244
|
+
# existing transformation (ie. Those properties will be updated). Any
|
245
|
+
# properties that are set to null here will mean that the corresponding
|
246
|
+
# property in the existing transformation will remain the same and not change
|
247
|
+
# as a result of this PATCH operation.
|
248
|
+
# @param resource_group_name [String] The name of the resource group that
|
249
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
250
|
+
# Manager API or the portal.
|
251
|
+
# @param job_name [String] The name of the streaming job.
|
252
|
+
# @param transformation_name [String] The name of the transformation.
|
253
|
+
# @param if_match [String] The ETag of the transformation. Omit this value to
|
254
|
+
# always overwrite the current transformation. Specify the last-seen ETag value
|
255
|
+
# to prevent accidentally overwritting concurrent changes.
|
256
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
257
|
+
# to the HTTP request.
|
258
|
+
#
|
259
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
260
|
+
#
|
261
|
+
def update_async(transformation, resource_group_name, job_name, transformation_name, if_match = nil, custom_headers = nil)
|
262
|
+
fail ArgumentError, 'transformation is nil' if transformation.nil?
|
263
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
264
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
265
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
266
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
267
|
+
fail ArgumentError, 'transformation_name is nil' if transformation_name.nil?
|
268
|
+
|
269
|
+
|
270
|
+
request_headers = {}
|
271
|
+
|
272
|
+
# Set Headers
|
273
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
274
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
275
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
276
|
+
|
277
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
278
|
+
|
279
|
+
# Serialize Request
|
280
|
+
request_mapper = Azure::ARM::StreamAnalytics::Models::Transformation.mapper()
|
281
|
+
request_content = @client.serialize(request_mapper, transformation)
|
282
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
283
|
+
|
284
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'
|
285
|
+
|
286
|
+
request_url = @base_url || @client.base_url
|
287
|
+
|
288
|
+
options = {
|
289
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
290
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'transformationName' => transformation_name},
|
291
|
+
query_params: {'api-version' => @client.api_version},
|
292
|
+
body: request_content,
|
293
|
+
headers: request_headers.merge(custom_headers || {}),
|
294
|
+
base_url: request_url
|
295
|
+
}
|
296
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
297
|
+
|
298
|
+
promise = promise.then do |result|
|
299
|
+
http_response = result.response
|
300
|
+
status_code = http_response.status
|
301
|
+
response_content = http_response.body
|
302
|
+
unless status_code == 200
|
303
|
+
error_model = JSON.load(response_content)
|
304
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
305
|
+
end
|
306
|
+
|
307
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
308
|
+
# Deserialize Response
|
309
|
+
if status_code == 200
|
310
|
+
begin
|
311
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
312
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Transformation.mapper()
|
313
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
314
|
+
rescue Exception => e
|
315
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
result
|
320
|
+
end
|
321
|
+
|
322
|
+
promise.execute
|
323
|
+
end
|
324
|
+
|
325
|
+
#
|
326
|
+
# Gets details about the specified transformation.
|
327
|
+
#
|
328
|
+
# @param resource_group_name [String] The name of the resource group that
|
329
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
330
|
+
# Manager API or the portal.
|
331
|
+
# @param job_name [String] The name of the streaming job.
|
332
|
+
# @param transformation_name [String] The name of the transformation.
|
333
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
334
|
+
# will be added to the HTTP request.
|
335
|
+
#
|
336
|
+
# @return [Transformation] operation results.
|
337
|
+
#
|
338
|
+
def get(resource_group_name, job_name, transformation_name, custom_headers = nil)
|
339
|
+
response = get_async(resource_group_name, job_name, transformation_name, custom_headers).value!
|
340
|
+
response.body unless response.nil?
|
341
|
+
end
|
342
|
+
|
343
|
+
#
|
344
|
+
# Gets details about the specified transformation.
|
345
|
+
#
|
346
|
+
# @param resource_group_name [String] The name of the resource group that
|
347
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
348
|
+
# Manager API or the portal.
|
349
|
+
# @param job_name [String] The name of the streaming job.
|
350
|
+
# @param transformation_name [String] The name of the transformation.
|
351
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
352
|
+
# will be added to the HTTP request.
|
353
|
+
#
|
354
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
355
|
+
#
|
356
|
+
def get_with_http_info(resource_group_name, job_name, transformation_name, custom_headers = nil)
|
357
|
+
get_async(resource_group_name, job_name, transformation_name, custom_headers).value!
|
358
|
+
end
|
359
|
+
|
360
|
+
#
|
361
|
+
# Gets details about the specified transformation.
|
362
|
+
#
|
363
|
+
# @param resource_group_name [String] The name of the resource group that
|
364
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
365
|
+
# Manager API or the portal.
|
366
|
+
# @param job_name [String] The name of the streaming job.
|
367
|
+
# @param transformation_name [String] The name of the transformation.
|
368
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
369
|
+
# to the HTTP request.
|
370
|
+
#
|
371
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
372
|
+
#
|
373
|
+
def get_async(resource_group_name, job_name, transformation_name, custom_headers = nil)
|
374
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
375
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
376
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
377
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
378
|
+
fail ArgumentError, 'transformation_name is nil' if transformation_name.nil?
|
379
|
+
|
380
|
+
|
381
|
+
request_headers = {}
|
382
|
+
|
383
|
+
# Set Headers
|
384
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
385
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
386
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'
|
387
|
+
|
388
|
+
request_url = @base_url || @client.base_url
|
389
|
+
|
390
|
+
options = {
|
391
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
392
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'transformationName' => transformation_name},
|
393
|
+
query_params: {'api-version' => @client.api_version},
|
394
|
+
headers: request_headers.merge(custom_headers || {}),
|
395
|
+
base_url: request_url
|
396
|
+
}
|
397
|
+
promise = @client.make_request_async(:get, path_template, options)
|
398
|
+
|
399
|
+
promise = promise.then do |result|
|
400
|
+
http_response = result.response
|
401
|
+
status_code = http_response.status
|
402
|
+
response_content = http_response.body
|
403
|
+
unless status_code == 200
|
404
|
+
error_model = JSON.load(response_content)
|
405
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
406
|
+
end
|
407
|
+
|
408
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
409
|
+
# Deserialize Response
|
410
|
+
if status_code == 200
|
411
|
+
begin
|
412
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
413
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Transformation.mapper()
|
414
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
415
|
+
rescue Exception => e
|
416
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
417
|
+
end
|
418
|
+
end
|
419
|
+
|
420
|
+
result
|
421
|
+
end
|
422
|
+
|
423
|
+
promise.execute
|
424
|
+
end
|
425
|
+
|
426
|
+
end
|
427
|
+
end
|