azure_mgmt_kusto 0.17.2 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/clusters.rb +22 -0
  3. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb +18 -0
  4. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/event_hub_connections.rb +12 -0
  5. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
  6. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/operations.rb +4 -0
  7. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/clusters.rb +22 -0
  8. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/databases.rb +18 -0
  9. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/event_hub_connections.rb +12 -0
  10. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
  11. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/operations.rb +4 -0
  12. data/lib/2019-01-21/generated/azure_mgmt_kusto.rb +16 -13
  13. data/lib/2019-01-21/generated/azure_mgmt_kusto/clusters.rb +22 -0
  14. data/lib/2019-01-21/generated/azure_mgmt_kusto/data_connections.rb +127 -0
  15. data/lib/2019-01-21/generated/azure_mgmt_kusto/databases.rb +18 -0
  16. data/lib/2019-01-21/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
  17. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_capacity.rb +2 -2
  18. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +1 -1
  19. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_sku.rb +9 -6
  20. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_sku_name.rb +12 -7
  21. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_sku_tier.rb +16 -0
  22. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/check_name_result.rb +12 -0
  23. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/cluster.rb +0 -1
  24. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/data_connection_check_name_request.rb +62 -0
  25. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/reason.rb +16 -0
  26. data/lib/2019-01-21/generated/azure_mgmt_kusto/operations.rb +4 -0
  27. data/lib/2019-05-15/generated/azure_mgmt_kusto.rb +79 -0
  28. data/lib/2019-05-15/generated/azure_mgmt_kusto/clusters.rb +1303 -0
  29. data/lib/2019-05-15/generated/azure_mgmt_kusto/data_connections.rb +963 -0
  30. data/lib/2019-05-15/generated/azure_mgmt_kusto/databases.rb +1149 -0
  31. data/lib/2019-05-15/generated/azure_mgmt_kusto/kusto_management_client.rb +145 -0
  32. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_capacity.rb +80 -0
  33. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +75 -0
  34. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +70 -0
  35. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_scale_type.rb +17 -0
  36. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_sku.rb +74 -0
  37. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_sku_name.rb +26 -0
  38. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_sku_tier.rb +16 -0
  39. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/check_name_result.rb +82 -0
  40. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/cluster.rb +238 -0
  41. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +60 -0
  42. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/cluster_list_result.rb +55 -0
  43. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/cluster_update.rb +225 -0
  44. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection.rb +82 -0
  45. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_check_name_request.rb +62 -0
  46. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_list_result.rb +57 -0
  47. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation.rb +60 -0
  48. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation_list_result.rb +56 -0
  49. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation_result.rb +47 -0
  50. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_format.rb +25 -0
  51. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database.rb +123 -0
  52. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_check_name_request.rb +61 -0
  53. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_list_result.rb +55 -0
  54. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal.rb +117 -0
  55. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +56 -0
  56. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +56 -0
  57. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal_role.rb +20 -0
  58. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal_type.rb +17 -0
  59. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_statistics.rb +47 -0
  60. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_update.rb +123 -0
  61. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/event_grid_data_connection.rb +158 -0
  62. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/event_hub_data_connection.rb +165 -0
  63. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/iot_hub_data_connection.rb +176 -0
  64. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +56 -0
  65. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/operation.rb +82 -0
  66. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/operation_display.rb +80 -0
  67. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/operation_list_result.rb +98 -0
  68. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/optimized_autoscale.rb +80 -0
  69. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/provisioning_state.rb +20 -0
  70. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/proxy_resource.rb +63 -0
  71. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/reason.rb +16 -0
  72. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/resource.rb +83 -0
  73. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/sku_description.rb +132 -0
  74. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/sku_description_list.rb +56 -0
  75. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/sku_location_info_item.rb +65 -0
  76. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/state.rb +23 -0
  77. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/tracked_resource.rb +92 -0
  78. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +46 -0
  79. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/virtual_network_configuration.rb +69 -0
  80. data/lib/2019-05-15/generated/azure_mgmt_kusto/module_definition.rb +9 -0
  81. data/lib/2019-05-15/generated/azure_mgmt_kusto/operations.rb +221 -0
  82. data/lib/azure_mgmt_kusto.rb +2 -1
  83. data/lib/profiles/latest/modules/kusto_profile_module.rb +133 -101
  84. data/lib/version.rb +1 -1
  85. metadata +63 -5
@@ -18,7 +18,7 @@ module Azure::Kusto::Mgmt::V2019_01_21
18
18
  # @return [AzureSku] The SKU details.
19
19
  attr_accessor :sku
20
20
 
21
- # @return [AzureCapacity] The SKU capacity.
21
+ # @return [AzureCapacity] The number of instances of the cluster.
22
22
  attr_accessor :capacity
23
23
 
24
24
 
@@ -12,14 +12,19 @@ module Azure::Kusto::Mgmt::V2019_01_21
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [AzureSkuName] SKU name. Possible values include: 'D13_v2',
16
- # 'D14_v2', 'L8', 'L16', 'D11_v2', 'D12_v2', 'L4'
15
+ # @return [AzureSkuName] SKU name. Possible values include:
16
+ # 'Standard_DS13_v2+1TB_PS', 'Standard_DS13_v2+2TB_PS',
17
+ # 'Standard_DS14_v2+3TB_PS', 'Standard_DS14_v2+4TB_PS',
18
+ # 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_L8s', 'Standard_L16s',
19
+ # 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_L4s', 'Dev(No
20
+ # SLA)_Standard_D11_v2'
17
21
  attr_accessor :name
18
22
 
19
- # @return [Integer] SKU capacity.
23
+ # @return [Integer] The number of instances of the cluster.
20
24
  attr_accessor :capacity
21
25
 
22
- # @return [String] SKU tier. Default value: 'Standard' .
26
+ # @return [AzureSkuTier] SKU tier. Possible values include: 'Basic',
27
+ # 'Standard'
23
28
  attr_accessor :tier
24
29
 
25
30
 
