azure_mgmt_kusto 0.19.3 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
- data/lib/2019-01-21/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
- data/lib/2019-05-15/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
- data/lib/2019-09-07/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
- data/lib/2019-11-09/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
- data/lib/2020-02-15/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
- data/lib/2020-06-14/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
- data/lib/2020-09-18/generated/azure_mgmt_kusto.rb +111 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/attached_database_configurations.rb +558 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/cluster_principal_assignments.rb +656 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/clusters.rb +2087 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/data_connections.rb +1033 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/database_principal_assignments.rb +683 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/databases.rb +1169 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/kusto_management_client.rb +157 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/attached_database_configuration.rb +144 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/attached_database_configuration_list_result.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/azure_capacity.rb +80 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +75 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +70 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/azure_scale_type.rb +17 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/azure_sku.rb +78 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/azure_sku_name.rb +36 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/azure_sku_tier.rb +16 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/blob_storage_event_type.rb +16 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/check_name_request.rb +61 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/check_name_result.rb +82 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/cluster.rb +327 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +60 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/cluster_list_result.rb +55 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/cluster_principal_assignment.rb +147 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/cluster_principal_assignment_check_name_request.rb +62 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/cluster_principal_assignment_list_result.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/cluster_principal_role.rb +16 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/cluster_update.rb +314 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/compression.rb +16 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/data_connection.rb +82 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/data_connection_check_name_request.rb +61 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/data_connection_list_result.rb +57 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/data_connection_validation.rb +60 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/data_connection_validation_list_result.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/data_connection_validation_result.rb +47 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database.rb +82 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_list_result.rb +57 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_principal.rb +117 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_principal_assignment.rb +148 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_principal_assignment_check_name_request.rb +62 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_principal_assignment_list_result.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_principal_role.rb +20 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_principal_type.rb +17 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/database_statistics.rb +47 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/default_principals_modification_kind.rb +17 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/diagnose_virtual_network_result.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/engine_type.rb +16 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/event_grid_data_connection.rb +198 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/event_grid_data_format.rb +30 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/event_hub_data_connection.rb +192 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/event_hub_data_format.rb +30 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/follower_database_definition.rb +72 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/follower_database_list_result.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/identity.rb +97 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/identity_type.rb +18 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/identity_user_assigned_identities_value.rb +60 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/iot_hub_data_connection.rb +191 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/iot_hub_data_format.rb +30 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/key_vault_properties.rb +80 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/language_extension.rb +47 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/language_extension_name.rb +16 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/language_extensions_list.rb +55 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/operation.rb +82 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/operation_display.rb +80 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/operation_list_result.rb +98 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/optimized_autoscale.rb +80 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/principal_type.rb +17 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/principals_modification_kind.rb +17 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/provisioning_state.rb +20 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/proxy_resource.rb +63 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/read_only_following_database.rb +174 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/read_write_database.rb +147 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/reason.rb +16 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/resource.rb +83 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/sku_description.rb +132 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/sku_description_list.rb +56 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/sku_location_info_item.rb +65 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/state.rb +23 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/tracked_resource.rb +92 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +46 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/type.rb +16 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/models/virtual_network_configuration.rb +69 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/module_definition.rb +9 -0
- data/lib/2020-09-18/generated/azure_mgmt_kusto/operations.rb +221 -0
- data/lib/azure_mgmt_kusto.rb +4 -3
- data/lib/profiles/latest/modules/kusto_profile_module.rb +164 -160
- data/lib/version.rb +1 -1
- metadata +90 -3
@@ -0,0 +1,2087 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Kusto::Mgmt::V2020_09_18
|
7
|
+
#
|
8
|
+
# The Azure Kusto management API provides a RESTful set of web services that
|
9
|
+
# interact with Azure Kusto services to manage your clusters and databases.
|
10
|
+
# The API enables you to create, update, and delete clusters and databases.
|
11
|
+
#
|
12
|
+
class Clusters
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
#
|
16
|
+
# Creates and initializes a new instance of the Clusters class.
|
17
|
+
# @param client service class for accessing basic functionality.
|
18
|
+
#
|
19
|
+
def initialize(client)
|
20
|
+
@client = client
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [KustoManagementClient] reference to the KustoManagementClient
|
24
|
+
attr_reader :client
|
25
|
+
|
26
|
+
#
|
27
|
+
# Gets a Kusto cluster.
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The name of the resource group containing
|
30
|
+
# the Kusto cluster.
|
31
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [Cluster] operation results.
|
36
|
+
#
|
37
|
+
def get(resource_group_name, cluster_name, custom_headers:nil)
|
38
|
+
response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Gets a Kusto cluster.
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] The name of the resource group containing
|
46
|
+
# the Kusto cluster.
|
47
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
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 get_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
54
|
+
get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Gets a Kusto cluster.
|
59
|
+
#
|
60
|
+
# @param resource_group_name [String] The name of the resource group containing
|
61
|
+
# the Kusto cluster.
|
62
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
63
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
64
|
+
# to the HTTP request.
|
65
|
+
#
|
66
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
67
|
+
#
|
68
|
+
def get_async(resource_group_name, cluster_name, custom_headers:nil)
|
69
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
70
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
71
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
72
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
73
|
+
|
74
|
+
|
75
|
+
request_headers = {}
|
76
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
77
|
+
|
78
|
+
# Set Headers
|
79
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
80
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
81
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
|
82
|
+
|
83
|
+
request_url = @base_url || @client.base_url
|
84
|
+
|
85
|
+
options = {
|
86
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
87
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
88
|
+
query_params: {'api-version' => @client.api_version},
|
89
|
+
headers: request_headers.merge(custom_headers || {}),
|
90
|
+
base_url: request_url
|
91
|
+
}
|
92
|
+
promise = @client.make_request_async(:get, path_template, options)
|
93
|
+
|
94
|
+
promise = promise.then do |result|
|
95
|
+
http_response = result.response
|
96
|
+
status_code = http_response.status
|
97
|
+
response_content = http_response.body
|
98
|
+
unless status_code == 200
|
99
|
+
error_model = JSON.load(response_content)
|
100
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
101
|
+
end
|
102
|
+
|
103
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
104
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
105
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
106
|
+
# Deserialize Response
|
107
|
+
if status_code == 200
|
108
|
+
begin
|
109
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
110
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
111
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
112
|
+
rescue Exception => e
|
113
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
promise.execute
|
121
|
+
end
|
122
|
+
|
123
|
+
#
|
124
|
+
# Create or update a Kusto cluster.
|
125
|
+
#
|
126
|
+
# @param resource_group_name [String] The name of the resource group containing
|
127
|
+
# the Kusto cluster.
|
128
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
129
|
+
# @param parameters [Cluster] The Kusto cluster parameters supplied to the
|
130
|
+
# CreateOrUpdate operation.
|
131
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
132
|
+
# will be added to the HTTP request.
|
133
|
+
#
|
134
|
+
# @return [Cluster] operation results.
|
135
|
+
#
|
136
|
+
def create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
137
|
+
response = create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
138
|
+
response.body unless response.nil?
|
139
|
+
end
|
140
|
+
|
141
|
+
#
|
142
|
+
# @param resource_group_name [String] The name of the resource group containing
|
143
|
+
# the Kusto cluster.
|
144
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
145
|
+
# @param parameters [Cluster] The Kusto cluster parameters supplied to the
|
146
|
+
# CreateOrUpdate operation.
|
147
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
148
|
+
# will be added to the HTTP request.
|
149
|
+
#
|
150
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
151
|
+
# response.
|
152
|
+
#
|
153
|
+
def create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
154
|
+
# Send request
|
155
|
+
promise = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
|
156
|
+
|
157
|
+
promise = promise.then do |response|
|
158
|
+
# Defining deserialization method.
|
159
|
+
deserialize_method = lambda do |parsed_response|
|
160
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
161
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Waiting for response.
|
165
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
166
|
+
end
|
167
|
+
|
168
|
+
promise
|
169
|
+
end
|
170
|
+
|
171
|
+
#
|
172
|
+
# Update a Kusto cluster.
|
173
|
+
#
|
174
|
+
# @param resource_group_name [String] The name of the resource group containing
|
175
|
+
# the Kusto cluster.
|
176
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
177
|
+
# @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
|
178
|
+
# the Update operation.
|
179
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
180
|
+
# will be added to the HTTP request.
|
181
|
+
#
|
182
|
+
# @return [Cluster] operation results.
|
183
|
+
#
|
184
|
+
def update(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
185
|
+
response = update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
186
|
+
response.body unless response.nil?
|
187
|
+
end
|
188
|
+
|
189
|
+
#
|
190
|
+
# @param resource_group_name [String] The name of the resource group containing
|
191
|
+
# the Kusto cluster.
|
192
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
193
|
+
# @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
|
194
|
+
# the Update operation.
|
195
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
196
|
+
# will be added to the HTTP request.
|
197
|
+
#
|
198
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
199
|
+
# response.
|
200
|
+
#
|
201
|
+
def update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
202
|
+
# Send request
|
203
|
+
promise = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
|
204
|
+
|
205
|
+
promise = promise.then do |response|
|
206
|
+
# Defining deserialization method.
|
207
|
+
deserialize_method = lambda do |parsed_response|
|
208
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
209
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
210
|
+
end
|
211
|
+
|
212
|
+
# Waiting for response.
|
213
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
214
|
+
end
|
215
|
+
|
216
|
+
promise
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
# Deletes a Kusto cluster.
|
221
|
+
#
|
222
|
+
# @param resource_group_name [String] The name of the resource group containing
|
223
|
+
# the Kusto cluster.
|
224
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
225
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
226
|
+
# will be added to the HTTP request.
|
227
|
+
#
|
228
|
+
def delete(resource_group_name, cluster_name, custom_headers:nil)
|
229
|
+
response = delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
230
|
+
nil
|
231
|
+
end
|
232
|
+
|
233
|
+
#
|
234
|
+
# @param resource_group_name [String] The name of the resource group containing
|
235
|
+
# the Kusto cluster.
|
236
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
237
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
238
|
+
# will be added to the HTTP request.
|
239
|
+
#
|
240
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
241
|
+
# response.
|
242
|
+
#
|
243
|
+
def delete_async(resource_group_name, cluster_name, custom_headers:nil)
|
244
|
+
# Send request
|
245
|
+
promise = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers)
|
246
|
+
|
247
|
+
promise = promise.then do |response|
|
248
|
+
# Defining deserialization method.
|
249
|
+
deserialize_method = lambda do |parsed_response|
|
250
|
+
end
|
251
|
+
|
252
|
+
# Waiting for response.
|
253
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
254
|
+
end
|
255
|
+
|
256
|
+
promise
|
257
|
+
end
|
258
|
+
|
259
|
+
#
|
260
|
+
# Stops a Kusto cluster.
|
261
|
+
#
|
262
|
+
# @param resource_group_name [String] The name of the resource group containing
|
263
|
+
# the Kusto cluster.
|
264
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
265
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
266
|
+
# will be added to the HTTP request.
|
267
|
+
#
|
268
|
+
def stop(resource_group_name, cluster_name, custom_headers:nil)
|
269
|
+
response = stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
270
|
+
nil
|
271
|
+
end
|
272
|
+
|
273
|
+
#
|
274
|
+
# @param resource_group_name [String] The name of the resource group containing
|
275
|
+
# the Kusto cluster.
|
276
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
277
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
278
|
+
# will be added to the HTTP request.
|
279
|
+
#
|
280
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
281
|
+
# response.
|
282
|
+
#
|
283
|
+
def stop_async(resource_group_name, cluster_name, custom_headers:nil)
|
284
|
+
# Send request
|
285
|
+
promise = begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers)
|
286
|
+
|
287
|
+
promise = promise.then do |response|
|
288
|
+
# Defining deserialization method.
|
289
|
+
deserialize_method = lambda do |parsed_response|
|
290
|
+
end
|
291
|
+
|
292
|
+
# Waiting for response.
|
293
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
294
|
+
end
|
295
|
+
|
296
|
+
promise
|
297
|
+
end
|
298
|
+
|
299
|
+
#
|
300
|
+
# Starts a Kusto cluster.
|
301
|
+
#
|
302
|
+
# @param resource_group_name [String] The name of the resource group containing
|
303
|
+
# the Kusto cluster.
|
304
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
305
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
306
|
+
# will be added to the HTTP request.
|
307
|
+
#
|
308
|
+
def start(resource_group_name, cluster_name, custom_headers:nil)
|
309
|
+
response = start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
310
|
+
nil
|
311
|
+
end
|
312
|
+
|
313
|
+
#
|
314
|
+
# @param resource_group_name [String] The name of the resource group containing
|
315
|
+
# the Kusto cluster.
|
316
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
317
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
318
|
+
# will be added to the HTTP request.
|
319
|
+
#
|
320
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
321
|
+
# response.
|
322
|
+
#
|
323
|
+
def start_async(resource_group_name, cluster_name, custom_headers:nil)
|
324
|
+
# Send request
|
325
|
+
promise = begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers)
|
326
|
+
|
327
|
+
promise = promise.then do |response|
|
328
|
+
# Defining deserialization method.
|
329
|
+
deserialize_method = lambda do |parsed_response|
|
330
|
+
end
|
331
|
+
|
332
|
+
# Waiting for response.
|
333
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
334
|
+
end
|
335
|
+
|
336
|
+
promise
|
337
|
+
end
|
338
|
+
|
339
|
+
#
|
340
|
+
# Returns a list of databases that are owned by this cluster and were followed
|
341
|
+
# by another cluster.
|
342
|
+
#
|
343
|
+
# @param resource_group_name [String] The name of the resource group containing
|
344
|
+
# the Kusto cluster.
|
345
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
346
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
347
|
+
# will be added to the HTTP request.
|
348
|
+
#
|
349
|
+
# @return [FollowerDatabaseListResult] operation results.
|
350
|
+
#
|
351
|
+
def list_follower_databases(resource_group_name, cluster_name, custom_headers:nil)
|
352
|
+
response = list_follower_databases_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
353
|
+
response.body unless response.nil?
|
354
|
+
end
|
355
|
+
|
356
|
+
#
|
357
|
+
# Returns a list of databases that are owned by this cluster and were followed
|
358
|
+
# by another cluster.
|
359
|
+
#
|
360
|
+
# @param resource_group_name [String] The name of the resource group containing
|
361
|
+
# the Kusto cluster.
|
362
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
363
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
364
|
+
# will be added to the HTTP request.
|
365
|
+
#
|
366
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
367
|
+
#
|
368
|
+
def list_follower_databases_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
369
|
+
list_follower_databases_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
370
|
+
end
|
371
|
+
|
372
|
+
#
|
373
|
+
# Returns a list of databases that are owned by this cluster and were followed
|
374
|
+
# by another cluster.
|
375
|
+
#
|
376
|
+
# @param resource_group_name [String] The name of the resource group containing
|
377
|
+
# the Kusto cluster.
|
378
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
379
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
380
|
+
# to the HTTP request.
|
381
|
+
#
|
382
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
383
|
+
#
|
384
|
+
def list_follower_databases_async(resource_group_name, cluster_name, custom_headers:nil)
|
385
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
386
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
387
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
388
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
389
|
+
|
390
|
+
|
391
|
+
request_headers = {}
|
392
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
393
|
+
|
394
|
+
# Set Headers
|
395
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
396
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
397
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases'
|
398
|
+
|
399
|
+
request_url = @base_url || @client.base_url
|
400
|
+
|
401
|
+
options = {
|
402
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
403
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
404
|
+
query_params: {'api-version' => @client.api_version},
|
405
|
+
headers: request_headers.merge(custom_headers || {}),
|
406
|
+
base_url: request_url
|
407
|
+
}
|
408
|
+
promise = @client.make_request_async(:post, path_template, options)
|
409
|
+
|
410
|
+
promise = promise.then do |result|
|
411
|
+
http_response = result.response
|
412
|
+
status_code = http_response.status
|
413
|
+
response_content = http_response.body
|
414
|
+
unless status_code == 200
|
415
|
+
error_model = JSON.load(response_content)
|
416
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
417
|
+
end
|
418
|
+
|
419
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
420
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
421
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
422
|
+
# Deserialize Response
|
423
|
+
if status_code == 200
|
424
|
+
begin
|
425
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
426
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::FollowerDatabaseListResult.mapper()
|
427
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
428
|
+
rescue Exception => e
|
429
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
430
|
+
end
|
431
|
+
end
|
432
|
+
|
433
|
+
result
|
434
|
+
end
|
435
|
+
|
436
|
+
promise.execute
|
437
|
+
end
|
438
|
+
|
439
|
+
#
|
440
|
+
# Detaches all followers of a database owned by this cluster.
|
441
|
+
#
|
442
|
+
# @param resource_group_name [String] The name of the resource group containing
|
443
|
+
# the Kusto cluster.
|
444
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
445
|
+
# @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
|
446
|
+
# databases properties to remove.
|
447
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
448
|
+
# will be added to the HTTP request.
|
449
|
+
#
|
450
|
+
def detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
|
451
|
+
response = detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value!
|
452
|
+
nil
|
453
|
+
end
|
454
|
+
|
455
|
+
#
|
456
|
+
# @param resource_group_name [String] The name of the resource group containing
|
457
|
+
# the Kusto cluster.
|
458
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
459
|
+
# @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
|
460
|
+
# databases properties to remove.
|
461
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
462
|
+
# will be added to the HTTP request.
|
463
|
+
#
|
464
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
465
|
+
# response.
|
466
|
+
#
|
467
|
+
def detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
|
468
|
+
# Send request
|
469
|
+
promise = begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers)
|
470
|
+
|
471
|
+
promise = promise.then do |response|
|
472
|
+
# Defining deserialization method.
|
473
|
+
deserialize_method = lambda do |parsed_response|
|
474
|
+
end
|
475
|
+
|
476
|
+
# Waiting for response.
|
477
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
478
|
+
end
|
479
|
+
|
480
|
+
promise
|
481
|
+
end
|
482
|
+
|
483
|
+
#
|
484
|
+
# Diagnoses network connectivity status for external resources on which the
|
485
|
+
# service is dependent on.
|
486
|
+
#
|
487
|
+
# @param resource_group_name [String] The name of the resource group containing
|
488
|
+
# the Kusto cluster.
|
489
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
490
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
491
|
+
# will be added to the HTTP request.
|
492
|
+
#
|
493
|
+
# @return [DiagnoseVirtualNetworkResult] operation results.
|
494
|
+
#
|
495
|
+
def diagnose_virtual_network(resource_group_name, cluster_name, custom_headers:nil)
|
496
|
+
response = diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
497
|
+
response.body unless response.nil?
|
498
|
+
end
|
499
|
+
|
500
|
+
#
|
501
|
+
# @param resource_group_name [String] The name of the resource group containing
|
502
|
+
# the Kusto cluster.
|
503
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
504
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
505
|
+
# will be added to the HTTP request.
|
506
|
+
#
|
507
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
508
|
+
# response.
|
509
|
+
#
|
510
|
+
def diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:nil)
|
511
|
+
# Send request
|
512
|
+
promise = begin_diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:custom_headers)
|
513
|
+
|
514
|
+
promise = promise.then do |response|
|
515
|
+
# Defining deserialization method.
|
516
|
+
deserialize_method = lambda do |parsed_response|
|
517
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::DiagnoseVirtualNetworkResult.mapper()
|
518
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
519
|
+
end
|
520
|
+
|
521
|
+
# Waiting for response.
|
522
|
+
@client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
|
523
|
+
end
|
524
|
+
|
525
|
+
promise
|
526
|
+
end
|
527
|
+
|
528
|
+
#
|
529
|
+
# Lists all Kusto clusters within a resource group.
|
530
|
+
#
|
531
|
+
# @param resource_group_name [String] The name of the resource group containing
|
532
|
+
# the Kusto cluster.
|
533
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
534
|
+
# will be added to the HTTP request.
|
535
|
+
#
|
536
|
+
# @return [ClusterListResult] operation results.
|
537
|
+
#
|
538
|
+
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
539
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
540
|
+
response.body unless response.nil?
|
541
|
+
end
|
542
|
+
|
543
|
+
#
|
544
|
+
# Lists all Kusto clusters within a resource group.
|
545
|
+
#
|
546
|
+
# @param resource_group_name [String] The name of the resource group containing
|
547
|
+
# the Kusto cluster.
|
548
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
549
|
+
# will be added to the HTTP request.
|
550
|
+
#
|
551
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
552
|
+
#
|
553
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
554
|
+
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
555
|
+
end
|
556
|
+
|
557
|
+
#
|
558
|
+
# Lists all Kusto clusters within a resource group.
|
559
|
+
#
|
560
|
+
# @param resource_group_name [String] The name of the resource group containing
|
561
|
+
# the Kusto cluster.
|
562
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
563
|
+
# to the HTTP request.
|
564
|
+
#
|
565
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
566
|
+
#
|
567
|
+
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
568
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
569
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
570
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
571
|
+
|
572
|
+
|
573
|
+
request_headers = {}
|
574
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
575
|
+
|
576
|
+
# Set Headers
|
577
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
578
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
579
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters'
|
580
|
+
|
581
|
+
request_url = @base_url || @client.base_url
|
582
|
+
|
583
|
+
options = {
|
584
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
585
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
586
|
+
query_params: {'api-version' => @client.api_version},
|
587
|
+
headers: request_headers.merge(custom_headers || {}),
|
588
|
+
base_url: request_url
|
589
|
+
}
|
590
|
+
promise = @client.make_request_async(:get, path_template, options)
|
591
|
+
|
592
|
+
promise = promise.then do |result|
|
593
|
+
http_response = result.response
|
594
|
+
status_code = http_response.status
|
595
|
+
response_content = http_response.body
|
596
|
+
unless status_code == 200
|
597
|
+
error_model = JSON.load(response_content)
|
598
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
599
|
+
end
|
600
|
+
|
601
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
602
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
603
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
604
|
+
# Deserialize Response
|
605
|
+
if status_code == 200
|
606
|
+
begin
|
607
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
608
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::ClusterListResult.mapper()
|
609
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
610
|
+
rescue Exception => e
|
611
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
612
|
+
end
|
613
|
+
end
|
614
|
+
|
615
|
+
result
|
616
|
+
end
|
617
|
+
|
618
|
+
promise.execute
|
619
|
+
end
|
620
|
+
|
621
|
+
#
|
622
|
+
# Lists all Kusto clusters within a subscription.
|
623
|
+
#
|
624
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
625
|
+
# will be added to the HTTP request.
|
626
|
+
#
|
627
|
+
# @return [ClusterListResult] operation results.
|
628
|
+
#
|
629
|
+
def list(custom_headers:nil)
|
630
|
+
response = list_async(custom_headers:custom_headers).value!
|
631
|
+
response.body unless response.nil?
|
632
|
+
end
|
633
|
+
|
634
|
+
#
|
635
|
+
# Lists all Kusto clusters within a subscription.
|
636
|
+
#
|
637
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
638
|
+
# will be added to the HTTP request.
|
639
|
+
#
|
640
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
641
|
+
#
|
642
|
+
def list_with_http_info(custom_headers:nil)
|
643
|
+
list_async(custom_headers:custom_headers).value!
|
644
|
+
end
|
645
|
+
|
646
|
+
#
|
647
|
+
# Lists all Kusto clusters within a subscription.
|
648
|
+
#
|
649
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
650
|
+
# to the HTTP request.
|
651
|
+
#
|
652
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
653
|
+
#
|
654
|
+
def list_async(custom_headers:nil)
|
655
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
656
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
657
|
+
|
658
|
+
|
659
|
+
request_headers = {}
|
660
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
661
|
+
|
662
|
+
# Set Headers
|
663
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
664
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
665
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters'
|
666
|
+
|
667
|
+
request_url = @base_url || @client.base_url
|
668
|
+
|
669
|
+
options = {
|
670
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
671
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
672
|
+
query_params: {'api-version' => @client.api_version},
|
673
|
+
headers: request_headers.merge(custom_headers || {}),
|
674
|
+
base_url: request_url
|
675
|
+
}
|
676
|
+
promise = @client.make_request_async(:get, path_template, options)
|
677
|
+
|
678
|
+
promise = promise.then do |result|
|
679
|
+
http_response = result.response
|
680
|
+
status_code = http_response.status
|
681
|
+
response_content = http_response.body
|
682
|
+
unless status_code == 200
|
683
|
+
error_model = JSON.load(response_content)
|
684
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
685
|
+
end
|
686
|
+
|
687
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
688
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
689
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
690
|
+
# Deserialize Response
|
691
|
+
if status_code == 200
|
692
|
+
begin
|
693
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
694
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::ClusterListResult.mapper()
|
695
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
696
|
+
rescue Exception => e
|
697
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
698
|
+
end
|
699
|
+
end
|
700
|
+
|
701
|
+
result
|
702
|
+
end
|
703
|
+
|
704
|
+
promise.execute
|
705
|
+
end
|
706
|
+
|
707
|
+
#
|
708
|
+
# Lists eligible SKUs for Kusto resource provider.
|
709
|
+
#
|
710
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
711
|
+
# will be added to the HTTP request.
|
712
|
+
#
|
713
|
+
# @return [SkuDescriptionList] operation results.
|
714
|
+
#
|
715
|
+
def list_skus(custom_headers:nil)
|
716
|
+
response = list_skus_async(custom_headers:custom_headers).value!
|
717
|
+
response.body unless response.nil?
|
718
|
+
end
|
719
|
+
|
720
|
+
#
|
721
|
+
# Lists eligible SKUs for Kusto resource provider.
|
722
|
+
#
|
723
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
724
|
+
# will be added to the HTTP request.
|
725
|
+
#
|
726
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
727
|
+
#
|
728
|
+
def list_skus_with_http_info(custom_headers:nil)
|
729
|
+
list_skus_async(custom_headers:custom_headers).value!
|
730
|
+
end
|
731
|
+
|
732
|
+
#
|
733
|
+
# Lists eligible SKUs for Kusto resource provider.
|
734
|
+
#
|
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 list_skus_async(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
|
+
|
744
|
+
|
745
|
+
request_headers = {}
|
746
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
747
|
+
|
748
|
+
# Set Headers
|
749
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
750
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
751
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus'
|
752
|
+
|
753
|
+
request_url = @base_url || @client.base_url
|
754
|
+
|
755
|
+
options = {
|
756
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
757
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
758
|
+
query_params: {'api-version' => @client.api_version},
|
759
|
+
headers: request_headers.merge(custom_headers || {}),
|
760
|
+
base_url: request_url
|
761
|
+
}
|
762
|
+
promise = @client.make_request_async(:get, path_template, options)
|
763
|
+
|
764
|
+
promise = promise.then do |result|
|
765
|
+
http_response = result.response
|
766
|
+
status_code = http_response.status
|
767
|
+
response_content = http_response.body
|
768
|
+
unless status_code == 200
|
769
|
+
error_model = JSON.load(response_content)
|
770
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
771
|
+
end
|
772
|
+
|
773
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
774
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
775
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
776
|
+
# Deserialize Response
|
777
|
+
if status_code == 200
|
778
|
+
begin
|
779
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
780
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::SkuDescriptionList.mapper()
|
781
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
782
|
+
rescue Exception => e
|
783
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
784
|
+
end
|
785
|
+
end
|
786
|
+
|
787
|
+
result
|
788
|
+
end
|
789
|
+
|
790
|
+
promise.execute
|
791
|
+
end
|
792
|
+
|
793
|
+
#
|
794
|
+
# Checks that the cluster name is valid and is not already in use.
|
795
|
+
#
|
796
|
+
# @param location [String] Azure location.
|
797
|
+
# @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
|
798
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
799
|
+
# will be added to the HTTP request.
|
800
|
+
#
|
801
|
+
# @return [CheckNameResult] operation results.
|
802
|
+
#
|
803
|
+
def check_name_availability(location, cluster_name, custom_headers:nil)
|
804
|
+
response = check_name_availability_async(location, cluster_name, custom_headers:custom_headers).value!
|
805
|
+
response.body unless response.nil?
|
806
|
+
end
|
807
|
+
|
808
|
+
#
|
809
|
+
# Checks that the cluster name is valid and is not already in use.
|
810
|
+
#
|
811
|
+
# @param location [String] Azure location.
|
812
|
+
# @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
|
813
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
814
|
+
# will be added to the HTTP request.
|
815
|
+
#
|
816
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
817
|
+
#
|
818
|
+
def check_name_availability_with_http_info(location, cluster_name, custom_headers:nil)
|
819
|
+
check_name_availability_async(location, cluster_name, custom_headers:custom_headers).value!
|
820
|
+
end
|
821
|
+
|
822
|
+
#
|
823
|
+
# Checks that the cluster name is valid and is not already in use.
|
824
|
+
#
|
825
|
+
# @param location [String] Azure location.
|
826
|
+
# @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
|
827
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
828
|
+
# to the HTTP request.
|
829
|
+
#
|
830
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
831
|
+
#
|
832
|
+
def check_name_availability_async(location, cluster_name, custom_headers:nil)
|
833
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
834
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
835
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
836
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
837
|
+
|
838
|
+
|
839
|
+
request_headers = {}
|
840
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
841
|
+
|
842
|
+
# Set Headers
|
843
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
844
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
845
|
+
|
846
|
+
# Serialize Request
|
847
|
+
request_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::ClusterCheckNameRequest.mapper()
|
848
|
+
request_content = @client.serialize(request_mapper, cluster_name)
|
849
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
850
|
+
|
851
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability'
|
852
|
+
|
853
|
+
request_url = @base_url || @client.base_url
|
854
|
+
|
855
|
+
options = {
|
856
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
857
|
+
path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
|
858
|
+
query_params: {'api-version' => @client.api_version},
|
859
|
+
body: request_content,
|
860
|
+
headers: request_headers.merge(custom_headers || {}),
|
861
|
+
base_url: request_url
|
862
|
+
}
|
863
|
+
promise = @client.make_request_async(:post, path_template, options)
|
864
|
+
|
865
|
+
promise = promise.then do |result|
|
866
|
+
http_response = result.response
|
867
|
+
status_code = http_response.status
|
868
|
+
response_content = http_response.body
|
869
|
+
unless status_code == 200
|
870
|
+
error_model = JSON.load(response_content)
|
871
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
872
|
+
end
|
873
|
+
|
874
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
875
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
876
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
877
|
+
# Deserialize Response
|
878
|
+
if status_code == 200
|
879
|
+
begin
|
880
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
881
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::CheckNameResult.mapper()
|
882
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
883
|
+
rescue Exception => e
|
884
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
885
|
+
end
|
886
|
+
end
|
887
|
+
|
888
|
+
result
|
889
|
+
end
|
890
|
+
|
891
|
+
promise.execute
|
892
|
+
end
|
893
|
+
|
894
|
+
#
|
895
|
+
# Returns the SKUs available for the provided resource.
|
896
|
+
#
|
897
|
+
# @param resource_group_name [String] The name of the resource group containing
|
898
|
+
# the Kusto cluster.
|
899
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
900
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
901
|
+
# will be added to the HTTP request.
|
902
|
+
#
|
903
|
+
# @return [ListResourceSkusResult] operation results.
|
904
|
+
#
|
905
|
+
def list_skus_by_resource(resource_group_name, cluster_name, custom_headers:nil)
|
906
|
+
response = list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
907
|
+
response.body unless response.nil?
|
908
|
+
end
|
909
|
+
|
910
|
+
#
|
911
|
+
# Returns the SKUs available for the provided resource.
|
912
|
+
#
|
913
|
+
# @param resource_group_name [String] The name of the resource group containing
|
914
|
+
# the Kusto cluster.
|
915
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
916
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
917
|
+
# will be added to the HTTP request.
|
918
|
+
#
|
919
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
920
|
+
#
|
921
|
+
def list_skus_by_resource_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
922
|
+
list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
923
|
+
end
|
924
|
+
|
925
|
+
#
|
926
|
+
# Returns the SKUs available for the provided resource.
|
927
|
+
#
|
928
|
+
# @param resource_group_name [String] The name of the resource group containing
|
929
|
+
# the Kusto cluster.
|
930
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
931
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
932
|
+
# to the HTTP request.
|
933
|
+
#
|
934
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
935
|
+
#
|
936
|
+
def list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:nil)
|
937
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
938
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
939
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
940
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
941
|
+
|
942
|
+
|
943
|
+
request_headers = {}
|
944
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
945
|
+
|
946
|
+
# Set Headers
|
947
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
948
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
949
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'
|
950
|
+
|
951
|
+
request_url = @base_url || @client.base_url
|
952
|
+
|
953
|
+
options = {
|
954
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
955
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
956
|
+
query_params: {'api-version' => @client.api_version},
|
957
|
+
headers: request_headers.merge(custom_headers || {}),
|
958
|
+
base_url: request_url
|
959
|
+
}
|
960
|
+
promise = @client.make_request_async(:get, path_template, options)
|
961
|
+
|
962
|
+
promise = promise.then do |result|
|
963
|
+
http_response = result.response
|
964
|
+
status_code = http_response.status
|
965
|
+
response_content = http_response.body
|
966
|
+
unless status_code == 200
|
967
|
+
error_model = JSON.load(response_content)
|
968
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
969
|
+
end
|
970
|
+
|
971
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
972
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
973
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
974
|
+
# Deserialize Response
|
975
|
+
if status_code == 200
|
976
|
+
begin
|
977
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
978
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::ListResourceSkusResult.mapper()
|
979
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
980
|
+
rescue Exception => e
|
981
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
982
|
+
end
|
983
|
+
end
|
984
|
+
|
985
|
+
result
|
986
|
+
end
|
987
|
+
|
988
|
+
promise.execute
|
989
|
+
end
|
990
|
+
|
991
|
+
#
|
992
|
+
# Returns a list of language extensions that can run within KQL queries.
|
993
|
+
#
|
994
|
+
# @param resource_group_name [String] The name of the resource group containing
|
995
|
+
# the Kusto cluster.
|
996
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
997
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
998
|
+
# will be added to the HTTP request.
|
999
|
+
#
|
1000
|
+
# @return [LanguageExtensionsList] operation results.
|
1001
|
+
#
|
1002
|
+
def list_language_extensions(resource_group_name, cluster_name, custom_headers:nil)
|
1003
|
+
response = list_language_extensions_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1004
|
+
response.body unless response.nil?
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
#
|
1008
|
+
# Returns a list of language extensions that can run within KQL queries.
|
1009
|
+
#
|
1010
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1011
|
+
# the Kusto cluster.
|
1012
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1013
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1014
|
+
# will be added to the HTTP request.
|
1015
|
+
#
|
1016
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1017
|
+
#
|
1018
|
+
def list_language_extensions_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
1019
|
+
list_language_extensions_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
#
|
1023
|
+
# Returns a list of language extensions that can run within KQL queries.
|
1024
|
+
#
|
1025
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1026
|
+
# the Kusto cluster.
|
1027
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1028
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1029
|
+
# to the HTTP request.
|
1030
|
+
#
|
1031
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1032
|
+
#
|
1033
|
+
def list_language_extensions_async(resource_group_name, cluster_name, custom_headers:nil)
|
1034
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1035
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1036
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1037
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1038
|
+
|
1039
|
+
|
1040
|
+
request_headers = {}
|
1041
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1042
|
+
|
1043
|
+
# Set Headers
|
1044
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1045
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1046
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions'
|
1047
|
+
|
1048
|
+
request_url = @base_url || @client.base_url
|
1049
|
+
|
1050
|
+
options = {
|
1051
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1052
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
|
1053
|
+
query_params: {'api-version' => @client.api_version},
|
1054
|
+
headers: request_headers.merge(custom_headers || {}),
|
1055
|
+
base_url: request_url
|
1056
|
+
}
|
1057
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1058
|
+
|
1059
|
+
promise = promise.then do |result|
|
1060
|
+
http_response = result.response
|
1061
|
+
status_code = http_response.status
|
1062
|
+
response_content = http_response.body
|
1063
|
+
unless status_code == 200
|
1064
|
+
error_model = JSON.load(response_content)
|
1065
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1069
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1070
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1071
|
+
# Deserialize Response
|
1072
|
+
if status_code == 200
|
1073
|
+
begin
|
1074
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1075
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::LanguageExtensionsList.mapper()
|
1076
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1077
|
+
rescue Exception => e
|
1078
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1079
|
+
end
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
result
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
promise.execute
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
#
|
1089
|
+
# Add a list of language extensions that can run within KQL queries.
|
1090
|
+
#
|
1091
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1092
|
+
# the Kusto cluster.
|
1093
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1094
|
+
# @param language_extensions_to_add [LanguageExtensionsList] The language
|
1095
|
+
# extensions to add.
|
1096
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1097
|
+
# will be added to the HTTP request.
|
1098
|
+
#
|
1099
|
+
def add_language_extensions(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:nil)
|
1100
|
+
response = add_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:custom_headers).value!
|
1101
|
+
nil
|
1102
|
+
end
|
1103
|
+
|
1104
|
+
#
|
1105
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1106
|
+
# the Kusto cluster.
|
1107
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1108
|
+
# @param language_extensions_to_add [LanguageExtensionsList] The language
|
1109
|
+
# extensions to add.
|
1110
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1111
|
+
# will be added to the HTTP request.
|
1112
|
+
#
|
1113
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
1114
|
+
# response.
|
1115
|
+
#
|
1116
|
+
def add_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:nil)
|
1117
|
+
# Send request
|
1118
|
+
promise = begin_add_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:custom_headers)
|
1119
|
+
|
1120
|
+
promise = promise.then do |response|
|
1121
|
+
# Defining deserialization method.
|
1122
|
+
deserialize_method = lambda do |parsed_response|
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
# Waiting for response.
|
1126
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
1127
|
+
end
|
1128
|
+
|
1129
|
+
promise
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
#
|
1133
|
+
# Remove a list of language extensions that can run within KQL queries.
|
1134
|
+
#
|
1135
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1136
|
+
# the Kusto cluster.
|
1137
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1138
|
+
# @param language_extensions_to_remove [LanguageExtensionsList] The language
|
1139
|
+
# extensions to remove.
|
1140
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1141
|
+
# will be added to the HTTP request.
|
1142
|
+
#
|
1143
|
+
def remove_language_extensions(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:nil)
|
1144
|
+
response = remove_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:custom_headers).value!
|
1145
|
+
nil
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
#
|
1149
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1150
|
+
# the Kusto cluster.
|
1151
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1152
|
+
# @param language_extensions_to_remove [LanguageExtensionsList] The language
|
1153
|
+
# extensions to remove.
|
1154
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1155
|
+
# will be added to the HTTP request.
|
1156
|
+
#
|
1157
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
1158
|
+
# response.
|
1159
|
+
#
|
1160
|
+
def remove_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:nil)
|
1161
|
+
# Send request
|
1162
|
+
promise = begin_remove_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:custom_headers)
|
1163
|
+
|
1164
|
+
promise = promise.then do |response|
|
1165
|
+
# Defining deserialization method.
|
1166
|
+
deserialize_method = lambda do |parsed_response|
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
# Waiting for response.
|
1170
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
1171
|
+
end
|
1172
|
+
|
1173
|
+
promise
|
1174
|
+
end
|
1175
|
+
|
1176
|
+
#
|
1177
|
+
# Create or update a Kusto cluster.
|
1178
|
+
#
|
1179
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1180
|
+
# the Kusto cluster.
|
1181
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1182
|
+
# @param parameters [Cluster] The Kusto cluster parameters supplied to the
|
1183
|
+
# CreateOrUpdate operation.
|
1184
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1185
|
+
# will be added to the HTTP request.
|
1186
|
+
#
|
1187
|
+
# @return [Cluster] operation results.
|
1188
|
+
#
|
1189
|
+
def begin_create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
1190
|
+
response = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
1191
|
+
response.body unless response.nil?
|
1192
|
+
end
|
1193
|
+
|
1194
|
+
#
|
1195
|
+
# Create or update a Kusto cluster.
|
1196
|
+
#
|
1197
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1198
|
+
# the Kusto cluster.
|
1199
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1200
|
+
# @param parameters [Cluster] The Kusto cluster parameters supplied to the
|
1201
|
+
# CreateOrUpdate operation.
|
1202
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1203
|
+
# will be added to the HTTP request.
|
1204
|
+
#
|
1205
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1206
|
+
#
|
1207
|
+
def begin_create_or_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
1208
|
+
begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
1209
|
+
end
|
1210
|
+
|
1211
|
+
#
|
1212
|
+
# Create or update a Kusto cluster.
|
1213
|
+
#
|
1214
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1215
|
+
# the Kusto cluster.
|
1216
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1217
|
+
# @param parameters [Cluster] The Kusto cluster parameters supplied to the
|
1218
|
+
# CreateOrUpdate operation.
|
1219
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1220
|
+
# to the HTTP request.
|
1221
|
+
#
|
1222
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1223
|
+
#
|
1224
|
+
def begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
1225
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1226
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1227
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
1228
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1229
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1230
|
+
|
1231
|
+
|
1232
|
+
request_headers = {}
|
1233
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1234
|
+
|
1235
|
+
# Set Headers
|
1236
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1237
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1238
|
+
|
1239
|
+
# Serialize Request
|
1240
|
+
request_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
1241
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1242
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1243
|
+
|
1244
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
|
1245
|
+
|
1246
|
+
request_url = @base_url || @client.base_url
|
1247
|
+
|
1248
|
+
options = {
|
1249
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1250
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
1251
|
+
query_params: {'api-version' => @client.api_version},
|
1252
|
+
body: request_content,
|
1253
|
+
headers: request_headers.merge(custom_headers || {}),
|
1254
|
+
base_url: request_url
|
1255
|
+
}
|
1256
|
+
promise = @client.make_request_async(:put, path_template, options)
|
1257
|
+
|
1258
|
+
promise = promise.then do |result|
|
1259
|
+
http_response = result.response
|
1260
|
+
status_code = http_response.status
|
1261
|
+
response_content = http_response.body
|
1262
|
+
unless status_code == 200 || status_code == 201
|
1263
|
+
error_model = JSON.load(response_content)
|
1264
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1268
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1269
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1270
|
+
# Deserialize Response
|
1271
|
+
if status_code == 200
|
1272
|
+
begin
|
1273
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1274
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
1275
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1276
|
+
rescue Exception => e
|
1277
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1278
|
+
end
|
1279
|
+
end
|
1280
|
+
# Deserialize Response
|
1281
|
+
if status_code == 201
|
1282
|
+
begin
|
1283
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1284
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
1285
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1286
|
+
rescue Exception => e
|
1287
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1288
|
+
end
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
result
|
1292
|
+
end
|
1293
|
+
|
1294
|
+
promise.execute
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
#
|
1298
|
+
# Update a Kusto cluster.
|
1299
|
+
#
|
1300
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1301
|
+
# the Kusto cluster.
|
1302
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1303
|
+
# @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
|
1304
|
+
# the Update operation.
|
1305
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1306
|
+
# will be added to the HTTP request.
|
1307
|
+
#
|
1308
|
+
# @return [Cluster] operation results.
|
1309
|
+
#
|
1310
|
+
def begin_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
1311
|
+
response = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
1312
|
+
response.body unless response.nil?
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
#
|
1316
|
+
# Update a Kusto cluster.
|
1317
|
+
#
|
1318
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1319
|
+
# the Kusto cluster.
|
1320
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1321
|
+
# @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
|
1322
|
+
# the Update operation.
|
1323
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1324
|
+
# will be added to the HTTP request.
|
1325
|
+
#
|
1326
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1327
|
+
#
|
1328
|
+
def begin_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
1329
|
+
begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
1330
|
+
end
|
1331
|
+
|
1332
|
+
#
|
1333
|
+
# Update a Kusto cluster.
|
1334
|
+
#
|
1335
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1336
|
+
# the Kusto cluster.
|
1337
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1338
|
+
# @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
|
1339
|
+
# the Update operation.
|
1340
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1341
|
+
# to the HTTP request.
|
1342
|
+
#
|
1343
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1344
|
+
#
|
1345
|
+
def begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
1346
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1347
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1348
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
1349
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1350
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1351
|
+
|
1352
|
+
|
1353
|
+
request_headers = {}
|
1354
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1355
|
+
|
1356
|
+
# Set Headers
|
1357
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1358
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1359
|
+
|
1360
|
+
# Serialize Request
|
1361
|
+
request_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::ClusterUpdate.mapper()
|
1362
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1363
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1364
|
+
|
1365
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
|
1366
|
+
|
1367
|
+
request_url = @base_url || @client.base_url
|
1368
|
+
|
1369
|
+
options = {
|
1370
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1371
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
1372
|
+
query_params: {'api-version' => @client.api_version},
|
1373
|
+
body: request_content,
|
1374
|
+
headers: request_headers.merge(custom_headers || {}),
|
1375
|
+
base_url: request_url
|
1376
|
+
}
|
1377
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
1378
|
+
|
1379
|
+
promise = promise.then do |result|
|
1380
|
+
http_response = result.response
|
1381
|
+
status_code = http_response.status
|
1382
|
+
response_content = http_response.body
|
1383
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
1384
|
+
error_model = JSON.load(response_content)
|
1385
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1389
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1390
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1391
|
+
# Deserialize Response
|
1392
|
+
if status_code == 200
|
1393
|
+
begin
|
1394
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1395
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
1396
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1397
|
+
rescue Exception => e
|
1398
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1399
|
+
end
|
1400
|
+
end
|
1401
|
+
# Deserialize Response
|
1402
|
+
if status_code == 201
|
1403
|
+
begin
|
1404
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1405
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
1406
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1407
|
+
rescue Exception => e
|
1408
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1409
|
+
end
|
1410
|
+
end
|
1411
|
+
# Deserialize Response
|
1412
|
+
if status_code == 202
|
1413
|
+
begin
|
1414
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1415
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::Cluster.mapper()
|
1416
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1417
|
+
rescue Exception => e
|
1418
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1419
|
+
end
|
1420
|
+
end
|
1421
|
+
|
1422
|
+
result
|
1423
|
+
end
|
1424
|
+
|
1425
|
+
promise.execute
|
1426
|
+
end
|
1427
|
+
|
1428
|
+
#
|
1429
|
+
# Deletes a Kusto cluster.
|
1430
|
+
#
|
1431
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1432
|
+
# the Kusto cluster.
|
1433
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1434
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1435
|
+
# will be added to the HTTP request.
|
1436
|
+
#
|
1437
|
+
#
|
1438
|
+
def begin_delete(resource_group_name, cluster_name, custom_headers:nil)
|
1439
|
+
response = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1440
|
+
nil
|
1441
|
+
end
|
1442
|
+
|
1443
|
+
#
|
1444
|
+
# Deletes a Kusto cluster.
|
1445
|
+
#
|
1446
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1447
|
+
# the Kusto cluster.
|
1448
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1449
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1450
|
+
# will be added to the HTTP request.
|
1451
|
+
#
|
1452
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1453
|
+
#
|
1454
|
+
def begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
1455
|
+
begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1456
|
+
end
|
1457
|
+
|
1458
|
+
#
|
1459
|
+
# Deletes a Kusto cluster.
|
1460
|
+
#
|
1461
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1462
|
+
# the Kusto cluster.
|
1463
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1464
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1465
|
+
# to the HTTP request.
|
1466
|
+
#
|
1467
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1468
|
+
#
|
1469
|
+
def begin_delete_async(resource_group_name, cluster_name, custom_headers:nil)
|
1470
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1471
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1472
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1473
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1474
|
+
|
1475
|
+
|
1476
|
+
request_headers = {}
|
1477
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1478
|
+
|
1479
|
+
# Set Headers
|
1480
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1481
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1482
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
|
1483
|
+
|
1484
|
+
request_url = @base_url || @client.base_url
|
1485
|
+
|
1486
|
+
options = {
|
1487
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1488
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
1489
|
+
query_params: {'api-version' => @client.api_version},
|
1490
|
+
headers: request_headers.merge(custom_headers || {}),
|
1491
|
+
base_url: request_url
|
1492
|
+
}
|
1493
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
1494
|
+
|
1495
|
+
promise = promise.then do |result|
|
1496
|
+
http_response = result.response
|
1497
|
+
status_code = http_response.status
|
1498
|
+
response_content = http_response.body
|
1499
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
1500
|
+
error_model = JSON.load(response_content)
|
1501
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1502
|
+
end
|
1503
|
+
|
1504
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1505
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1506
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1507
|
+
|
1508
|
+
result
|
1509
|
+
end
|
1510
|
+
|
1511
|
+
promise.execute
|
1512
|
+
end
|
1513
|
+
|
1514
|
+
#
|
1515
|
+
# Stops a Kusto cluster.
|
1516
|
+
#
|
1517
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1518
|
+
# the Kusto cluster.
|
1519
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1520
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1521
|
+
# will be added to the HTTP request.
|
1522
|
+
#
|
1523
|
+
#
|
1524
|
+
def begin_stop(resource_group_name, cluster_name, custom_headers:nil)
|
1525
|
+
response = begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1526
|
+
nil
|
1527
|
+
end
|
1528
|
+
|
1529
|
+
#
|
1530
|
+
# Stops a Kusto cluster.
|
1531
|
+
#
|
1532
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1533
|
+
# the Kusto cluster.
|
1534
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1535
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1536
|
+
# will be added to the HTTP request.
|
1537
|
+
#
|
1538
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1539
|
+
#
|
1540
|
+
def begin_stop_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
1541
|
+
begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1542
|
+
end
|
1543
|
+
|
1544
|
+
#
|
1545
|
+
# Stops a Kusto cluster.
|
1546
|
+
#
|
1547
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1548
|
+
# the Kusto cluster.
|
1549
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1550
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1551
|
+
# to the HTTP request.
|
1552
|
+
#
|
1553
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1554
|
+
#
|
1555
|
+
def begin_stop_async(resource_group_name, cluster_name, custom_headers:nil)
|
1556
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1557
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1558
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1559
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1560
|
+
|
1561
|
+
|
1562
|
+
request_headers = {}
|
1563
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1564
|
+
|
1565
|
+
# Set Headers
|
1566
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1567
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1568
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop'
|
1569
|
+
|
1570
|
+
request_url = @base_url || @client.base_url
|
1571
|
+
|
1572
|
+
options = {
|
1573
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1574
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
1575
|
+
query_params: {'api-version' => @client.api_version},
|
1576
|
+
headers: request_headers.merge(custom_headers || {}),
|
1577
|
+
base_url: request_url
|
1578
|
+
}
|
1579
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1580
|
+
|
1581
|
+
promise = promise.then do |result|
|
1582
|
+
http_response = result.response
|
1583
|
+
status_code = http_response.status
|
1584
|
+
response_content = http_response.body
|
1585
|
+
unless status_code == 200 || status_code == 202
|
1586
|
+
error_model = JSON.load(response_content)
|
1587
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1588
|
+
end
|
1589
|
+
|
1590
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1591
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1592
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1593
|
+
|
1594
|
+
result
|
1595
|
+
end
|
1596
|
+
|
1597
|
+
promise.execute
|
1598
|
+
end
|
1599
|
+
|
1600
|
+
#
|
1601
|
+
# Starts a Kusto cluster.
|
1602
|
+
#
|
1603
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1604
|
+
# the Kusto cluster.
|
1605
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1606
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1607
|
+
# will be added to the HTTP request.
|
1608
|
+
#
|
1609
|
+
#
|
1610
|
+
def begin_start(resource_group_name, cluster_name, custom_headers:nil)
|
1611
|
+
response = begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1612
|
+
nil
|
1613
|
+
end
|
1614
|
+
|
1615
|
+
#
|
1616
|
+
# Starts a Kusto cluster.
|
1617
|
+
#
|
1618
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1619
|
+
# the Kusto cluster.
|
1620
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1621
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1622
|
+
# will be added to the HTTP request.
|
1623
|
+
#
|
1624
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1625
|
+
#
|
1626
|
+
def begin_start_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
1627
|
+
begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
#
|
1631
|
+
# Starts a Kusto cluster.
|
1632
|
+
#
|
1633
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1634
|
+
# the Kusto cluster.
|
1635
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1636
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1637
|
+
# to the HTTP request.
|
1638
|
+
#
|
1639
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1640
|
+
#
|
1641
|
+
def begin_start_async(resource_group_name, cluster_name, custom_headers:nil)
|
1642
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1643
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1644
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1645
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1646
|
+
|
1647
|
+
|
1648
|
+
request_headers = {}
|
1649
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1650
|
+
|
1651
|
+
# Set Headers
|
1652
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1653
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1654
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start'
|
1655
|
+
|
1656
|
+
request_url = @base_url || @client.base_url
|
1657
|
+
|
1658
|
+
options = {
|
1659
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1660
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
1661
|
+
query_params: {'api-version' => @client.api_version},
|
1662
|
+
headers: request_headers.merge(custom_headers || {}),
|
1663
|
+
base_url: request_url
|
1664
|
+
}
|
1665
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1666
|
+
|
1667
|
+
promise = promise.then do |result|
|
1668
|
+
http_response = result.response
|
1669
|
+
status_code = http_response.status
|
1670
|
+
response_content = http_response.body
|
1671
|
+
unless status_code == 200 || status_code == 202
|
1672
|
+
error_model = JSON.load(response_content)
|
1673
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1674
|
+
end
|
1675
|
+
|
1676
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1677
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1678
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1679
|
+
|
1680
|
+
result
|
1681
|
+
end
|
1682
|
+
|
1683
|
+
promise.execute
|
1684
|
+
end
|
1685
|
+
|
1686
|
+
#
|
1687
|
+
# Detaches all followers of a database owned by this cluster.
|
1688
|
+
#
|
1689
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1690
|
+
# the Kusto cluster.
|
1691
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1692
|
+
# @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
|
1693
|
+
# databases properties to remove.
|
1694
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1695
|
+
# will be added to the HTTP request.
|
1696
|
+
#
|
1697
|
+
#
|
1698
|
+
def begin_detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
|
1699
|
+
response = begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value!
|
1700
|
+
nil
|
1701
|
+
end
|
1702
|
+
|
1703
|
+
#
|
1704
|
+
# Detaches all followers of a database owned by this cluster.
|
1705
|
+
#
|
1706
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1707
|
+
# the Kusto cluster.
|
1708
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1709
|
+
# @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
|
1710
|
+
# databases properties to remove.
|
1711
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1712
|
+
# will be added to the HTTP request.
|
1713
|
+
#
|
1714
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1715
|
+
#
|
1716
|
+
def begin_detach_follower_databases_with_http_info(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
|
1717
|
+
begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value!
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
#
|
1721
|
+
# Detaches all followers of a database owned by this cluster.
|
1722
|
+
#
|
1723
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1724
|
+
# the Kusto cluster.
|
1725
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1726
|
+
# @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
|
1727
|
+
# databases properties to remove.
|
1728
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1729
|
+
# to the HTTP request.
|
1730
|
+
#
|
1731
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1732
|
+
#
|
1733
|
+
def begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
|
1734
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1735
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1736
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1737
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1738
|
+
fail ArgumentError, 'follower_database_to_remove is nil' if follower_database_to_remove.nil?
|
1739
|
+
|
1740
|
+
|
1741
|
+
request_headers = {}
|
1742
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1743
|
+
|
1744
|
+
# Set Headers
|
1745
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1746
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1747
|
+
|
1748
|
+
# Serialize Request
|
1749
|
+
request_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::FollowerDatabaseDefinition.mapper()
|
1750
|
+
request_content = @client.serialize(request_mapper, follower_database_to_remove)
|
1751
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1752
|
+
|
1753
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'
|
1754
|
+
|
1755
|
+
request_url = @base_url || @client.base_url
|
1756
|
+
|
1757
|
+
options = {
|
1758
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1759
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
1760
|
+
query_params: {'api-version' => @client.api_version},
|
1761
|
+
body: request_content,
|
1762
|
+
headers: request_headers.merge(custom_headers || {}),
|
1763
|
+
base_url: request_url
|
1764
|
+
}
|
1765
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1766
|
+
|
1767
|
+
promise = promise.then do |result|
|
1768
|
+
http_response = result.response
|
1769
|
+
status_code = http_response.status
|
1770
|
+
response_content = http_response.body
|
1771
|
+
unless status_code == 200 || status_code == 202
|
1772
|
+
error_model = JSON.load(response_content)
|
1773
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1774
|
+
end
|
1775
|
+
|
1776
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1777
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1778
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1779
|
+
|
1780
|
+
result
|
1781
|
+
end
|
1782
|
+
|
1783
|
+
promise.execute
|
1784
|
+
end
|
1785
|
+
|
1786
|
+
#
|
1787
|
+
# Diagnoses network connectivity status for external resources on which the
|
1788
|
+
# service is dependent on.
|
1789
|
+
#
|
1790
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1791
|
+
# the Kusto cluster.
|
1792
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1793
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1794
|
+
# will be added to the HTTP request.
|
1795
|
+
#
|
1796
|
+
# @return [DiagnoseVirtualNetworkResult] operation results.
|
1797
|
+
#
|
1798
|
+
def begin_diagnose_virtual_network(resource_group_name, cluster_name, custom_headers:nil)
|
1799
|
+
response = begin_diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1800
|
+
response.body unless response.nil?
|
1801
|
+
end
|
1802
|
+
|
1803
|
+
#
|
1804
|
+
# Diagnoses network connectivity status for external resources on which the
|
1805
|
+
# service is dependent on.
|
1806
|
+
#
|
1807
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1808
|
+
# the Kusto cluster.
|
1809
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1810
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1811
|
+
# will be added to the HTTP request.
|
1812
|
+
#
|
1813
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1814
|
+
#
|
1815
|
+
def begin_diagnose_virtual_network_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
1816
|
+
begin_diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
1817
|
+
end
|
1818
|
+
|
1819
|
+
#
|
1820
|
+
# Diagnoses network connectivity status for external resources on which the
|
1821
|
+
# service is dependent on.
|
1822
|
+
#
|
1823
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1824
|
+
# the Kusto cluster.
|
1825
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1826
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1827
|
+
# to the HTTP request.
|
1828
|
+
#
|
1829
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1830
|
+
#
|
1831
|
+
def begin_diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:nil)
|
1832
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1833
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1834
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1835
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1836
|
+
|
1837
|
+
|
1838
|
+
request_headers = {}
|
1839
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1840
|
+
|
1841
|
+
# Set Headers
|
1842
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1843
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1844
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/diagnoseVirtualNetwork'
|
1845
|
+
|
1846
|
+
request_url = @base_url || @client.base_url
|
1847
|
+
|
1848
|
+
options = {
|
1849
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1850
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
1851
|
+
query_params: {'api-version' => @client.api_version},
|
1852
|
+
headers: request_headers.merge(custom_headers || {}),
|
1853
|
+
base_url: request_url
|
1854
|
+
}
|
1855
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1856
|
+
|
1857
|
+
promise = promise.then do |result|
|
1858
|
+
http_response = result.response
|
1859
|
+
status_code = http_response.status
|
1860
|
+
response_content = http_response.body
|
1861
|
+
unless status_code == 200 || status_code == 202
|
1862
|
+
error_model = JSON.load(response_content)
|
1863
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1864
|
+
end
|
1865
|
+
|
1866
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1867
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1868
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1869
|
+
# Deserialize Response
|
1870
|
+
if status_code == 200
|
1871
|
+
begin
|
1872
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1873
|
+
result_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::DiagnoseVirtualNetworkResult.mapper()
|
1874
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1875
|
+
rescue Exception => e
|
1876
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1877
|
+
end
|
1878
|
+
end
|
1879
|
+
|
1880
|
+
result
|
1881
|
+
end
|
1882
|
+
|
1883
|
+
promise.execute
|
1884
|
+
end
|
1885
|
+
|
1886
|
+
#
|
1887
|
+
# Add a list of language extensions that can run within KQL queries.
|
1888
|
+
#
|
1889
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1890
|
+
# the Kusto cluster.
|
1891
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1892
|
+
# @param language_extensions_to_add [LanguageExtensionsList] The language
|
1893
|
+
# extensions to add.
|
1894
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1895
|
+
# will be added to the HTTP request.
|
1896
|
+
#
|
1897
|
+
#
|
1898
|
+
def begin_add_language_extensions(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:nil)
|
1899
|
+
response = begin_add_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:custom_headers).value!
|
1900
|
+
nil
|
1901
|
+
end
|
1902
|
+
|
1903
|
+
#
|
1904
|
+
# Add a list of language extensions that can run within KQL queries.
|
1905
|
+
#
|
1906
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1907
|
+
# the Kusto cluster.
|
1908
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1909
|
+
# @param language_extensions_to_add [LanguageExtensionsList] The language
|
1910
|
+
# extensions to add.
|
1911
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1912
|
+
# will be added to the HTTP request.
|
1913
|
+
#
|
1914
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1915
|
+
#
|
1916
|
+
def begin_add_language_extensions_with_http_info(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:nil)
|
1917
|
+
begin_add_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:custom_headers).value!
|
1918
|
+
end
|
1919
|
+
|
1920
|
+
#
|
1921
|
+
# Add a list of language extensions that can run within KQL queries.
|
1922
|
+
#
|
1923
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1924
|
+
# the Kusto cluster.
|
1925
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1926
|
+
# @param language_extensions_to_add [LanguageExtensionsList] The language
|
1927
|
+
# extensions to add.
|
1928
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1929
|
+
# to the HTTP request.
|
1930
|
+
#
|
1931
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1932
|
+
#
|
1933
|
+
def begin_add_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_add, custom_headers:nil)
|
1934
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1935
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1936
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
1937
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1938
|
+
fail ArgumentError, 'language_extensions_to_add is nil' if language_extensions_to_add.nil?
|
1939
|
+
|
1940
|
+
|
1941
|
+
request_headers = {}
|
1942
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1943
|
+
|
1944
|
+
# Set Headers
|
1945
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1946
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1947
|
+
|
1948
|
+
# Serialize Request
|
1949
|
+
request_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::LanguageExtensionsList.mapper()
|
1950
|
+
request_content = @client.serialize(request_mapper, language_extensions_to_add)
|
1951
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1952
|
+
|
1953
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions'
|
1954
|
+
|
1955
|
+
request_url = @base_url || @client.base_url
|
1956
|
+
|
1957
|
+
options = {
|
1958
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1959
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
|
1960
|
+
query_params: {'api-version' => @client.api_version},
|
1961
|
+
body: request_content,
|
1962
|
+
headers: request_headers.merge(custom_headers || {}),
|
1963
|
+
base_url: request_url
|
1964
|
+
}
|
1965
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1966
|
+
|
1967
|
+
promise = promise.then do |result|
|
1968
|
+
http_response = result.response
|
1969
|
+
status_code = http_response.status
|
1970
|
+
response_content = http_response.body
|
1971
|
+
unless status_code == 200 || status_code == 202
|
1972
|
+
error_model = JSON.load(response_content)
|
1973
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1974
|
+
end
|
1975
|
+
|
1976
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1977
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1978
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1979
|
+
|
1980
|
+
result
|
1981
|
+
end
|
1982
|
+
|
1983
|
+
promise.execute
|
1984
|
+
end
|
1985
|
+
|
1986
|
+
#
|
1987
|
+
# Remove a list of language extensions that can run within KQL queries.
|
1988
|
+
#
|
1989
|
+
# @param resource_group_name [String] The name of the resource group containing
|
1990
|
+
# the Kusto cluster.
|
1991
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
1992
|
+
# @param language_extensions_to_remove [LanguageExtensionsList] The language
|
1993
|
+
# extensions to remove.
|
1994
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1995
|
+
# will be added to the HTTP request.
|
1996
|
+
#
|
1997
|
+
#
|
1998
|
+
def begin_remove_language_extensions(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:nil)
|
1999
|
+
response = begin_remove_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:custom_headers).value!
|
2000
|
+
nil
|
2001
|
+
end
|
2002
|
+
|
2003
|
+
#
|
2004
|
+
# Remove a list of language extensions that can run within KQL queries.
|
2005
|
+
#
|
2006
|
+
# @param resource_group_name [String] The name of the resource group containing
|
2007
|
+
# the Kusto cluster.
|
2008
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
2009
|
+
# @param language_extensions_to_remove [LanguageExtensionsList] The language
|
2010
|
+
# extensions to remove.
|
2011
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2012
|
+
# will be added to the HTTP request.
|
2013
|
+
#
|
2014
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2015
|
+
#
|
2016
|
+
def begin_remove_language_extensions_with_http_info(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:nil)
|
2017
|
+
begin_remove_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:custom_headers).value!
|
2018
|
+
end
|
2019
|
+
|
2020
|
+
#
|
2021
|
+
# Remove a list of language extensions that can run within KQL queries.
|
2022
|
+
#
|
2023
|
+
# @param resource_group_name [String] The name of the resource group containing
|
2024
|
+
# the Kusto cluster.
|
2025
|
+
# @param cluster_name [String] The name of the Kusto cluster.
|
2026
|
+
# @param language_extensions_to_remove [LanguageExtensionsList] The language
|
2027
|
+
# extensions to remove.
|
2028
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2029
|
+
# to the HTTP request.
|
2030
|
+
#
|
2031
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2032
|
+
#
|
2033
|
+
def begin_remove_language_extensions_async(resource_group_name, cluster_name, language_extensions_to_remove, custom_headers:nil)
|
2034
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
2035
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
2036
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
2037
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
2038
|
+
fail ArgumentError, 'language_extensions_to_remove is nil' if language_extensions_to_remove.nil?
|
2039
|
+
|
2040
|
+
|
2041
|
+
request_headers = {}
|
2042
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2043
|
+
|
2044
|
+
# Set Headers
|
2045
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2046
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2047
|
+
|
2048
|
+
# Serialize Request
|
2049
|
+
request_mapper = Azure::Kusto::Mgmt::V2020_09_18::Models::LanguageExtensionsList.mapper()
|
2050
|
+
request_content = @client.serialize(request_mapper, language_extensions_to_remove)
|
2051
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
2052
|
+
|
2053
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions'
|
2054
|
+
|
2055
|
+
request_url = @base_url || @client.base_url
|
2056
|
+
|
2057
|
+
options = {
|
2058
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2059
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
|
2060
|
+
query_params: {'api-version' => @client.api_version},
|
2061
|
+
body: request_content,
|
2062
|
+
headers: request_headers.merge(custom_headers || {}),
|
2063
|
+
base_url: request_url
|
2064
|
+
}
|
2065
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2066
|
+
|
2067
|
+
promise = promise.then do |result|
|
2068
|
+
http_response = result.response
|
2069
|
+
status_code = http_response.status
|
2070
|
+
response_content = http_response.body
|
2071
|
+
unless status_code == 200 || status_code == 202
|
2072
|
+
error_model = JSON.load(response_content)
|
2073
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
2074
|
+
end
|
2075
|
+
|
2076
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2077
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2078
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2079
|
+
|
2080
|
+
result
|
2081
|
+
end
|
2082
|
+
|
2083
|
+
promise.execute
|
2084
|
+
end
|
2085
|
+
|
2086
|
+
end
|
2087
|
+
end
|