azure_mgmt_kusto 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto.rb +70 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/clusters.rb +1281 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb +1131 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/event_hub_connections.rb +854 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/kusto_management_client.rb +145 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_capacity.rb +81 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +75 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +71 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_scale_type.rb +17 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_sku.rb +72 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_sku_name.rb +22 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/check_name_result.rb +71 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/cluster.rb +183 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +61 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/cluster_list_result.rb +55 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/cluster_update.rb +188 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/data_format.rb +17 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database.rb +148 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_check_name_request.rb +62 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_list_result.rb +55 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal.rb +106 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +56 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +56 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal_role.rb +20 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal_type.rb +17 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_statistics.rb +48 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_update.rb +135 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection.rb +133 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_list_result.rb +56 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_update.rb +133 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_validation.rb +106 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_validation_list_result.rb +56 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_validation_result.rb +48 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +56 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/list_skus_result.rb +56 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/operation.rb +82 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/operation_display.rb +80 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/operation_list_result.rb +98 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/provisioning_state.rb +19 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/proxy_resource.rb +63 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/resource.rb +83 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/state.rb +22 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/tracked_resource.rb +92 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +47 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/module_definition.rb +9 -0
- data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/operations.rb +217 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto.rb +70 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/clusters.rb +1281 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/databases.rb +1131 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/event_hub_connections.rb +854 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/kusto_management_client.rb +145 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_capacity.rb +81 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +75 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +71 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_scale_type.rb +17 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_sku.rb +72 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_sku_name.rb +22 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/check_name_result.rb +71 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/cluster.rb +183 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +61 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/cluster_list_result.rb +55 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/cluster_update.rb +188 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/data_format.rb +17 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database.rb +148 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_check_name_request.rb +62 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_list_result.rb +55 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal.rb +106 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +56 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +56 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal_role.rb +20 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal_type.rb +17 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_statistics.rb +48 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_update.rb +135 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection.rb +133 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_list_result.rb +56 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_update.rb +133 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_validation.rb +106 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_validation_list_result.rb +56 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_validation_result.rb +48 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +56 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/list_skus_result.rb +56 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/operation.rb +82 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/operation_display.rb +80 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/operation_list_result.rb +98 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/provisioning_state.rb +19 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/proxy_resource.rb +63 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/resource.rb +83 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/state.rb +22 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/tracked_resource.rb +92 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +47 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/module_definition.rb +9 -0
- data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/operations.rb +217 -0
- data/lib/azure_mgmt_kusto.rb +7 -0
- data/lib/module_definition.rb +8 -0
- data/lib/profiles/latest/kusto_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/kusto_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/kusto_profile_module.rb +223 -0
- data/lib/version.rb +7 -0
- metadata +218 -0
@@ -0,0 +1,92 @@
|
|
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::V2018_09_07_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The resource model definition for a ARM tracked top level resource
|
10
|
+
#
|
11
|
+
class TrackedResource < Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Hash{String => String}] Resource tags.
|
16
|
+
attr_accessor :tags
|
17
|
+
|
18
|
+
# @return [String] The geo-location where the resource lives
|
19
|
+
attr_accessor :location
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for TrackedResource class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
client_side_validation: true,
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'TrackedResource',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'TrackedResource',
|
34
|
+
model_properties: {
|
35
|
+
id: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
read_only: true,
|
39
|
+
serialized_name: 'id',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
name: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
read_only: true,
|
48
|
+
serialized_name: 'name',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
type: {
|
54
|
+
client_side_validation: true,
|
55
|
+
required: false,
|
56
|
+
read_only: true,
|
57
|
+
serialized_name: 'type',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
tags: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
serialized_name: 'tags',
|
66
|
+
type: {
|
67
|
+
name: 'Dictionary',
|
68
|
+
value: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'StringElementType',
|
72
|
+
type: {
|
73
|
+
name: 'String'
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
},
|
78
|
+
location: {
|
79
|
+
client_side_validation: true,
|
80
|
+
required: true,
|
81
|
+
serialized_name: 'location',
|
82
|
+
type: {
|
83
|
+
name: 'String'
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,47 @@
|
|
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::V2018_09_07_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class TrustedExternalTenant
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] GUID representing an external tenant.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# Mapper for TrustedExternalTenant class as Ruby Hash.
|
22
|
+
# This will be used for serialization/deserialization.
|
23
|
+
#
|
24
|
+
def self.mapper()
|
25
|
+
{
|
26
|
+
client_side_validation: true,
|
27
|
+
required: false,
|
28
|
+
serialized_name: 'TrustedExternalTenant',
|
29
|
+
type: {
|
30
|
+
name: 'Composite',
|
31
|
+
class_name: 'TrustedExternalTenant',
|
32
|
+
model_properties: {
|
33
|
+
value: {
|
34
|
+
client_side_validation: true,
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'value',
|
37
|
+
type: {
|
38
|
+
name: 'String'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,9 @@
|
|
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 end
|
7
|
+
module Azure::Kusto end
|
8
|
+
module Azure::Kusto::Mgmt end
|
9
|
+
module Azure::Kusto::Mgmt::V2018_09_07_preview end
|
@@ -0,0 +1,217 @@
|
|
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::V2018_09_07_preview
|
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 Operations
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
#
|
16
|
+
# Creates and initializes a new instance of the Operations 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
|
+
# Lists available operations for the Microsoft.Kusto provider.
|
28
|
+
#
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [Array<Operation>] operation results.
|
33
|
+
#
|
34
|
+
def list(custom_headers:nil)
|
35
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
36
|
+
first_page.get_all_items
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Lists available operations for the Microsoft.Kusto provider.
|
41
|
+
#
|
42
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
43
|
+
# will be added to the HTTP request.
|
44
|
+
#
|
45
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
46
|
+
#
|
47
|
+
def list_with_http_info(custom_headers:nil)
|
48
|
+
list_async(custom_headers:custom_headers).value!
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Lists available operations for the Microsoft.Kusto provider.
|
53
|
+
#
|
54
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
55
|
+
# to the HTTP request.
|
56
|
+
#
|
57
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
58
|
+
#
|
59
|
+
def list_async(custom_headers:nil)
|
60
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
61
|
+
|
62
|
+
|
63
|
+
request_headers = {}
|
64
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
65
|
+
|
66
|
+
# Set Headers
|
67
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
68
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
69
|
+
path_template = 'providers/Microsoft.Kusto/operations'
|
70
|
+
|
71
|
+
request_url = @base_url || @client.base_url
|
72
|
+
|
73
|
+
options = {
|
74
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
75
|
+
query_params: {'api-version' => @client.api_version},
|
76
|
+
headers: request_headers.merge(custom_headers || {}),
|
77
|
+
base_url: request_url
|
78
|
+
}
|
79
|
+
promise = @client.make_request_async(:get, path_template, options)
|
80
|
+
|
81
|
+
promise = promise.then do |result|
|
82
|
+
http_response = result.response
|
83
|
+
status_code = http_response.status
|
84
|
+
response_content = http_response.body
|
85
|
+
unless status_code == 200
|
86
|
+
error_model = JSON.load(response_content)
|
87
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
88
|
+
end
|
89
|
+
|
90
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
91
|
+
# Deserialize Response
|
92
|
+
if status_code == 200
|
93
|
+
begin
|
94
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
95
|
+
result_mapper = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::OperationListResult.mapper()
|
96
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
97
|
+
rescue Exception => e
|
98
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
result
|
103
|
+
end
|
104
|
+
|
105
|
+
promise.execute
|
106
|
+
end
|
107
|
+
|
108
|
+
#
|
109
|
+
# Lists available operations for the Microsoft.Kusto provider.
|
110
|
+
#
|
111
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
112
|
+
# to List operation.
|
113
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
114
|
+
# will be added to the HTTP request.
|
115
|
+
#
|
116
|
+
# @return [OperationListResult] operation results.
|
117
|
+
#
|
118
|
+
def list_next(next_page_link, custom_headers:nil)
|
119
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
120
|
+
response.body unless response.nil?
|
121
|
+
end
|
122
|
+
|
123
|
+
#
|
124
|
+
# Lists available operations for the Microsoft.Kusto provider.
|
125
|
+
#
|
126
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
127
|
+
# to List operation.
|
128
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
129
|
+
# will be added to the HTTP request.
|
130
|
+
#
|
131
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
132
|
+
#
|
133
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
134
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# Lists available operations for the Microsoft.Kusto provider.
|
139
|
+
#
|
140
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
141
|
+
# to List operation.
|
142
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
143
|
+
# to the HTTP request.
|
144
|
+
#
|
145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
146
|
+
#
|
147
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
148
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
149
|
+
|
150
|
+
|
151
|
+
request_headers = {}
|
152
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
153
|
+
|
154
|
+
# Set Headers
|
155
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
156
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
157
|
+
path_template = '{nextLink}'
|
158
|
+
|
159
|
+
request_url = @base_url || @client.base_url
|
160
|
+
|
161
|
+
options = {
|
162
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
163
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
164
|
+
headers: request_headers.merge(custom_headers || {}),
|
165
|
+
base_url: request_url
|
166
|
+
}
|
167
|
+
promise = @client.make_request_async(:get, path_template, options)
|
168
|
+
|
169
|
+
promise = promise.then do |result|
|
170
|
+
http_response = result.response
|
171
|
+
status_code = http_response.status
|
172
|
+
response_content = http_response.body
|
173
|
+
unless status_code == 200
|
174
|
+
error_model = JSON.load(response_content)
|
175
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
176
|
+
end
|
177
|
+
|
178
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
179
|
+
# Deserialize Response
|
180
|
+
if status_code == 200
|
181
|
+
begin
|
182
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
183
|
+
result_mapper = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::OperationListResult.mapper()
|
184
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
185
|
+
rescue Exception => e
|
186
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
result
|
191
|
+
end
|
192
|
+
|
193
|
+
promise.execute
|
194
|
+
end
|
195
|
+
|
196
|
+
#
|
197
|
+
# Lists available operations for the Microsoft.Kusto provider.
|
198
|
+
#
|
199
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
200
|
+
# will be added to the HTTP request.
|
201
|
+
#
|
202
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
203
|
+
# response.
|
204
|
+
#
|
205
|
+
def list_as_lazy(custom_headers:nil)
|
206
|
+
response = list_async(custom_headers:custom_headers).value!
|
207
|
+
unless response.nil?
|
208
|
+
page = response.body
|
209
|
+
page.next_method = Proc.new do |next_page_link|
|
210
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
211
|
+
end
|
212
|
+
page
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require '2018-09-07-preview/generated/azure_mgmt_kusto'
|
6
|
+
require '2017-09-07-privatepreview/generated/azure_mgmt_kusto'
|
7
|
+
require 'profiles/latest/kusto_latest_profile_client'
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'profiles/latest/kusto_module_definition'
|
6
|
+
require 'profiles/latest/modules/kusto_profile_module'
|
7
|
+
|
8
|
+
module Azure::Kusto::Profiles::Latest
|
9
|
+
module Mgmt
|
10
|
+
#
|
11
|
+
# Client class for the Latest profile SDK.
|
12
|
+
#
|
13
|
+
class Client < KustoManagementClass
|
14
|
+
include MsRestAzure::Common::Configurable
|
15
|
+
|
16
|
+
#
|
17
|
+
# Initializes a new instance of the Client class.
|
18
|
+
# @param options [Hash] hash of client options.
|
19
|
+
# options = {
|
20
|
+
# tenant_id: 'YOUR TENANT ID',
|
21
|
+
# client_id: 'YOUR CLIENT ID',
|
22
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
23
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
24
|
+
# credentials: credentials,
|
25
|
+
# active_directory_settings: active_directory_settings,
|
26
|
+
# base_url: 'YOUR BASE URL',
|
27
|
+
# options: options
|
28
|
+
# }
|
29
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
30
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
31
|
+
#
|
32
|
+
# Also, base_url, active_directory_settings & options are optional.
|
33
|
+
#
|
34
|
+
def initialize(options = {})
|
35
|
+
super(options)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::Kusto end
|
7
|
+
module Azure::Kusto::Profiles end
|
8
|
+
module Azure::Kusto::Profiles::Latest end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'azure_mgmt_kusto'
|
6
|
+
|
7
|
+
module Azure::Kusto::Profiles::Latest
|
8
|
+
module Mgmt
|
9
|
+
Clusters = Azure::Kusto::Mgmt::V2018_09_07_preview::Clusters
|
10
|
+
Databases = Azure::Kusto::Mgmt::V2018_09_07_preview::Databases
|
11
|
+
EventHubConnections = Azure::Kusto::Mgmt::V2018_09_07_preview::EventHubConnections
|
12
|
+
Operations = Azure::Kusto::Mgmt::V2018_09_07_preview::Operations
|
13
|
+
|
14
|
+
module Models
|
15
|
+
DatabasePrincipalListResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipalListResult
|
16
|
+
DatabasePrincipalListRequest = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipalListRequest
|
17
|
+
AzureSku = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureSku
|
18
|
+
EventHubConnectionValidationListResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionValidationListResult
|
19
|
+
AzureResourceSku = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureResourceSku
|
20
|
+
EventHubConnectionListResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionListResult
|
21
|
+
EventHubConnectionValidation = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionValidation
|
22
|
+
TrustedExternalTenant = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::TrustedExternalTenant
|
23
|
+
AzureCapacity = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureCapacity
|
24
|
+
OperationListResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::OperationListResult
|
25
|
+
DatabaseStatistics = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabaseStatistics
|
26
|
+
Operation = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::Operation
|
27
|
+
OperationDisplay = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::OperationDisplay
|
28
|
+
ListResourceSkusResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ListResourceSkusResult
|
29
|
+
ClusterListResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ClusterListResult
|
30
|
+
ListSkusResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ListSkusResult
|
31
|
+
Resource = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::Resource
|
32
|
+
EventHubConnectionValidationResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionValidationResult
|
33
|
+
ClusterCheckNameRequest = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ClusterCheckNameRequest
|
34
|
+
DatabasePrincipal = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipal
|
35
|
+
DatabaseCheckNameRequest = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabaseCheckNameRequest
|
36
|
+
DatabaseListResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabaseListResult
|
37
|
+
CheckNameResult = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::CheckNameResult
|
38
|
+
Cluster = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::Cluster
|
39
|
+
ClusterUpdate = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ClusterUpdate
|
40
|
+
Database = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::Database
|
41
|
+
DatabaseUpdate = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabaseUpdate
|
42
|
+
EventHubConnectionUpdate = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionUpdate
|
43
|
+
EventHubConnection = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnection
|
44
|
+
TrackedResource = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::TrackedResource
|
45
|
+
AzureEntityResource = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureEntityResource
|
46
|
+
ProxyResource = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ProxyResource
|
47
|
+
State = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::State
|
48
|
+
ProvisioningState = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ProvisioningState
|
49
|
+
AzureSkuName = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureSkuName
|
50
|
+
AzureScaleType = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureScaleType
|
51
|
+
DataFormat = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DataFormat
|
52
|
+
DatabasePrincipalRole = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipalRole
|
53
|
+
DatabasePrincipalType = Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipalType
|
54
|
+
end
|
55
|
+
|
56
|
+
#
|
57
|
+
# KustoManagementClass
|
58
|
+
#
|
59
|
+
class KustoManagementClass
|
60
|
+
attr_reader :clusters, :databases, :event_hub_connections, :operations, :configurable, :base_url, :options, :model_classes
|
61
|
+
|
62
|
+
def initialize(options = {})
|
63
|
+
if options.is_a?(Hash) && options.length == 0
|
64
|
+
@options = setup_default_options
|
65
|
+
else
|
66
|
+
@options = options
|
67
|
+
end
|
68
|
+
|
69
|
+
reset!(options)
|
70
|
+
|
71
|
+
@configurable = self
|
72
|
+
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
73
|
+
@options = options[:options].nil? ? nil:options[:options]
|
74
|
+
|
75
|
+
@client_0 = Azure::Kusto::Mgmt::V2018_09_07_preview::KustoManagementClient.new(configurable.credentials, base_url, options)
|
76
|
+
if(@client_0.respond_to?(:subscription_id))
|
77
|
+
@client_0.subscription_id = configurable.subscription_id
|
78
|
+
end
|
79
|
+
add_telemetry(@client_0)
|
80
|
+
@clusters = @client_0.clusters
|
81
|
+
@databases = @client_0.databases
|
82
|
+
@event_hub_connections = @client_0.event_hub_connections
|
83
|
+
@operations = @client_0.operations
|
84
|
+
|
85
|
+
@model_classes = ModelClasses.new
|
86
|
+
end
|
87
|
+
|
88
|
+
def add_telemetry(client)
|
89
|
+
profile_information = 'Profiles/Latest/Kusto/Mgmt'
|
90
|
+
client.add_user_agent_information(profile_information)
|
91
|
+
end
|
92
|
+
|
93
|
+
def method_missing(method, *args)
|
94
|
+
if @client_0.respond_to?method
|
95
|
+
@client_0.send(method, *args)
|
96
|
+
else
|
97
|
+
super
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
class ModelClasses
|
104
|
+
def database_principal_list_result
|
105
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipalListResult
|
106
|
+
end
|
107
|
+
def database_principal_list_request
|
108
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipalListRequest
|
109
|
+
end
|
110
|
+
def azure_sku
|
111
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureSku
|
112
|
+
end
|
113
|
+
def event_hub_connection_validation_list_result
|
114
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionValidationListResult
|
115
|
+
end
|
116
|
+
def azure_resource_sku
|
117
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureResourceSku
|
118
|
+
end
|
119
|
+
def event_hub_connection_list_result
|
120
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionListResult
|
121
|
+
end
|
122
|
+
def event_hub_connection_validation
|
123
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionValidation
|
124
|
+
end
|
125
|
+
def trusted_external_tenant
|
126
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::TrustedExternalTenant
|
127
|
+
end
|
128
|
+
def azure_capacity
|
129
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureCapacity
|
130
|
+
end
|
131
|
+
def operation_list_result
|
132
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::OperationListResult
|
133
|
+
end
|
134
|
+
def database_statistics
|
135
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabaseStatistics
|
136
|
+
end
|
137
|
+
def operation
|
138
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::Operation
|
139
|
+
end
|
140
|
+
def operation_display
|
141
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::OperationDisplay
|
142
|
+
end
|
143
|
+
def list_resource_skus_result
|
144
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ListResourceSkusResult
|
145
|
+
end
|
146
|
+
def cluster_list_result
|
147
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ClusterListResult
|
148
|
+
end
|
149
|
+
def list_skus_result
|
150
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ListSkusResult
|
151
|
+
end
|
152
|
+
def resource
|
153
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::Resource
|
154
|
+
end
|
155
|
+
def event_hub_connection_validation_result
|
156
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionValidationResult
|
157
|
+
end
|
158
|
+
def cluster_check_name_request
|
159
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ClusterCheckNameRequest
|
160
|
+
end
|
161
|
+
def database_principal
|
162
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipal
|
163
|
+
end
|
164
|
+
def database_check_name_request
|
165
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabaseCheckNameRequest
|
166
|
+
end
|
167
|
+
def database_list_result
|
168
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabaseListResult
|
169
|
+
end
|
170
|
+
def check_name_result
|
171
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::CheckNameResult
|
172
|
+
end
|
173
|
+
def cluster
|
174
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::Cluster
|
175
|
+
end
|
176
|
+
def cluster_update
|
177
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ClusterUpdate
|
178
|
+
end
|
179
|
+
def database
|
180
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::Database
|
181
|
+
end
|
182
|
+
def database_update
|
183
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabaseUpdate
|
184
|
+
end
|
185
|
+
def event_hub_connection_update
|
186
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnectionUpdate
|
187
|
+
end
|
188
|
+
def event_hub_connection
|
189
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::EventHubConnection
|
190
|
+
end
|
191
|
+
def tracked_resource
|
192
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::TrackedResource
|
193
|
+
end
|
194
|
+
def azure_entity_resource
|
195
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureEntityResource
|
196
|
+
end
|
197
|
+
def proxy_resource
|
198
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ProxyResource
|
199
|
+
end
|
200
|
+
def state
|
201
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::State
|
202
|
+
end
|
203
|
+
def provisioning_state
|
204
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::ProvisioningState
|
205
|
+
end
|
206
|
+
def azure_sku_name
|
207
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureSkuName
|
208
|
+
end
|
209
|
+
def azure_scale_type
|
210
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::AzureScaleType
|
211
|
+
end
|
212
|
+
def data_format
|
213
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DataFormat
|
214
|
+
end
|
215
|
+
def database_principal_role
|
216
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipalRole
|
217
|
+
end
|
218
|
+
def database_principal_type
|
219
|
+
Azure::Kusto::Mgmt::V2018_09_07_preview::Models::DatabasePrincipalType
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|