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
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6aa2e10b98ecc6c6bd71a51483517cc74b68c9b4
|
4
|
+
data.tar.gz: 2039da87188761e787df11dfd382a7fa9442480a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8043bc708ef7ed90cc75222ab1915ccdc01c8127de9ca2b56797ae895ac7b6b509a88019a24e9d101632f68fdb27cdf5f7ac6ad4ce81bf2331e205064567251b
|
7
|
+
data.tar.gz: bdd64681636e767c36790447f5e9a295bd61ecc1dd9c373ad16e287a8be168c1ba48904d89417a275f56b2720f36c6fc0bfa15ae5175ad85c6d9d5a347415d37
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Microsoft Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,102 @@
|
|
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
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require 'generated/azure_mgmt_stream_analytics/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ARM::StreamAnalytics
|
23
|
+
autoload :Operations, 'generated/azure_mgmt_stream_analytics/operations.rb'
|
24
|
+
autoload :StreamingJobs, 'generated/azure_mgmt_stream_analytics/streaming_jobs.rb'
|
25
|
+
autoload :Inputs, 'generated/azure_mgmt_stream_analytics/inputs.rb'
|
26
|
+
autoload :Outputs, 'generated/azure_mgmt_stream_analytics/outputs.rb'
|
27
|
+
autoload :Transformations, 'generated/azure_mgmt_stream_analytics/transformations.rb'
|
28
|
+
autoload :Functions, 'generated/azure_mgmt_stream_analytics/functions.rb'
|
29
|
+
autoload :Subscriptions, 'generated/azure_mgmt_stream_analytics/subscriptions.rb'
|
30
|
+
autoload :StreamAnalyticsManagementClient, 'generated/azure_mgmt_stream_analytics/stream_analytics_management_client.rb'
|
31
|
+
|
32
|
+
module Models
|
33
|
+
autoload :SubResource, 'generated/azure_mgmt_stream_analytics/models/sub_resource.rb'
|
34
|
+
autoload :AzureMachineLearningWebServiceInputColumn, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_input_column.rb'
|
35
|
+
autoload :Operation, 'generated/azure_mgmt_stream_analytics/models/operation.rb'
|
36
|
+
autoload :AzureMachineLearningWebServiceInputs, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_inputs.rb'
|
37
|
+
autoload :Sku, 'generated/azure_mgmt_stream_analytics/models/sku.rb'
|
38
|
+
autoload :StorageAccount, 'generated/azure_mgmt_stream_analytics/models/storage_account.rb'
|
39
|
+
autoload :DiagnosticCondition, 'generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb'
|
40
|
+
autoload :FunctionBinding, 'generated/azure_mgmt_stream_analytics/models/function_binding.rb'
|
41
|
+
autoload :InputProperties, 'generated/azure_mgmt_stream_analytics/models/input_properties.rb'
|
42
|
+
autoload :FunctionOutput, 'generated/azure_mgmt_stream_analytics/models/function_output.rb'
|
43
|
+
autoload :Diagnostics, 'generated/azure_mgmt_stream_analytics/models/diagnostics.rb'
|
44
|
+
autoload :OutputDataSource, 'generated/azure_mgmt_stream_analytics/models/output_data_source.rb'
|
45
|
+
autoload :AzureSqlDatabaseDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb'
|
46
|
+
autoload :OutputListResult, 'generated/azure_mgmt_stream_analytics/models/output_list_result.rb'
|
47
|
+
autoload :InputListResult, 'generated/azure_mgmt_stream_analytics/models/input_list_result.rb'
|
48
|
+
autoload :ServiceBusDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb'
|
49
|
+
autoload :StreamingJobListResult, 'generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb'
|
50
|
+
autoload :FunctionInput, 'generated/azure_mgmt_stream_analytics/models/function_input.rb'
|
51
|
+
autoload :BlobDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/blob_data_source_properties.rb'
|
52
|
+
autoload :AzureMachineLearningWebServiceOutputColumn, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb'
|
53
|
+
autoload :ReferenceInputDataSource, 'generated/azure_mgmt_stream_analytics/models/reference_input_data_source.rb'
|
54
|
+
autoload :Serialization, 'generated/azure_mgmt_stream_analytics/models/serialization.rb'
|
55
|
+
autoload :StreamInputDataSource, 'generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb'
|
56
|
+
autoload :ErrorResponse, 'generated/azure_mgmt_stream_analytics/models/error_response.rb'
|
57
|
+
autoload :FunctionRetrieveDefaultDefinitionParameters, 'generated/azure_mgmt_stream_analytics/models/function_retrieve_default_definition_parameters.rb'
|
58
|
+
autoload :ResourceTestStatus, 'generated/azure_mgmt_stream_analytics/models/resource_test_status.rb'
|
59
|
+
autoload :OperationDisplay, 'generated/azure_mgmt_stream_analytics/models/operation_display.rb'
|
60
|
+
autoload :FunctionProperties, 'generated/azure_mgmt_stream_analytics/models/function_properties.rb'
|
61
|
+
autoload :OperationListResult, 'generated/azure_mgmt_stream_analytics/models/operation_list_result.rb'
|
62
|
+
autoload :SubscriptionQuotasListResult, 'generated/azure_mgmt_stream_analytics/models/subscription_quotas_list_result.rb'
|
63
|
+
autoload :StartStreamingJobParameters, 'generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb'
|
64
|
+
autoload :FunctionListResult, 'generated/azure_mgmt_stream_analytics/models/function_list_result.rb'
|
65
|
+
autoload :Input, 'generated/azure_mgmt_stream_analytics/models/input.rb'
|
66
|
+
autoload :Transformation, 'generated/azure_mgmt_stream_analytics/models/transformation.rb'
|
67
|
+
autoload :Output, 'generated/azure_mgmt_stream_analytics/models/output.rb'
|
68
|
+
autoload :Function, 'generated/azure_mgmt_stream_analytics/models/function.rb'
|
69
|
+
autoload :StreamingJob, 'generated/azure_mgmt_stream_analytics/models/streaming_job.rb'
|
70
|
+
autoload :JavaScriptFunctionBinding, 'generated/azure_mgmt_stream_analytics/models/java_script_function_binding.rb'
|
71
|
+
autoload :AzureMachineLearningWebServiceFunctionBinding, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_binding.rb'
|
72
|
+
autoload :ScalarFunctionProperties, 'generated/azure_mgmt_stream_analytics/models/scalar_function_properties.rb'
|
73
|
+
autoload :JavaScriptFunctionRetrieveDefaultDefinitionParameters, 'generated/azure_mgmt_stream_analytics/models/java_script_function_retrieve_default_definition_parameters.rb'
|
74
|
+
autoload :AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters, 'generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_retrieve_default_definition_parameters.rb'
|
75
|
+
autoload :AvroSerialization, 'generated/azure_mgmt_stream_analytics/models/avro_serialization.rb'
|
76
|
+
autoload :JsonSerialization, 'generated/azure_mgmt_stream_analytics/models/json_serialization.rb'
|
77
|
+
autoload :CsvSerialization, 'generated/azure_mgmt_stream_analytics/models/csv_serialization.rb'
|
78
|
+
autoload :EventHubDataSourceProperties, 'generated/azure_mgmt_stream_analytics/models/event_hub_data_source_properties.rb'
|
79
|
+
autoload :ServiceBusTopicOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/service_bus_topic_output_data_source.rb'
|
80
|
+
autoload :ServiceBusQueueOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/service_bus_queue_output_data_source.rb'
|
81
|
+
autoload :DocumentDbOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/document_db_output_data_source.rb'
|
82
|
+
autoload :AzureSqlDatabaseOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/azure_sql_database_output_data_source.rb'
|
83
|
+
autoload :EventHubOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/event_hub_output_data_source.rb'
|
84
|
+
autoload :AzureTableOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/azure_table_output_data_source.rb'
|
85
|
+
autoload :BlobOutputDataSource, 'generated/azure_mgmt_stream_analytics/models/blob_output_data_source.rb'
|
86
|
+
autoload :BlobReferenceInputDataSource, 'generated/azure_mgmt_stream_analytics/models/blob_reference_input_data_source.rb'
|
87
|
+
autoload :ReferenceInputProperties, 'generated/azure_mgmt_stream_analytics/models/reference_input_properties.rb'
|
88
|
+
autoload :IoTHubStreamInputDataSource, 'generated/azure_mgmt_stream_analytics/models/io_thub_stream_input_data_source.rb'
|
89
|
+
autoload :EventHubStreamInputDataSource, 'generated/azure_mgmt_stream_analytics/models/event_hub_stream_input_data_source.rb'
|
90
|
+
autoload :BlobStreamInputDataSource, 'generated/azure_mgmt_stream_analytics/models/blob_stream_input_data_source.rb'
|
91
|
+
autoload :StreamInputProperties, 'generated/azure_mgmt_stream_analytics/models/stream_input_properties.rb'
|
92
|
+
autoload :SubscriptionQuota, 'generated/azure_mgmt_stream_analytics/models/subscription_quota.rb'
|
93
|
+
autoload :SkuName, 'generated/azure_mgmt_stream_analytics/models/sku_name.rb'
|
94
|
+
autoload :OutputStartMode, 'generated/azure_mgmt_stream_analytics/models/output_start_mode.rb'
|
95
|
+
autoload :EventsOutOfOrderPolicy, 'generated/azure_mgmt_stream_analytics/models/events_out_of_order_policy.rb'
|
96
|
+
autoload :OutputErrorPolicy, 'generated/azure_mgmt_stream_analytics/models/output_error_policy.rb'
|
97
|
+
autoload :CompatibilityLevel, 'generated/azure_mgmt_stream_analytics/models/compatibility_level.rb'
|
98
|
+
autoload :UdfType, 'generated/azure_mgmt_stream_analytics/models/udf_type.rb'
|
99
|
+
autoload :JsonOutputSerializationFormat, 'generated/azure_mgmt_stream_analytics/models/json_output_serialization_format.rb'
|
100
|
+
autoload :Encoding, 'generated/azure_mgmt_stream_analytics/models/encoding.rb'
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,1055 @@
|
|
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 Functions
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Functions 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 function or replaces an already existing function under an existing
|
26
|
+
# streaming job.
|
27
|
+
#
|
28
|
+
# @param function [Function] The definition of the function that will be used
|
29
|
+
# to create a new function or replace the existing one under the streaming job.
|
30
|
+
# @param resource_group_name [String] The name of the resource group that
|
31
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
32
|
+
# Manager API or the portal.
|
33
|
+
# @param job_name [String] The name of the streaming job.
|
34
|
+
# @param function_name [String] The name of the function.
|
35
|
+
# @param if_match [String] The ETag of the function. Omit this value to always
|
36
|
+
# overwrite the current function. Specify the last-seen ETag value to prevent
|
37
|
+
# accidentally overwritting concurrent changes.
|
38
|
+
# @param if_none_match [String] Set to '*' to allow a new function to be
|
39
|
+
# created, but to prevent updating an existing function. Other values will
|
40
|
+
# result in a 412 Pre-condition Failed response.
|
41
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
42
|
+
# will be added to the HTTP request.
|
43
|
+
#
|
44
|
+
# @return [Function] operation results.
|
45
|
+
#
|
46
|
+
def create_or_replace(function, resource_group_name, job_name, function_name, if_match = nil, if_none_match = nil, custom_headers = nil)
|
47
|
+
response = create_or_replace_async(function, resource_group_name, job_name, function_name, if_match, if_none_match, custom_headers).value!
|
48
|
+
response.body unless response.nil?
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Creates a function or replaces an already existing function under an existing
|
53
|
+
# streaming job.
|
54
|
+
#
|
55
|
+
# @param function [Function] The definition of the function that will be used
|
56
|
+
# to create a new function or replace the existing one under the streaming job.
|
57
|
+
# @param resource_group_name [String] The name of the resource group that
|
58
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
59
|
+
# Manager API or the portal.
|
60
|
+
# @param job_name [String] The name of the streaming job.
|
61
|
+
# @param function_name [String] The name of the function.
|
62
|
+
# @param if_match [String] The ETag of the function. Omit this value to always
|
63
|
+
# overwrite the current function. Specify the last-seen ETag value to prevent
|
64
|
+
# accidentally overwritting concurrent changes.
|
65
|
+
# @param if_none_match [String] Set to '*' to allow a new function to be
|
66
|
+
# created, but to prevent updating an existing function. Other values will
|
67
|
+
# result in a 412 Pre-condition Failed response.
|
68
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
69
|
+
# will be added to the HTTP request.
|
70
|
+
#
|
71
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
72
|
+
#
|
73
|
+
def create_or_replace_with_http_info(function, resource_group_name, job_name, function_name, if_match = nil, if_none_match = nil, custom_headers = nil)
|
74
|
+
create_or_replace_async(function, resource_group_name, job_name, function_name, if_match, if_none_match, custom_headers).value!
|
75
|
+
end
|
76
|
+
|
77
|
+
#
|
78
|
+
# Creates a function or replaces an already existing function under an existing
|
79
|
+
# streaming job.
|
80
|
+
#
|
81
|
+
# @param function [Function] The definition of the function that will be used
|
82
|
+
# to create a new function or replace the existing one under the streaming job.
|
83
|
+
# @param resource_group_name [String] The name of the resource group that
|
84
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
85
|
+
# Manager API or the portal.
|
86
|
+
# @param job_name [String] The name of the streaming job.
|
87
|
+
# @param function_name [String] The name of the function.
|
88
|
+
# @param if_match [String] The ETag of the function. Omit this value to always
|
89
|
+
# overwrite the current function. Specify the last-seen ETag value to prevent
|
90
|
+
# accidentally overwritting concurrent changes.
|
91
|
+
# @param if_none_match [String] Set to '*' to allow a new function to be
|
92
|
+
# created, but to prevent updating an existing function. Other values will
|
93
|
+
# result in a 412 Pre-condition Failed response.
|
94
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
95
|
+
# to the HTTP request.
|
96
|
+
#
|
97
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
98
|
+
#
|
99
|
+
def create_or_replace_async(function, resource_group_name, job_name, function_name, if_match = nil, if_none_match = nil, custom_headers = nil)
|
100
|
+
fail ArgumentError, 'function is nil' if function.nil?
|
101
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
102
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
103
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
104
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
105
|
+
fail ArgumentError, 'function_name is nil' if function_name.nil?
|
106
|
+
|
107
|
+
|
108
|
+
request_headers = {}
|
109
|
+
|
110
|
+
# Set Headers
|
111
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
112
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
113
|
+
request_headers['If-None-Match'] = if_none_match unless if_none_match.nil?
|
114
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
115
|
+
|
116
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
117
|
+
|
118
|
+
# Serialize Request
|
119
|
+
request_mapper = Azure::ARM::StreamAnalytics::Models::Function.mapper()
|
120
|
+
request_content = @client.serialize(request_mapper, function)
|
121
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
122
|
+
|
123
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'
|
124
|
+
|
125
|
+
request_url = @base_url || @client.base_url
|
126
|
+
|
127
|
+
options = {
|
128
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
129
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'functionName' => function_name},
|
130
|
+
query_params: {'api-version' => @client.api_version},
|
131
|
+
body: request_content,
|
132
|
+
headers: request_headers.merge(custom_headers || {}),
|
133
|
+
base_url: request_url
|
134
|
+
}
|
135
|
+
promise = @client.make_request_async(:put, path_template, options)
|
136
|
+
|
137
|
+
promise = promise.then do |result|
|
138
|
+
http_response = result.response
|
139
|
+
status_code = http_response.status
|
140
|
+
response_content = http_response.body
|
141
|
+
unless status_code == 200 || status_code == 201
|
142
|
+
error_model = JSON.load(response_content)
|
143
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
144
|
+
end
|
145
|
+
|
146
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
147
|
+
# Deserialize Response
|
148
|
+
if status_code == 200
|
149
|
+
begin
|
150
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
151
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Function.mapper()
|
152
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
153
|
+
rescue Exception => e
|
154
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
# Deserialize Response
|
158
|
+
if status_code == 201
|
159
|
+
begin
|
160
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
161
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Function.mapper()
|
162
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
163
|
+
rescue Exception => e
|
164
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
result
|
169
|
+
end
|
170
|
+
|
171
|
+
promise.execute
|
172
|
+
end
|
173
|
+
|
174
|
+
#
|
175
|
+
# Updates an existing function under an existing streaming job. This can be
|
176
|
+
# used to partially update (ie. update one or two properties) a function
|
177
|
+
# without affecting the rest the job or function definition.
|
178
|
+
#
|
179
|
+
# @param function [Function] A function object. The properties specified here
|
180
|
+
# will overwrite the corresponding properties in the existing function (ie.
|
181
|
+
# Those properties will be updated). Any properties that are set to null here
|
182
|
+
# will mean that the corresponding property in the existing function will
|
183
|
+
# remain the same and not change as a result of this PATCH operation.
|
184
|
+
# @param resource_group_name [String] The name of the resource group that
|
185
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
186
|
+
# Manager API or the portal.
|
187
|
+
# @param job_name [String] The name of the streaming job.
|
188
|
+
# @param function_name [String] The name of the function.
|
189
|
+
# @param if_match [String] The ETag of the function. Omit this value to always
|
190
|
+
# overwrite the current function. Specify the last-seen ETag value to prevent
|
191
|
+
# accidentally overwritting concurrent changes.
|
192
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
193
|
+
# will be added to the HTTP request.
|
194
|
+
#
|
195
|
+
# @return [Function] operation results.
|
196
|
+
#
|
197
|
+
def update(function, resource_group_name, job_name, function_name, if_match = nil, custom_headers = nil)
|
198
|
+
response = update_async(function, resource_group_name, job_name, function_name, if_match, custom_headers).value!
|
199
|
+
response.body unless response.nil?
|
200
|
+
end
|
201
|
+
|
202
|
+
#
|
203
|
+
# Updates an existing function under an existing streaming job. This can be
|
204
|
+
# used to partially update (ie. update one or two properties) a function
|
205
|
+
# without affecting the rest the job or function definition.
|
206
|
+
#
|
207
|
+
# @param function [Function] A function object. The properties specified here
|
208
|
+
# will overwrite the corresponding properties in the existing function (ie.
|
209
|
+
# Those properties will be updated). Any properties that are set to null here
|
210
|
+
# will mean that the corresponding property in the existing function will
|
211
|
+
# remain the same and not change as a result of this PATCH operation.
|
212
|
+
# @param resource_group_name [String] The name of the resource group that
|
213
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
214
|
+
# Manager API or the portal.
|
215
|
+
# @param job_name [String] The name of the streaming job.
|
216
|
+
# @param function_name [String] The name of the function.
|
217
|
+
# @param if_match [String] The ETag of the function. Omit this value to always
|
218
|
+
# overwrite the current function. Specify the last-seen ETag value to prevent
|
219
|
+
# accidentally overwritting concurrent changes.
|
220
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
221
|
+
# will be added to the HTTP request.
|
222
|
+
#
|
223
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
224
|
+
#
|
225
|
+
def update_with_http_info(function, resource_group_name, job_name, function_name, if_match = nil, custom_headers = nil)
|
226
|
+
update_async(function, resource_group_name, job_name, function_name, if_match, custom_headers).value!
|
227
|
+
end
|
228
|
+
|
229
|
+
#
|
230
|
+
# Updates an existing function under an existing streaming job. This can be
|
231
|
+
# used to partially update (ie. update one or two properties) a function
|
232
|
+
# without affecting the rest the job or function definition.
|
233
|
+
#
|
234
|
+
# @param function [Function] A function object. The properties specified here
|
235
|
+
# will overwrite the corresponding properties in the existing function (ie.
|
236
|
+
# Those properties will be updated). Any properties that are set to null here
|
237
|
+
# will mean that the corresponding property in the existing function will
|
238
|
+
# remain the same and not change as a result of this PATCH operation.
|
239
|
+
# @param resource_group_name [String] The name of the resource group that
|
240
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
241
|
+
# Manager API or the portal.
|
242
|
+
# @param job_name [String] The name of the streaming job.
|
243
|
+
# @param function_name [String] The name of the function.
|
244
|
+
# @param if_match [String] The ETag of the function. Omit this value to always
|
245
|
+
# overwrite the current function. Specify the last-seen ETag value to prevent
|
246
|
+
# accidentally overwritting concurrent changes.
|
247
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
248
|
+
# to the HTTP request.
|
249
|
+
#
|
250
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
251
|
+
#
|
252
|
+
def update_async(function, resource_group_name, job_name, function_name, if_match = nil, custom_headers = nil)
|
253
|
+
fail ArgumentError, 'function is nil' if function.nil?
|
254
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
255
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
256
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
257
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
258
|
+
fail ArgumentError, 'function_name is nil' if function_name.nil?
|
259
|
+
|
260
|
+
|
261
|
+
request_headers = {}
|
262
|
+
|
263
|
+
# Set Headers
|
264
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
265
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
266
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
267
|
+
|
268
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
269
|
+
|
270
|
+
# Serialize Request
|
271
|
+
request_mapper = Azure::ARM::StreamAnalytics::Models::Function.mapper()
|
272
|
+
request_content = @client.serialize(request_mapper, function)
|
273
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
274
|
+
|
275
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'
|
276
|
+
|
277
|
+
request_url = @base_url || @client.base_url
|
278
|
+
|
279
|
+
options = {
|
280
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
281
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'functionName' => function_name},
|
282
|
+
query_params: {'api-version' => @client.api_version},
|
283
|
+
body: request_content,
|
284
|
+
headers: request_headers.merge(custom_headers || {}),
|
285
|
+
base_url: request_url
|
286
|
+
}
|
287
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
288
|
+
|
289
|
+
promise = promise.then do |result|
|
290
|
+
http_response = result.response
|
291
|
+
status_code = http_response.status
|
292
|
+
response_content = http_response.body
|
293
|
+
unless status_code == 200
|
294
|
+
error_model = JSON.load(response_content)
|
295
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
296
|
+
end
|
297
|
+
|
298
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
299
|
+
# Deserialize Response
|
300
|
+
if status_code == 200
|
301
|
+
begin
|
302
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
303
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Function.mapper()
|
304
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
305
|
+
rescue Exception => e
|
306
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
result
|
311
|
+
end
|
312
|
+
|
313
|
+
promise.execute
|
314
|
+
end
|
315
|
+
|
316
|
+
#
|
317
|
+
# Deletes a function from the streaming job.
|
318
|
+
#
|
319
|
+
# @param resource_group_name [String] The name of the resource group that
|
320
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
321
|
+
# Manager API or the portal.
|
322
|
+
# @param job_name [String] The name of the streaming job.
|
323
|
+
# @param function_name [String] The name of the function.
|
324
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
325
|
+
# will be added to the HTTP request.
|
326
|
+
#
|
327
|
+
#
|
328
|
+
def delete(resource_group_name, job_name, function_name, custom_headers = nil)
|
329
|
+
response = delete_async(resource_group_name, job_name, function_name, custom_headers).value!
|
330
|
+
nil
|
331
|
+
end
|
332
|
+
|
333
|
+
#
|
334
|
+
# Deletes a function from the streaming job.
|
335
|
+
#
|
336
|
+
# @param resource_group_name [String] The name of the resource group that
|
337
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
338
|
+
# Manager API or the portal.
|
339
|
+
# @param job_name [String] The name of the streaming job.
|
340
|
+
# @param function_name [String] The name of the function.
|
341
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
342
|
+
# will be added to the HTTP request.
|
343
|
+
#
|
344
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
345
|
+
#
|
346
|
+
def delete_with_http_info(resource_group_name, job_name, function_name, custom_headers = nil)
|
347
|
+
delete_async(resource_group_name, job_name, function_name, custom_headers).value!
|
348
|
+
end
|
349
|
+
|
350
|
+
#
|
351
|
+
# Deletes a function from the streaming job.
|
352
|
+
#
|
353
|
+
# @param resource_group_name [String] The name of the resource group that
|
354
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
355
|
+
# Manager API or the portal.
|
356
|
+
# @param job_name [String] The name of the streaming job.
|
357
|
+
# @param function_name [String] The name of the function.
|
358
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
359
|
+
# to the HTTP request.
|
360
|
+
#
|
361
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
362
|
+
#
|
363
|
+
def delete_async(resource_group_name, job_name, function_name, custom_headers = nil)
|
364
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
365
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
366
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
367
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
368
|
+
fail ArgumentError, 'function_name is nil' if function_name.nil?
|
369
|
+
|
370
|
+
|
371
|
+
request_headers = {}
|
372
|
+
|
373
|
+
# Set Headers
|
374
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
375
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
376
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'
|
377
|
+
|
378
|
+
request_url = @base_url || @client.base_url
|
379
|
+
|
380
|
+
options = {
|
381
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
382
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'functionName' => function_name},
|
383
|
+
query_params: {'api-version' => @client.api_version},
|
384
|
+
headers: request_headers.merge(custom_headers || {}),
|
385
|
+
base_url: request_url
|
386
|
+
}
|
387
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
388
|
+
|
389
|
+
promise = promise.then do |result|
|
390
|
+
http_response = result.response
|
391
|
+
status_code = http_response.status
|
392
|
+
response_content = http_response.body
|
393
|
+
unless status_code == 200 || status_code == 204
|
394
|
+
error_model = JSON.load(response_content)
|
395
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
396
|
+
end
|
397
|
+
|
398
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
399
|
+
|
400
|
+
result
|
401
|
+
end
|
402
|
+
|
403
|
+
promise.execute
|
404
|
+
end
|
405
|
+
|
406
|
+
#
|
407
|
+
# Gets details about the specified function.
|
408
|
+
#
|
409
|
+
# @param resource_group_name [String] The name of the resource group that
|
410
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
411
|
+
# Manager API or the portal.
|
412
|
+
# @param job_name [String] The name of the streaming job.
|
413
|
+
# @param function_name [String] The name of the function.
|
414
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
415
|
+
# will be added to the HTTP request.
|
416
|
+
#
|
417
|
+
# @return [Function] operation results.
|
418
|
+
#
|
419
|
+
def get(resource_group_name, job_name, function_name, custom_headers = nil)
|
420
|
+
response = get_async(resource_group_name, job_name, function_name, custom_headers).value!
|
421
|
+
response.body unless response.nil?
|
422
|
+
end
|
423
|
+
|
424
|
+
#
|
425
|
+
# Gets details about the specified function.
|
426
|
+
#
|
427
|
+
# @param resource_group_name [String] The name of the resource group that
|
428
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
429
|
+
# Manager API or the portal.
|
430
|
+
# @param job_name [String] The name of the streaming job.
|
431
|
+
# @param function_name [String] The name of the function.
|
432
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
433
|
+
# will be added to the HTTP request.
|
434
|
+
#
|
435
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
436
|
+
#
|
437
|
+
def get_with_http_info(resource_group_name, job_name, function_name, custom_headers = nil)
|
438
|
+
get_async(resource_group_name, job_name, function_name, custom_headers).value!
|
439
|
+
end
|
440
|
+
|
441
|
+
#
|
442
|
+
# Gets details about the specified function.
|
443
|
+
#
|
444
|
+
# @param resource_group_name [String] The name of the resource group that
|
445
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
446
|
+
# Manager API or the portal.
|
447
|
+
# @param job_name [String] The name of the streaming job.
|
448
|
+
# @param function_name [String] The name of the function.
|
449
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
450
|
+
# to the HTTP request.
|
451
|
+
#
|
452
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
453
|
+
#
|
454
|
+
def get_async(resource_group_name, job_name, function_name, custom_headers = nil)
|
455
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
456
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
457
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
458
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
459
|
+
fail ArgumentError, 'function_name is nil' if function_name.nil?
|
460
|
+
|
461
|
+
|
462
|
+
request_headers = {}
|
463
|
+
|
464
|
+
# Set Headers
|
465
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
466
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
467
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'
|
468
|
+
|
469
|
+
request_url = @base_url || @client.base_url
|
470
|
+
|
471
|
+
options = {
|
472
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
473
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'functionName' => function_name},
|
474
|
+
query_params: {'api-version' => @client.api_version},
|
475
|
+
headers: request_headers.merge(custom_headers || {}),
|
476
|
+
base_url: request_url
|
477
|
+
}
|
478
|
+
promise = @client.make_request_async(:get, path_template, options)
|
479
|
+
|
480
|
+
promise = promise.then do |result|
|
481
|
+
http_response = result.response
|
482
|
+
status_code = http_response.status
|
483
|
+
response_content = http_response.body
|
484
|
+
unless status_code == 200
|
485
|
+
error_model = JSON.load(response_content)
|
486
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
487
|
+
end
|
488
|
+
|
489
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
490
|
+
# Deserialize Response
|
491
|
+
if status_code == 200
|
492
|
+
begin
|
493
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
494
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Function.mapper()
|
495
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
496
|
+
rescue Exception => e
|
497
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
498
|
+
end
|
499
|
+
end
|
500
|
+
|
501
|
+
result
|
502
|
+
end
|
503
|
+
|
504
|
+
promise.execute
|
505
|
+
end
|
506
|
+
|
507
|
+
#
|
508
|
+
# Lists all of the functions under the specified streaming job.
|
509
|
+
#
|
510
|
+
# @param resource_group_name [String] The name of the resource group that
|
511
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
512
|
+
# Manager API or the portal.
|
513
|
+
# @param job_name [String] The name of the streaming job.
|
514
|
+
# @param select [String] The $select OData query parameter. This is a
|
515
|
+
# comma-separated list of structural properties to include in the response, or
|
516
|
+
# “*” to include all properties. By default, all properties are returned except
|
517
|
+
# diagnostics. Currently only accepts '*' as a valid value.
|
518
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
519
|
+
# will be added to the HTTP request.
|
520
|
+
#
|
521
|
+
# @return [Array<Function>] operation results.
|
522
|
+
#
|
523
|
+
def list_by_streaming_job(resource_group_name, job_name, select = nil, custom_headers = nil)
|
524
|
+
first_page = list_by_streaming_job_as_lazy(resource_group_name, job_name, select, custom_headers)
|
525
|
+
first_page.get_all_items
|
526
|
+
end
|
527
|
+
|
528
|
+
#
|
529
|
+
# Lists all of the functions under the specified streaming job.
|
530
|
+
#
|
531
|
+
# @param resource_group_name [String] The name of the resource group that
|
532
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
533
|
+
# Manager API or the portal.
|
534
|
+
# @param job_name [String] The name of the streaming job.
|
535
|
+
# @param select [String] The $select OData query parameter. This is a
|
536
|
+
# comma-separated list of structural properties to include in the response, or
|
537
|
+
# “*” to include all properties. By default, all properties are returned except
|
538
|
+
# diagnostics. Currently only accepts '*' as a valid value.
|
539
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
540
|
+
# will be added to the HTTP request.
|
541
|
+
#
|
542
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
543
|
+
#
|
544
|
+
def list_by_streaming_job_with_http_info(resource_group_name, job_name, select = nil, custom_headers = nil)
|
545
|
+
list_by_streaming_job_async(resource_group_name, job_name, select, custom_headers).value!
|
546
|
+
end
|
547
|
+
|
548
|
+
#
|
549
|
+
# Lists all of the functions under the specified streaming job.
|
550
|
+
#
|
551
|
+
# @param resource_group_name [String] The name of the resource group that
|
552
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
553
|
+
# Manager API or the portal.
|
554
|
+
# @param job_name [String] The name of the streaming job.
|
555
|
+
# @param select [String] The $select OData query parameter. This is a
|
556
|
+
# comma-separated list of structural properties to include in the response, or
|
557
|
+
# “*” to include all properties. By default, all properties are returned except
|
558
|
+
# diagnostics. Currently only accepts '*' as a valid value.
|
559
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
560
|
+
# to the HTTP request.
|
561
|
+
#
|
562
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
563
|
+
#
|
564
|
+
def list_by_streaming_job_async(resource_group_name, job_name, select = nil, custom_headers = nil)
|
565
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
566
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
567
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
568
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
569
|
+
|
570
|
+
|
571
|
+
request_headers = {}
|
572
|
+
|
573
|
+
# Set Headers
|
574
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
575
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
576
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions'
|
577
|
+
|
578
|
+
request_url = @base_url || @client.base_url
|
579
|
+
|
580
|
+
options = {
|
581
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
582
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name},
|
583
|
+
query_params: {'$select' => select,'api-version' => @client.api_version},
|
584
|
+
headers: request_headers.merge(custom_headers || {}),
|
585
|
+
base_url: request_url
|
586
|
+
}
|
587
|
+
promise = @client.make_request_async(:get, path_template, options)
|
588
|
+
|
589
|
+
promise = promise.then do |result|
|
590
|
+
http_response = result.response
|
591
|
+
status_code = http_response.status
|
592
|
+
response_content = http_response.body
|
593
|
+
unless status_code == 200
|
594
|
+
error_model = JSON.load(response_content)
|
595
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
596
|
+
end
|
597
|
+
|
598
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
599
|
+
# Deserialize Response
|
600
|
+
if status_code == 200
|
601
|
+
begin
|
602
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
603
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::FunctionListResult.mapper()
|
604
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
605
|
+
rescue Exception => e
|
606
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
607
|
+
end
|
608
|
+
end
|
609
|
+
|
610
|
+
result
|
611
|
+
end
|
612
|
+
|
613
|
+
promise.execute
|
614
|
+
end
|
615
|
+
|
616
|
+
#
|
617
|
+
# Tests if the information provided for a function is valid. This can range
|
618
|
+
# from testing the connection to the underlying web service behind the function
|
619
|
+
# or making sure the function code provided is syntactically correct.
|
620
|
+
#
|
621
|
+
# @param resource_group_name [String] The name of the resource group that
|
622
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
623
|
+
# Manager API or the portal.
|
624
|
+
# @param job_name [String] The name of the streaming job.
|
625
|
+
# @param function_name [String] The name of the function.
|
626
|
+
# @param function [Function] If the function specified does not already exist,
|
627
|
+
# this parameter must contain the full function definition intended to be
|
628
|
+
# tested. If the function specified already exists, this parameter can be left
|
629
|
+
# null to test the existing function as is or if specified, the properties
|
630
|
+
# specified will overwrite the corresponding properties in the existing
|
631
|
+
# function (exactly like a PATCH operation) and the resulting function will be
|
632
|
+
# tested.
|
633
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
634
|
+
# will be added to the HTTP request.
|
635
|
+
#
|
636
|
+
# @return [ResourceTestStatus] operation results.
|
637
|
+
#
|
638
|
+
def test(resource_group_name, job_name, function_name, function = nil, custom_headers = nil)
|
639
|
+
response = test_async(resource_group_name, job_name, function_name, function, custom_headers).value!
|
640
|
+
response.body unless response.nil?
|
641
|
+
end
|
642
|
+
|
643
|
+
#
|
644
|
+
# @param resource_group_name [String] The name of the resource group that
|
645
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
646
|
+
# Manager API or the portal.
|
647
|
+
# @param job_name [String] The name of the streaming job.
|
648
|
+
# @param function_name [String] The name of the function.
|
649
|
+
# @param function [Function] If the function specified does not already exist,
|
650
|
+
# this parameter must contain the full function definition intended to be
|
651
|
+
# tested. If the function specified already exists, this parameter can be left
|
652
|
+
# null to test the existing function as is or if specified, the properties
|
653
|
+
# specified will overwrite the corresponding properties in the existing
|
654
|
+
# function (exactly like a PATCH operation) and the resulting function will be
|
655
|
+
# tested.
|
656
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
657
|
+
# will be added to the HTTP request.
|
658
|
+
#
|
659
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
660
|
+
# response.
|
661
|
+
#
|
662
|
+
def test_async(resource_group_name, job_name, function_name, function = nil, custom_headers = nil)
|
663
|
+
# Send request
|
664
|
+
promise = begin_test_async(resource_group_name, job_name, function_name, function, custom_headers)
|
665
|
+
|
666
|
+
promise = promise.then do |response|
|
667
|
+
# Defining deserialization method.
|
668
|
+
deserialize_method = lambda do |parsed_response|
|
669
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::ResourceTestStatus.mapper()
|
670
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
671
|
+
end
|
672
|
+
|
673
|
+
# Waiting for response.
|
674
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
675
|
+
end
|
676
|
+
|
677
|
+
promise
|
678
|
+
end
|
679
|
+
|
680
|
+
#
|
681
|
+
# Retrieves the default definition of a function based on the parameters
|
682
|
+
# specified.
|
683
|
+
#
|
684
|
+
# @param resource_group_name [String] The name of the resource group that
|
685
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
686
|
+
# Manager API or the portal.
|
687
|
+
# @param job_name [String] The name of the streaming job.
|
688
|
+
# @param function_name [String] The name of the function.
|
689
|
+
# @param function_retrieve_default_definition_parameters
|
690
|
+
# [FunctionRetrieveDefaultDefinitionParameters] Parameters used to specify the
|
691
|
+
# type of function to retrieve the default definition for.
|
692
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
693
|
+
# will be added to the HTTP request.
|
694
|
+
#
|
695
|
+
# @return [Function] operation results.
|
696
|
+
#
|
697
|
+
def retrieve_default_definition(resource_group_name, job_name, function_name, function_retrieve_default_definition_parameters = nil, custom_headers = nil)
|
698
|
+
response = retrieve_default_definition_async(resource_group_name, job_name, function_name, function_retrieve_default_definition_parameters, custom_headers).value!
|
699
|
+
response.body unless response.nil?
|
700
|
+
end
|
701
|
+
|
702
|
+
#
|
703
|
+
# Retrieves the default definition of a function based on the parameters
|
704
|
+
# specified.
|
705
|
+
#
|
706
|
+
# @param resource_group_name [String] The name of the resource group that
|
707
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
708
|
+
# Manager API or the portal.
|
709
|
+
# @param job_name [String] The name of the streaming job.
|
710
|
+
# @param function_name [String] The name of the function.
|
711
|
+
# @param function_retrieve_default_definition_parameters
|
712
|
+
# [FunctionRetrieveDefaultDefinitionParameters] Parameters used to specify the
|
713
|
+
# type of function to retrieve the default definition for.
|
714
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
715
|
+
# will be added to the HTTP request.
|
716
|
+
#
|
717
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
718
|
+
#
|
719
|
+
def retrieve_default_definition_with_http_info(resource_group_name, job_name, function_name, function_retrieve_default_definition_parameters = nil, custom_headers = nil)
|
720
|
+
retrieve_default_definition_async(resource_group_name, job_name, function_name, function_retrieve_default_definition_parameters, custom_headers).value!
|
721
|
+
end
|
722
|
+
|
723
|
+
#
|
724
|
+
# Retrieves the default definition of a function based on the parameters
|
725
|
+
# specified.
|
726
|
+
#
|
727
|
+
# @param resource_group_name [String] The name of the resource group that
|
728
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
729
|
+
# Manager API or the portal.
|
730
|
+
# @param job_name [String] The name of the streaming job.
|
731
|
+
# @param function_name [String] The name of the function.
|
732
|
+
# @param function_retrieve_default_definition_parameters
|
733
|
+
# [FunctionRetrieveDefaultDefinitionParameters] Parameters used to specify the
|
734
|
+
# type of function to retrieve the default definition for.
|
735
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
736
|
+
# to the HTTP request.
|
737
|
+
#
|
738
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
739
|
+
#
|
740
|
+
def retrieve_default_definition_async(resource_group_name, job_name, function_name, function_retrieve_default_definition_parameters = nil, custom_headers = nil)
|
741
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
742
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
743
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
744
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
745
|
+
fail ArgumentError, 'function_name is nil' if function_name.nil?
|
746
|
+
|
747
|
+
|
748
|
+
request_headers = {}
|
749
|
+
|
750
|
+
# Set Headers
|
751
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
752
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
753
|
+
|
754
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
755
|
+
|
756
|
+
# Serialize Request
|
757
|
+
request_mapper = Azure::ARM::StreamAnalytics::Models::FunctionRetrieveDefaultDefinitionParameters.mapper()
|
758
|
+
request_content = @client.serialize(request_mapper, function_retrieve_default_definition_parameters)
|
759
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
760
|
+
|
761
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition'
|
762
|
+
|
763
|
+
request_url = @base_url || @client.base_url
|
764
|
+
|
765
|
+
options = {
|
766
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
767
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'functionName' => function_name},
|
768
|
+
query_params: {'api-version' => @client.api_version},
|
769
|
+
body: request_content,
|
770
|
+
headers: request_headers.merge(custom_headers || {}),
|
771
|
+
base_url: request_url
|
772
|
+
}
|
773
|
+
promise = @client.make_request_async(:post, path_template, options)
|
774
|
+
|
775
|
+
promise = promise.then do |result|
|
776
|
+
http_response = result.response
|
777
|
+
status_code = http_response.status
|
778
|
+
response_content = http_response.body
|
779
|
+
unless status_code == 200
|
780
|
+
error_model = JSON.load(response_content)
|
781
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
782
|
+
end
|
783
|
+
|
784
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
785
|
+
# Deserialize Response
|
786
|
+
if status_code == 200
|
787
|
+
begin
|
788
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
789
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::Function.mapper()
|
790
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
791
|
+
rescue Exception => e
|
792
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
793
|
+
end
|
794
|
+
end
|
795
|
+
|
796
|
+
result
|
797
|
+
end
|
798
|
+
|
799
|
+
promise.execute
|
800
|
+
end
|
801
|
+
|
802
|
+
#
|
803
|
+
# Tests if the information provided for a function is valid. This can range
|
804
|
+
# from testing the connection to the underlying web service behind the function
|
805
|
+
# or making sure the function code provided is syntactically correct.
|
806
|
+
#
|
807
|
+
# @param resource_group_name [String] The name of the resource group that
|
808
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
809
|
+
# Manager API or the portal.
|
810
|
+
# @param job_name [String] The name of the streaming job.
|
811
|
+
# @param function_name [String] The name of the function.
|
812
|
+
# @param function [Function] If the function specified does not already exist,
|
813
|
+
# this parameter must contain the full function definition intended to be
|
814
|
+
# tested. If the function specified already exists, this parameter can be left
|
815
|
+
# null to test the existing function as is or if specified, the properties
|
816
|
+
# specified will overwrite the corresponding properties in the existing
|
817
|
+
# function (exactly like a PATCH operation) and the resulting function will be
|
818
|
+
# tested.
|
819
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
820
|
+
# will be added to the HTTP request.
|
821
|
+
#
|
822
|
+
# @return [ResourceTestStatus] operation results.
|
823
|
+
#
|
824
|
+
def begin_test(resource_group_name, job_name, function_name, function = nil, custom_headers = nil)
|
825
|
+
response = begin_test_async(resource_group_name, job_name, function_name, function, custom_headers).value!
|
826
|
+
response.body unless response.nil?
|
827
|
+
end
|
828
|
+
|
829
|
+
#
|
830
|
+
# Tests if the information provided for a function is valid. This can range
|
831
|
+
# from testing the connection to the underlying web service behind the function
|
832
|
+
# or making sure the function code provided is syntactically correct.
|
833
|
+
#
|
834
|
+
# @param resource_group_name [String] The name of the resource group that
|
835
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
836
|
+
# Manager API or the portal.
|
837
|
+
# @param job_name [String] The name of the streaming job.
|
838
|
+
# @param function_name [String] The name of the function.
|
839
|
+
# @param function [Function] If the function specified does not already exist,
|
840
|
+
# this parameter must contain the full function definition intended to be
|
841
|
+
# tested. If the function specified already exists, this parameter can be left
|
842
|
+
# null to test the existing function as is or if specified, the properties
|
843
|
+
# specified will overwrite the corresponding properties in the existing
|
844
|
+
# function (exactly like a PATCH operation) and the resulting function will be
|
845
|
+
# tested.
|
846
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
847
|
+
# will be added to the HTTP request.
|
848
|
+
#
|
849
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
850
|
+
#
|
851
|
+
def begin_test_with_http_info(resource_group_name, job_name, function_name, function = nil, custom_headers = nil)
|
852
|
+
begin_test_async(resource_group_name, job_name, function_name, function, custom_headers).value!
|
853
|
+
end
|
854
|
+
|
855
|
+
#
|
856
|
+
# Tests if the information provided for a function is valid. This can range
|
857
|
+
# from testing the connection to the underlying web service behind the function
|
858
|
+
# or making sure the function code provided is syntactically correct.
|
859
|
+
#
|
860
|
+
# @param resource_group_name [String] The name of the resource group that
|
861
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
862
|
+
# Manager API or the portal.
|
863
|
+
# @param job_name [String] The name of the streaming job.
|
864
|
+
# @param function_name [String] The name of the function.
|
865
|
+
# @param function [Function] If the function specified does not already exist,
|
866
|
+
# this parameter must contain the full function definition intended to be
|
867
|
+
# tested. If the function specified already exists, this parameter can be left
|
868
|
+
# null to test the existing function as is or if specified, the properties
|
869
|
+
# specified will overwrite the corresponding properties in the existing
|
870
|
+
# function (exactly like a PATCH operation) and the resulting function will be
|
871
|
+
# tested.
|
872
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
873
|
+
# to the HTTP request.
|
874
|
+
#
|
875
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
876
|
+
#
|
877
|
+
def begin_test_async(resource_group_name, job_name, function_name, function = nil, custom_headers = nil)
|
878
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
879
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
880
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
881
|
+
fail ArgumentError, 'job_name is nil' if job_name.nil?
|
882
|
+
fail ArgumentError, 'function_name is nil' if function_name.nil?
|
883
|
+
|
884
|
+
|
885
|
+
request_headers = {}
|
886
|
+
|
887
|
+
# Set Headers
|
888
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
889
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
890
|
+
|
891
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
892
|
+
|
893
|
+
# Serialize Request
|
894
|
+
request_mapper = Azure::ARM::StreamAnalytics::Models::Function.mapper()
|
895
|
+
request_content = @client.serialize(request_mapper, function)
|
896
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
897
|
+
|
898
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test'
|
899
|
+
|
900
|
+
request_url = @base_url || @client.base_url
|
901
|
+
|
902
|
+
options = {
|
903
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
904
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'functionName' => function_name},
|
905
|
+
query_params: {'api-version' => @client.api_version},
|
906
|
+
body: request_content,
|
907
|
+
headers: request_headers.merge(custom_headers || {}),
|
908
|
+
base_url: request_url
|
909
|
+
}
|
910
|
+
promise = @client.make_request_async(:post, path_template, options)
|
911
|
+
|
912
|
+
promise = promise.then do |result|
|
913
|
+
http_response = result.response
|
914
|
+
status_code = http_response.status
|
915
|
+
response_content = http_response.body
|
916
|
+
unless status_code == 200 || status_code == 202
|
917
|
+
error_model = JSON.load(response_content)
|
918
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
919
|
+
end
|
920
|
+
|
921
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
922
|
+
# Deserialize Response
|
923
|
+
if status_code == 200
|
924
|
+
begin
|
925
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
926
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::ResourceTestStatus.mapper()
|
927
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
928
|
+
rescue Exception => e
|
929
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
930
|
+
end
|
931
|
+
end
|
932
|
+
|
933
|
+
result
|
934
|
+
end
|
935
|
+
|
936
|
+
promise.execute
|
937
|
+
end
|
938
|
+
|
939
|
+
#
|
940
|
+
# Lists all of the functions under the specified streaming job.
|
941
|
+
#
|
942
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
943
|
+
# to List operation.
|
944
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
945
|
+
# will be added to the HTTP request.
|
946
|
+
#
|
947
|
+
# @return [FunctionListResult] operation results.
|
948
|
+
#
|
949
|
+
def list_by_streaming_job_next(next_page_link, custom_headers = nil)
|
950
|
+
response = list_by_streaming_job_next_async(next_page_link, custom_headers).value!
|
951
|
+
response.body unless response.nil?
|
952
|
+
end
|
953
|
+
|
954
|
+
#
|
955
|
+
# Lists all of the functions under the specified streaming job.
|
956
|
+
#
|
957
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
958
|
+
# to List operation.
|
959
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
960
|
+
# will be added to the HTTP request.
|
961
|
+
#
|
962
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
963
|
+
#
|
964
|
+
def list_by_streaming_job_next_with_http_info(next_page_link, custom_headers = nil)
|
965
|
+
list_by_streaming_job_next_async(next_page_link, custom_headers).value!
|
966
|
+
end
|
967
|
+
|
968
|
+
#
|
969
|
+
# Lists all of the functions under the specified streaming job.
|
970
|
+
#
|
971
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
972
|
+
# to List operation.
|
973
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
974
|
+
# to the HTTP request.
|
975
|
+
#
|
976
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
977
|
+
#
|
978
|
+
def list_by_streaming_job_next_async(next_page_link, custom_headers = nil)
|
979
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
980
|
+
|
981
|
+
|
982
|
+
request_headers = {}
|
983
|
+
|
984
|
+
# Set Headers
|
985
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
986
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
987
|
+
path_template = '{nextLink}'
|
988
|
+
|
989
|
+
request_url = @base_url || @client.base_url
|
990
|
+
|
991
|
+
options = {
|
992
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
993
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
994
|
+
headers: request_headers.merge(custom_headers || {}),
|
995
|
+
base_url: request_url
|
996
|
+
}
|
997
|
+
promise = @client.make_request_async(:get, path_template, options)
|
998
|
+
|
999
|
+
promise = promise.then do |result|
|
1000
|
+
http_response = result.response
|
1001
|
+
status_code = http_response.status
|
1002
|
+
response_content = http_response.body
|
1003
|
+
unless status_code == 200
|
1004
|
+
error_model = JSON.load(response_content)
|
1005
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1006
|
+
end
|
1007
|
+
|
1008
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1009
|
+
# Deserialize Response
|
1010
|
+
if status_code == 200
|
1011
|
+
begin
|
1012
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1013
|
+
result_mapper = Azure::ARM::StreamAnalytics::Models::FunctionListResult.mapper()
|
1014
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1015
|
+
rescue Exception => e
|
1016
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1017
|
+
end
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
result
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
promise.execute
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
#
|
1027
|
+
# Lists all of the functions under the specified streaming job.
|
1028
|
+
#
|
1029
|
+
# @param resource_group_name [String] The name of the resource group that
|
1030
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
1031
|
+
# Manager API or the portal.
|
1032
|
+
# @param job_name [String] The name of the streaming job.
|
1033
|
+
# @param select [String] The $select OData query parameter. This is a
|
1034
|
+
# comma-separated list of structural properties to include in the response, or
|
1035
|
+
# “*” to include all properties. By default, all properties are returned except
|
1036
|
+
# diagnostics. Currently only accepts '*' as a valid value.
|
1037
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1038
|
+
# will be added to the HTTP request.
|
1039
|
+
#
|
1040
|
+
# @return [FunctionListResult] which provide lazy access to pages of the
|
1041
|
+
# response.
|
1042
|
+
#
|
1043
|
+
def list_by_streaming_job_as_lazy(resource_group_name, job_name, select = nil, custom_headers = nil)
|
1044
|
+
response = list_by_streaming_job_async(resource_group_name, job_name, select, custom_headers).value!
|
1045
|
+
unless response.nil?
|
1046
|
+
page = response.body
|
1047
|
+
page.next_method = Proc.new do |next_page_link|
|
1048
|
+
list_by_streaming_job_next_async(next_page_link, custom_headers)
|
1049
|
+
end
|
1050
|
+
page
|
1051
|
+
end
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
end
|
1055
|
+
end
|