@@ -55,9 +60,7 @@ module Azure::Kusto::Mgmt::V2019_01_21
55
60
  tier: {
56
61
  client_side_validation: true,
57
62
  required: true,
58
- is_constant: true,
59
63
  serialized_name: 'tier',
60
- default_value: 'Standard',
61
64
  type: {
62
65
  name: 'String'
63
66
  }
@@ -9,13 +9,18 @@ module Azure::Kusto::Mgmt::V2019_01_21
9
9
  # Defines values for AzureSkuName
10
10
  #
11
11
  module AzureSkuName
12
- D13V2 = "D13_v2"
13
- D14V2 = "D14_v2"
14
- L8 = "L8"
15
- L16 = "L16"
16
- D11V2 = "D11_v2"
17
- D12V2 = "D12_v2"
18
- L4 = "L4"
12
+ StandardDS13V21TBPS = "Standard_DS13_v2+1TB_PS"
13
+ StandardDS13V22TBPS = "Standard_DS13_v2+2TB_PS"
14
+ StandardDS14V23TBPS = "Standard_DS14_v2+3TB_PS"
15
+ StandardDS14V24TBPS = "Standard_DS14_v2+4TB_PS"
16
+ StandardD13V2 = "Standard_D13_v2"
17
+ StandardD14V2 = "Standard_D14_v2"
18
+ StandardL8s = "Standard_L8s"
19
+ StandardL16s = "Standard_L16s"
20
+ StandardD11V2 = "Standard_D11_v2"
21
+ StandardD12V2 = "Standard_D12_v2"
22
+ StandardL4s = "Standard_L4s"
23
+ DevNoSLAStandardD11V2 = "Dev(No SLA)_Standard_D11_v2"
19
24
  end
20
25
  end
21
26
  end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Kusto::Mgmt::V2019_01_21
7
+ module Models
8
+ #
9
+ # Defines values for AzureSkuTier
10
+ #
11
+ module AzureSkuTier
12
+ Basic = "Basic"
13
+ Standard = "Standard"
14
+ end
15
+ end
16
+ end
@@ -23,6 +23,10 @@ module Azure::Kusto::Mgmt::V2019_01_21
23
23
  # conflict, or a description of the naming rules that are violated.
24
24
  attr_accessor :message
25
25
 
26
+ # @return [Reason] Message providing the reason why the given name is
27
+ # invalid. Possible values include: 'Invalid', 'AlreadyExists'
28
+ attr_accessor :reason
29
+
26
30
 
27
31
  #
28
32
  # Mapper for CheckNameResult class as Ruby Hash.
@@ -60,6 +64,14 @@ module Azure::Kusto::Mgmt::V2019_01_21
60
64
  type: {
61
65
  name: 'String'
62
66
  }
67
+ },
68
+ reason: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ serialized_name: 'reason',
72
+ type: {
73
+ name: 'String'
74
+ }
63
75
  }
64
76
  }
65
77
  }
@@ -103,7 +103,6 @@ module Azure::Kusto::Mgmt::V2019_01_21
103
103
  client_side_validation: true,
104
104
  required: true,
105
105
  serialized_name: 'sku',
