Class: Azure::Kusto::Mgmt::V2019_11_09::Clusters

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2019-11-09/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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Clusters

Creates and initializes a new instance of the Clusters class.

Parameters:

  • client

    service class for accessing basic functionality.



19
20
21
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 19

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientKustoManagementClient (readonly)

Returns reference to the KustoManagementClient.

Returns:



24
25
26
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (Cluster)

    The Kusto cluster parameters supplied to the

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

    A hash of custom headers that

Returns:

  • (Cluster)

    operation results.



1004
1005
1006
1007
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1004

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (Cluster)

    The Kusto cluster parameters supplied to the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1039

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_11_09::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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 201
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    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_11_09::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.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Kusto::Mgmt::V2019_11_09::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.message, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (Cluster)

    The Kusto cluster parameters supplied to the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1022
1023
1024
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1022

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that



1253
1254
1255
1256
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1253

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1284

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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1269
1270
1271
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1269

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • follower_database_to_remove (FollowerDatabaseDefinition)

    The follower

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

    A hash of custom headers that



1513
1514
1515
1516
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1513

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • follower_database_to_remove (FollowerDatabaseDefinition)

    The follower

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1548

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_11_09::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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • follower_database_to_remove (FollowerDatabaseDefinition)

    The follower

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1531
1532
1533
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1531

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_diagnose_virtual_network(resource_group_name, cluster_name, custom_headers: nil) ⇒ DiagnoseVirtualNetworkResult

Diagnoses network connectivity status for external resources on which the service is dependent on.

the Kusto cluster. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (DiagnoseVirtualNetworkResult)

    operation results.



1613
1614
1615
1616
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1613

def begin_diagnose_virtual_network(resource_group_name, cluster_name, custom_headers:nil)
  response = begin_diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise

Diagnoses network connectivity status for external resources on which the service is dependent on.

the Kusto cluster. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1646

def begin_diagnose_virtual_network_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}/diagnoseVirtualNetwork'

  request_url = @base_url || @client.base_url

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.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_11_09::Models::DiagnoseVirtualNetworkResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_diagnose_virtual_network_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Diagnoses network connectivity status for external resources on which the service is dependent on.

the Kusto cluster. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1630
1631
1632
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1630

def begin_diagnose_virtual_network_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
  begin_diagnose_virtual_network_async(resource_group_name, cluster_name, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that



1425
1426
1427
1428
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1425

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1456

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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1441
1442
1443
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1441

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that



1339
1340
1341
1342
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1339

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1370

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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1355
1356
1357
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1355

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (ClusterUpdate)

    The Kusto cluster parameters supplied to

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

    A hash of custom headers that

Returns:

  • (Cluster)

    operation results.



1125
1126
1127
1128
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1125

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (ClusterUpdate)

    The Kusto cluster parameters supplied to

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1160

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_11_09::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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 201 || 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_11_09::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.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Kusto::Mgmt::V2019_11_09::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.message, 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_11_09::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.message, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (ClusterUpdate)

    The Kusto cluster parameters supplied to

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1143
1144
1145
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 1143

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.

Parameters:

  • location (String)

    Azure location.

  • cluster_name (ClusterCheckNameRequest)

    The name of the cluster.

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

    A hash of custom headers that

Returns:

  • (CheckNameResult)

    operation results.



803
804
805
806
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 803

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.

Parameters:

  • location (String)

    Azure location.

  • cluster_name (ClusterCheckNameRequest)

    The name of the cluster.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 832

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_11_09::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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    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_11_09::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.message, 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.

Parameters:

  • location (String)

    Azure location.

  • cluster_name (ClusterCheckNameRequest)

    The name of the cluster.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



818
819
820
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 818

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (Cluster)

    The Kusto cluster parameters supplied to the

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

    A hash of custom headers that

Returns:

  • (Cluster)

    operation results.



136
137
138
139
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (Cluster)

    The Kusto cluster parameters supplied to the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/2019-11-09/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_11_09::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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that



228
229
230
231
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • follower_database_to_remove (FollowerDatabaseDefinition)

    The follower

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

    A hash of custom headers that



450
451
452
453
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • follower_database_to_remove (FollowerDatabaseDefinition)

    The follower

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# File 'lib/2019-11-09/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

#diagnose_virtual_network(resource_group_name, cluster_name, custom_headers: nil) ⇒ DiagnoseVirtualNetworkResult

Diagnoses network connectivity status for external resources on which the service is dependent on.

the Kusto cluster. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (DiagnoseVirtualNetworkResult)

    operation results.



495
496
497
498
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 495

def diagnose_virtual_network(resource_group_name, cluster_name, custom_headers:nil)
  response = diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise

the Kusto cluster. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 510

def diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:nil)
  # Send request
  promise = begin_diagnose_virtual_network_async(resource_group_name, cluster_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Kusto::Mgmt::V2019_11_09::Models::DiagnoseVirtualNetworkResult.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
  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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (Cluster)

    operation results.



37
38
39
40
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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-11-09/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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    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_11_09::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.message, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



53
54
55
# File 'lib/2019-11-09/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.

Parameters:

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

    A hash of custom headers that

Returns:

  • (ClusterListResult)

    operation results.



629
630
631
632
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 629

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.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 654

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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    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_11_09::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.message, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

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

    A hash of custom headers that

Returns:

  • (ClusterListResult)

    operation results.



538
539
540
541
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 538

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 567

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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    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_11_09::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.message, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



553
554
555
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 553

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (FollowerDatabaseListResult)

    operation results.



351
352
353
354
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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-11-09/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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    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_11_09::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.message, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



368
369
370
# File 'lib/2019-11-09/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.

Parameters:

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

    A hash of custom headers that

Returns:

  • (SkuDescriptionList)

    operation results.



715
716
717
718
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 715

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.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 740

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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    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_11_09::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.message, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (ListResourceSkusResult)

    operation results.



905
906
907
908
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 905

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 936

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

  options = {
      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, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    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_11_09::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.message, 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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



921
922
923
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 921

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.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



728
729
730
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 728

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.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



642
643
644
# File 'lib/2019-11-09/generated/azure_mgmt_kusto/clusters.rb', line 642

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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that



308
309
310
311
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that



268
269
270
271
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (ClusterUpdate)

    The Kusto cluster parameters supplied to

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

    A hash of custom headers that

Returns:

  • (Cluster)

    operation results.



184
185
186
187
# File 'lib/2019-11-09/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.

Parameters:

  • resource_group_name (String)

    The name of the resource group containing

  • cluster_name (String)

    The name of the Kusto cluster.

  • parameters (ClusterUpdate)

    The Kusto cluster parameters supplied to

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/2019-11-09/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_11_09::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