Class: Azure::Kusto::Mgmt::V2019_09_07::Clusters
- Inherits:
-
Object
- Object
- Azure::Kusto::Mgmt::V2019_09_07::Clusters
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb
Overview
The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases.
Instance Attribute Summary collapse
-
#client ⇒ KustoManagementClient
readonly
Reference to the KustoManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Create or update a Kusto cluster.
-
#begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Create or update a Kusto cluster.
-
#begin_create_or_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create or update a Kusto cluster.
-
#begin_delete(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Deletes a Kusto cluster.
-
#begin_delete_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a Kusto cluster.
-
#begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a Kusto cluster.
-
#begin_detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ Object
Detaches all followers of a database owned by this cluster.
-
#begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ Concurrent::Promise
Detaches all followers of a database owned by this cluster.
-
#begin_detach_follower_databases_with_http_info(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Detaches all followers of a database owned by this cluster.
-
#begin_start(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Starts a Kusto cluster.
-
#begin_start_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Starts a Kusto cluster.
-
#begin_start_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Starts a Kusto cluster.
-
#begin_stop(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Stops a Kusto cluster.
-
#begin_stop_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Stops a Kusto cluster.
-
#begin_stop_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Stops a Kusto cluster.
-
#begin_update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Update a Kusto cluster.
-
#begin_update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update a Kusto cluster.
-
#begin_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update a Kusto cluster.
-
#check_name_availability(location, cluster_name, custom_headers: nil) ⇒ CheckNameResult
Checks that the cluster name is valid and is not already in use.
-
#check_name_availability_async(location, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks that the cluster name is valid and is not already in use.
-
#check_name_availability_with_http_info(location, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks that the cluster name is valid and is not already in use.
-
#create_or_update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Create or update a Kusto cluster.
-
#create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster.
-
#delete(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Deletes a Kusto cluster.
-
#delete_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster.
-
#detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ Object
Detaches all followers of a database owned by this cluster.
-
#detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster.
-
#get(resource_group_name, cluster_name, custom_headers: nil) ⇒ Cluster
Gets a Kusto cluster.
-
#get_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a Kusto cluster.
-
#get_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a Kusto cluster.
-
#initialize(client) ⇒ Clusters
constructor
Creates and initializes a new instance of the Clusters class.
-
#list(custom_headers: nil) ⇒ ClusterListResult
Lists all Kusto clusters within a subscription.
-
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
Lists all Kusto clusters within a subscription.
-
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ ClusterListResult
Lists all Kusto clusters within a resource group.
-
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists all Kusto clusters within a resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all Kusto clusters within a resource group.
-
#list_follower_databases(resource_group_name, cluster_name, custom_headers: nil) ⇒ FollowerDatabaseListResult
Returns a list of databases that are owned by this cluster and were followed by another cluster.
-
#list_follower_databases_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Returns a list of databases that are owned by this cluster and were followed by another cluster.
-
#list_follower_databases_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns a list of databases that are owned by this cluster and were followed by another cluster.
-
#list_skus(custom_headers: nil) ⇒ SkuDescriptionList
Lists eligible SKUs for Kusto resource provider.
-
#list_skus_async(custom_headers: nil) ⇒ Concurrent::Promise
Lists eligible SKUs for Kusto resource provider.
-
#list_skus_by_resource(resource_group_name, cluster_name, custom_headers: nil) ⇒ ListResourceSkusResult
Returns the SKUs available for the provided resource.
-
#list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Returns the SKUs available for the provided resource.
-
#list_skus_by_resource_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns the SKUs available for the provided resource.
-
#list_skus_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists eligible SKUs for Kusto resource provider.
-
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all Kusto clusters within a subscription.
-
#start(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Starts a Kusto cluster.
-
#start_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster.
-
#stop(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Stops a Kusto cluster.
-
#stop_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster.
-
#update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Update a Kusto cluster.
-
#update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster.
Constructor Details
#initialize(client) ⇒ Clusters
Creates and initializes a new instance of the Clusters class.
19 20 21 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 19 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ KustoManagementClient (readonly)
Returns reference to the KustoManagementClient.
24 25 26 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 24 def client @client end |
Instance Method Details
#begin_create_or_update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Create or update a Kusto cluster.
the Kusto cluster. CreateOrUpdate operation. will be added to the HTTP request.
959 960 961 962 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 959 def begin_create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Create or update a Kusto cluster.
the Kusto cluster. CreateOrUpdate operation. to the HTTP request.
994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 994 def begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_or_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create or update a Kusto cluster.
the Kusto cluster. CreateOrUpdate operation. will be added to the HTTP request.
977 978 979 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 977 def begin_create_or_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Deletes a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
1208 1209 1210 1211 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1208 def begin_delete(resource_group_name, cluster_name, custom_headers:nil) response = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a Kusto cluster.
the Kusto cluster. to the HTTP request.
1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1239 def begin_delete_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
1224 1225 1226 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1224 def begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil) begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#begin_detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ Object
Detaches all followers of a database owned by this cluster.
the Kusto cluster. databases properties to remove. will be added to the HTTP request.
1468 1469 1470 1471 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1468 def begin_detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil) response = begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value! nil end |
#begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ Concurrent::Promise
Detaches all followers of a database owned by this cluster.
the Kusto cluster. databases properties to remove. to the HTTP request.
1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1503 def begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'follower_database_to_remove is nil' if follower_database_to_remove.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::FollowerDatabaseDefinition.mapper() request_content = @client.serialize(request_mapper, follower_database_to_remove) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_detach_follower_databases_with_http_info(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Detaches all followers of a database owned by this cluster.
the Kusto cluster. databases properties to remove. will be added to the HTTP request.
1486 1487 1488 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1486 def begin_detach_follower_databases_with_http_info(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil) begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value! end |
#begin_start(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Starts a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
1380 1381 1382 1383 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1380 def begin_start(resource_group_name, cluster_name, custom_headers:nil) response = begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! nil end |
#begin_start_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Starts a Kusto cluster.
the Kusto cluster. to the HTTP request.
1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1411 def begin_start_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_start_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Starts a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
1396 1397 1398 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1396 def begin_start_with_http_info(resource_group_name, cluster_name, custom_headers:nil) begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#begin_stop(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Stops a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
1294 1295 1296 1297 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1294 def begin_stop(resource_group_name, cluster_name, custom_headers:nil) response = begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! nil end |
#begin_stop_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Stops a Kusto cluster.
the Kusto cluster. to the HTTP request.
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1325 def begin_stop_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_stop_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Stops a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
1310 1311 1312 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1310 def begin_stop_with_http_info(resource_group_name, cluster_name, custom_headers:nil) begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#begin_update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Update a Kusto cluster.
the Kusto cluster. the Update operation. will be added to the HTTP request.
1080 1081 1082 1083 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1080 def begin_update(resource_group_name, cluster_name, parameters, custom_headers:nil) response = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update a Kusto cluster.
the Kusto cluster. the Update operation. to the HTTP request.
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1115 def begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ClusterUpdate.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update a Kusto cluster.
the Kusto cluster. the Update operation. will be added to the HTTP request.
1098 1099 1100 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 1098 def begin_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! end |
#check_name_availability(location, cluster_name, custom_headers: nil) ⇒ CheckNameResult
Checks that the cluster name is valid and is not already in use.
will be added to the HTTP request.
758 759 760 761 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 758 def check_name_availability(location, cluster_name, custom_headers:nil) response = check_name_availability_async(location, cluster_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_name_availability_async(location, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Checks that the cluster name is valid and is not already in use.
to the HTTP request.
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 787 def check_name_availability_async(location, cluster_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ClusterCheckNameRequest.mapper() request_content = @client.serialize(request_mapper, cluster_name) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'location' => location}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::CheckNameResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#check_name_availability_with_http_info(location, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks that the cluster name is valid and is not already in use.
will be added to the HTTP request.
773 774 775 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 773 def check_name_availability_with_http_info(location, cluster_name, custom_headers:nil) check_name_availability_async(location, cluster_name, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Create or update a Kusto cluster.
the Kusto cluster. CreateOrUpdate operation. will be added to the HTTP request.
136 137 138 139 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 136 def create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster. CreateOrUpdate operation. will be added to the HTTP request.
response.
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 153 def create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Deletes a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
228 229 230 231 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 228 def delete(resource_group_name, cluster_name, custom_headers:nil) response = delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster. will be added to the HTTP request.
response.
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 243 def delete_async(resource_group_name, cluster_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ Object
Detaches all followers of a database owned by this cluster.
the Kusto cluster. databases properties to remove. will be added to the HTTP request.
450 451 452 453 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 450 def detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil) response = detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value! nil end |
#detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster. databases properties to remove. will be added to the HTTP request.
response.
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 467 def detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil) # Send request promise = begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get(resource_group_name, cluster_name, custom_headers: nil) ⇒ Cluster
Gets a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
37 38 39 40 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 37 def get(resource_group_name, cluster_name, custom_headers:nil) response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a Kusto cluster.
the Kusto cluster. to the HTTP request.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 68 def get_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
53 54 55 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 53 def get_with_http_info(resource_group_name, cluster_name, custom_headers:nil) get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#list(custom_headers: nil) ⇒ ClusterListResult
Lists all Kusto clusters within a subscription.
will be added to the HTTP request.
584 585 586 587 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 584 def list(custom_headers:nil) response = list_async(custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
Lists all Kusto clusters within a subscription.
to the HTTP request.
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 609 def list_async(custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ClusterListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ ClusterListResult
Lists all Kusto clusters within a resource group.
the Kusto cluster. will be added to the HTTP request.
493 494 495 496 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 493 def list_by_resource_group(resource_group_name, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists all Kusto clusters within a resource group.
the Kusto cluster. to the HTTP request.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 522 def list_by_resource_group_async(resource_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ClusterListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all Kusto clusters within a resource group.
the Kusto cluster. will be added to the HTTP request.
508 509 510 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 508 def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! end |
#list_follower_databases(resource_group_name, cluster_name, custom_headers: nil) ⇒ FollowerDatabaseListResult
Returns a list of databases that are owned by this cluster and were followed by another cluster.
the Kusto cluster. will be added to the HTTP request.
351 352 353 354 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 351 def list_follower_databases(resource_group_name, cluster_name, custom_headers:nil) response = list_follower_databases_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_follower_databases_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Returns a list of databases that are owned by this cluster and were followed by another cluster.
the Kusto cluster. to the HTTP request.
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 384 def list_follower_databases_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::FollowerDatabaseListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_follower_databases_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns a list of databases that are owned by this cluster and were followed by another cluster.
the Kusto cluster. will be added to the HTTP request.
368 369 370 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 368 def list_follower_databases_with_http_info(resource_group_name, cluster_name, custom_headers:nil) list_follower_databases_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#list_skus(custom_headers: nil) ⇒ SkuDescriptionList
Lists eligible SKUs for Kusto resource provider.
will be added to the HTTP request.
670 671 672 673 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 670 def list_skus(custom_headers:nil) response = list_skus_async(custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_skus_async(custom_headers: nil) ⇒ Concurrent::Promise
Lists eligible SKUs for Kusto resource provider.
to the HTTP request.
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 695 def list_skus_async(custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::SkuDescriptionList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_skus_by_resource(resource_group_name, cluster_name, custom_headers: nil) ⇒ ListResourceSkusResult
Returns the SKUs available for the provided resource.
the Kusto cluster. will be added to the HTTP request.
860 861 862 863 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 860 def list_skus_by_resource(resource_group_name, cluster_name, custom_headers:nil) response = list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Returns the SKUs available for the provided resource.
the Kusto cluster. to the HTTP request.
891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 891 def list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ListResourceSkusResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_skus_by_resource_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Returns the SKUs available for the provided resource.
the Kusto cluster. will be added to the HTTP request.
876 877 878 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 876 def list_skus_by_resource_with_http_info(resource_group_name, cluster_name, custom_headers:nil) list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#list_skus_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists eligible SKUs for Kusto resource provider.
will be added to the HTTP request.
683 684 685 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 683 def list_skus_with_http_info(custom_headers:nil) list_skus_async(custom_headers:custom_headers).value! end |
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all Kusto clusters within a subscription.
will be added to the HTTP request.
597 598 599 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 597 def list_with_http_info(custom_headers:nil) list_async(custom_headers:custom_headers).value! end |
#start(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Starts a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
308 309 310 311 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 308 def start(resource_group_name, cluster_name, custom_headers:nil) response = start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! nil end |
#start_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster. will be added to the HTTP request.
response.
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 323 def start_async(resource_group_name, cluster_name, custom_headers:nil) # Send request promise = begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#stop(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Stops a Kusto cluster.
the Kusto cluster. will be added to the HTTP request.
268 269 270 271 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 268 def stop(resource_group_name, cluster_name, custom_headers:nil) response = stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! nil end |
#stop_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster. will be added to the HTTP request.
response.
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 283 def stop_async(resource_group_name, cluster_name, custom_headers:nil) # Send request promise = begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Update a Kusto cluster.
the Kusto cluster. the Update operation. will be added to the HTTP request.
184 185 186 187 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 184 def update(resource_group_name, cluster_name, parameters, custom_headers:nil) response = update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
the Kusto cluster. the Update operation. will be added to the HTTP request.
response.
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb', line 201 def update_async(resource_group_name, cluster_name, parameters, custom_headers:nil) # Send request promise = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |