7
7
# --------------------------------------------------------------------------
8
8
9
9
from copy import deepcopy
10
- from typing import Any , Optional , TYPE_CHECKING
10
+ from typing import Any , TYPE_CHECKING
11
11
12
12
from azure .core .rest import HttpRequest , HttpResponse
13
13
from azure .mgmt .core import ARMPipelineClient
14
- from msrest import Deserializer , Serializer
15
14
16
15
from . import models
17
16
from ._configuration import KustoManagementClientConfiguration
18
- from .operations import AttachedDatabaseConfigurationsOperations , ClusterPrincipalAssignmentsOperations , ClustersOperations , DataConnectionsOperations , DatabasePrincipalAssignmentsOperations , DatabasesOperations , ManagedPrivateEndpointsOperations , Operations , OperationsResultsLocationOperations , OperationsResultsOperations , PrivateEndpointConnectionsOperations , PrivateLinkResourcesOperations , ScriptsOperations
17
+ from ._serialization import Deserializer , Serializer
18
+ from .operations import (
19
+ AttachedDatabaseConfigurationsOperations ,
20
+ ClusterPrincipalAssignmentsOperations ,
21
+ ClustersOperations ,
22
+ DataConnectionsOperations ,
23
+ DatabasePrincipalAssignmentsOperations ,
24
+ DatabasesOperations ,
25
+ ManagedPrivateEndpointsOperations ,
26
+ Operations ,
27
+ OperationsResultsLocationOperations ,
28
+ OperationsResultsOperations ,
29
+ PrivateEndpointConnectionsOperations ,
30
+ PrivateLinkResourcesOperations ,
31
+ ScriptsOperations ,
32
+ )
19
33
20
34
if TYPE_CHECKING :
21
35
# pylint: disable=unused-import,ungrouped-imports
22
36
from azure .core .credentials import TokenCredential
23
37
24
- class KustoManagementClient :
25
- """The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases.
38
+
39
+ class KustoManagementClient : # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
40
+ """The Azure Kusto management API provides a RESTful set of web services that interact with Azure
41
+ Kusto services to manage your clusters and databases. The API enables you to create, update,
42
+ and delete clusters and databases.
26
43
27
44
:ivar clusters: ClustersOperations operations
28
- :vartype clusters: kusto_management_client .operations.ClustersOperations
45
+ :vartype clusters: azure.mgmt.kusto .operations.ClustersOperations
29
46
:ivar cluster_principal_assignments: ClusterPrincipalAssignmentsOperations operations
30
47
:vartype cluster_principal_assignments:
31
- kusto_management_client .operations.ClusterPrincipalAssignmentsOperations
48
+ azure.mgmt.kusto .operations.ClusterPrincipalAssignmentsOperations
32
49
:ivar databases: DatabasesOperations operations
33
- :vartype databases: kusto_management_client .operations.DatabasesOperations
50
+ :vartype databases: azure.mgmt.kusto .operations.DatabasesOperations
34
51
:ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations
35
52
:vartype attached_database_configurations:
36
- kusto_management_client .operations.AttachedDatabaseConfigurationsOperations
53
+ azure.mgmt.kusto .operations.AttachedDatabaseConfigurationsOperations
37
54
:ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations
38
55
:vartype managed_private_endpoints:
39
- kusto_management_client .operations.ManagedPrivateEndpointsOperations
56
+ azure.mgmt.kusto .operations.ManagedPrivateEndpointsOperations
40
57
:ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations
41
58
:vartype database_principal_assignments:
42
- kusto_management_client .operations.DatabasePrincipalAssignmentsOperations
59
+ azure.mgmt.kusto .operations.DatabasePrincipalAssignmentsOperations
43
60
:ivar scripts: ScriptsOperations operations
44
- :vartype scripts: kusto_management_client .operations.ScriptsOperations
61
+ :vartype scripts: azure.mgmt.kusto .operations.ScriptsOperations
45
62
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
46
63
:vartype private_endpoint_connections:
47
- kusto_management_client .operations.PrivateEndpointConnectionsOperations
64
+ azure.mgmt.kusto .operations.PrivateEndpointConnectionsOperations
48
65
:ivar private_link_resources: PrivateLinkResourcesOperations operations
49
- :vartype private_link_resources:
50
- kusto_management_client.operations.PrivateLinkResourcesOperations
66
+ :vartype private_link_resources: azure.mgmt.kusto.operations.PrivateLinkResourcesOperations
51
67
:ivar data_connections: DataConnectionsOperations operations
52
- :vartype data_connections: kusto_management_client .operations.DataConnectionsOperations
68
+ :vartype data_connections: azure.mgmt.kusto .operations.DataConnectionsOperations
53
69
:ivar operations: Operations operations
54
- :vartype operations: kusto_management_client .operations.Operations
70
+ :vartype operations: azure.mgmt.kusto .operations.Operations
55
71
:ivar operations_results: OperationsResultsOperations operations
56
- :vartype operations_results: kusto_management_client .operations.OperationsResultsOperations
72
+ :vartype operations_results: azure.mgmt.kusto .operations.OperationsResultsOperations
57
73
:ivar operations_results_location: OperationsResultsLocationOperations operations
58
74
:vartype operations_results_location:
59
- kusto_management_client .operations.OperationsResultsLocationOperations
60
- :param credential: Credential needed for the client to connect to Azure.
75
+ azure.mgmt.kusto .operations.OperationsResultsLocationOperations
76
+ :param credential: Credential needed for the client to connect to Azure. Required.
61
77
:type credential: ~azure.core.credentials.TokenCredential
62
78
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
63
- subscription. The subscription ID forms part of the URI for every service call.
79
+ subscription. The subscription ID forms part of the URI for every service call. Required.
64
80
:type subscription_id: str
65
- :param base_url: Service URL. Default value is ' https://management.azure.com' .
81
+ :param base_url: Service URL. Default value is " https://management.azure.com" .
66
82
:type base_url: str
83
+ :keyword api_version: Api Version. Default value is "2022-07-07". Note that overriding this
84
+ default value may result in unsupported behavior.
85
+ :paramtype api_version: str
67
86
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
68
87
Retry-After header is present.
69
88
"""
@@ -75,33 +94,48 @@ def __init__(
75
94
base_url : str = "https://management.azure.com" ,
76
95
** kwargs : Any
77
96
) -> None :
78
- self ._config = KustoManagementClientConfiguration (credential = credential , subscription_id = subscription_id , ** kwargs )
97
+ self ._config = KustoManagementClientConfiguration (
98
+ credential = credential , subscription_id = subscription_id , ** kwargs
99
+ )
79
100
self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
80
101
81
102
client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
82
103
self ._serialize = Serializer (client_models )
83
104
self ._deserialize = Deserializer (client_models )
84
105
self ._serialize .client_side_validation = False
85
106
self .clusters = ClustersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
86
- self .cluster_principal_assignments = ClusterPrincipalAssignmentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
107
+ self .cluster_principal_assignments = ClusterPrincipalAssignmentsOperations (
108
+ self ._client , self ._config , self ._serialize , self ._deserialize
109
+ )
87
110
self .databases = DatabasesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
88
- self .attached_database_configurations = AttachedDatabaseConfigurationsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
89
- self .managed_private_endpoints = ManagedPrivateEndpointsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
90
- self .database_principal_assignments = DatabasePrincipalAssignmentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
111
+ self .attached_database_configurations = AttachedDatabaseConfigurationsOperations (
112
+ self ._client , self ._config , self ._serialize , self ._deserialize
113
+ )
114
+ self .managed_private_endpoints = ManagedPrivateEndpointsOperations (
115
+ self ._client , self ._config , self ._serialize , self ._deserialize
116
+ )
117
+ self .database_principal_assignments = DatabasePrincipalAssignmentsOperations (
118
+ self ._client , self ._config , self ._serialize , self ._deserialize
119
+ )
91
120
self .scripts = ScriptsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
92
- self .private_endpoint_connections = PrivateEndpointConnectionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
93
- self .private_link_resources = PrivateLinkResourcesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
94
- self .data_connections = DataConnectionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
121
+ self .private_endpoint_connections = PrivateEndpointConnectionsOperations (
122
+ self ._client , self ._config , self ._serialize , self ._deserialize
123
+ )
124
+ self .private_link_resources = PrivateLinkResourcesOperations (
125
+ self ._client , self ._config , self ._serialize , self ._deserialize
126
+ )
127
+ self .data_connections = DataConnectionsOperations (
128
+ self ._client , self ._config , self ._serialize , self ._deserialize
129
+ )
95
130
self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
96
- self .operations_results = OperationsResultsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
97
- self .operations_results_location = OperationsResultsLocationOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
98
-
99
-
100
- def _send_request (
101
- self ,
102
- request , # type: HttpRequest
103
- ** kwargs : Any
104
- ) -> HttpResponse :
131
+ self .operations_results = OperationsResultsOperations (
132
+ self ._client , self ._config , self ._serialize , self ._deserialize
133
+ )
134
+ self .operations_results_location = OperationsResultsLocationOperations (
135
+ self ._client , self ._config , self ._serialize , self ._deserialize
136
+ )
137
+
138
+ def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
105
139
"""Runs the network request through the client's chained policies.
106
140
107
141
>>> from azure.core.rest import HttpRequest
@@ -110,7 +144,7 @@ def _send_request(
110
144
>>> response = client._send_request(request)
111
145
<HttpResponse: 200 OK>
112
146
113
- For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
147
+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/ python/send_request
114
148
115
149
:param request: The network request you want to make. Required.
116
150
:type request: ~azure.core.rest.HttpRequest
0 commit comments