From f8176d247087fcda566555d5dc9e18dddc24383d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 22 Apr 2021 01:38:55 +0000 Subject: [PATCH 1/2] CodeGen from PR 14061 in Azure/azure-rest-api-specs update (#14061) --- sdk/kusto/azure-mgmt-kusto/MANIFEST.in | 1 + sdk/kusto/azure-mgmt-kusto/_meta.json | 8 + .../azure/mgmt/kusto/_configuration.py | 2 +- .../mgmt/kusto/_kusto_management_client.py | 30 + .../azure/mgmt/kusto/_metadata.json | 70 +- .../azure/mgmt/kusto/_version.py | 2 +- .../azure/mgmt/kusto/aio/_configuration.py | 2 +- .../kusto/aio/_kusto_management_client.py | 29 + .../mgmt/kusto/aio/operations/__init__.py | 4 + ...ched_database_configurations_operations.py | 16 +- ...luster_principal_assignments_operations.py | 18 +- .../aio/operations/_clusters_operations.py | 98 ++- .../_data_connections_operations.py | 30 +- ...tabase_principal_assignments_operations.py | 18 +- .../aio/operations/_databases_operations.py | 30 +- .../mgmt/kusto/aio/operations/_operations.py | 2 +- .../_operations_results_operations.py | 99 +++ .../aio/operations/_scripts_operations.py | 667 +++++++++++++++++ .../azure/mgmt/kusto/models/__init__.py | 22 + .../models/_kusto_management_client_enums.py | 23 +- .../azure/mgmt/kusto/models/_models.py | 384 ++++++++-- .../azure/mgmt/kusto/models/_models_py3.py | 417 +++++++++-- .../azure/mgmt/kusto/operations/__init__.py | 4 + ...ched_database_configurations_operations.py | 16 +- ...luster_principal_assignments_operations.py | 18 +- .../kusto/operations/_clusters_operations.py | 98 ++- .../_data_connections_operations.py | 30 +- ...tabase_principal_assignments_operations.py | 18 +- .../kusto/operations/_databases_operations.py | 30 +- .../mgmt/kusto/operations/_operations.py | 2 +- .../_operations_results_operations.py | 104 +++ .../kusto/operations/_scripts_operations.py | 680 ++++++++++++++++++ 32 files changed, 2661 insertions(+), 311 deletions(-) create mode 100644 sdk/kusto/azure-mgmt-kusto/_meta.json create mode 100644 sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_operations.py create mode 100644 sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py create mode 100644 sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py create mode 100644 sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py diff --git a/sdk/kusto/azure-mgmt-kusto/MANIFEST.in b/sdk/kusto/azure-mgmt-kusto/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/kusto/azure-mgmt-kusto/MANIFEST.in +++ b/sdk/kusto/azure-mgmt-kusto/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/kusto/azure-mgmt-kusto/_meta.json b/sdk/kusto/azure-mgmt-kusto/_meta.json new file mode 100644 index 000000000000..202385447f26 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.3.0", + "use": "@autorest/python@5.6.6", + "commit": "4c881abe43b82c6f001f2f2ca7f2a2d63299749e", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/azure-kusto/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "readme": "specification/azure-kusto/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py index 1460adffc35e..55ac8d3b7f55 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-kusto/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py index f164d7cde911..06d3907b44c3 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py @@ -16,15 +16,18 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import KustoManagementClientConfiguration from .operations import ClustersOperations from .operations import ClusterPrincipalAssignmentsOperations from .operations import DatabasesOperations from .operations import DatabasePrincipalAssignmentsOperations +from .operations import ScriptsOperations from .operations import AttachedDatabaseConfigurationsOperations from .operations import DataConnectionsOperations from .operations import Operations +from .operations import OperationsResultsOperations from . import models @@ -39,12 +42,16 @@ class KustoManagementClient(object): :vartype databases: azure.mgmt.kusto.operations.DatabasesOperations :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations :vartype database_principal_assignments: azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations + :ivar scripts: ScriptsOperations operations + :vartype scripts: azure.mgmt.kusto.operations.ScriptsOperations :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations :vartype attached_database_configurations: azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations :ivar data_connections: DataConnectionsOperations operations :vartype data_connections: azure.mgmt.kusto.operations.DataConnectionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.kusto.operations.Operations + :ivar operations_results: OperationsResultsOperations operations + :vartype operations_results: azure.mgmt.kusto.operations.OperationsResultsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -68,6 +75,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.clusters = ClustersOperations( @@ -78,12 +86,34 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( self._client, self._config, self._serialize, self._deserialize) + self.scripts = ScriptsOperations( + self._client, self._config, self._serialize, self._deserialize) self.attached_database_configurations = AttachedDatabaseConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize) self.data_connections = DataConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + self.operations_results = OperationsResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response def close(self): # type: () -> None diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_metadata.json b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_metadata.json index 9c8f38598ca4..8bc500159da1 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_metadata.json +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2020-09-18", - "total_api_version_list": ["2020-09-18"], + "chosen_version": "2021-01-01", + "total_api_version_list": ["2021-01-01"], "client": { "name": "KustoManagementClient", "filename": "_kusto_management_client", @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"KustoManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"KustoManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", "docstring_type": "str", "required": true @@ -42,26 +44,68 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "clusters": "ClustersOperations", "cluster_principal_assignments": "ClusterPrincipalAssignmentsOperations", "databases": "DatabasesOperations", "database_principal_assignments": "DatabasePrincipalAssignmentsOperations", + "scripts": "ScriptsOperations", "attached_database_configurations": "AttachedDatabaseConfigurationsOperations", "data_connections": "DataConnectionsOperations", - "operations": "Operations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + "operations": "Operations", + "operations_results": "OperationsResultsOperations" + } } \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py index c47f66669f1b..eae7c95b6fbd 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "0.1.0" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py index d4fda3662edf..87f64ac0cefc 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-09-18" + self.api_version = "2021-01-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-kusto/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py index 281c3962b07d..ec0f3ee72d1e 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -20,9 +21,11 @@ from .operations import ClusterPrincipalAssignmentsOperations from .operations import DatabasesOperations from .operations import DatabasePrincipalAssignmentsOperations +from .operations import ScriptsOperations from .operations import AttachedDatabaseConfigurationsOperations from .operations import DataConnectionsOperations from .operations import Operations +from .operations import OperationsResultsOperations from .. import models @@ -37,12 +40,16 @@ class KustoManagementClient(object): :vartype databases: azure.mgmt.kusto.aio.operations.DatabasesOperations :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations :vartype database_principal_assignments: azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations + :ivar scripts: ScriptsOperations operations + :vartype scripts: azure.mgmt.kusto.aio.operations.ScriptsOperations :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations :vartype attached_database_configurations: azure.mgmt.kusto.aio.operations.AttachedDatabaseConfigurationsOperations :ivar data_connections: DataConnectionsOperations operations :vartype data_connections: azure.mgmt.kusto.aio.operations.DataConnectionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.kusto.aio.operations.Operations + :ivar operations_results: OperationsResultsOperations operations + :vartype operations_results: azure.mgmt.kusto.aio.operations.OperationsResultsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -65,6 +72,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.clusters = ClustersOperations( @@ -75,12 +83,33 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( self._client, self._config, self._serialize, self._deserialize) + self.scripts = ScriptsOperations( + self._client, self._config, self._serialize, self._deserialize) self.attached_database_configurations = AttachedDatabaseConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize) self.data_connections = DataConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + self.operations_results = OperationsResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response async def close(self) -> None: await self._client.close() diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py index fb6fa5953866..27917c1aa7d5 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py @@ -10,16 +10,20 @@ from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations from ._databases_operations import DatabasesOperations from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations +from ._scripts_operations import ScriptsOperations from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations from ._data_connections_operations import DataConnectionsOperations from ._operations import Operations +from ._operations_results_operations import OperationsResultsOperations __all__ = [ 'ClustersOperations', 'ClusterPrincipalAssignmentsOperations', 'DatabasesOperations', 'DatabasePrincipalAssignmentsOperations', + 'ScriptsOperations', 'AttachedDatabaseConfigurationsOperations', 'DataConnectionsOperations', 'Operations', + 'OperationsResultsOperations', ] diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py index a9891ec0975c..5f1bd2d8b3a9 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py @@ -65,7 +65,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -261,8 +261,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AttachedDatabaseConfiguration or the result of cls(response) @@ -329,7 +329,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -380,8 +380,8 @@ async def begin_delete( :type attached_database_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py index 3302449d1fd3..b334ad3fad6d 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py @@ -68,7 +68,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -134,7 +134,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -184,7 +184,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -251,8 +251,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ClusterPrincipalAssignment or the result of cls(response) @@ -319,7 +319,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -370,8 +370,8 @@ async def begin_delete( :type principal_assignment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -444,7 +444,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py index 32090944b443..ba4dae97cabe 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -106,6 +106,8 @@ async def _create_or_update_initial( resource_group_name: str, cluster_name: str, parameters: "_models.Cluster", + if_match: Optional[str] = None, + if_none_match: Optional[str] = None, **kwargs ) -> "_models.Cluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -113,7 +115,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -132,6 +134,10 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') @@ -163,6 +169,8 @@ async def begin_create_or_update( resource_group_name: str, cluster_name: str, parameters: "_models.Cluster", + if_match: Optional[str] = None, + if_none_match: Optional[str] = None, **kwargs ) -> AsyncLROPoller["_models.Cluster"]: """Create or update a Kusto cluster. @@ -173,10 +181,17 @@ async def begin_create_or_update( :type cluster_name: str :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. :type parameters: ~azure.mgmt.kusto.models.Cluster + :param if_match: The ETag of the cluster. Omit this value to always overwrite the current + cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + changes. + :type if_match: str + :param if_none_match: Set to '*' to allow a new cluster to be created, but to prevent updating + an existing cluster. Other values will result in a 412 Pre-condition Failed response. + :type if_none_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) @@ -195,6 +210,8 @@ async def begin_create_or_update( resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=parameters, + if_match=if_match, + if_none_match=if_none_match, cls=lambda x,y,z: x, **kwargs ) @@ -234,6 +251,7 @@ async def _update_initial( resource_group_name: str, cluster_name: str, parameters: "_models.ClusterUpdate", + if_match: Optional[str] = None, **kwargs ) -> "_models.Cluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -241,7 +259,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -260,6 +278,8 @@ async def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') @@ -294,6 +314,7 @@ async def begin_update( resource_group_name: str, cluster_name: str, parameters: "_models.ClusterUpdate", + if_match: Optional[str] = None, **kwargs ) -> AsyncLROPoller["_models.Cluster"]: """Update a Kusto cluster. @@ -304,10 +325,14 @@ async def begin_update( :type cluster_name: str :param parameters: The Kusto cluster parameters supplied to the Update operation. :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate + :param if_match: The ETag of the cluster. Omit this value to always overwrite the current + cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + changes. + :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) @@ -326,6 +351,7 @@ async def begin_update( resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=parameters, + if_match=if_match, cls=lambda x,y,z: x, **kwargs ) @@ -371,7 +397,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -418,8 +444,8 @@ async def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -479,7 +505,7 @@ async def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -526,8 +552,8 @@ async def begin_stop( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -587,7 +613,7 @@ async def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -634,8 +660,8 @@ async def begin_start( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -707,7 +733,7 @@ def list_follower_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -771,7 +797,7 @@ async def _detach_follower_databases_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -826,8 +852,8 @@ async def begin_detach_follower_databases( :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -888,7 +914,7 @@ async def _diagnose_virtual_network_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -941,8 +967,8 @@ async def begin_diagnose_virtual_network( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DiagnoseVirtualNetworkResult or the result of cls(response) @@ -1013,7 +1039,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1080,7 +1106,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1146,7 +1172,7 @@ def list_skus( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1204,7 +1230,7 @@ async def check_name_availability( ) -> "_models.CheckNameResult": """Checks that the cluster name is valid and is not already in use. - :param location: Azure location. + :param location: Azure location (region) name. :type location: str :param cluster_name: The name of the cluster. :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest @@ -1218,7 +1244,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1280,7 +1306,7 @@ def list_skus_by_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1354,7 +1380,7 @@ def list_language_extensions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1418,7 +1444,7 @@ async def _add_language_extensions_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1473,8 +1499,8 @@ async def begin_add_language_extensions( :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1536,7 +1562,7 @@ async def _remove_language_extensions_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1591,8 +1617,8 @@ async def begin_remove_language_extensions( :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py index 1474292f2b57..d258abcdbc7d 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py @@ -68,7 +68,7 @@ def list_by_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -134,7 +134,7 @@ async def _data_connection_validation_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -198,8 +198,8 @@ async def begin_data_connection_validation( :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DataConnectionValidationListResult or the result of cls(response) @@ -282,7 +282,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -352,7 +352,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -404,7 +404,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -477,8 +477,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.DataConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DataConnection or the result of cls(response) @@ -549,7 +549,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -622,8 +622,8 @@ async def begin_update( :type parameters: ~azure.mgmt.kusto.models.DataConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DataConnection or the result of cls(response) @@ -693,7 +693,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -748,8 +748,8 @@ async def begin_delete( :type data_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py index 6a7c800fc164..4217d6cd2bc8 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py @@ -71,7 +71,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -141,7 +141,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -263,8 +263,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DatabasePrincipalAssignment or the result of cls(response) @@ -334,7 +334,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -389,8 +389,8 @@ async def begin_delete( :type principal_assignment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -468,7 +468,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py index f12c0ed87e36..7c5df75c32b4 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py @@ -68,7 +68,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -131,7 +131,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -208,7 +208,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -258,7 +258,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -327,8 +327,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.Database :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Database or the result of cls(response) @@ -396,7 +396,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -465,8 +465,8 @@ async def begin_update( :type parameters: ~azure.mgmt.kusto.models.Database :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Database or the result of cls(response) @@ -533,7 +533,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -584,8 +584,8 @@ async def begin_delete( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -661,7 +661,7 @@ def list_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -742,7 +742,7 @@ async def add_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -812,7 +812,7 @@ async def remove_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations.py index dd22452828d5..1a9a99b188e9 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_operations.py new file mode 100644 index 000000000000..c4492e6961e1 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationsResultsOperations: + """OperationsResultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.kusto.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + location: str, + operation_id: str, + **kwargs + ) -> "_models.OperationResult": + """Returns operation results. + + :param location: Azure location (region) name. + :type location: str + :param operation_id: The Guid of the operation ID. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationResult, or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.OperationResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationresults/{operationId}'} # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py new file mode 100644 index 000000000000..03da3f370c92 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py @@ -0,0 +1,667 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ScriptsOperations: + """ScriptsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.kusto.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_database( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + **kwargs + ) -> AsyncIterable["_models.ScriptListResult"]: + """Returns the list of database scripts for given database. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScriptListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ScriptListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ScriptListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts'} # type: ignore + + async def get( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + **kwargs + ) -> "_models.Script": + """Gets a Kusto cluster database script. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Script, or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.Script + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: "_models.Script", + **kwargs + ) -> "_models.Script": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Script') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Script', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Script', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: "_models.Script", + **kwargs + ) -> AsyncLROPoller["_models.Script"]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. + :type parameters: ~azure.mgmt.kusto.models.Script + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Script or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: "_models.Script", + **kwargs + ) -> "_models.Script": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Script') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Script', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: "_models.Script", + **kwargs + ) -> AsyncLROPoller["_models.Script"]: + """Updates a database script. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. + :type parameters: ~azure.mgmt.kusto.models.Script + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Script or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes a Kusto principalAssignment. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: "_models.ScriptCheckNameRequest", + **kwargs + ) -> "_models.CheckNameResult": + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the script. + :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult, or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(script_name, 'ScriptCheckNameRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scriptsCheckNameAvailability'} # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py index 4bad7da941c0..0d487db49251 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py @@ -52,14 +52,20 @@ from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult + from ._models_py3 import OperationResult from ._models_py3 import OptimizedAutoscale from ._models_py3 import ProxyResource from ._models_py3 import ReadOnlyFollowingDatabase from ._models_py3 import ReadWriteDatabase from ._models_py3 import Resource + from ._models_py3 import Script + from ._models_py3 import ScriptCheckNameRequest + from ._models_py3 import ScriptListResult from ._models_py3 import SkuDescription from ._models_py3 import SkuDescriptionList from ._models_py3 import SkuLocationInfoItem + from ._models_py3 import SystemData + from ._models_py3 import TableLevelSharingProperties from ._models_py3 import TrackedResource from ._models_py3 import TrustedExternalTenant from ._models_py3 import VirtualNetworkConfiguration @@ -109,14 +115,20 @@ from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore + from ._models import OperationResult # type: ignore from ._models import OptimizedAutoscale # type: ignore from ._models import ProxyResource # type: ignore from ._models import ReadOnlyFollowingDatabase # type: ignore from ._models import ReadWriteDatabase # type: ignore from ._models import Resource # type: ignore + from ._models import Script # type: ignore + from ._models import ScriptCheckNameRequest # type: ignore + from ._models import ScriptListResult # type: ignore from ._models import SkuDescription # type: ignore from ._models import SkuDescriptionList # type: ignore from ._models import SkuLocationInfoItem # type: ignore + from ._models import SystemData # type: ignore + from ._models import TableLevelSharingProperties # type: ignore from ._models import TrackedResource # type: ignore from ._models import TrustedExternalTenant # type: ignore from ._models import VirtualNetworkConfiguration # type: ignore @@ -128,6 +140,7 @@ BlobStorageEventType, ClusterPrincipalRole, Compression, + CreatedByType, DataConnectionKind, DatabasePrincipalRole, DatabasePrincipalType, @@ -144,6 +157,7 @@ ProvisioningState, Reason, State, + Status, Type, ) @@ -193,14 +207,20 @@ 'Operation', 'OperationDisplay', 'OperationListResult', + 'OperationResult', 'OptimizedAutoscale', 'ProxyResource', 'ReadOnlyFollowingDatabase', 'ReadWriteDatabase', 'Resource', + 'Script', + 'ScriptCheckNameRequest', + 'ScriptListResult', 'SkuDescription', 'SkuDescriptionList', 'SkuLocationInfoItem', + 'SystemData', + 'TableLevelSharingProperties', 'TrackedResource', 'TrustedExternalTenant', 'VirtualNetworkConfiguration', @@ -210,6 +230,7 @@ 'BlobStorageEventType', 'ClusterPrincipalRole', 'Compression', + 'CreatedByType', 'DataConnectionKind', 'DatabasePrincipalRole', 'DatabasePrincipalType', @@ -226,5 +247,6 @@ 'ProvisioningState', 'Reason', 'State', + 'Status', 'Type', ] diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py index 103e2cc4b75a..38869eaa64fd 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py @@ -46,11 +46,14 @@ class AzureSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): STANDARD_D14_V2 = "Standard_D14_v2" STANDARD_L8_S = "Standard_L8s" STANDARD_L16_S = "Standard_L16s" + STANDARD_L8_S_V2 = "Standard_L8s_v2" + STANDARD_L16_S_V2 = "Standard_L16s_v2" STANDARD_D11_V2 = "Standard_D11_v2" STANDARD_D12_V2 = "Standard_D12_v2" STANDARD_L4_S = "Standard_L4s" DEV_NO_SLA_STANDARD_D11_V2 = "Dev(No SLA)_Standard_D11_v2" STANDARD_E64_I_V3 = "Standard_E64i_v3" + STANDARD_E80_IDS_V4 = "Standard_E80ids_v4" STANDARD_E2_A_V4 = "Standard_E2a_v4" STANDARD_E4_A_V4 = "Standard_E4a_v4" STANDARD_E8_A_V4 = "Standard_E8a_v4" @@ -89,6 +92,15 @@ class Compression(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NONE = "None" G_ZIP = "GZip" +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + class DatabasePrincipalRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Database principal role. """ @@ -97,7 +109,7 @@ class DatabasePrincipalRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) INGESTOR = "Ingestor" MONITOR = "Monitor" USER = "User" - UNRESTRICTED_VIEWERS = "UnrestrictedViewers" + UNRESTRICTED_VIEWER = "UnrestrictedViewer" VIEWER = "Viewer" class DatabasePrincipalType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -267,6 +279,15 @@ class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): STARTING = "Starting" UPDATING = "Updating" +class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of operation. + """ + + SUCCEEDED = "Succeeded" + CANCELED = "Canceled" + FAILED = "Failed" + RUNNING = "Running" + class Type(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of resource, for instance Microsoft.Kusto/clusters/databases. """ diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py index e1bf5be51aed..2dba0563fd32 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py @@ -46,7 +46,41 @@ def __init__( self.type = None -class AttachedDatabaseConfiguration(Resource): +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class AttachedDatabaseConfiguration(ProxyResource): """Class representing an attached database configuration. Variables are only populated by the server, and will be ignored when sending a request. @@ -77,6 +111,8 @@ class AttachedDatabaseConfiguration(Resource): values include: "Union", "Replace", "None". :type default_principals_modification_kind: str or ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind + :param table_level_sharing_properties: Table level sharing specifications. + :type table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties """ _validation = { @@ -97,6 +133,7 @@ class AttachedDatabaseConfiguration(Resource): 'cluster_resource_id': {'key': 'properties.clusterResourceId', 'type': 'str'}, 'attached_database_names': {'key': 'properties.attachedDatabaseNames', 'type': '[str]'}, 'default_principals_modification_kind': {'key': 'properties.defaultPrincipalsModificationKind', 'type': 'str'}, + 'table_level_sharing_properties': {'key': 'properties.tableLevelSharingProperties', 'type': 'TableLevelSharingProperties'}, } def __init__( @@ -110,6 +147,7 @@ def __init__( self.cluster_resource_id = kwargs.get('cluster_resource_id', None) self.attached_database_names = None self.default_principals_modification_kind = kwargs.get('default_principals_modification_kind', None) + self.table_level_sharing_properties = kwargs.get('table_level_sharing_properties', None) class AttachedDatabaseConfigurationListResult(msrest.serialization.Model): @@ -206,11 +244,12 @@ class AzureSku(msrest.serialization.Model): :param name: Required. SKU name. Possible values include: "Standard_DS13_v2+1TB_PS", "Standard_DS13_v2+2TB_PS", "Standard_DS14_v2+3TB_PS", "Standard_DS14_v2+4TB_PS", - "Standard_D13_v2", "Standard_D14_v2", "Standard_L8s", "Standard_L16s", "Standard_D11_v2", - "Standard_D12_v2", "Standard_L4s", "Dev(No SLA)_Standard_D11_v2", "Standard_E64i_v3", - "Standard_E2a_v4", "Standard_E4a_v4", "Standard_E8a_v4", "Standard_E16a_v4", - "Standard_E8as_v4+1TB_PS", "Standard_E8as_v4+2TB_PS", "Standard_E16as_v4+3TB_PS", - "Standard_E16as_v4+4TB_PS", "Dev(No SLA)_Standard_E2a_v4". + "Standard_D13_v2", "Standard_D14_v2", "Standard_L8s", "Standard_L16s", "Standard_L8s_v2", + "Standard_L16s_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_L4s", "Dev(No + SLA)_Standard_D11_v2", "Standard_E64i_v3", "Standard_E80ids_v4", "Standard_E2a_v4", + "Standard_E4a_v4", "Standard_E8a_v4", "Standard_E16a_v4", "Standard_E8as_v4+1TB_PS", + "Standard_E8as_v4+2TB_PS", "Standard_E16as_v4+3TB_PS", "Standard_E16as_v4+4TB_PS", "Dev(No + SLA)_Standard_E2a_v4". :type name: str or ~azure.mgmt.kusto.models.AzureSkuName :param capacity: The number of instances of the cluster. :type capacity: int @@ -408,6 +447,8 @@ class Cluster(TrackedResource): :type zones: list[str] :param identity: The identity of the cluster, if configured. :type identity: ~azure.mgmt.kusto.models.Identity + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str :ivar state: The state of the resource. Possible values include: "Creating", "Unavailable", "Running", "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating". :vartype state: str or ~azure.mgmt.kusto.models.State @@ -441,7 +482,7 @@ class Cluster(TrackedResource): :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. :type enable_double_encryption: bool - :param engine_type: The engine type. Possible values include: "V2", "V3". + :param engine_type: The engine type. Possible values include: "V2", "V3". Default value: "V3". :type engine_type: str or ~azure.mgmt.kusto.models.EngineType """ @@ -451,6 +492,7 @@ class Cluster(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'sku': {'required': True}, + 'etag': {'readonly': True}, 'state': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'uri': {'readonly': True}, @@ -468,6 +510,7 @@ class Cluster(TrackedResource): 'sku': {'key': 'sku', 'type': 'AzureSku'}, 'zones': {'key': 'zones', 'type': '[str]'}, 'identity': {'key': 'identity', 'type': 'Identity'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'uri': {'key': 'properties.uri', 'type': 'str'}, @@ -493,6 +536,7 @@ def __init__( self.sku = kwargs['sku'] self.zones = kwargs.get('zones', None) self.identity = kwargs.get('identity', None) + self.etag = None self.state = None self.provisioning_state = None self.uri = None @@ -500,14 +544,14 @@ def __init__( self.state_reason = None self.trusted_external_tenants = kwargs.get('trusted_external_tenants', None) self.optimized_autoscale = kwargs.get('optimized_autoscale', None) - self.enable_disk_encryption = kwargs.get('enable_disk_encryption', None) + self.enable_disk_encryption = kwargs.get('enable_disk_encryption', False) self.enable_streaming_ingest = kwargs.get('enable_streaming_ingest', False) self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) self.key_vault_properties = kwargs.get('key_vault_properties', None) self.enable_purge = kwargs.get('enable_purge', False) self.language_extensions = None self.enable_double_encryption = kwargs.get('enable_double_encryption', False) - self.engine_type = kwargs.get('engine_type', None) + self.engine_type = kwargs.get('engine_type', "V3") class ClusterCheckNameRequest(msrest.serialization.Model): @@ -563,7 +607,7 @@ def __init__( self.value = kwargs.get('value', None) -class ClusterPrincipalAssignment(Resource): +class ClusterPrincipalAssignment(ProxyResource): """Class representing a cluster principal assignment. Variables are only populated by the server, and will be ignored when sending a request. @@ -738,7 +782,7 @@ class ClusterUpdate(Resource): :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. :type enable_double_encryption: bool - :param engine_type: The engine type. Possible values include: "V2", "V3". + :param engine_type: The engine type. Possible values include: "V2", "V3". Default value: "V3". :type engine_type: str or ~azure.mgmt.kusto.models.EngineType """ @@ -795,14 +839,14 @@ def __init__( self.state_reason = None self.trusted_external_tenants = kwargs.get('trusted_external_tenants', None) self.optimized_autoscale = kwargs.get('optimized_autoscale', None) - self.enable_disk_encryption = kwargs.get('enable_disk_encryption', None) + self.enable_disk_encryption = kwargs.get('enable_disk_encryption', False) self.enable_streaming_ingest = kwargs.get('enable_streaming_ingest', False) self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) self.key_vault_properties = kwargs.get('key_vault_properties', None) self.enable_purge = kwargs.get('enable_purge', False) self.language_extensions = None self.enable_double_encryption = kwargs.get('enable_double_encryption', False) - self.engine_type = kwargs.get('engine_type', None) + self.engine_type = kwargs.get('engine_type', "V3") class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): @@ -835,7 +879,7 @@ def __init__( self.client_id = None -class Database(Resource): +class Database(ProxyResource): """Class representing a Kusto database. You probably want to use the sub-classes and not this class directly. Known @@ -915,7 +959,7 @@ class DatabasePrincipal(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param role: Required. Database principal role. Possible values include: "Admin", "Ingestor", - "Monitor", "User", "UnrestrictedViewers", "Viewer". + "Monitor", "User", "UnrestrictedViewer", "Viewer". :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole :param name: Required. Database principal name. :type name: str @@ -963,7 +1007,7 @@ def __init__( self.tenant_name = None -class DatabasePrincipalAssignment(Resource): +class DatabasePrincipalAssignment(ProxyResource): """Class representing a database principal assignment. Variables are only populated by the server, and will be ignored when sending a request. @@ -980,7 +1024,7 @@ class DatabasePrincipalAssignment(Resource): email, application ID, or security group name. :type principal_id: str :param role: Database principal role. Possible values include: "Admin", "Ingestor", "Monitor", - "User", "UnrestrictedViewers", "Viewer". + "User", "UnrestrictedViewer", "Viewer". :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole :param tenant_id: The tenant id of the principal. :type tenant_id: str @@ -1142,7 +1186,7 @@ def __init__( self.size = kwargs.get('size', None) -class DataConnection(Resource): +class DataConnection(ProxyResource): """Class representing an data connection. You probably want to use the sub-classes and not this class directly. Known @@ -1459,11 +1503,14 @@ class EventHubDataConnection(DataConnection): :param event_system_properties: System properties of the event hub. :type event_system_properties: list[str] :param compression: The event hub messages compression type. Possible values include: "None", - "GZip". + "GZip". Default value: "None". :type compression: str or ~azure.mgmt.kusto.models.Compression :ivar provisioning_state: The provisioned state of the resource. Possible values include: "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving". :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :param managed_identity_resource_id: The resource ID of a managed identity (system or user + assigned) to be used to authenticate with event hub. + :type managed_identity_resource_id: str """ _validation = { @@ -1488,6 +1535,7 @@ class EventHubDataConnection(DataConnection): 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, 'compression': {'key': 'properties.compression', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'managed_identity_resource_id': {'key': 'properties.managedIdentityResourceId', 'type': 'str'}, } def __init__( @@ -1502,8 +1550,9 @@ def __init__( self.mapping_rule_name = kwargs.get('mapping_rule_name', None) self.data_format = kwargs.get('data_format', None) self.event_system_properties = kwargs.get('event_system_properties', None) - self.compression = kwargs.get('compression', None) + self.compression = kwargs.get('compression', "None") self.provisioning_state = None + self.managed_identity_resource_id = kwargs.get('managed_identity_resource_id', None) class FollowerDatabaseDefinition(msrest.serialization.Model): @@ -1878,6 +1927,71 @@ def __init__( self.next_link = kwargs.get('next_link', None) +class OperationResult(msrest.serialization.Model): + """Operation Result Entity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: ID of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar status: status of the Operation result. Possible values include: "Succeeded", "Canceled", + "Failed", "Running". + :vartype status: str or ~azure.mgmt.kusto.models.Status + :param start_time: The operation start time. + :type start_time: ~datetime.datetime + :param end_time: The operation end time. + :type end_time: ~datetime.datetime + :param percent_complete: Percentage completed. + :type percent_complete: float + :param code: The code of the error. + :type code: str + :param message: The error message. + :type message: str + :param operation_kind: The kind of the operation. + :type operation_kind: str + :param operation_state: The state of the operation. + :type operation_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'float'}, + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'operation_kind': {'key': 'properties.operationKind', 'type': 'str'}, + 'operation_state': {'key': 'properties.operationState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.percent_complete = kwargs.get('percent_complete', None) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.operation_kind = kwargs.get('operation_kind', None) + self.operation_state = kwargs.get('operation_state', None) + + class OptimizedAutoscale(msrest.serialization.Model): """A class that contains the optimized auto scale definition. @@ -1919,40 +2033,6 @@ def __init__( self.maximum = kwargs['maximum'] -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - - class ReadOnlyFollowingDatabase(Database): """Class representing a read only following database. @@ -2109,6 +2189,120 @@ def __init__( self.is_followed = None +class Script(ProxyResource): + """Class representing a database script. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :param script_url: The url to the KQL script blob file. + :type script_url: str + :param script_url_sas_token: The SaS token. + :type script_url_sas_token: str + :param force_update_tag: A unique string. If changed the script will be applied again. + :type force_update_tag: str + :param continue_on_errors: Flag that indicates whether to continue if one of the command fails. + :type continue_on_errors: bool + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'script_url': {'key': 'properties.scriptUrl', 'type': 'str'}, + 'script_url_sas_token': {'key': 'properties.scriptUrlSasToken', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'continue_on_errors': {'key': 'properties.continueOnErrors', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Script, self).__init__(**kwargs) + self.system_data = None + self.script_url = kwargs.get('script_url', None) + self.script_url_sas_token = kwargs.get('script_url_sas_token', None) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.continue_on_errors = kwargs.get('continue_on_errors', False) + self.provisioning_state = None + + +class ScriptCheckNameRequest(msrest.serialization.Model): + """A script name availability request. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Script name. + :type name: str + :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/scripts. Default + value: "Microsoft.Kusto/clusters/databases/scripts". + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Kusto/clusters/databases/scripts" + + def __init__( + self, + **kwargs + ): + super(ScriptCheckNameRequest, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class ScriptListResult(msrest.serialization.Model): + """The list Kusto database script operation response. + + :param value: The list of Kusto scripts. + :type value: list[~azure.mgmt.kusto.models.Script] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Script]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScriptListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class SkuDescription(msrest.serialization.Model): """The Kusto SKU description of given resource type. @@ -2213,6 +2407,88 @@ def __init__( self.zones = kwargs.get('zones', None) +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TableLevelSharingProperties(msrest.serialization.Model): + """Tables that will be included and excluded in the follower database. + + :param tables_to_include: List of tables to include in the follower database. + :type tables_to_include: list[str] + :param tables_to_exclude: List of tables to exclude from the follower database. + :type tables_to_exclude: list[str] + :param external_tables_to_include: List of external tables to include in the follower database. + :type external_tables_to_include: list[str] + :param external_tables_to_exclude: List of external tables exclude from the follower database. + :type external_tables_to_exclude: list[str] + :param materialized_views_to_include: List of materialized views to include in the follower + database. + :type materialized_views_to_include: list[str] + :param materialized_views_to_exclude: List of materialized views exclude from the follower + database. + :type materialized_views_to_exclude: list[str] + """ + + _attribute_map = { + 'tables_to_include': {'key': 'tablesToInclude', 'type': '[str]'}, + 'tables_to_exclude': {'key': 'tablesToExclude', 'type': '[str]'}, + 'external_tables_to_include': {'key': 'externalTablesToInclude', 'type': '[str]'}, + 'external_tables_to_exclude': {'key': 'externalTablesToExclude', 'type': '[str]'}, + 'materialized_views_to_include': {'key': 'materializedViewsToInclude', 'type': '[str]'}, + 'materialized_views_to_exclude': {'key': 'materializedViewsToExclude', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(TableLevelSharingProperties, self).__init__(**kwargs) + self.tables_to_include = kwargs.get('tables_to_include', None) + self.tables_to_exclude = kwargs.get('tables_to_exclude', None) + self.external_tables_to_include = kwargs.get('external_tables_to_include', None) + self.external_tables_to_exclude = kwargs.get('external_tables_to_exclude', None) + self.materialized_views_to_include = kwargs.get('materialized_views_to_include', None) + self.materialized_views_to_exclude = kwargs.get('materialized_views_to_exclude', None) + + class TrustedExternalTenant(msrest.serialization.Model): """Represents a tenant ID that is trusted by the cluster. diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py index 80c5f085c894..e519944f8764 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py @@ -51,7 +51,41 @@ def __init__( self.type = None -class AttachedDatabaseConfiguration(Resource): +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class AttachedDatabaseConfiguration(ProxyResource): """Class representing an attached database configuration. Variables are only populated by the server, and will be ignored when sending a request. @@ -82,6 +116,8 @@ class AttachedDatabaseConfiguration(Resource): values include: "Union", "Replace", "None". :type default_principals_modification_kind: str or ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind + :param table_level_sharing_properties: Table level sharing specifications. + :type table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties """ _validation = { @@ -102,6 +138,7 @@ class AttachedDatabaseConfiguration(Resource): 'cluster_resource_id': {'key': 'properties.clusterResourceId', 'type': 'str'}, 'attached_database_names': {'key': 'properties.attachedDatabaseNames', 'type': '[str]'}, 'default_principals_modification_kind': {'key': 'properties.defaultPrincipalsModificationKind', 'type': 'str'}, + 'table_level_sharing_properties': {'key': 'properties.tableLevelSharingProperties', 'type': 'TableLevelSharingProperties'}, } def __init__( @@ -111,6 +148,7 @@ def __init__( database_name: Optional[str] = None, cluster_resource_id: Optional[str] = None, default_principals_modification_kind: Optional[Union[str, "DefaultPrincipalsModificationKind"]] = None, + table_level_sharing_properties: Optional["TableLevelSharingProperties"] = None, **kwargs ): super(AttachedDatabaseConfiguration, self).__init__(**kwargs) @@ -120,6 +158,7 @@ def __init__( self.cluster_resource_id = cluster_resource_id self.attached_database_names = None self.default_principals_modification_kind = default_principals_modification_kind + self.table_level_sharing_properties = table_level_sharing_properties class AttachedDatabaseConfigurationListResult(msrest.serialization.Model): @@ -227,11 +266,12 @@ class AzureSku(msrest.serialization.Model): :param name: Required. SKU name. Possible values include: "Standard_DS13_v2+1TB_PS", "Standard_DS13_v2+2TB_PS", "Standard_DS14_v2+3TB_PS", "Standard_DS14_v2+4TB_PS", - "Standard_D13_v2", "Standard_D14_v2", "Standard_L8s", "Standard_L16s", "Standard_D11_v2", - "Standard_D12_v2", "Standard_L4s", "Dev(No SLA)_Standard_D11_v2", "Standard_E64i_v3", - "Standard_E2a_v4", "Standard_E4a_v4", "Standard_E8a_v4", "Standard_E16a_v4", - "Standard_E8as_v4+1TB_PS", "Standard_E8as_v4+2TB_PS", "Standard_E16as_v4+3TB_PS", - "Standard_E16as_v4+4TB_PS", "Dev(No SLA)_Standard_E2a_v4". + "Standard_D13_v2", "Standard_D14_v2", "Standard_L8s", "Standard_L16s", "Standard_L8s_v2", + "Standard_L16s_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_L4s", "Dev(No + SLA)_Standard_D11_v2", "Standard_E64i_v3", "Standard_E80ids_v4", "Standard_E2a_v4", + "Standard_E4a_v4", "Standard_E8a_v4", "Standard_E16a_v4", "Standard_E8as_v4+1TB_PS", + "Standard_E8as_v4+2TB_PS", "Standard_E16as_v4+3TB_PS", "Standard_E16as_v4+4TB_PS", "Dev(No + SLA)_Standard_E2a_v4". :type name: str or ~azure.mgmt.kusto.models.AzureSkuName :param capacity: The number of instances of the cluster. :type capacity: int @@ -449,6 +489,8 @@ class Cluster(TrackedResource): :type zones: list[str] :param identity: The identity of the cluster, if configured. :type identity: ~azure.mgmt.kusto.models.Identity + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str :ivar state: The state of the resource. Possible values include: "Creating", "Unavailable", "Running", "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating". :vartype state: str or ~azure.mgmt.kusto.models.State @@ -482,7 +524,7 @@ class Cluster(TrackedResource): :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. :type enable_double_encryption: bool - :param engine_type: The engine type. Possible values include: "V2", "V3". + :param engine_type: The engine type. Possible values include: "V2", "V3". Default value: "V3". :type engine_type: str or ~azure.mgmt.kusto.models.EngineType """ @@ -492,6 +534,7 @@ class Cluster(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'sku': {'required': True}, + 'etag': {'readonly': True}, 'state': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'uri': {'readonly': True}, @@ -509,6 +552,7 @@ class Cluster(TrackedResource): 'sku': {'key': 'sku', 'type': 'AzureSku'}, 'zones': {'key': 'zones', 'type': '[str]'}, 'identity': {'key': 'identity', 'type': 'Identity'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'uri': {'key': 'properties.uri', 'type': 'str'}, @@ -536,19 +580,20 @@ def __init__( identity: Optional["Identity"] = None, trusted_external_tenants: Optional[List["TrustedExternalTenant"]] = None, optimized_autoscale: Optional["OptimizedAutoscale"] = None, - enable_disk_encryption: Optional[bool] = None, + enable_disk_encryption: Optional[bool] = False, enable_streaming_ingest: Optional[bool] = False, virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None, key_vault_properties: Optional["KeyVaultProperties"] = None, enable_purge: Optional[bool] = False, enable_double_encryption: Optional[bool] = False, - engine_type: Optional[Union[str, "EngineType"]] = None, + engine_type: Optional[Union[str, "EngineType"]] = "V3", **kwargs ): super(Cluster, self).__init__(tags=tags, location=location, **kwargs) self.sku = sku self.zones = zones self.identity = identity + self.etag = None self.state = None self.provisioning_state = None self.uri = None @@ -623,7 +668,7 @@ def __init__( self.value = value -class ClusterPrincipalAssignment(Resource): +class ClusterPrincipalAssignment(ProxyResource): """Class representing a cluster principal assignment. Variables are only populated by the server, and will be ignored when sending a request. @@ -807,7 +852,7 @@ class ClusterUpdate(Resource): :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. :type enable_double_encryption: bool - :param engine_type: The engine type. Possible values include: "V2", "V3". + :param engine_type: The engine type. Possible values include: "V2", "V3". Default value: "V3". :type engine_type: str or ~azure.mgmt.kusto.models.EngineType """ @@ -857,13 +902,13 @@ def __init__( identity: Optional["Identity"] = None, trusted_external_tenants: Optional[List["TrustedExternalTenant"]] = None, optimized_autoscale: Optional["OptimizedAutoscale"] = None, - enable_disk_encryption: Optional[bool] = None, + enable_disk_encryption: Optional[bool] = False, enable_streaming_ingest: Optional[bool] = False, virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None, key_vault_properties: Optional["KeyVaultProperties"] = None, enable_purge: Optional[bool] = False, enable_double_encryption: Optional[bool] = False, - engine_type: Optional[Union[str, "EngineType"]] = None, + engine_type: Optional[Union[str, "EngineType"]] = "V3", **kwargs ): super(ClusterUpdate, self).__init__(**kwargs) @@ -918,7 +963,7 @@ def __init__( self.client_id = None -class Database(Resource): +class Database(ProxyResource): """Class representing a Kusto database. You probably want to use the sub-classes and not this class directly. Known @@ -1002,7 +1047,7 @@ class DatabasePrincipal(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param role: Required. Database principal role. Possible values include: "Admin", "Ingestor", - "Monitor", "User", "UnrestrictedViewers", "Viewer". + "Monitor", "User", "UnrestrictedViewer", "Viewer". :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole :param name: Required. Database principal name. :type name: str @@ -1057,7 +1102,7 @@ def __init__( self.tenant_name = None -class DatabasePrincipalAssignment(Resource): +class DatabasePrincipalAssignment(ProxyResource): """Class representing a database principal assignment. Variables are only populated by the server, and will be ignored when sending a request. @@ -1074,7 +1119,7 @@ class DatabasePrincipalAssignment(Resource): email, application ID, or security group name. :type principal_id: str :param role: Database principal role. Possible values include: "Admin", "Ingestor", "Monitor", - "User", "UnrestrictedViewers", "Viewer". + "User", "UnrestrictedViewer", "Viewer". :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole :param tenant_id: The tenant id of the principal. :type tenant_id: str @@ -1251,7 +1296,7 @@ def __init__( self.size = size -class DataConnection(Resource): +class DataConnection(ProxyResource): """Class representing an data connection. You probably want to use the sub-classes and not this class directly. Known @@ -1593,11 +1638,14 @@ class EventHubDataConnection(DataConnection): :param event_system_properties: System properties of the event hub. :type event_system_properties: list[str] :param compression: The event hub messages compression type. Possible values include: "None", - "GZip". + "GZip". Default value: "None". :type compression: str or ~azure.mgmt.kusto.models.Compression :ivar provisioning_state: The provisioned state of the resource. Possible values include: "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving". :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :param managed_identity_resource_id: The resource ID of a managed identity (system or user + assigned) to be used to authenticate with event hub. + :type managed_identity_resource_id: str """ _validation = { @@ -1622,6 +1670,7 @@ class EventHubDataConnection(DataConnection): 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, 'compression': {'key': 'properties.compression', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'managed_identity_resource_id': {'key': 'properties.managedIdentityResourceId', 'type': 'str'}, } def __init__( @@ -1634,7 +1683,8 @@ def __init__( mapping_rule_name: Optional[str] = None, data_format: Optional[Union[str, "EventHubDataFormat"]] = None, event_system_properties: Optional[List[str]] = None, - compression: Optional[Union[str, "Compression"]] = None, + compression: Optional[Union[str, "Compression"]] = "None", + managed_identity_resource_id: Optional[str] = None, **kwargs ): super(EventHubDataConnection, self).__init__(location=location, **kwargs) @@ -1647,6 +1697,7 @@ def __init__( self.event_system_properties = event_system_properties self.compression = compression self.provisioning_state = None + self.managed_identity_resource_id = managed_identity_resource_id class FollowerDatabaseDefinition(msrest.serialization.Model): @@ -2062,6 +2113,79 @@ def __init__( self.next_link = next_link +class OperationResult(msrest.serialization.Model): + """Operation Result Entity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: ID of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar status: status of the Operation result. Possible values include: "Succeeded", "Canceled", + "Failed", "Running". + :vartype status: str or ~azure.mgmt.kusto.models.Status + :param start_time: The operation start time. + :type start_time: ~datetime.datetime + :param end_time: The operation end time. + :type end_time: ~datetime.datetime + :param percent_complete: Percentage completed. + :type percent_complete: float + :param code: The code of the error. + :type code: str + :param message: The error message. + :type message: str + :param operation_kind: The kind of the operation. + :type operation_kind: str + :param operation_state: The state of the operation. + :type operation_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'percent_complete': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'float'}, + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'operation_kind': {'key': 'properties.operationKind', 'type': 'str'}, + 'operation_state': {'key': 'properties.operationState', 'type': 'str'}, + } + + def __init__( + self, + *, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + percent_complete: Optional[float] = None, + code: Optional[str] = None, + message: Optional[str] = None, + operation_kind: Optional[str] = None, + operation_state: Optional[str] = None, + **kwargs + ): + super(OperationResult, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = start_time + self.end_time = end_time + self.percent_complete = percent_complete + self.code = code + self.message = message + self.operation_kind = operation_kind + self.operation_state = operation_state + + class OptimizedAutoscale(msrest.serialization.Model): """A class that contains the optimized auto scale definition. @@ -2108,40 +2232,6 @@ def __init__( self.maximum = maximum -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - - class ReadOnlyFollowingDatabase(Database): """Class representing a read only following database. @@ -2305,6 +2395,129 @@ def __init__( self.is_followed = None +class Script(ProxyResource): + """Class representing a database script. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :param script_url: The url to the KQL script blob file. + :type script_url: str + :param script_url_sas_token: The SaS token. + :type script_url_sas_token: str + :param force_update_tag: A unique string. If changed the script will be applied again. + :type force_update_tag: str + :param continue_on_errors: Flag that indicates whether to continue if one of the command fails. + :type continue_on_errors: bool + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'script_url': {'key': 'properties.scriptUrl', 'type': 'str'}, + 'script_url_sas_token': {'key': 'properties.scriptUrlSasToken', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'continue_on_errors': {'key': 'properties.continueOnErrors', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + script_url: Optional[str] = None, + script_url_sas_token: Optional[str] = None, + force_update_tag: Optional[str] = None, + continue_on_errors: Optional[bool] = False, + **kwargs + ): + super(Script, self).__init__(**kwargs) + self.system_data = None + self.script_url = script_url + self.script_url_sas_token = script_url_sas_token + self.force_update_tag = force_update_tag + self.continue_on_errors = continue_on_errors + self.provisioning_state = None + + +class ScriptCheckNameRequest(msrest.serialization.Model): + """A script name availability request. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Script name. + :type name: str + :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/scripts. Default + value: "Microsoft.Kusto/clusters/databases/scripts". + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Kusto/clusters/databases/scripts" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(ScriptCheckNameRequest, self).__init__(**kwargs) + self.name = name + + +class ScriptListResult(msrest.serialization.Model): + """The list Kusto database script operation response. + + :param value: The list of Kusto scripts. + :type value: list[~azure.mgmt.kusto.models.Script] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Script]'}, + } + + def __init__( + self, + *, + value: Optional[List["Script"]] = None, + **kwargs + ): + super(ScriptListResult, self).__init__(**kwargs) + self.value = value + + class SkuDescription(msrest.serialization.Model): """The Kusto SKU description of given resource type. @@ -2412,6 +2625,102 @@ def __init__( self.zones = zones +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TableLevelSharingProperties(msrest.serialization.Model): + """Tables that will be included and excluded in the follower database. + + :param tables_to_include: List of tables to include in the follower database. + :type tables_to_include: list[str] + :param tables_to_exclude: List of tables to exclude from the follower database. + :type tables_to_exclude: list[str] + :param external_tables_to_include: List of external tables to include in the follower database. + :type external_tables_to_include: list[str] + :param external_tables_to_exclude: List of external tables exclude from the follower database. + :type external_tables_to_exclude: list[str] + :param materialized_views_to_include: List of materialized views to include in the follower + database. + :type materialized_views_to_include: list[str] + :param materialized_views_to_exclude: List of materialized views exclude from the follower + database. + :type materialized_views_to_exclude: list[str] + """ + + _attribute_map = { + 'tables_to_include': {'key': 'tablesToInclude', 'type': '[str]'}, + 'tables_to_exclude': {'key': 'tablesToExclude', 'type': '[str]'}, + 'external_tables_to_include': {'key': 'externalTablesToInclude', 'type': '[str]'}, + 'external_tables_to_exclude': {'key': 'externalTablesToExclude', 'type': '[str]'}, + 'materialized_views_to_include': {'key': 'materializedViewsToInclude', 'type': '[str]'}, + 'materialized_views_to_exclude': {'key': 'materializedViewsToExclude', 'type': '[str]'}, + } + + def __init__( + self, + *, + tables_to_include: Optional[List[str]] = None, + tables_to_exclude: Optional[List[str]] = None, + external_tables_to_include: Optional[List[str]] = None, + external_tables_to_exclude: Optional[List[str]] = None, + materialized_views_to_include: Optional[List[str]] = None, + materialized_views_to_exclude: Optional[List[str]] = None, + **kwargs + ): + super(TableLevelSharingProperties, self).__init__(**kwargs) + self.tables_to_include = tables_to_include + self.tables_to_exclude = tables_to_exclude + self.external_tables_to_include = external_tables_to_include + self.external_tables_to_exclude = external_tables_to_exclude + self.materialized_views_to_include = materialized_views_to_include + self.materialized_views_to_exclude = materialized_views_to_exclude + + class TrustedExternalTenant(msrest.serialization.Model): """Represents a tenant ID that is trusted by the cluster. diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py index fb6fa5953866..27917c1aa7d5 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py @@ -10,16 +10,20 @@ from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations from ._databases_operations import DatabasesOperations from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations +from ._scripts_operations import ScriptsOperations from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations from ._data_connections_operations import DataConnectionsOperations from ._operations import Operations +from ._operations_results_operations import OperationsResultsOperations __all__ = [ 'ClustersOperations', 'ClusterPrincipalAssignmentsOperations', 'DatabasesOperations', 'DatabasePrincipalAssignmentsOperations', + 'ScriptsOperations', 'AttachedDatabaseConfigurationsOperations', 'DataConnectionsOperations', 'Operations', + 'OperationsResultsOperations', ] diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py index b381e2a3ab3c..585ff07b2e8a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py @@ -70,7 +70,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -269,8 +269,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AttachedDatabaseConfiguration or the result of cls(response) @@ -338,7 +338,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -390,8 +390,8 @@ def begin_delete( :type attached_database_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py index f8483f33575f..037d6f357c61 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py @@ -73,7 +73,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -140,7 +140,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -191,7 +191,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -259,8 +259,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ClusterPrincipalAssignment or the result of cls(response) @@ -328,7 +328,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -380,8 +380,8 @@ def begin_delete( :type principal_assignment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -455,7 +455,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py index 202753898115..a39d2052a6c9 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -111,6 +111,8 @@ def _create_or_update_initial( resource_group_name, # type: str cluster_name, # type: str parameters, # type: "_models.Cluster" + if_match=None, # type: Optional[str] + if_none_match=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "_models.Cluster" @@ -119,7 +121,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -138,6 +140,10 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') @@ -169,6 +175,8 @@ def begin_create_or_update( resource_group_name, # type: str cluster_name, # type: str parameters, # type: "_models.Cluster" + if_match=None, # type: Optional[str] + if_none_match=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.Cluster"] @@ -180,10 +188,17 @@ def begin_create_or_update( :type cluster_name: str :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. :type parameters: ~azure.mgmt.kusto.models.Cluster + :param if_match: The ETag of the cluster. Omit this value to always overwrite the current + cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + changes. + :type if_match: str + :param if_none_match: Set to '*' to allow a new cluster to be created, but to prevent updating + an existing cluster. Other values will result in a 412 Pre-condition Failed response. + :type if_none_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Cluster or the result of cls(response) @@ -202,6 +217,8 @@ def begin_create_or_update( resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=parameters, + if_match=if_match, + if_none_match=if_none_match, cls=lambda x,y,z: x, **kwargs ) @@ -241,6 +258,7 @@ def _update_initial( resource_group_name, # type: str cluster_name, # type: str parameters, # type: "_models.ClusterUpdate" + if_match=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "_models.Cluster" @@ -249,7 +267,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -268,6 +286,8 @@ def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') @@ -302,6 +322,7 @@ def begin_update( resource_group_name, # type: str cluster_name, # type: str parameters, # type: "_models.ClusterUpdate" + if_match=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.Cluster"] @@ -313,10 +334,14 @@ def begin_update( :type cluster_name: str :param parameters: The Kusto cluster parameters supplied to the Update operation. :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate + :param if_match: The ETag of the cluster. Omit this value to always overwrite the current + cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + changes. + :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Cluster or the result of cls(response) @@ -335,6 +360,7 @@ def begin_update( resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=parameters, + if_match=if_match, cls=lambda x,y,z: x, **kwargs ) @@ -381,7 +407,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -429,8 +455,8 @@ def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -491,7 +517,7 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -539,8 +565,8 @@ def begin_stop( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -601,7 +627,7 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -649,8 +675,8 @@ def begin_start( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -723,7 +749,7 @@ def list_follower_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -788,7 +814,7 @@ def _detach_follower_databases_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -844,8 +870,8 @@ def begin_detach_follower_databases( :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -907,7 +933,7 @@ def _diagnose_virtual_network_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -961,8 +987,8 @@ def begin_diagnose_virtual_network( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DiagnoseVirtualNetworkResult or the result of cls(response) @@ -1034,7 +1060,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1102,7 +1128,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1169,7 +1195,7 @@ def list_skus( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1228,7 +1254,7 @@ def check_name_availability( # type: (...) -> "_models.CheckNameResult" """Checks that the cluster name is valid and is not already in use. - :param location: Azure location. + :param location: Azure location (region) name. :type location: str :param cluster_name: The name of the cluster. :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest @@ -1242,7 +1268,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1305,7 +1331,7 @@ def list_skus_by_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1380,7 +1406,7 @@ def list_language_extensions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -1445,7 +1471,7 @@ def _add_language_extensions_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1501,8 +1527,8 @@ def begin_add_language_extensions( :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1565,7 +1591,7 @@ def _remove_language_extensions_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1621,8 +1647,8 @@ def begin_remove_language_extensions( :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py index 7c790ac9a9d2..f50ac661f300 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py @@ -73,7 +73,7 @@ def list_by_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -140,7 +140,7 @@ def _data_connection_validation_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -205,8 +205,8 @@ def begin_data_connection_validation( :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DataConnectionValidationListResult or the result of cls(response) @@ -290,7 +290,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -361,7 +361,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -414,7 +414,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -488,8 +488,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.DataConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DataConnection or the result of cls(response) @@ -561,7 +561,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -635,8 +635,8 @@ def begin_update( :type parameters: ~azure.mgmt.kusto.models.DataConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DataConnection or the result of cls(response) @@ -707,7 +707,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -763,8 +763,8 @@ def begin_delete( :type data_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py index 55982e7b204b..d9236fa714a0 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py @@ -76,7 +76,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -147,7 +147,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -271,8 +271,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DatabasePrincipalAssignment or the result of cls(response) @@ -343,7 +343,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -399,8 +399,8 @@ def begin_delete( :type principal_assignment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -479,7 +479,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py index a69e851b84a8..b49e7dd9d35f 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py @@ -73,7 +73,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -137,7 +137,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -215,7 +215,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -266,7 +266,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -336,8 +336,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.kusto.models.Database :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Database or the result of cls(response) @@ -406,7 +406,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -476,8 +476,8 @@ def begin_update( :type parameters: ~azure.mgmt.kusto.models.Database :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Database or the result of cls(response) @@ -545,7 +545,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" # Construct URL @@ -597,8 +597,8 @@ def begin_delete( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -675,7 +675,7 @@ def list_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): @@ -757,7 +757,7 @@ def add_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -828,7 +828,7 @@ def remove_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py index 1a8cae0d2eb1..f31beb271e5b 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-09-18" + api_version = "2021-01-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py new file mode 100644 index 000000000000..82115fbd0309 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationsResultsOperations(object): + """OperationsResultsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.kusto.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + location, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OperationResult" + """Returns operation results. + + :param location: Azure location (region) name. + :type location: str + :param operation_id: The Guid of the operation ID. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationResult, or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.OperationResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationresults/{operationId}'} # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py new file mode 100644 index 000000000000..81aee3982c31 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py @@ -0,0 +1,680 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ScriptsOperations(object): + """ScriptsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.kusto.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_database( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ScriptListResult"] + """Returns the list of database scripts for given database. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScriptListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ScriptListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ScriptListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts'} # type: ignore + + def get( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + script_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Script" + """Gets a Kusto cluster database script. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Script, or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.Script + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + script_name, # type: str + parameters, # type: "_models.Script" + **kwargs # type: Any + ): + # type: (...) -> "_models.Script" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Script') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Script', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Script', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + script_name, # type: str + parameters, # type: "_models.Script" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Script"] + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. + :type parameters: ~azure.mgmt.kusto.models.Script + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Script or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + script_name, # type: str + parameters, # type: "_models.Script" + **kwargs # type: Any + ): + # type: (...) -> "_models.Script" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Script') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Script', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + script_name, # type: str + parameters, # type: "_models.Script" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Script"] + """Updates a database script. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. + :type parameters: ~azure.mgmt.kusto.models.Script + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Script or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Script', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + script_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + script_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a Kusto principalAssignment. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the Kusto database script. + :type script_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'scriptName': self._serialize.url("script_name", script_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}'} # type: ignore + + def check_name_availability( + self, + resource_group_name, # type: str + cluster_name, # type: str + database_name, # type: str + script_name, # type: "_models.ScriptCheckNameRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameResult" + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group containing the Kusto cluster. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. + :type database_name: str + :param script_name: The name of the script. + :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult, or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(script_name, 'ScriptCheckNameRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scriptsCheckNameAvailability'} # type: ignore From 01879b9b206bf1e78938d3d4a3c6781c7f97550f Mon Sep 17 00:00:00 2001 From: PythonSdkPipelines Date: Mon, 26 Apr 2021 02:34:40 +0000 Subject: [PATCH 2/2] version,CHANGELOG --- sdk/kusto/azure-mgmt-kusto/CHANGELOG.md | 15 +++++++++++++++ .../azure-mgmt-kusto/azure/mgmt/kusto/_version.py | 2 +- sdk/kusto/azure-mgmt-kusto/setup.py | 2 +- shared_requirements.txt | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md b/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md index c4b997e76b41..58c0fc99b207 100644 --- a/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md +++ b/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md @@ -1,5 +1,20 @@ # Release History +## 2.0.0 (2021-04-26) + +**Features** + + - Model EventHubDataConnection has a new parameter managed_identity_resource_id + - Model Cluster has a new parameter etag + - Model AttachedDatabaseConfiguration has a new parameter table_level_sharing_properties + - Added operation group ScriptsOperations + - Added operation group OperationsResultsOperations + +**Breaking changes** + + - Operation ClustersOperations.begin_update has a new signature + - Operation ClustersOperations.begin_create_or_update has a new signature + ## 1.0.0 (2021-02-04) - GA release diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py index eae7c95b6fbd..48944bf3938a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "2.0.0" diff --git a/sdk/kusto/azure-mgmt-kusto/setup.py b/sdk/kusto/azure-mgmt-kusto/setup.py index 0a2e3564f5ce..4a550e3b59ec 100644 --- a/sdk/kusto/azure-mgmt-kusto/setup.py +++ b/sdk/kusto/azure-mgmt-kusto/setup.py @@ -78,7 +78,7 @@ 'azure.mgmt', ]), install_requires=[ - 'msrest>=0.5.0', + 'msrest>=0.6.21', 'azure-common~=1.1', 'azure-mgmt-core>=1.2.0,<2.0.0', ], diff --git a/shared_requirements.txt b/shared_requirements.txt index 1d205e9c3f63..0975877cc75f 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -248,3 +248,4 @@ opentelemetry-sdk<2.0.0,>=1.0.0 #override azure-mgmt-keyvault msrest>=0.6.21 #override azure-mgmt-resource msrest>=0.6.21 #override azure-template azure-core<2.0.0,>=1.10.0 +#override azure-mgmt-kusto msrest>=0.6.21