106
- default_value: {},
107
106
  type: {
108
107
  name: 'Composite',
109
108
  class_name: 'AzureSku'
@@ -0,0 +1,62 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Kusto::Mgmt::V2019_01_21
7
+ module Models
8
+ #
9
+ # The result returned from a data connections check name availability
10
+ # request.
11
+ #
12
+ class DataConnectionCheckNameRequest
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] Data Connection name.
17
+ attr_accessor :name
18
+
19
+ # @return [String] The type of resource,
20
+ # Microsoft.Kusto/clusters/databases/dataConnections. Default value:
21
+ # 'Microsoft.Kusto/clusters/databases/dataConnections' .
22
+ attr_accessor :type
23
+
24
+
25
+ #
26
+ # Mapper for DataConnectionCheckNameRequest class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ client_side_validation: true,
32
+ required: false,
33
+ serialized_name: 'DataConnectionCheckNameRequest',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'DataConnectionCheckNameRequest',
37
+ model_properties: {
38
+ name: {
39
+ client_side_validation: true,
40
+ required: true,
41
+ serialized_name: 'name',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ type: {
47
+ client_side_validation: true,
48
+ required: true,
49
+ is_constant: true,
50
+ serialized_name: 'type',
51
+ default_value: 'Microsoft.Kusto/clusters/databases/dataConnections',
52
+ type: {
53
+ name: 'String'
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Kusto::Mgmt::V2019_01_21
7
+ module Models
8
+ #
9
+ # Defines values for Reason
10
+ #
11
+ module Reason
12
+ Invalid = "Invalid"
13
+ AlreadyExists = "AlreadyExists"
14
+ end
15
+ end
16
+ end
@@ -88,6 +88,8 @@ module Azure::Kusto::Mgmt::V2019_01_21
88
88
  end
89
89
 
90
90
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
91
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
92
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
91
93
  # Deserialize Response
92
94
  if status_code == 200
93
95
  begin
@@ -176,6 +178,8 @@ module Azure::Kusto::Mgmt::V2019_01_21
176
178
  end
177
179
 
178
180
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
181
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
182
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
179
183
  # Deserialize Response
180
184
  if status_code == 200
181
185
  begin
@@ -0,0 +1,79 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2019-05-15/generated/azure_mgmt_kusto/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Kusto::Mgmt::V2019_05_15
23
+ autoload :Clusters, '2019-05-15/generated/azure_mgmt_kusto/clusters.rb'
24
+ autoload :Databases, '2019-05-15/generated/azure_mgmt_kusto/databases.rb'
25
+ autoload :DataConnections, '2019-05-15/generated/azure_mgmt_kusto/data_connections.rb'
26
+ autoload :Operations, '2019-05-15/generated/azure_mgmt_kusto/operations.rb'
27
+ autoload :KustoManagementClient, '2019-05-15/generated/azure_mgmt_kusto/kusto_management_client.rb'
28
+
29
+ module Models
30
+ autoload :DatabasePrincipalListRequest, '2019-05-15/generated/azure_mgmt_kusto/models/database_principal_list_request.rb'
31
+ autoload :TrustedExternalTenant, '2019-05-15/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb'
32
+ autoload :DataConnectionValidation, '2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation.rb'
33
+ autoload :VirtualNetworkConfiguration, '2019-05-15/generated/azure_mgmt_kusto/models/virtual_network_configuration.rb'
34
+ autoload :DataConnectionValidationResult, '2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation_result.rb'
35
+ autoload :AzureCapacity, '2019-05-15/generated/azure_mgmt_kusto/models/azure_capacity.rb'
36
+ autoload :OptimizedAutoscale, '2019-05-15/generated/azure_mgmt_kusto/models/optimized_autoscale.rb'
37
+ autoload :SkuLocationInfoItem, '2019-05-15/generated/azure_mgmt_kusto/models/sku_location_info_item.rb'
38
+ autoload :AzureSku, '2019-05-15/generated/azure_mgmt_kusto/models/azure_sku.rb'
39
+ autoload :SkuDescriptionList, '2019-05-15/generated/azure_mgmt_kusto/models/sku_description_list.rb'
40
+ autoload :Resource, '2019-05-15/generated/azure_mgmt_kusto/models/resource.rb'
41
+ autoload :SkuDescription, '2019-05-15/generated/azure_mgmt_kusto/models/sku_description.rb'
42
+ autoload :OperationDisplay, '2019-05-15/generated/azure_mgmt_kusto/models/operation_display.rb'
43
+ autoload :DatabaseStatistics, '2019-05-15/generated/azure_mgmt_kusto/models/database_statistics.rb'
44
+ autoload :CheckNameResult, '2019-05-15/generated/azure_mgmt_kusto/models/check_name_result.rb'
45
+ autoload :DatabaseCheckNameRequest, '2019-05-15/generated/azure_mgmt_kusto/models/database_check_name_request.rb'
46
+ autoload :ClusterListResult, '2019-05-15/generated/azure_mgmt_kusto/models/cluster_list_result.rb'
47
+ autoload :OperationListResult, '2019-05-15/generated/azure_mgmt_kusto/models/operation_list_result.rb'
48
+ autoload :DatabasePrincipalListResult, '2019-05-15/generated/azure_mgmt_kusto/models/database_principal_list_result.rb'
49
+ autoload :Operation, '2019-05-15/generated/azure_mgmt_kusto/models/operation.rb'
50
+ autoload :AzureResourceSku, '2019-05-15/generated/azure_mgmt_kusto/models/azure_resource_sku.rb'
51
+ autoload :DataConnectionValidationListResult, '2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation_list_result.rb'
52
+ autoload :DatabasePrincipal, '2019-05-15/generated/azure_mgmt_kusto/models/database_principal.rb'
53
+ autoload :DataConnectionListResult, '2019-05-15/generated/azure_mgmt_kusto/models/data_connection_list_result.rb'
54
+ autoload :DataConnectionCheckNameRequest, '2019-05-15/generated/azure_mgmt_kusto/models/data_connection_check_name_request.rb'
55
+ autoload :DatabaseListResult, '2019-05-15/generated/azure_mgmt_kusto/models/database_list_result.rb'
56
+ autoload :ListResourceSkusResult, '2019-05-15/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb'
57
+ autoload :ClusterCheckNameRequest, '2019-05-15/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb'
58
+ autoload :Cluster, '2019-05-15/generated/azure_mgmt_kusto/models/cluster.rb'
59
+ autoload :ClusterUpdate, '2019-05-15/generated/azure_mgmt_kusto/models/cluster_update.rb'
60
+ autoload :Database, '2019-05-15/generated/azure_mgmt_kusto/models/database.rb'
61
+ autoload :DatabaseUpdate, '2019-05-15/generated/azure_mgmt_kusto/models/database_update.rb'
62
+ autoload :DataConnection, '2019-05-15/generated/azure_mgmt_kusto/models/data_connection.rb'
63
+ autoload :EventHubDataConnection, '2019-05-15/generated/azure_mgmt_kusto/models/event_hub_data_connection.rb'
64
+ autoload :IotHubDataConnection, '2019-05-15/generated/azure_mgmt_kusto/models/iot_hub_data_connection.rb'
65
+ autoload :EventGridDataConnection, '2019-05-15/generated/azure_mgmt_kusto/models/event_grid_data_connection.rb'
66
+ autoload :TrackedResource, '2019-05-15/generated/azure_mgmt_kusto/models/tracked_resource.rb'
67
+ autoload :AzureEntityResource, '2019-05-15/generated/azure_mgmt_kusto/models/azure_entity_resource.rb'
68
+ autoload :ProxyResource, '2019-05-15/generated/azure_mgmt_kusto/models/proxy_resource.rb'
69
+ autoload :State, '2019-05-15/generated/azure_mgmt_kusto/models/state.rb'
70
+ autoload :ProvisioningState, '2019-05-15/generated/azure_mgmt_kusto/models/provisioning_state.rb'
71
+ autoload :AzureSkuName, '2019-05-15/generated/azure_mgmt_kusto/models/azure_sku_name.rb'
72
+ autoload :AzureSkuTier, '2019-05-15/generated/azure_mgmt_kusto/models/azure_sku_tier.rb'
73
+ autoload :AzureScaleType, '2019-05-15/generated/azure_mgmt_kusto/models/azure_scale_type.rb'
74
+ autoload :DataFormat, '2019-05-15/generated/azure_mgmt_kusto/models/data_format.rb'
75
+ autoload :DatabasePrincipalRole, '2019-05-15/generated/azure_mgmt_kusto/models/database_principal_role.rb'
76
+ autoload :DatabasePrincipalType, '2019-05-15/generated/azure_mgmt_kusto/models/database_principal_type.rb'
77
+ autoload :Reason, '2019-05-15/generated/azure_mgmt_kusto/models/reason.rb'
78
+ end
79
+ end
@@ -0,0 +1,1303 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Kusto::Mgmt::V2019_05_15
7
+ #
8
+ # The Azure Kusto management API provides a RESTful set of web services that
9
+ # interact with Azure Kusto services to manage your clusters and databases.
10
+ # The API enables you to create, update, and delete clusters and databases.
11
+ #
12
+ class Clusters
13
+ include MsRestAzure
14
+
15
+ #
16
+ # Creates and initializes a new instance of the Clusters class.
17
+ # @param client service class for accessing basic functionality.
18
+ #
19
+ def initialize(client)
20
+ @client = client
21
+ end
22
+
23
+ # @return [KustoManagementClient] reference to the KustoManagementClient
24
+ attr_reader :client
25
+
26
+ #
27
+ # Gets a Kusto cluster.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group containing
30
+ # the Kusto cluster.
31
+ # @param cluster_name [String] The name of the Kusto cluster.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Cluster] operation results.
36
+ #
37
+ def get(resource_group_name, cluster_name, custom_headers:nil)
38
+ response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Gets a Kusto cluster.
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group containing
46
+ # the Kusto cluster.
47
+ # @param cluster_name [String] The name of the Kusto cluster.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def get_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
54
+ get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Gets a Kusto cluster.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group containing
61
+ # the Kusto cluster.
62
+ # @param cluster_name [String] The name of the Kusto cluster.
63
+ # @param [Hash{String => String}] A hash of custom headers that will be added
64
+ # to the HTTP request.
65
+ #
66
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
67
+ #
68
+ def get_async(resource_group_name, cluster_name, custom_headers:nil)
69
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
70
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
71
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
72
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
73
+
74
+
75
+ request_headers = {}
76
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
77
+
78
+ # Set Headers
79
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
80
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
81
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
82
+
83
+ request_url = @base_url || @client.base_url
84
+
85
+ options = {
86
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
88
+ query_params: {'api-version' => @client.api_version},
89
+ headers: request_headers.merge(custom_headers || {}),
90
+ base_url: request_url
91
+ }
92
+ promise = @client.make_request_async(:get, path_template, options)
93
+
94
+ promise = promise.then do |result|
95
+ http_response = result.response
96
+ status_code = http_response.status
97
+ response_content = http_response.body
98
+ unless status_code == 200
99
+ error_model = JSON.load(response_content)
100
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
101
+ end
102
+
103
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
104
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
105
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
106
+ # Deserialize Response
107
+ if status_code == 200
108
+ begin
109
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::Cluster.mapper()
111
+ result.body = @client.deserialize(result_mapper, parsed_response)
112
+ rescue Exception => e
113
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
114
+ end
115
+ end
116
+
117
+ result
118
+ end
119
+
120
+ promise.execute
121
+ end
122
+
123
+ #
124
+ # Create or update a Kusto cluster.
125
+ #
126
+ # @param resource_group_name [String] The name of the resource group containing
127
+ # the Kusto cluster.
128
+ # @param cluster_name [String] The name of the Kusto cluster.
129
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
130
+ # CreateOrUpdate operation.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [Cluster] operation results.
135
+ #
136
+ def create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
137
+ response = create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
138
+ response.body unless response.nil?
139
+ end
140
+
141
+ #
142
+ # @param resource_group_name [String] The name of the resource group containing
143
+ # the Kusto cluster.
144
+ # @param cluster_name [String] The name of the Kusto cluster.
145
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
146
+ # CreateOrUpdate operation.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [Concurrent::Promise] promise which provides async access to http
151
+ # response.
152
+ #
153
+ def create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
154
+ # Send request
155
+ promise = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
156
+
157
+ promise = promise.then do |response|
158
+ # Defining deserialization method.
159
+ deserialize_method = lambda do |parsed_response|
160
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::Cluster.mapper()
161
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
162
+ end
163
+
164
+ # Waiting for response.
165
+ @client.get_long_running_operation_result(response, deserialize_method)
166
+ end
167
+
168
+ promise
169
+ end
170
+
171
+ #
172
+ # Update a Kusto cluster.
173
+ #
174
+ # @param resource_group_name [String] The name of the resource group containing
175
+ # the Kusto cluster.
176
+ # @param cluster_name [String] The name of the Kusto cluster.
177
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
178
+ # the Update operation.
179
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
180
+ # will be added to the HTTP request.
181
+ #
182
+ # @return [Cluster] operation results.
183
+ #
184
+ def update(resource_group_name, cluster_name, parameters, custom_headers:nil)
185
+ response = update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
186
+ response.body unless response.nil?
187
+ end
188
+
189
+ #
190
+ # @param resource_group_name [String] The name of the resource group containing
191
+ # the Kusto cluster.
192
+ # @param cluster_name [String] The name of the Kusto cluster.
193
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
194
+ # the Update operation.
195
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
196
+ # will be added to the HTTP request.
197
+ #
198
+ # @return [Concurrent::Promise] promise which provides async access to http
199
+ # response.
200
+ #
201
+ def update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
202
+ # Send request
203
+ promise = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
204
+
205
+ promise = promise.then do |response|
206
+ # Defining deserialization method.
207
+ deserialize_method = lambda do |parsed_response|
208
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::Cluster.mapper()
209
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
210
+ end
211
+
212
+ # Waiting for response.
213
+ @client.get_long_running_operation_result(response, deserialize_method)
214
+ end
215
+
216
+ promise
217
+ end
218
+
219
+ #
220
+ # Deletes a Kusto cluster.
221
+ #
222
+ # @param resource_group_name [String] The name of the resource group containing
223
+ # the Kusto cluster.
224
+ # @param cluster_name [String] The name of the Kusto cluster.
225
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
226
+ # will be added to the HTTP request.
227
+ #
228
+ def delete(resource_group_name, cluster_name, custom_headers:nil)
229
+ response = delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
230
+ nil
231
+ end
232
+
233
+ #
234
+ # @param resource_group_name [String] The name of the resource group containing
235
+ # the Kusto cluster.
236
+ # @param cluster_name [String] The name of the Kusto cluster.
237
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
238
+ # will be added to the HTTP request.
239
+ #
240
+ # @return [Concurrent::Promise] promise which provides async access to http
241
+ # response.
242
+ #
243
+ def delete_async(resource_group_name, cluster_name, custom_headers:nil)
244
+ # Send request
245
+ promise = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers)
246
+
247
+ promise = promise.then do |response|
248
+ # Defining deserialization method.
249
+ deserialize_method = lambda do |parsed_response|
250
+ end
251
+
252
+ # Waiting for response.
253
+ @client.get_long_running_operation_result(response, deserialize_method)
254
+ end
255
+
256
+ promise
257
+ end
258
+
259
+ #
260
+ # Stops a Kusto cluster.
261
+ #
262
+ # @param resource_group_name [String] The name of the resource group containing
263
+ # the Kusto cluster.
264
+ # @param cluster_name [String] The name of the Kusto cluster.
265
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
266
+ # will be added to the HTTP request.
267
+ #
268
+ def stop(resource_group_name, cluster_name, custom_headers:nil)
269
+ response = stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
270
+ nil
271
+ end
272
+
273
+ #
274
+ # @param resource_group_name [String] The name of the resource group containing
275
+ # the Kusto cluster.
276
+ # @param cluster_name [String] The name of the Kusto cluster.
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ # @return [Concurrent::Promise] promise which provides async access to http
281
+ # response.
282
+ #
283
+ def stop_async(resource_group_name, cluster_name, custom_headers:nil)
284
+ # Send request
285
+ promise = begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers)
286
+
287
+ promise = promise.then do |response|
288
+ # Defining deserialization method.
289
+ deserialize_method = lambda do |parsed_response|
290
+ end
291
+
292
+ # Waiting for response.
293
+ @client.get_long_running_operation_result(response, deserialize_method)
294
+ end
295
+
296
+ promise
297
+ end
298
+
299
+ #
300
+ # Starts a Kusto cluster.
301
+ #
302
+ # @param resource_group_name [String] The name of the resource group containing
303
+ # the Kusto cluster.
304
+ # @param cluster_name [String] The name of the Kusto cluster.
305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
306
+ # will be added to the HTTP request.
307
+ #
308
+ def start(resource_group_name, cluster_name, custom_headers:nil)
309
+ response = start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
310
+ nil
311
+ end
312
+
313
+ #
314
+ # @param resource_group_name [String] The name of the resource group containing
315
+ # the Kusto cluster.
316
+ # @param cluster_name [String] The name of the Kusto cluster.
317
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
318
+ # will be added to the HTTP request.
319
+ #
320
+ # @return [Concurrent::Promise] promise which provides async access to http
321
+ # response.
322
+ #
323
+ def start_async(resource_group_name, cluster_name, custom_headers:nil)
324
+ # Send request
325
+ promise = begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers)
326
+
327
+ promise = promise.then do |response|
328
+ # Defining deserialization method.
329
+ deserialize_method = lambda do |parsed_response|
330
+ end
331
+
332
+ # Waiting for response.
333
+ @client.get_long_running_operation_result(response, deserialize_method)
334
+ end
335
+
336
+ promise
337
+ end
338
+
339
+ #
340
+ # Lists all Kusto clusters within a resource group.
341
+ #
342
+ # @param resource_group_name [String] The name of the resource group containing
343
+ # the Kusto cluster.
344
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
345
+ # will be added to the HTTP request.
346
+ #
347
+ # @return [ClusterListResult] operation results.
348
+ #
349
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
350
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
351
+ response.body unless response.nil?
352
+ end
353
+
354
+ #
355
+ # Lists all Kusto clusters within a resource group.
356
+ #
357
+ # @param resource_group_name [String] The name of the resource group containing
358
+ # the Kusto cluster.
359
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
360
+ # will be added to the HTTP request.
361
+ #
362
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
363
+ #
364
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
365
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
366
+ end
367
+
368
+ #
369
+ # Lists all Kusto clusters within a resource group.
370
+ #
371
+ # @param resource_group_name [String] The name of the resource group containing
372
+ # the Kusto cluster.
373
+ # @param [Hash{String => String}] A hash of custom headers that will be added
374
+ # to the HTTP request.
375
+ #
376
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
377
+ #
378
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
379
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
380
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
381
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
382
+
383
+
384
+ request_headers = {}
385
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
386
+
387
+ # Set Headers
388
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
389
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
390
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters'
391
+
392
+ request_url = @base_url || @client.base_url
393
+
394
+ options = {
395
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
396
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
397
+ query_params: {'api-version' => @client.api_version},
398
+ headers: request_headers.merge(custom_headers || {}),
399
+ base_url: request_url
400
+ }
401
+ promise = @client.make_request_async(:get, path_template, options)
402
+
403
+ promise = promise.then do |result|
404
+ http_response = result.response
405
+ status_code = http_response.status
406
+ response_content = http_response.body
407
+ unless status_code == 200
408
+ error_model = JSON.load(response_content)
409
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
410
+ end
411
+
412
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
413
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
414
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
415
+ # Deserialize Response
416
+ if status_code == 200
417
+ begin
418
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
419
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::ClusterListResult.mapper()
420
+ result.body = @client.deserialize(result_mapper, parsed_response)
421
+ rescue Exception => e
422
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
423
+ end
424
+ end
425
+
426
+ result
427
+ end
428
+
429
+ promise.execute
430
+ end
431
+
432
+ #
433
+ # Lists all Kusto clusters within a subscription.
434
+ #
435
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
436
+ # will be added to the HTTP request.
437
+ #
438
+ # @return [ClusterListResult] operation results.
439
+ #
440
+ def list(custom_headers:nil)
441
+ response = list_async(custom_headers:custom_headers).value!
442
+ response.body unless response.nil?
443
+ end
444
+
445
+ #
446
+ # Lists all Kusto clusters within a subscription.
447
+ #
448
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
449
+ # will be added to the HTTP request.
450
+ #
451
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
452
+ #
453
+ def list_with_http_info(custom_headers:nil)
454
+ list_async(custom_headers:custom_headers).value!
455
+ end
456
+
457
+ #
458
+ # Lists all Kusto clusters within a subscription.
459
+ #
460
+ # @param [Hash{String => String}] A hash of custom headers that will be added
461
+ # to the HTTP request.
462
+ #
463
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
464
+ #
465
+ def list_async(custom_headers:nil)
466
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
467
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
468
+
469
+
470
+ request_headers = {}
471
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
472
+
473
+ # Set Headers
474
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
475
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
476
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters'
477
+
478
+ request_url = @base_url || @client.base_url
479
+
480
+ options = {
481
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
482
+ path_params: {'subscriptionId' => @client.subscription_id},
483
+ query_params: {'api-version' => @client.api_version},
484
+ headers: request_headers.merge(custom_headers || {}),
485
+ base_url: request_url
486
+ }
487
+ promise = @client.make_request_async(:get, path_template, options)
488
+
489
+ promise = promise.then do |result|
490
+ http_response = result.response
491
+ status_code = http_response.status
492
+ response_content = http_response.body
493
+ unless status_code == 200
494
+ error_model = JSON.load(response_content)
495
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
496
+ end
497
+
498
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
499
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
500
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
501
+ # Deserialize Response
502
+ if status_code == 200
503
+ begin
504
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
505
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::ClusterListResult.mapper()
506
+ result.body = @client.deserialize(result_mapper, parsed_response)
507
+ rescue Exception => e
508
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
509
+ end
510
+ end
511
+
512
+ result
513
+ end
514
+
515
+ promise.execute
516
+ end
517
+
518
+ #
519
+ # Lists eligible SKUs for Kusto resource provider.
520
+ #
521
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
522
+ # will be added to the HTTP request.
523
+ #
524
+ # @return [SkuDescriptionList] operation results.
525
+ #
526
+ def list_skus(custom_headers:nil)
527
+ response = list_skus_async(custom_headers:custom_headers).value!
528
+ response.body unless response.nil?
529
+ end
530
+
531
+ #
532
+ # Lists eligible SKUs for Kusto resource provider.
533
+ #
534
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
535
+ # will be added to the HTTP request.
536
+ #
537
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
538
+ #
539
+ def list_skus_with_http_info(custom_headers:nil)
540
+ list_skus_async(custom_headers:custom_headers).value!
541
+ end
542
+
543
+ #
544
+ # Lists eligible SKUs for Kusto resource provider.
545
+ #
546
+ # @param [Hash{String => String}] A hash of custom headers that will be added
547
+ # to the HTTP request.
548
+ #
549
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
550
+ #
551
+ def list_skus_async(custom_headers:nil)
552
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
553
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
554
+
555
+
556
+ request_headers = {}
557
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
558
+
559
+ # Set Headers
560
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
561
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
562
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus'
563
+
564
+ request_url = @base_url || @client.base_url
565
+
566
+ options = {
567
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
568
+ path_params: {'subscriptionId' => @client.subscription_id},
569
+ query_params: {'api-version' => @client.api_version},
570
+ headers: request_headers.merge(custom_headers || {}),
571
+ base_url: request_url
572
+ }
573
+ promise = @client.make_request_async(:get, path_template, options)
574
+
575
+ promise = promise.then do |result|
576
+ http_response = result.response
577
+ status_code = http_response.status
578
+ response_content = http_response.body
579
+ unless status_code == 200
580
+ error_model = JSON.load(response_content)
581
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
582
+ end
583
+
584
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
585
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
586
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
587
+ # Deserialize Response
588
+ if status_code == 200
589
+ begin
590
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
591
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::SkuDescriptionList.mapper()
592
+ result.body = @client.deserialize(result_mapper, parsed_response)
593
+ rescue Exception => e
594
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
595
+ end
596
+ end
597
+
598
+ result
599
+ end
600
+
601
+ promise.execute
602
+ end
603
+
604
+ #
605
+ # Checks that the cluster name is valid and is not already in use.
606
+ #
607
+ # @param location [String] Azure location.
608
+ # @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
609
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
610
+ # will be added to the HTTP request.
611
+ #
612
+ # @return [CheckNameResult] operation results.
613
+ #
614
+ def check_name_availability(location, cluster_name, custom_headers:nil)
615
+ response = check_name_availability_async(location, cluster_name, custom_headers:custom_headers).value!
616
+ response.body unless response.nil?
617
+ end
618
+
619
+ #
620
+ # Checks that the cluster name is valid and is not already in use.
621
+ #
622
+ # @param location [String] Azure location.
623
+ # @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
624
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
625
+ # will be added to the HTTP request.
626
+ #
627
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
628
+ #
629
+ def check_name_availability_with_http_info(location, cluster_name, custom_headers:nil)
630
+ check_name_availability_async(location, cluster_name, custom_headers:custom_headers).value!
631
+ end
632
+
633
+ #
634
+ # Checks that the cluster name is valid and is not already in use.
635
+ #
636
+ # @param location [String] Azure location.
637
+ # @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
638
+ # @param [Hash{String => String}] A hash of custom headers that will be added
639
+ # to the HTTP request.
640
+ #
641
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
642
+ #
643
+ def check_name_availability_async(location, cluster_name, custom_headers:nil)
644
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
645
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
646
+ fail ArgumentError, 'location is nil' if location.nil?
647
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
648
+
649
+
650
+ request_headers = {}
651
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
652
+
653
+ # Set Headers
654
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
655
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
656
+
657
+ # Serialize Request
658
+ request_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::ClusterCheckNameRequest.mapper()
659
+ request_content = @client.serialize(request_mapper, cluster_name)
660
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
661
+
662
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability'
663
+
664
+ request_url = @base_url || @client.base_url
665
+
666
+ options = {
667
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
668
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
669
+ query_params: {'api-version' => @client.api_version},
670
+ body: request_content,
671
+ headers: request_headers.merge(custom_headers || {}),
672
+ base_url: request_url
673
+ }
674
+ promise = @client.make_request_async(:post, path_template, options)
675
+
676
+ promise = promise.then do |result|
677
+ http_response = result.response
678
+ status_code = http_response.status
679
+ response_content = http_response.body
680
+ unless status_code == 200
681
+ error_model = JSON.load(response_content)
682
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
683
+ end
684
+
685
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
686
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
687
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
688
+ # Deserialize Response
689
+ if status_code == 200
690
+ begin
691
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
692
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::CheckNameResult.mapper()
693
+ result.body = @client.deserialize(result_mapper, parsed_response)
694
+ rescue Exception => e
695
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
696
+ end
697
+ end
698
+
699
+ result
700
+ end
701
+
702
+ promise.execute
703
+ end
704
+
705
+ #
706
+ # Returns the SKUs available for the provided resource.
707
+ #
708
+ # @param resource_group_name [String] The name of the resource group containing
709
+ # the Kusto cluster.
710
+ # @param cluster_name [String] The name of the Kusto cluster.
711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
712
+ # will be added to the HTTP request.
713
+ #
714
+ # @return [ListResourceSkusResult] operation results.
715
+ #
716
+ def list_skus_by_resource(resource_group_name, cluster_name, custom_headers:nil)
717
+ response = list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
718
+ response.body unless response.nil?
719
+ end
720
+
721
+ #
722
+ # Returns the SKUs available for the provided resource.
723
+ #
724
+ # @param resource_group_name [String] The name of the resource group containing
725
+ # the Kusto cluster.
726
+ # @param cluster_name [String] The name of the Kusto cluster.
727
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
728
+ # will be added to the HTTP request.
729
+ #
730
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
731
+ #
732
+ def list_skus_by_resource_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
733
+ list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
734
+ end
735
+
736
+ #
737
+ # Returns the SKUs available for the provided resource.
738
+ #
739
+ # @param resource_group_name [String] The name of the resource group containing
740
+ # the Kusto cluster.
741
+ # @param cluster_name [String] The name of the Kusto cluster.
742
+ # @param [Hash{String => String}] A hash of custom headers that will be added
743
+ # to the HTTP request.
744
+ #
745
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
746
+ #
747
+ def list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:nil)
748
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
749
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
750
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
751
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
752
+
753
+
754
+ request_headers = {}
755
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
756
+
757
+ # Set Headers
758
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
759
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
760
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'
761
+
762
+ request_url = @base_url || @client.base_url
763
+
764
+ options = {
765
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
766
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
767
+ query_params: {'api-version' => @client.api_version},
768
+ headers: request_headers.merge(custom_headers || {}),
769
+ base_url: request_url
770
+ }
771
+ promise = @client.make_request_async(:get, path_template, options)
772
+
773
+ promise = promise.then do |result|
774
+ http_response = result.response
775
+ status_code = http_response.status
776
+ response_content = http_response.body
777
+ unless status_code == 200
778
+ error_model = JSON.load(response_content)
779
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
780
+ end
781
+
782
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
783
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
784
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
785
+ # Deserialize Response
786
+ if status_code == 200
787
+ begin
788
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
789
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::ListResourceSkusResult.mapper()
790
+ result.body = @client.deserialize(result_mapper, parsed_response)
791
+ rescue Exception => e
792
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
793
+ end
794
+ end
795
+
796
+ result
797
+ end
798
+
799
+ promise.execute
800
+ end
801
+
802
+ #
803
+ # Create or update a Kusto cluster.
804
+ #
805
+ # @param resource_group_name [String] The name of the resource group containing
806
+ # the Kusto cluster.
807
+ # @param cluster_name [String] The name of the Kusto cluster.
808
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
809
+ # CreateOrUpdate operation.
810
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
811
+ # will be added to the HTTP request.
812
+ #
813
+ # @return [Cluster] operation results.
814
+ #
815
+ def begin_create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
816
+ response = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
817
+ response.body unless response.nil?
818
+ end
819
+
820
+ #
821
+ # Create or update a Kusto cluster.
822
+ #
823
+ # @param resource_group_name [String] The name of the resource group containing
824
+ # the Kusto cluster.
825
+ # @param cluster_name [String] The name of the Kusto cluster.
826
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
827
+ # CreateOrUpdate operation.
828
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
829
+ # will be added to the HTTP request.
830
+ #
831
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
832
+ #
833
+ def begin_create_or_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
834
+ begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
835
+ end
836
+
837
+ #
838
+ # Create or update a Kusto cluster.
839
+ #
840
+ # @param resource_group_name [String] The name of the resource group containing
841
+ # the Kusto cluster.
842
+ # @param cluster_name [String] The name of the Kusto cluster.
843
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
844
+ # CreateOrUpdate operation.
845
+ # @param [Hash{String => String}] A hash of custom headers that will be added
846
+ # to the HTTP request.
847
+ #
848
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
849
+ #
850
+ def begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
851
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
852
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
853
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
854
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
855
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
856
+
857
+
858
+ request_headers = {}
859
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
860
+
861
+ # Set Headers
862
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
863
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
864
+
865
+ # Serialize Request
866
+ request_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::Cluster.mapper()
867
+ request_content = @client.serialize(request_mapper, parameters)
868
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
869
+
870
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
871
+
872
+ request_url = @base_url || @client.base_url
873
+
874
+ options = {
875
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
876
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
877
+ query_params: {'api-version' => @client.api_version},
878
+ body: request_content,
879
+ headers: request_headers.merge(custom_headers || {}),
880
+ base_url: request_url
881
+ }
882
+ promise = @client.make_request_async(:put, path_template, options)
883
+
884
+ promise = promise.then do |result|
885
+ http_response = result.response
886
+ status_code = http_response.status
887
+ response_content = http_response.body
888
+ unless status_code == 200 || status_code == 201
889
+ error_model = JSON.load(response_content)
890
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
891
+ end
892
+
893
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
894
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
895
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
896
+ # Deserialize Response
897
+ if status_code == 200
898
+ begin
899
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
900
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::Cluster.mapper()
901
+ result.body = @client.deserialize(result_mapper, parsed_response)
902
+ rescue Exception => e
903
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
904
+ end
905
+ end
906
+ # Deserialize Response
907
+ if status_code == 201
908
+ begin
909
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
910
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::Cluster.mapper()
911
+ result.body = @client.deserialize(result_mapper, parsed_response)
912
+ rescue Exception => e
913
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
914
+ end
915
+ end
916
+
917
+ result
918
+ end
919
+
920
+ promise.execute
921
+ end
922
+
923
+ #
924
+ # Update a Kusto cluster.
925
+ #
926
+ # @param resource_group_name [String] The name of the resource group containing
927
+ # the Kusto cluster.
928
+ # @param cluster_name [String] The name of the Kusto cluster.
929
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
930
+ # the Update operation.
931
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
932
+ # will be added to the HTTP request.
933
+ #
934
+ # @return [Cluster] operation results.
935
+ #
936
+ def begin_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
937
+ response = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
938
+ response.body unless response.nil?
939
+ end
940
+
941
+ #
942
+ # Update a Kusto cluster.
943
+ #
944
+ # @param resource_group_name [String] The name of the resource group containing
945
+ # the Kusto cluster.
946
+ # @param cluster_name [String] The name of the Kusto cluster.
947
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
948
+ # the Update operation.
949
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
950
+ # will be added to the HTTP request.
951
+ #
952
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
953
+ #
954
+ def begin_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
955
+ begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
956
+ end
957
+
958
+ #
959
+ # Update a Kusto cluster.
960
+ #
961
+ # @param resource_group_name [String] The name of the resource group containing
962
+ # the Kusto cluster.
963
+ # @param cluster_name [String] The name of the Kusto cluster.
964
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
965
+ # the Update operation.
966
+ # @param [Hash{String => String}] A hash of custom headers that will be added
967
+ # to the HTTP request.
968
+ #
969
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
970
+ #
971
+ def begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
972
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
973
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
974
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
975
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
976
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
977
+
978
+
979
+ request_headers = {}
980
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
981
+
982
+ # Set Headers
983
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
984
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
985
+
986
+ # Serialize Request
987
+ request_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::ClusterUpdate.mapper()
988
+ request_content = @client.serialize(request_mapper, parameters)
989
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
990
+
991
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
992
+
993
+ request_url = @base_url || @client.base_url
994
+
995
+ options = {
996
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
997
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
998
+ query_params: {'api-version' => @client.api_version},
999
+ body: request_content,
1000
+ headers: request_headers.merge(custom_headers || {}),
1001
+ base_url: request_url
1002
+ }
1003
+ promise = @client.make_request_async(:patch, path_template, options)
1004
+
1005
+ promise = promise.then do |result|
1006
+ http_response = result.response
1007
+ status_code = http_response.status
1008
+ response_content = http_response.body
1009
+ unless status_code == 200 || status_code == 201
1010
+ error_model = JSON.load(response_content)
1011
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1012
+ end
1013
+
1014
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1015
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1016
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1017
+ # Deserialize Response
1018
+ if status_code == 200
1019
+ begin
1020
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1021
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::Cluster.mapper()
1022
+ result.body = @client.deserialize(result_mapper, parsed_response)
1023
+ rescue Exception => e
1024
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1025
+ end
1026
+ end
1027
+ # Deserialize Response
1028
+ if status_code == 201
1029
+ begin
1030
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1031
+ result_mapper = Azure::Kusto::Mgmt::V2019_05_15::Models::Cluster.mapper()
1032
+ result.body = @client.deserialize(result_mapper, parsed_response)
1033
+ rescue Exception => e
1034
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1035
+ end
1036
+ end
1037
+
1038
+ result
1039
+ end
1040
+
1041
+ promise.execute
1042
+ end
1043
+
1044
+ #
1045
+ # Deletes a Kusto cluster.
1046
+ #
1047
+ # @param resource_group_name [String] The name of the resource group containing
1048
+ # the Kusto cluster.
1049
+ # @param cluster_name [String] The name of the Kusto cluster.
1050
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1051
+ # will be added to the HTTP request.
1052
+ #
1053
+ #
1054
+ def begin_delete(resource_group_name, cluster_name, custom_headers:nil)
1055
+ response = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1056
+ nil
1057
+ end
1058
+
1059
+ #
1060
+ # Deletes a Kusto cluster.
1061
+ #
1062
+ # @param resource_group_name [String] The name of the resource group containing
1063
+ # the Kusto cluster.
1064
+ # @param cluster_name [String] The name of the Kusto cluster.
1065
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1066
+ # will be added to the HTTP request.
1067
+ #
1068
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1069
+ #
1070
+ def begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
1071
+ begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1072
+ end
1073
+
1074
+ #
1075
+ # Deletes a Kusto cluster.
1076
+ #
1077
+ # @param resource_group_name [String] The name of the resource group containing
1078
+ # the Kusto cluster.
1079
+ # @param cluster_name [String] The name of the Kusto cluster.
1080
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1081
+ # to the HTTP request.
1082
+ #
1083
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1084
+ #
1085
+ def begin_delete_async(resource_group_name, cluster_name, custom_headers:nil)
1086
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1087
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
1088
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1089
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1090
+
1091
+
1092
+ request_headers = {}
1093
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1094
+
1095
+ # Set Headers
1096
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1097
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1098
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
1099
+
1100
+ request_url = @base_url || @client.base_url
1101
+
1102
+ options = {
1103
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1104
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1105
+ query_params: {'api-version' => @client.api_version},
1106
+ headers: request_headers.merge(custom_headers || {}),
1107
+ base_url: request_url
1108
+ }
1109
+ promise = @client.make_request_async(:delete, path_template, options)
1110
+
1111
+ promise = promise.then do |result|
1112
+ http_response = result.response
1113
+ status_code = http_response.status
1114
+ response_content = http_response.body
1115
+ unless status_code == 200 || status_code == 202 || status_code == 204
1116
+ error_model = JSON.load(response_content)
1117
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1118
+ end
1119
+
1120
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1121
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1122
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1123
+
1124
+ result
1125
+ end
1126
+
1127
+ promise.execute
1128
+ end
1129
+
1130
+ #
1131
+ # Stops a Kusto cluster.
1132
+ #
1133
+ # @param resource_group_name [String] The name of the resource group containing
1134
+ # the Kusto cluster.
1135
+ # @param cluster_name [String] The name of the Kusto cluster.
1136
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1137
+ # will be added to the HTTP request.
1138
+ #
1139
+ #
1140
+ def begin_stop(resource_group_name, cluster_name, custom_headers:nil)
1141
+ response = begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1142
+ nil
1143
+ end
1144
+
1145
+ #
1146
+ # Stops a Kusto cluster.
1147
+ #
1148
+ # @param resource_group_name [String] The name of the resource group containing
1149
+ # the Kusto cluster.
1150
+ # @param cluster_name [String] The name of the Kusto cluster.
1151
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1152
+ # will be added to the HTTP request.
1153
+ #
1154
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1155
+ #
1156
+ def begin_stop_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
1157
+ begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1158
+ end
1159
+
1160
+ #
1161
+ # Stops a Kusto cluster.
1162
+ #
1163
+ # @param resource_group_name [String] The name of the resource group containing
1164
+ # the Kusto cluster.
1165
+ # @param cluster_name [String] The name of the Kusto cluster.
1166
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1167
+ # to the HTTP request.
1168
+ #
1169
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1170
+ #
1171
+ def begin_stop_async(resource_group_name, cluster_name, custom_headers:nil)
1172
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1173
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
1174
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1175
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1176
+
1177
+
1178
+ request_headers = {}
1179
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1180
+
1181
+ # Set Headers
1182
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1183
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1184
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop'
1185
+
1186
+ request_url = @base_url || @client.base_url
1187
+
1188
+ options = {
1189
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1190
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1191
+ query_params: {'api-version' => @client.api_version},
1192
+ headers: request_headers.merge(custom_headers || {}),
1193
+ base_url: request_url
1194
+ }
1195
+ promise = @client.make_request_async(:post, path_template, options)
1196
+
1197
+ promise = promise.then do |result|
1198
+ http_response = result.response
1199
+ status_code = http_response.status
1200
+ response_content = http_response.body
1201
+ unless status_code == 200 || status_code == 202
1202
+ error_model = JSON.load(response_content)
1203
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1204
+ end
1205
+
1206
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1207
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1208
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1209
+
1210
+ result
1211
+ end
1212
+
1213
+ promise.execute
1214
+ end
1215
+
1216
+ #
1217
+ # Starts a Kusto cluster.
1218
+ #
1219
+ # @param resource_group_name [String] The name of the resource group containing
1220
+ # the Kusto cluster.
1221
+ # @param cluster_name [String] The name of the Kusto cluster.
1222
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1223
+ # will be added to the HTTP request.
1224
+ #
1225
+ #
1226
+ def begin_start(resource_group_name, cluster_name, custom_headers:nil)
1227
+ response = begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1228
+ nil
1229
+ end
1230
+
1231
+ #
1232
+ # Starts a Kusto cluster.
1233
+ #
1234
+ # @param resource_group_name [String] The name of the resource group containing
1235
+ # the Kusto cluster.
1236
+ # @param cluster_name [String] The name of the Kusto cluster.
1237
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1238
+ # will be added to the HTTP request.
1239
+ #
1240
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1241
+ #
1242
+ def begin_start_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
1243
+ begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1244
+ end
1245
+
1246
+ #
1247
+ # Starts a Kusto cluster.
1248
+ #
1249
+ # @param resource_group_name [String] The name of the resource group containing
1250
+ # the Kusto cluster.
1251
+ # @param cluster_name [String] The name of the Kusto cluster.
1252
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1253
+ # to the HTTP request.
1254
+ #
1255
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1256
+ #
1257
+ def begin_start_async(resource_group_name, cluster_name, custom_headers:nil)
1258
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1259
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
1260
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1261
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1262
+
1263
+
1264
+ request_headers = {}
1265
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1266
+
1267
+ # Set Headers
1268
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1269
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1270
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start'
1271
+
1272
+ request_url = @base_url || @client.base_url
1273
+
1274
+ options = {
1275
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1276
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1277
+ query_params: {'api-version' => @client.api_version},
1278
+ headers: request_headers.merge(custom_headers || {}),
1279
+ base_url: request_url
1280
+ }
1281
+ promise = @client.make_request_async(:post, path_template, options)
1282
+
1283
+ promise = promise.then do |result|
1284
+ http_response = result.response
1285
+ status_code = http_response.status
1286
+ response_content = http_response.body
1287
+ unless status_code == 200 || status_code == 202
1288
+ error_model = JSON.load(response_content)
1289
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1290
+ end
1291
+
1292
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1293
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1294
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1295
+
1296
+ result
1297
+ end
1298
+
1299
+ promise.execute
1300
+ end
1301
+
1302
+ end
1303
+ end