diff --git a/sdk/kusto/azure-mgmt-kusto/_meta.json b/sdk/kusto/azure-mgmt-kusto/_meta.json index 202385447f26..4039e14fc300 100644 --- a/sdk/kusto/azure-mgmt-kusto/_meta.json +++ b/sdk/kusto/azure-mgmt-kusto/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.6", - "commit": "4c881abe43b82c6f001f2f2ca7f2a2d63299749e", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "57e4490a06aad262ca9154dc15b40f5a11bf7af5", "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", + "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.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "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 55ac8d3b7f55..7847665b5e79 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 = "2021-01-01" + self.api_version = "2021-08-27" 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 06d3907b44c3..b07bc3c9b506 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 @@ -22,9 +22,12 @@ from .operations import ClustersOperations from .operations import ClusterPrincipalAssignmentsOperations from .operations import DatabasesOperations +from .operations import AttachedDatabaseConfigurationsOperations +from .operations import ManagedPrivateEndpointsOperations from .operations import DatabasePrincipalAssignmentsOperations from .operations import ScriptsOperations -from .operations import AttachedDatabaseConfigurationsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from .operations import DataConnectionsOperations from .operations import Operations from .operations import OperationsResultsOperations @@ -35,23 +38,29 @@ class KustoManagementClient(object): """The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.kusto.operations.ClustersOperations + :vartype clusters: kusto_management_client.operations.ClustersOperations :ivar cluster_principal_assignments: ClusterPrincipalAssignmentsOperations operations - :vartype cluster_principal_assignments: azure.mgmt.kusto.operations.ClusterPrincipalAssignmentsOperations + :vartype cluster_principal_assignments: kusto_management_client.operations.ClusterPrincipalAssignmentsOperations :ivar databases: DatabasesOperations operations - :vartype databases: azure.mgmt.kusto.operations.DatabasesOperations + :vartype databases: kusto_management_client.operations.DatabasesOperations + :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations + :vartype attached_database_configurations: kusto_management_client.operations.AttachedDatabaseConfigurationsOperations + :ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations + :vartype managed_private_endpoints: kusto_management_client.operations.ManagedPrivateEndpointsOperations :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations - :vartype database_principal_assignments: azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations + :vartype database_principal_assignments: kusto_management_client.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 + :vartype scripts: kusto_management_client.operations.ScriptsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: kusto_management_client.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: kusto_management_client.operations.PrivateLinkResourcesOperations :ivar data_connections: DataConnectionsOperations operations - :vartype data_connections: azure.mgmt.kusto.operations.DataConnectionsOperations + :vartype data_connections: kusto_management_client.operations.DataConnectionsOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.kusto.operations.Operations + :vartype operations: kusto_management_client.operations.Operations :ivar operations_results: OperationsResultsOperations operations - :vartype operations_results: azure.mgmt.kusto.operations.OperationsResultsOperations + :vartype operations_results: kusto_management_client.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. @@ -84,11 +93,17 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.databases = DatabasesOperations( self._client, self._config, self._serialize, self._deserialize) + self.attached_database_configurations = AttachedDatabaseConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_private_endpoints = ManagedPrivateEndpointsOperations( + 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.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) self.data_connections = DataConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) 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 8bc500159da1..fa0144640826 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": "2021-01-01", - "total_api_version_list": ["2021-01-01"], + "chosen_version": "2021-08-27", + "total_api_version_list": ["2021-08-27"], "client": { "name": "KustoManagementClient", "filename": "_kusto_management_client", @@ -101,9 +101,12 @@ "clusters": "ClustersOperations", "cluster_principal_assignments": "ClusterPrincipalAssignmentsOperations", "databases": "DatabasesOperations", + "attached_database_configurations": "AttachedDatabaseConfigurationsOperations", + "managed_private_endpoints": "ManagedPrivateEndpointsOperations", "database_principal_assignments": "DatabasePrincipalAssignmentsOperations", "scripts": "ScriptsOperations", - "attached_database_configurations": "AttachedDatabaseConfigurationsOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations", "data_connections": "DataConnectionsOperations", "operations": "Operations", "operations_results": "OperationsResultsOperations" 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 48944bf3938a..e5754a47ce68 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 = "2.0.0" +VERSION = "1.0.0b1" 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 87f64ac0cefc..0b0f62ab702c 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 = "2021-01-01" + self.api_version = "2021-08-27" 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 ec0f3ee72d1e..e3d5b476bc82 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 @@ -20,9 +20,12 @@ from .operations import ClustersOperations from .operations import ClusterPrincipalAssignmentsOperations from .operations import DatabasesOperations +from .operations import AttachedDatabaseConfigurationsOperations +from .operations import ManagedPrivateEndpointsOperations from .operations import DatabasePrincipalAssignmentsOperations from .operations import ScriptsOperations -from .operations import AttachedDatabaseConfigurationsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from .operations import DataConnectionsOperations from .operations import Operations from .operations import OperationsResultsOperations @@ -33,23 +36,29 @@ class KustoManagementClient(object): """The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.kusto.aio.operations.ClustersOperations + :vartype clusters: kusto_management_client.aio.operations.ClustersOperations :ivar cluster_principal_assignments: ClusterPrincipalAssignmentsOperations operations - :vartype cluster_principal_assignments: azure.mgmt.kusto.aio.operations.ClusterPrincipalAssignmentsOperations + :vartype cluster_principal_assignments: kusto_management_client.aio.operations.ClusterPrincipalAssignmentsOperations :ivar databases: DatabasesOperations operations - :vartype databases: azure.mgmt.kusto.aio.operations.DatabasesOperations + :vartype databases: kusto_management_client.aio.operations.DatabasesOperations + :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations + :vartype attached_database_configurations: kusto_management_client.aio.operations.AttachedDatabaseConfigurationsOperations + :ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations + :vartype managed_private_endpoints: kusto_management_client.aio.operations.ManagedPrivateEndpointsOperations :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations - :vartype database_principal_assignments: azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations + :vartype database_principal_assignments: kusto_management_client.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 + :vartype scripts: kusto_management_client.aio.operations.ScriptsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: kusto_management_client.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: kusto_management_client.aio.operations.PrivateLinkResourcesOperations :ivar data_connections: DataConnectionsOperations operations - :vartype data_connections: azure.mgmt.kusto.aio.operations.DataConnectionsOperations + :vartype data_connections: kusto_management_client.aio.operations.DataConnectionsOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.kusto.aio.operations.Operations + :vartype operations: kusto_management_client.aio.operations.Operations :ivar operations_results: OperationsResultsOperations operations - :vartype operations_results: azure.mgmt.kusto.aio.operations.OperationsResultsOperations + :vartype operations_results: kusto_management_client.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. @@ -81,11 +90,17 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.databases = DatabasesOperations( self._client, self._config, self._serialize, self._deserialize) + self.attached_database_configurations = AttachedDatabaseConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_private_endpoints = ManagedPrivateEndpointsOperations( + 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.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) self.data_connections = DataConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) 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 27917c1aa7d5..9547038985cb 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 @@ -9,9 +9,12 @@ from ._clusters_operations import ClustersOperations from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations from ._databases_operations import DatabasesOperations +from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations +from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations from ._scripts_operations import ScriptsOperations -from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._data_connections_operations import DataConnectionsOperations from ._operations import Operations from ._operations_results_operations import OperationsResultsOperations @@ -20,9 +23,12 @@ 'ClustersOperations', 'ClusterPrincipalAssignmentsOperations', 'DatabasesOperations', + 'AttachedDatabaseConfigurationsOperations', + 'ManagedPrivateEndpointsOperations', 'DatabasePrincipalAssignmentsOperations', 'ScriptsOperations', - 'AttachedDatabaseConfigurationsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', '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 5f1bd2d8b3a9..deb83ca3a5a8 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 @@ -28,7 +28,7 @@ class AttachedDatabaseConfigurationsOperations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,11 +43,78 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: "_models.AttachedDatabaseConfigurationsCheckNameRequest", + **kwargs: Any + ) -> "_models.CheckNameResult": + """Checks that the attached database configuration resource 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 resource_name: The name of the resource. + :type resource_name: ~kusto_management_client.models.AttachedDatabaseConfigurationsCheckNameRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult, or the result of cls(response) + :rtype: ~kusto_management_client.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-08-27" + 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'), + '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(resource_name, 'AttachedDatabaseConfigurationsCheckNameRequest') + 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}/attachedDatabaseConfigurationCheckNameAvailability'} # type: ignore + def list_by_cluster( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AttachedDatabaseConfigurationListResult"]: """Returns the list of attached database configurations of the given Kusto cluster. @@ -57,7 +124,7 @@ def list_by_cluster( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AttachedDatabaseConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.AttachedDatabaseConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.AttachedDatabaseConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AttachedDatabaseConfigurationListResult"] @@ -65,7 +132,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +189,7 @@ async def get( resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, - **kwargs + **kwargs: Any ) -> "_models.AttachedDatabaseConfiguration": """Returns an attached database configuration. @@ -134,7 +201,7 @@ async def get( :type attached_database_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AttachedDatabaseConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :rtype: ~kusto_management_client.models.AttachedDatabaseConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AttachedDatabaseConfiguration"] @@ -142,7 +209,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -185,14 +252,14 @@ async def _create_or_update_initial( cluster_name: str, attached_database_configuration_name: str, parameters: "_models.AttachedDatabaseConfiguration", - **kwargs + **kwargs: Any ) -> "_models.AttachedDatabaseConfiguration": cls = kwargs.pop('cls', None) # type: ClsType["_models.AttachedDatabaseConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -247,7 +314,7 @@ async def begin_create_or_update( cluster_name: str, attached_database_configuration_name: str, parameters: "_models.AttachedDatabaseConfiguration", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.AttachedDatabaseConfiguration"]: """Creates or updates an attached database configuration. @@ -258,15 +325,15 @@ async def begin_create_or_update( :param attached_database_configuration_name: The name of the attached database configuration. :type attached_database_configuration_name: str :param parameters: The database parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.AttachedDatabaseConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -322,14 +389,14 @@ async def _delete_initial( resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -368,7 +435,7 @@ async def begin_delete( resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the attached database configuration with the given name. @@ -380,8 +447,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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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 b334ad3fad6d..dd726ae83ff8 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 @@ -28,7 +28,7 @@ class ClusterPrincipalAssignmentsOperations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,7 +48,7 @@ async def check_name_availability( resource_group_name: str, cluster_name: str, principal_assignment_name: "_models.ClusterPrincipalAssignmentCheckNameRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameResult": """Checks that the principal assignment name is valid and is not already in use. @@ -57,10 +57,10 @@ async def check_name_availability( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param principal_assignment_name: The name of the principal assignment. - :type principal_assignment_name: ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest + :type principal_assignment_name: ~kusto_management_client.models.ClusterPrincipalAssignmentCheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -68,7 +68,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -114,7 +114,7 @@ async def get( resource_group_name: str, cluster_name: str, principal_assignment_name: str, - **kwargs + **kwargs: Any ) -> "_models.ClusterPrincipalAssignment": """Gets a Kusto cluster principalAssignment. @@ -126,7 +126,7 @@ async def get( :type principal_assignment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ClusterPrincipalAssignment, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment + :rtype: ~kusto_management_client.models.ClusterPrincipalAssignment :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignment"] @@ -134,7 +134,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -177,14 +177,14 @@ async def _create_or_update_initial( cluster_name: str, principal_assignment_name: str, parameters: "_models.ClusterPrincipalAssignment", - **kwargs + **kwargs: Any ) -> "_models.ClusterPrincipalAssignment": cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignment"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -236,7 +236,7 @@ async def begin_create_or_update( cluster_name: str, principal_assignment_name: str, parameters: "_models.ClusterPrincipalAssignment", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ClusterPrincipalAssignment"]: """Create a Kusto cluster principalAssignment. @@ -248,15 +248,15 @@ async def begin_create_or_update( :type principal_assignment_name: str :param parameters: The Kusto cluster principalAssignment's parameters supplied for the operation. - :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.ClusterPrincipalAssignment] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -312,14 +312,14 @@ async def _delete_initial( resource_group_name: str, cluster_name: str, principal_assignment_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -358,7 +358,7 @@ async def begin_delete( resource_group_name: str, cluster_name: str, principal_assignment_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Kusto cluster principalAssignment. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -426,7 +426,7 @@ def list( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ClusterPrincipalAssignmentListResult"]: """Lists all Kusto cluster principalAssignments. @@ -436,7 +436,7 @@ def list( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterPrincipalAssignmentListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ClusterPrincipalAssignmentListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.ClusterPrincipalAssignmentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignmentListResult"] @@ -444,7 +444,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 ba4dae97cabe..afdd060afdd2 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 @@ -28,7 +28,7 @@ class ClustersOperations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,7 +47,7 @@ async def get( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> "_models.Cluster": """Gets a Kusto cluster. @@ -57,7 +57,7 @@ async def get( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Cluster + :rtype: ~kusto_management_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -108,14 +108,14 @@ async def _create_or_update_initial( parameters: "_models.Cluster", if_match: Optional[str] = None, if_none_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Cluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -171,7 +171,7 @@ async def begin_create_or_update( parameters: "_models.Cluster", if_match: Optional[str] = None, if_none_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Cluster"]: """Create or update a Kusto cluster. @@ -180,7 +180,7 @@ async def begin_create_or_update( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.Cluster + :type parameters: ~kusto_management_client.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. @@ -190,12 +190,12 @@ async def begin_create_or_update( :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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.Cluster] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -252,14 +252,14 @@ async def _update_initial( cluster_name: str, parameters: "_models.ClusterUpdate", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Cluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -315,7 +315,7 @@ async def begin_update( cluster_name: str, parameters: "_models.ClusterUpdate", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Cluster"]: """Update a Kusto cluster. @@ -324,19 +324,19 @@ async def begin_update( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param parameters: The Kusto cluster parameters supplied to the Update operation. - :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.Cluster] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -390,14 +390,14 @@ async def _delete_initial( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -434,7 +434,7 @@ async def begin_delete( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Kusto cluster. @@ -444,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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -498,14 +498,14 @@ async def _stop_initial( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -542,7 +542,7 @@ async def begin_stop( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Stops a Kusto cluster. @@ -552,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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -606,14 +606,14 @@ async def _start_initial( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -650,7 +650,7 @@ async def begin_start( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Starts a Kusto cluster. @@ -660,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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -714,7 +714,7 @@ def list_follower_databases( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.FollowerDatabaseListResult"]: """Returns a list of databases that are owned by this cluster and were followed by another cluster. @@ -725,7 +725,7 @@ def list_follower_databases( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FollowerDatabaseListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.FollowerDatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.FollowerDatabaseListResult"] @@ -733,7 +733,7 @@ def list_follower_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -790,14 +790,14 @@ async def _detach_follower_databases_initial( resource_group_name: str, cluster_name: str, follower_database_to_remove: "_models.FollowerDatabaseDefinition", - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -840,7 +840,7 @@ async def begin_detach_follower_databases( resource_group_name: str, cluster_name: str, follower_database_to_remove: "_models.FollowerDatabaseDefinition", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Detaches all followers of a database owned by this cluster. @@ -849,11 +849,11 @@ async def begin_detach_follower_databases( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param follower_database_to_remove: The follower databases properties to remove. - :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition + :type follower_database_to_remove: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -907,14 +907,14 @@ async def _diagnose_virtual_network_initial( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.DiagnoseVirtualNetworkResult"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DiagnoseVirtualNetworkResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -956,7 +956,7 @@ async def begin_diagnose_virtual_network( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DiagnoseVirtualNetworkResult"]: """Diagnoses network connectivity status for external resources on which the service is dependent on. @@ -967,12 +967,12 @@ 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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DiagnoseVirtualNetworkResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.DiagnoseVirtualNetworkResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1023,7 +1023,7 @@ def get_long_running_output(pipeline_response): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ClusterListResult"]: """Lists all Kusto clusters within a resource group. @@ -1031,7 +1031,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ClusterListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.ClusterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] @@ -1039,7 +1039,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1092,13 +1092,13 @@ async def get_next(next_link=None): def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ClusterListResult"]: """Lists all Kusto clusters within a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ClusterListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.ClusterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] @@ -1106,7 +1106,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1158,13 +1158,13 @@ async def get_next(next_link=None): def list_skus( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SkuDescriptionList"]: """Lists eligible SKUs for Kusto resource provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SkuDescriptionList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.SkuDescriptionList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.SkuDescriptionList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuDescriptionList"] @@ -1172,7 +1172,7 @@ def list_skus( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1226,17 +1226,17 @@ async def check_name_availability( self, location: str, cluster_name: "_models.ClusterCheckNameRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameResult": """Checks that the cluster name is valid and is not already in use. :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 + :type cluster_name: ~kusto_management_client.models.ClusterCheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -1244,7 +1244,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1288,7 +1288,7 @@ def list_skus_by_resource( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ListResourceSkusResult"]: """Returns the SKUs available for the provided resource. @@ -1298,7 +1298,7 @@ def list_skus_by_resource( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ListResourceSkusResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ListResourceSkusResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.ListResourceSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ListResourceSkusResult"] @@ -1306,7 +1306,7 @@ def list_skus_by_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1358,11 +1358,85 @@ async def get_next(next_link=None): ) list_skus_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'} # type: ignore + def list_outbound_network_dependencies_endpoints( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.OutboundNetworkDependenciesEndpointListResult"]: + """Gets the network endpoints of all outbound dependencies of a Kusto cluster. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundNetworkDependenciesEndpointListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.OutboundNetworkDependenciesEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundNetworkDependenciesEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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_outbound_network_dependencies_endpoints.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'), + } + 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('OutboundNetworkDependenciesEndpointListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or 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_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/outboundNetworkDependenciesEndpoints'} # type: ignore + def list_language_extensions( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LanguageExtensionsList"]: """Returns a list of language extensions that can run within KQL queries. @@ -1372,7 +1446,7 @@ def list_language_extensions( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LanguageExtensionsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.LanguageExtensionsList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.LanguageExtensionsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LanguageExtensionsList"] @@ -1380,7 +1454,7 @@ def list_language_extensions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1437,14 +1511,14 @@ async def _add_language_extensions_initial( resource_group_name: str, cluster_name: str, language_extensions_to_add: "_models.LanguageExtensionsList", - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1487,7 +1561,7 @@ async def begin_add_language_extensions( resource_group_name: str, cluster_name: str, language_extensions_to_add: "_models.LanguageExtensionsList", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Add a list of language extensions that can run within KQL queries. @@ -1496,11 +1570,11 @@ async def begin_add_language_extensions( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param language_extensions_to_add: The language extensions to add. - :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList + :type language_extensions_to_add: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -1555,14 +1629,14 @@ async def _remove_language_extensions_initial( resource_group_name: str, cluster_name: str, language_extensions_to_remove: "_models.LanguageExtensionsList", - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1605,7 +1679,7 @@ async def begin_remove_language_extensions( resource_group_name: str, cluster_name: str, language_extensions_to_remove: "_models.LanguageExtensionsList", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Remove a list of language extensions that can run within KQL queries. @@ -1614,11 +1688,11 @@ async def begin_remove_language_extensions( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param language_extensions_to_remove: The language extensions to remove. - :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList + :type language_extensions_to_remove: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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 d258abcdbc7d..42b6f67a9987 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 @@ -28,7 +28,7 @@ class DataConnectionsOperations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,7 +48,7 @@ def list_by_database( resource_group_name: str, cluster_name: str, database_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DataConnectionListResult"]: """Returns the list of data connections of the given Kusto database. @@ -60,7 +60,7 @@ def list_by_database( :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 DataConnectionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DataConnectionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.DataConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnectionListResult"] @@ -68,7 +68,7 @@ def list_by_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -127,14 +127,14 @@ async def _data_connection_validation_initial( cluster_name: str, database_name: str, parameters: "_models.DataConnectionValidation", - **kwargs + **kwargs: Any ) -> Optional["_models.DataConnectionValidationListResult"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DataConnectionValidationListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -184,7 +184,7 @@ async def begin_data_connection_validation( cluster_name: str, database_name: str, parameters: "_models.DataConnectionValidation", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DataConnectionValidationListResult"]: """Checks that the data connection parameters are valid. @@ -195,15 +195,15 @@ async def begin_data_connection_validation( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.DataConnectionValidationListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -260,7 +260,7 @@ async def check_name_availability( cluster_name: str, database_name: str, data_connection_name: "_models.DataConnectionCheckNameRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameResult": """Checks that the data connection name is valid and is not already in use. @@ -271,10 +271,10 @@ async def check_name_availability( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param data_connection_name: The name of the data connection. - :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest + :type data_connection_name: ~kusto_management_client.models.DataConnectionCheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -282,7 +282,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -330,7 +330,7 @@ async def get( cluster_name: str, database_name: str, data_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.DataConnection": """Returns a data connection. @@ -344,7 +344,7 @@ async def get( :type data_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataConnection, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DataConnection + :rtype: ~kusto_management_client.models.DataConnection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnection"] @@ -352,7 +352,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -397,14 +397,14 @@ async def _create_or_update_initial( database_name: str, data_connection_name: str, parameters: "_models.DataConnection", - **kwargs + **kwargs: Any ) -> "_models.DataConnection": cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -461,7 +461,7 @@ async def begin_create_or_update( database_name: str, data_connection_name: str, parameters: "_models.DataConnection", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DataConnection"]: """Creates or updates a data connection. @@ -474,15 +474,15 @@ async def begin_create_or_update( :param data_connection_name: The name of the data connection. :type data_connection_name: str :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.DataConnection + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.DataConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -542,14 +542,14 @@ async def _update_initial( database_name: str, data_connection_name: str, parameters: "_models.DataConnection", - **kwargs + **kwargs: Any ) -> "_models.DataConnection": cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -606,7 +606,7 @@ async def begin_update( database_name: str, data_connection_name: str, parameters: "_models.DataConnection", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DataConnection"]: """Updates a data connection. @@ -619,15 +619,15 @@ async def begin_update( :param data_connection_name: The name of the data connection. :type data_connection_name: str :param parameters: The data connection parameters supplied to the Update operation. - :type parameters: ~azure.mgmt.kusto.models.DataConnection + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.DataConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -686,14 +686,14 @@ async def _delete_initial( cluster_name: str, database_name: str, data_connection_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -734,7 +734,7 @@ async def begin_delete( cluster_name: str, database_name: str, data_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the data connection with the given name. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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 4217d6cd2bc8..dcd76bdcdf9f 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 @@ -28,7 +28,7 @@ class DatabasePrincipalAssignmentsOperations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ async def check_name_availability( cluster_name: str, database_name: str, principal_assignment_name: "_models.DatabasePrincipalAssignmentCheckNameRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameResult": """Checks that the database principal assignment is valid and is not already in use. @@ -60,10 +60,10 @@ async def check_name_availability( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param principal_assignment_name: The name of the resource. - :type principal_assignment_name: ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest + :type principal_assignment_name: ~kusto_management_client.models.DatabasePrincipalAssignmentCheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -71,7 +71,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -119,7 +119,7 @@ async def get( cluster_name: str, database_name: str, principal_assignment_name: str, - **kwargs + **kwargs: Any ) -> "_models.DatabasePrincipalAssignment": """Gets a Kusto cluster database principalAssignment. @@ -133,7 +133,7 @@ async def get( :type principal_assignment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DatabasePrincipalAssignment, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment + :rtype: ~kusto_management_client.models.DatabasePrincipalAssignment :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignment"] @@ -141,7 +141,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -186,14 +186,14 @@ async def _create_or_update_initial( database_name: str, principal_assignment_name: str, parameters: "_models.DatabasePrincipalAssignment", - **kwargs + **kwargs: Any ) -> "_models.DatabasePrincipalAssignment": cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignment"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -247,7 +247,7 @@ async def begin_create_or_update( database_name: str, principal_assignment_name: str, parameters: "_models.DatabasePrincipalAssignment", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DatabasePrincipalAssignment"]: """Creates a Kusto cluster database principalAssignment. @@ -260,15 +260,15 @@ async def begin_create_or_update( :param principal_assignment_name: The name of the Kusto principalAssignment. :type principal_assignment_name: str :param parameters: The Kusto principalAssignments parameters supplied for the operation. - :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.DatabasePrincipalAssignment] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -327,14 +327,14 @@ async def _delete_initial( cluster_name: str, database_name: str, principal_assignment_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -375,7 +375,7 @@ async def begin_delete( cluster_name: str, database_name: str, principal_assignment_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Kusto principalAssignment. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -448,7 +448,7 @@ def list( resource_group_name: str, cluster_name: str, database_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DatabasePrincipalAssignmentListResult"]: """Lists all Kusto cluster database principalAssignments. @@ -460,7 +460,7 @@ def list( :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 DatabasePrincipalAssignmentListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DatabasePrincipalAssignmentListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.DatabasePrincipalAssignmentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignmentListResult"] @@ -468,7 +468,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 7c5df75c32b4..315f03c8ba03 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 @@ -28,7 +28,7 @@ class DatabasesOperations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,19 +48,19 @@ async def check_name_availability( resource_group_name: str, cluster_name: str, resource_name: "_models.CheckNameRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameResult": - """Checks that the database name is valid and is not already in use. + """Checks that the databases resource 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 resource_name: The name of the resource. - :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest + :type resource_name: ~kusto_management_client.models.CheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -68,7 +68,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -113,7 +113,7 @@ def list_by_cluster( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DatabaseListResult"]: """Returns the list of databases of the given Kusto cluster. @@ -123,7 +123,7 @@ def list_by_cluster( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DatabaseListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] @@ -131,7 +131,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -188,7 +188,7 @@ async def get( resource_group_name: str, cluster_name: str, database_name: str, - **kwargs + **kwargs: Any ) -> "_models.Database": """Returns a database. @@ -200,7 +200,7 @@ async def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Database + :rtype: ~kusto_management_client.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] @@ -208,7 +208,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -251,14 +251,14 @@ async def _create_or_update_initial( cluster_name: str, database_name: str, parameters: "_models.Database", - **kwargs + **kwargs: Any ) -> "_models.Database": cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -313,7 +313,7 @@ async def begin_create_or_update( cluster_name: str, database_name: str, parameters: "_models.Database", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Database"]: """Creates or updates a database. @@ -324,15 +324,15 @@ async def begin_create_or_update( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param parameters: The database parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.Database + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -389,14 +389,14 @@ async def _update_initial( cluster_name: str, database_name: str, parameters: "_models.Database", - **kwargs + **kwargs: Any ) -> "_models.Database": cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -451,7 +451,7 @@ async def begin_update( cluster_name: str, database_name: str, parameters: "_models.Database", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Database"]: """Updates a database. @@ -462,15 +462,15 @@ async def begin_update( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param parameters: The database parameters supplied to the Update operation. - :type parameters: ~azure.mgmt.kusto.models.Database + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -526,14 +526,14 @@ async def _delete_initial( resource_group_name: str, cluster_name: str, database_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -572,7 +572,7 @@ async def begin_delete( resource_group_name: str, cluster_name: str, database_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the database with the given name. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -641,7 +641,7 @@ def list_principals( resource_group_name: str, cluster_name: str, database_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DatabasePrincipalListResult"]: """Returns a list of database principals of the given Kusto cluster and database. @@ -653,7 +653,7 @@ def list_principals( :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 DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DatabasePrincipalListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.DatabasePrincipalListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalListResult"] @@ -661,7 +661,7 @@ def list_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -720,7 +720,7 @@ async def add_principals( cluster_name: str, database_name: str, database_principals_to_add: "_models.DatabasePrincipalListRequest", - **kwargs + **kwargs: Any ) -> "_models.DatabasePrincipalListResult": """Add Database principals permissions. @@ -731,10 +731,10 @@ async def add_principals( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param database_principals_to_add: List of database principals to add. - :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest + :type database_principals_to_add: ~kusto_management_client.models.DatabasePrincipalListRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: DatabasePrincipalListResult, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :rtype: ~kusto_management_client.models.DatabasePrincipalListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalListResult"] @@ -742,7 +742,7 @@ async def add_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -790,7 +790,7 @@ async def remove_principals( cluster_name: str, database_name: str, database_principals_to_remove: "_models.DatabasePrincipalListRequest", - **kwargs + **kwargs: Any ) -> "_models.DatabasePrincipalListResult": """Remove Database principals permissions. @@ -801,10 +801,10 @@ async def remove_principals( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param database_principals_to_remove: List of database principals to remove. - :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest + :type database_principals_to_remove: ~kusto_management_client.models.DatabasePrincipalListRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: DatabasePrincipalListResult, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :rtype: ~kusto_management_client.models.DatabasePrincipalListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalListResult"] @@ -812,7 +812,7 @@ async def remove_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py new file mode 100644 index 000000000000..84ad68bde57f --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py @@ -0,0 +1,634 @@ +# 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 ManagedPrivateEndpointsOperations: + """ManagedPrivateEndpointsOperations 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: ~kusto_management_client.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 check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: "_models.ManagedPrivateEndpointsCheckNameRequest", + **kwargs: Any + ) -> "_models.CheckNameResult": + """Checks that the managed private endpoints resource 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 resource_name: The name of the resource. + :type resource_name: ~kusto_management_client.models.ManagedPrivateEndpointsCheckNameRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult, or the result of cls(response) + :rtype: ~kusto_management_client.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-08-27" + 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'), + '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(resource_name, 'ManagedPrivateEndpointsCheckNameRequest') + 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}/managedPrivateEndpointsCheckNameAvailability'} # type: ignore + + def list( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedPrivateEndpointListResult"]: + """Returns the list of managed private endpoints. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedPrivateEndpointListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.ManagedPrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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.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'), + } + 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('ManagedPrivateEndpointListResult', 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints'} # type: ignore + + async def get( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + **kwargs: Any + ) -> "_models.ManagedPrivateEndpoint": + """Gets a managed private endpoint. + + :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 managed_private_endpoint_name: The name of the managed private endpoint. + :type managed_private_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedPrivateEndpoint, or the result of cls(response) + :rtype: ~kusto_management_client.models.ManagedPrivateEndpoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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('ManagedPrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: "_models.ManagedPrivateEndpoint", + **kwargs: Any + ) -> "_models.ManagedPrivateEndpoint": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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, 'ManagedPrivateEndpoint') + 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('ManagedPrivateEndpoint', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ManagedPrivateEndpoint', 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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: "_models.ManagedPrivateEndpoint", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedPrivateEndpoint"]: + """Creates a managed private endpoint. + + :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 managed_private_endpoint_name: The name of the managed private endpoint. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. + :type parameters: ~kusto_management_client.models.ManagedPrivateEndpoint + :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: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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 ManagedPrivateEndpoint or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + 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, + managed_private_endpoint_name=managed_private_endpoint_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('ManagedPrivateEndpoint', 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: "_models.ManagedPrivateEndpoint", + **kwargs: Any + ) -> "_models.ManagedPrivateEndpoint": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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, 'ManagedPrivateEndpoint') + 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('ManagedPrivateEndpoint', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: "_models.ManagedPrivateEndpoint", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedPrivateEndpoint"]: + """Updates a managed private endpoint. + + :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 managed_private_endpoint_name: The name of the managed private endpoint. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. + :type parameters: ~kusto_management_client.models.ManagedPrivateEndpoint + :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: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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 ManagedPrivateEndpoint or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + 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, + managed_private_endpoint_name=managed_private_endpoint_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('ManagedPrivateEndpoint', 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + **kwargs: Any + ) -> 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-08-27" + 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed private endpoint. + + :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 managed_private_endpoint_name: The name of the managed private endpoint. + :type managed_private_endpoint_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: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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, + managed_private_endpoint_name=managed_private_endpoint_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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore 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 1a9a99b188e9..116094d03eef 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 @@ -26,7 +26,7 @@ class Operations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,13 +43,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists available operations for the Microsoft.Kusto provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.OperationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 index c4492e6961e1..f95d8f67be3a 100644 --- 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 @@ -25,7 +25,7 @@ class OperationsResultsOperations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,7 +44,7 @@ async def get( self, location: str, operation_id: str, - **kwargs + **kwargs: Any ) -> "_models.OperationResult": """Returns operation results. @@ -54,7 +54,7 @@ async def get( :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 + :rtype: ~kusto_management_client.models.OperationResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResult"] @@ -62,7 +62,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..f3cefd84d633 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,430 @@ +# 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 PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations 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: ~kusto_management_client.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( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """Returns the list of private endpoint connections. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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.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'), + } + 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('PrivateEndpointConnectionListResult', 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets a private endpoint connection. + + :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 private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~kusto_management_client.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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, 'PrivateEndpointConnection') + 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]: + 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('PrivateEndpointConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnection', 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}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + """Approve or reject a private endpoint connection with a given name. + + :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 private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: + :type parameters: ~kusto_management_client.models.PrivateEndpointConnection + :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: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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 PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + 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, + private_endpoint_connection_name=private_endpoint_connection_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('PrivateEndpointConnection', 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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> 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-08-27" + 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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection with a given name. + + :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 private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_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: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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, + private_endpoint_connection_name=private_endpoint_connection_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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_link_resources_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..16a457b35319 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,178 @@ +# 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 +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.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 PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations 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: ~kusto_management_client.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( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: + """Returns the list of private link resources. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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.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'), + } + 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('PrivateLinkResourceListResult', 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources'} # type: ignore + + async def get( + self, + resource_group_name: str, + cluster_name: str, + private_link_resource_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResource": + """Gets a private link resource. + + :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 private_link_resource_name: The name of the private link resource. + :type private_link_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~kusto_management_client.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'privateLinkResourceName': self._serialize.url("private_link_resource_name", private_link_resource_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('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName}'} # 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 index 03da3f370c92..90ee17ab72b8 100644 --- 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 @@ -28,7 +28,7 @@ class ScriptsOperations: 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,7 +48,7 @@ def list_by_database( resource_group_name: str, cluster_name: str, database_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScriptListResult"]: """Returns the list of database scripts for given database. @@ -60,7 +60,7 @@ def list_by_database( :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] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~kusto_management_client.models.ScriptListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptListResult"] @@ -68,7 +68,7 @@ def list_by_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -127,7 +127,7 @@ async def get( cluster_name: str, database_name: str, script_name: str, - **kwargs + **kwargs: Any ) -> "_models.Script": """Gets a Kusto cluster database script. @@ -141,7 +141,7 @@ async def get( :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 + :rtype: ~kusto_management_client.models.Script :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] @@ -149,7 +149,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -194,14 +194,14 @@ async def _create_or_update_initial( database_name: str, script_name: str, parameters: "_models.Script", - **kwargs + **kwargs: Any ) -> "_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" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -258,7 +258,7 @@ async def begin_create_or_update( database_name: str, script_name: str, parameters: "_models.Script", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Script"]: """Creates a Kusto database script. @@ -271,15 +271,15 @@ async def begin_create_or_update( :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 + :type parameters: ~kusto_management_client.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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.Script] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -339,14 +339,14 @@ async def _update_initial( database_name: str, script_name: str, parameters: "_models.Script", - **kwargs + **kwargs: Any ) -> "_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" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -400,7 +400,7 @@ async def begin_update( database_name: str, script_name: str, parameters: "_models.Script", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Script"]: """Updates a database script. @@ -413,15 +413,15 @@ async def begin_update( :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 + :type parameters: ~kusto_management_client.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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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] + :rtype: ~azure.core.polling.AsyncLROPoller[~kusto_management_client.models.Script] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -480,14 +480,14 @@ async def _delete_initial( cluster_name: str, database_name: str, script_name: str, - **kwargs + **kwargs: Any ) -> 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" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -528,7 +528,7 @@ async def begin_delete( cluster_name: str, database_name: str, script_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Kusto principalAssignment. @@ -542,8 +542,8 @@ async def begin_delete( :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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -602,7 +602,7 @@ async def check_name_availability( cluster_name: str, database_name: str, script_name: "_models.ScriptCheckNameRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameResult": """Checks that the script name is valid and is not already in use. @@ -613,10 +613,10 @@ async def check_name_availability( :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 + :type script_name: ~kusto_management_client.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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -624,7 +624,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 0d487db49251..25effe035c5b 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 @@ -7,8 +7,10 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AcceptedAudiences from ._models_py3 import AttachedDatabaseConfiguration from ._models_py3 import AttachedDatabaseConfigurationListResult + from ._models_py3 import AttachedDatabaseConfigurationsCheckNameRequest from ._models_py3 import AzureCapacity from ._models_py3 import AzureResourceSku from ._models_py3 import AzureSku @@ -39,6 +41,8 @@ from ._models_py3 import DatabasePrincipalListResult from ._models_py3 import DatabaseStatistics from ._models_py3 import DiagnoseVirtualNetworkResult + from ._models_py3 import EndpointDependency + from ._models_py3 import EndpointDetail from ._models_py3 import EventGridDataConnection from ._models_py3 import EventHubDataConnection from ._models_py3 import FollowerDatabaseDefinition @@ -49,11 +53,22 @@ from ._models_py3 import LanguageExtension from ._models_py3 import LanguageExtensionsList from ._models_py3 import ListResourceSkusResult + from ._models_py3 import ManagedPrivateEndpoint + from ._models_py3 import ManagedPrivateEndpointListResult + from ._models_py3 import ManagedPrivateEndpointsCheckNameRequest 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 OutboundNetworkDependenciesEndpoint + from ._models_py3 import OutboundNetworkDependenciesEndpointListResult + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateEndpointProperty + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionStateProperty from ._models_py3 import ProxyResource from ._models_py3 import ReadOnlyFollowingDatabase from ._models_py3 import ReadWriteDatabase @@ -70,8 +85,10 @@ from ._models_py3 import TrustedExternalTenant from ._models_py3 import VirtualNetworkConfiguration except (SyntaxError, ImportError): + from ._models import AcceptedAudiences # type: ignore from ._models import AttachedDatabaseConfiguration # type: ignore from ._models import AttachedDatabaseConfigurationListResult # type: ignore + from ._models import AttachedDatabaseConfigurationsCheckNameRequest # type: ignore from ._models import AzureCapacity # type: ignore from ._models import AzureResourceSku # type: ignore from ._models import AzureSku # type: ignore @@ -102,6 +119,8 @@ from ._models import DatabasePrincipalListResult # type: ignore from ._models import DatabaseStatistics # type: ignore from ._models import DiagnoseVirtualNetworkResult # type: ignore + from ._models import EndpointDependency # type: ignore + from ._models import EndpointDetail # type: ignore from ._models import EventGridDataConnection # type: ignore from ._models import EventHubDataConnection # type: ignore from ._models import FollowerDatabaseDefinition # type: ignore @@ -112,11 +131,22 @@ from ._models import LanguageExtension # type: ignore from ._models import LanguageExtensionsList # type: ignore from ._models import ListResourceSkusResult # type: ignore + from ._models import ManagedPrivateEndpoint # type: ignore + from ._models import ManagedPrivateEndpointListResult # type: ignore + from ._models import ManagedPrivateEndpointsCheckNameRequest # type: ignore 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 OutboundNetworkDependenciesEndpoint # type: ignore + from ._models import OutboundNetworkDependenciesEndpointListResult # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateEndpointProperty # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionStateProperty # type: ignore from ._models import ProxyResource # type: ignore from ._models import ReadOnlyFollowingDatabase # type: ignore from ._models import ReadWriteDatabase # type: ignore @@ -138,6 +168,7 @@ AzureSkuName, AzureSkuTier, BlobStorageEventType, + ClusterNetworkAccessFlag, ClusterPrincipalRole, Compression, CreatedByType, @@ -155,6 +186,7 @@ PrincipalType, PrincipalsModificationKind, ProvisioningState, + PublicNetworkAccess, Reason, State, Status, @@ -162,8 +194,10 @@ ) __all__ = [ + 'AcceptedAudiences', 'AttachedDatabaseConfiguration', 'AttachedDatabaseConfigurationListResult', + 'AttachedDatabaseConfigurationsCheckNameRequest', 'AzureCapacity', 'AzureResourceSku', 'AzureSku', @@ -194,6 +228,8 @@ 'DatabasePrincipalListResult', 'DatabaseStatistics', 'DiagnoseVirtualNetworkResult', + 'EndpointDependency', + 'EndpointDetail', 'EventGridDataConnection', 'EventHubDataConnection', 'FollowerDatabaseDefinition', @@ -204,11 +240,22 @@ 'LanguageExtension', 'LanguageExtensionsList', 'ListResourceSkusResult', + 'ManagedPrivateEndpoint', + 'ManagedPrivateEndpointListResult', + 'ManagedPrivateEndpointsCheckNameRequest', 'Operation', 'OperationDisplay', 'OperationListResult', 'OperationResult', 'OptimizedAutoscale', + 'OutboundNetworkDependenciesEndpoint', + 'OutboundNetworkDependenciesEndpointListResult', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateEndpointProperty', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', 'ReadOnlyFollowingDatabase', 'ReadWriteDatabase', @@ -228,6 +275,7 @@ 'AzureSkuName', 'AzureSkuTier', 'BlobStorageEventType', + 'ClusterNetworkAccessFlag', 'ClusterPrincipalRole', 'Compression', 'CreatedByType', @@ -245,6 +293,7 @@ 'PrincipalType', 'PrincipalsModificationKind', 'ProvisioningState', + 'PublicNetworkAccess', 'Reason', 'State', 'Status', 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 38869eaa64fd..de61d1c1ca50 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 @@ -78,6 +78,14 @@ class BlobStorageEventType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MICROSOFT_STORAGE_BLOB_CREATED = "Microsoft.Storage.BlobCreated" MICROSOFT_STORAGE_BLOB_RENAMED = "Microsoft.Storage.BlobRenamed" +class ClusterNetworkAccessFlag(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether or not to restrict outbound network access. Value is optional but if passed in, must + be 'Enabled' or 'Disabled' + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + class ClusterPrincipalRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Cluster principal role. """ @@ -258,6 +266,14 @@ class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FAILED = "Failed" MOVING = "Moving" +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Public network access to the cluster is enabled by default. When disabled, only private + endpoint connection to the cluster is allowed + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Message providing the reason why the given name is invalid. """ 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 2dba0563fd32..da08d0d94d6b 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 @@ -9,6 +9,25 @@ import msrest.serialization +class AcceptedAudiences(msrest.serialization.Model): + """Represents an accepted audience trusted by the cluster. + + :param value: GUID or valid URL representing an accepted audience. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AcceptedAudiences, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. @@ -97,7 +116,7 @@ class AttachedDatabaseConfiguration(ProxyResource): :type location: str :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :param database_name: The name of the database which you would like to attach, use * if you want to follow all current and future databases. :type database_name: str @@ -110,9 +129,10 @@ class AttachedDatabaseConfiguration(ProxyResource): :param default_principals_modification_kind: The default principals modification kind. Possible values include: "Union", "Replace", "None". :type default_principals_modification_kind: str or - ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind + ~kusto_management_client.models.DefaultPrincipalsModificationKind :param table_level_sharing_properties: Table level sharing specifications. - :type table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties + :type table_level_sharing_properties: + ~kusto_management_client.models.TableLevelSharingProperties """ _validation = { @@ -154,7 +174,7 @@ class AttachedDatabaseConfigurationListResult(msrest.serialization.Model): """The list attached database configurations operation response. :param value: The list of attached database configurations. - :type value: list[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :type value: list[~kusto_management_client.models.AttachedDatabaseConfiguration] """ _attribute_map = { @@ -169,6 +189,41 @@ def __init__( self.value = kwargs.get('value', None) +class AttachedDatabaseConfigurationsCheckNameRequest(msrest.serialization.Model): + """The result returned from a AttachedDatabaseConfigurations check 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. Attached database resource name. + :type name: str + :ivar type: The type of resource, for instance + Microsoft.Kusto/clusters/attachedDatabaseConfigurations. Has constant value: + "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". + :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/attachedDatabaseConfigurations" + + def __init__( + self, + **kwargs + ): + super(AttachedDatabaseConfigurationsCheckNameRequest, self).__init__(**kwargs) + self.name = kwargs['name'] + + class AzureCapacity(msrest.serialization.Model): """Azure capacity definition. @@ -176,7 +231,7 @@ class AzureCapacity(msrest.serialization.Model): :param scale_type: Required. Scale type. Possible values include: "automatic", "manual", "none". - :type scale_type: str or ~azure.mgmt.kusto.models.AzureScaleType + :type scale_type: str or ~kusto_management_client.models.AzureScaleType :param minimum: Required. Minimum allowed capacity. :type minimum: int :param maximum: Required. Maximum allowed capacity. @@ -216,9 +271,9 @@ class AzureResourceSku(msrest.serialization.Model): :param resource_type: Resource Namespace and Type. :type resource_type: str :param sku: The SKU details. - :type sku: ~azure.mgmt.kusto.models.AzureSku + :type sku: ~kusto_management_client.models.AzureSku :param capacity: The number of instances of the cluster. - :type capacity: ~azure.mgmt.kusto.models.AzureCapacity + :type capacity: ~kusto_management_client.models.AzureCapacity """ _attribute_map = { @@ -250,11 +305,11 @@ class AzureSku(msrest.serialization.Model): "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 + :type name: str or ~kusto_management_client.models.AzureSkuName :param capacity: The number of instances of the cluster. :type capacity: int :param tier: Required. SKU tier. Possible values include: "Basic", "Standard". - :type tier: str or ~azure.mgmt.kusto.models.AzureSkuTier + :type tier: str or ~kusto_management_client.models.AzureSkuTier """ _validation = { @@ -288,7 +343,7 @@ class CheckNameRequest(msrest.serialization.Model): :param type: Required. The type of resource, for instance Microsoft.Kusto/clusters/databases. Possible values include: "Microsoft.Kusto/clusters/databases", "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". - :type type: str or ~azure.mgmt.kusto.models.Type + :type type: str or ~kusto_management_client.models.Type """ _validation = { @@ -322,7 +377,7 @@ class CheckNameResult(msrest.serialization.Model): :type message: str :param reason: Message providing the reason why the given name is invalid. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.kusto.models.Reason + :type reason: str or ~kusto_management_client.models.Reason """ _attribute_map = { @@ -356,7 +411,7 @@ class CloudErrorBody(msrest.serialization.Model): error. :type target: str :param details: A list of additional details about the error. - :type details: list[~azure.mgmt.kusto.models.CloudErrorBody] + :type details: list[~kusto_management_client.models.CloudErrorBody] """ _attribute_map = { @@ -442,19 +497,21 @@ class Cluster(TrackedResource): :param location: Required. The geo-location where the resource lives. :type location: str :param sku: Required. The SKU of the cluster. - :type sku: ~azure.mgmt.kusto.models.AzureSku + :type sku: ~kusto_management_client.models.AzureSku + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~kusto_management_client.models.SystemData :param zones: The availability zones of the cluster. :type zones: list[str] :param identity: The identity of the cluster, if configured. - :type identity: ~azure.mgmt.kusto.models.Identity + :type identity: ~kusto_management_client.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 + :vartype state: str or ~kusto_management_client.models.State :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :ivar uri: The cluster URI. :vartype uri: str :ivar data_ingestion_uri: The cluster data ingestion URI. @@ -462,9 +519,9 @@ class Cluster(TrackedResource): :ivar state_reason: The reason for the cluster's current state. :vartype state_reason: str :param trusted_external_tenants: The cluster's external tenants. - :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :type trusted_external_tenants: list[~kusto_management_client.models.TrustedExternalTenant] :param optimized_autoscale: Optimized auto scale definition. - :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale + :type optimized_autoscale: ~kusto_management_client.models.OptimizedAutoscale :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are encrypted. :type enable_disk_encryption: bool @@ -472,18 +529,39 @@ class Cluster(TrackedResource): enabled. :type enable_streaming_ingest: bool :param virtual_network_configuration: Virtual network definition. - :type virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration + :type virtual_network_configuration: + ~kusto_management_client.models.VirtualNetworkConfiguration :param key_vault_properties: KeyVault properties for the cluster encryption. - :type key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties + :type key_vault_properties: ~kusto_management_client.models.KeyVaultProperties :param enable_purge: A boolean value that indicates if the purge operations are enabled. :type enable_purge: bool :ivar language_extensions: List of the cluster's language extensions. - :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList + :vartype language_extensions: ~kusto_management_client.models.LanguageExtensionsList :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. :type enable_double_encryption: bool + :param public_network_access: Public network access to the cluster is enabled by default. When + disabled, only private endpoint connection to the cluster is allowed. Possible values include: + "Enabled", "Disabled". Default value: "Enabled". + :type public_network_access: str or ~kusto_management_client.models.PublicNetworkAccess + :param allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the + cluster. + :type allowed_ip_range_list: list[str] :param engine_type: The engine type. Possible values include: "V2", "V3". Default value: "V3". - :type engine_type: str or ~azure.mgmt.kusto.models.EngineType + :type engine_type: str or ~kusto_management_client.models.EngineType + :param accepted_audiences: The cluster's accepted audiences. + :type accepted_audiences: list[~kusto_management_client.models.AcceptedAudiences] + :param enable_auto_stop: A boolean value that indicates if the cluster could be automatically + stopped (due to lack of data or no activity for many days). + :type enable_auto_stop: bool + :param restrict_outbound_network_access: Whether or not to restrict outbound network access. + Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: + "Enabled", "Disabled". + :type restrict_outbound_network_access: str or + ~kusto_management_client.models.ClusterNetworkAccessFlag + :param allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from + Cluster. + :type allowed_fqdn_list: list[str] """ _validation = { @@ -492,6 +570,7 @@ class Cluster(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'sku': {'required': True}, + 'system_data': {'readonly': True}, 'etag': {'readonly': True}, 'state': {'readonly': True}, 'provisioning_state': {'readonly': True}, @@ -508,6 +587,7 @@ class Cluster(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'AzureSku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'zones': {'key': 'zones', 'type': '[str]'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'etag': {'key': 'etag', 'type': 'str'}, @@ -525,7 +605,13 @@ class Cluster(TrackedResource): 'enable_purge': {'key': 'properties.enablePurge', 'type': 'bool'}, 'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'}, 'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'allowed_ip_range_list': {'key': 'properties.allowedIpRangeList', 'type': '[str]'}, 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'accepted_audiences': {'key': 'properties.acceptedAudiences', 'type': '[AcceptedAudiences]'}, + 'enable_auto_stop': {'key': 'properties.enableAutoStop', 'type': 'bool'}, + 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, + 'allowed_fqdn_list': {'key': 'properties.allowedFqdnList', 'type': '[str]'}, } def __init__( @@ -534,6 +620,7 @@ def __init__( ): super(Cluster, self).__init__(**kwargs) self.sku = kwargs['sku'] + self.system_data = None self.zones = kwargs.get('zones', None) self.identity = kwargs.get('identity', None) self.etag = None @@ -551,7 +638,13 @@ def __init__( self.enable_purge = kwargs.get('enable_purge', False) self.language_extensions = None self.enable_double_encryption = kwargs.get('enable_double_encryption', False) + self.public_network_access = kwargs.get('public_network_access', "Enabled") + self.allowed_ip_range_list = kwargs.get('allowed_ip_range_list', None) self.engine_type = kwargs.get('engine_type', "V3") + self.accepted_audiences = kwargs.get('accepted_audiences', None) + self.enable_auto_stop = kwargs.get('enable_auto_stop', True) + self.restrict_outbound_network_access = kwargs.get('restrict_outbound_network_access', None) + self.allowed_fqdn_list = kwargs.get('allowed_fqdn_list', None) class ClusterCheckNameRequest(msrest.serialization.Model): @@ -563,7 +656,7 @@ class ClusterCheckNameRequest(msrest.serialization.Model): :param name: Required. Cluster name. :type name: str - :ivar type: Required. The type of resource, Microsoft.Kusto/clusters. Default value: + :ivar type: The type of resource, Microsoft.Kusto/clusters. Has constant value: "Microsoft.Kusto/clusters". :vartype type: str """ @@ -592,7 +685,7 @@ class ClusterListResult(msrest.serialization.Model): """The list Kusto clusters operation response. :param value: The list of Kusto clusters. - :type value: list[~azure.mgmt.kusto.models.Cluster] + :type value: list[~kusto_management_client.models.Cluster] """ _attribute_map = { @@ -625,18 +718,18 @@ class ClusterPrincipalAssignment(ProxyResource): :type principal_id: str :param role: Cluster principal role. Possible values include: "AllDatabasesAdmin", "AllDatabasesViewer". - :type role: str or ~azure.mgmt.kusto.models.ClusterPrincipalRole + :type role: str or ~kusto_management_client.models.ClusterPrincipalRole :param tenant_id: The tenant id of the principal. :type tenant_id: str :param principal_type: Principal type. Possible values include: "App", "Group", "User". - :type principal_type: str or ~azure.mgmt.kusto.models.PrincipalType + :type principal_type: str or ~kusto_management_client.models.PrincipalType :ivar tenant_name: The tenant name of the principal. :vartype tenant_name: str :ivar principal_name: The principal name. :vartype principal_name: str :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -684,8 +777,8 @@ class ClusterPrincipalAssignmentCheckNameRequest(msrest.serialization.Model): :param name: Required. Principal Assignment resource name. :type name: str - :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/principalAssignments. - Default value: "Microsoft.Kusto/clusters/principalAssignments". + :ivar type: The type of resource, Microsoft.Kusto/clusters/principalAssignments. Has constant + value: "Microsoft.Kusto/clusters/principalAssignments". :vartype type: str """ @@ -713,7 +806,7 @@ class ClusterPrincipalAssignmentListResult(msrest.serialization.Model): """The list Kusto cluster principal assignments operation response. :param value: The list of Kusto cluster principal assignments. - :type value: list[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :type value: list[~kusto_management_client.models.ClusterPrincipalAssignment] """ _attribute_map = { @@ -746,15 +839,15 @@ class ClusterUpdate(Resource): :param location: Resource location. :type location: str :param sku: The SKU of the cluster. - :type sku: ~azure.mgmt.kusto.models.AzureSku + :type sku: ~kusto_management_client.models.AzureSku :param identity: The identity of the cluster, if configured. - :type identity: ~azure.mgmt.kusto.models.Identity + :type identity: ~kusto_management_client.models.Identity :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 + :vartype state: str or ~kusto_management_client.models.State :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :ivar uri: The cluster URI. :vartype uri: str :ivar data_ingestion_uri: The cluster data ingestion URI. @@ -762,9 +855,9 @@ class ClusterUpdate(Resource): :ivar state_reason: The reason for the cluster's current state. :vartype state_reason: str :param trusted_external_tenants: The cluster's external tenants. - :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :type trusted_external_tenants: list[~kusto_management_client.models.TrustedExternalTenant] :param optimized_autoscale: Optimized auto scale definition. - :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale + :type optimized_autoscale: ~kusto_management_client.models.OptimizedAutoscale :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are encrypted. :type enable_disk_encryption: bool @@ -772,18 +865,39 @@ class ClusterUpdate(Resource): enabled. :type enable_streaming_ingest: bool :param virtual_network_configuration: Virtual network definition. - :type virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration + :type virtual_network_configuration: + ~kusto_management_client.models.VirtualNetworkConfiguration :param key_vault_properties: KeyVault properties for the cluster encryption. - :type key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties + :type key_vault_properties: ~kusto_management_client.models.KeyVaultProperties :param enable_purge: A boolean value that indicates if the purge operations are enabled. :type enable_purge: bool :ivar language_extensions: List of the cluster's language extensions. - :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList + :vartype language_extensions: ~kusto_management_client.models.LanguageExtensionsList :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. :type enable_double_encryption: bool + :param public_network_access: Public network access to the cluster is enabled by default. When + disabled, only private endpoint connection to the cluster is allowed. Possible values include: + "Enabled", "Disabled". Default value: "Enabled". + :type public_network_access: str or ~kusto_management_client.models.PublicNetworkAccess + :param allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the + cluster. + :type allowed_ip_range_list: list[str] :param engine_type: The engine type. Possible values include: "V2", "V3". Default value: "V3". - :type engine_type: str or ~azure.mgmt.kusto.models.EngineType + :type engine_type: str or ~kusto_management_client.models.EngineType + :param accepted_audiences: The cluster's accepted audiences. + :type accepted_audiences: list[~kusto_management_client.models.AcceptedAudiences] + :param enable_auto_stop: A boolean value that indicates if the cluster could be automatically + stopped (due to lack of data or no activity for many days). + :type enable_auto_stop: bool + :param restrict_outbound_network_access: Whether or not to restrict outbound network access. + Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: + "Enabled", "Disabled". + :type restrict_outbound_network_access: str or + ~kusto_management_client.models.ClusterNetworkAccessFlag + :param allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from + Cluster. + :type allowed_fqdn_list: list[str] """ _validation = { @@ -820,7 +934,13 @@ class ClusterUpdate(Resource): 'enable_purge': {'key': 'properties.enablePurge', 'type': 'bool'}, 'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'}, 'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'allowed_ip_range_list': {'key': 'properties.allowedIpRangeList', 'type': '[str]'}, 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'accepted_audiences': {'key': 'properties.acceptedAudiences', 'type': '[AcceptedAudiences]'}, + 'enable_auto_stop': {'key': 'properties.enableAutoStop', 'type': 'bool'}, + 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, + 'allowed_fqdn_list': {'key': 'properties.allowedFqdnList', 'type': '[str]'}, } def __init__( @@ -846,7 +966,13 @@ def __init__( self.enable_purge = kwargs.get('enable_purge', False) self.language_extensions = None self.enable_double_encryption = kwargs.get('enable_double_encryption', False) + self.public_network_access = kwargs.get('public_network_access', "Enabled") + self.allowed_ip_range_list = kwargs.get('allowed_ip_range_list', None) self.engine_type = kwargs.get('engine_type', "V3") + self.accepted_audiences = kwargs.get('accepted_audiences', None) + self.enable_auto_stop = kwargs.get('enable_auto_stop', True) + self.restrict_outbound_network_access = kwargs.get('restrict_outbound_network_access', None) + self.allowed_fqdn_list = kwargs.get('allowed_fqdn_list', None) class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): @@ -901,7 +1027,7 @@ class Database(ProxyResource): :type location: str :param kind: Required. Kind of the database.Constant filled by server. Possible values include: "ReadWrite", "ReadOnlyFollowing". - :type kind: str or ~azure.mgmt.kusto.models.Kind + :type kind: str or ~kusto_management_client.models.Kind """ _validation = { @@ -936,7 +1062,7 @@ class DatabaseListResult(msrest.serialization.Model): """The list Kusto databases operation response. :param value: The list of Kusto databases. - :type value: list[~azure.mgmt.kusto.models.Database] + :type value: list[~kusto_management_client.models.Database] """ _attribute_map = { @@ -960,12 +1086,12 @@ class DatabasePrincipal(msrest.serialization.Model): :param role: Required. Database principal role. Possible values include: "Admin", "Ingestor", "Monitor", "User", "UnrestrictedViewer", "Viewer". - :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole + :type role: str or ~kusto_management_client.models.DatabasePrincipalRole :param name: Required. Database principal name. :type name: str :param type: Required. Database principal type. Possible values include: "App", "Group", "User". - :type type: str or ~azure.mgmt.kusto.models.DatabasePrincipalType + :type type: str or ~kusto_management_client.models.DatabasePrincipalType :param fqn: Database principal fully qualified name. :type fqn: str :param email: Database principal email if exists. @@ -1025,18 +1151,18 @@ class DatabasePrincipalAssignment(ProxyResource): :type principal_id: str :param role: Database principal role. Possible values include: "Admin", "Ingestor", "Monitor", "User", "UnrestrictedViewer", "Viewer". - :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole + :type role: str or ~kusto_management_client.models.DatabasePrincipalRole :param tenant_id: The tenant id of the principal. :type tenant_id: str :param principal_type: Principal type. Possible values include: "App", "Group", "User". - :type principal_type: str or ~azure.mgmt.kusto.models.PrincipalType + :type principal_type: str or ~kusto_management_client.models.PrincipalType :ivar tenant_name: The tenant name of the principal. :vartype tenant_name: str :ivar principal_name: The principal name. :vartype principal_name: str :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -1084,9 +1210,8 @@ class DatabasePrincipalAssignmentCheckNameRequest(msrest.serialization.Model): :param name: Required. Principal Assignment resource name. :type name: str - :ivar type: Required. The type of resource, - Microsoft.Kusto/clusters/databases/principalAssignments. Default value: - "Microsoft.Kusto/clusters/databases/principalAssignments". + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. Has + constant value: "Microsoft.Kusto/clusters/databases/principalAssignments". :vartype type: str """ @@ -1114,7 +1239,7 @@ class DatabasePrincipalAssignmentListResult(msrest.serialization.Model): """The list Kusto database principal assignments operation response. :param value: The list of Kusto database principal assignments. - :type value: list[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :type value: list[~kusto_management_client.models.DatabasePrincipalAssignment] """ _attribute_map = { @@ -1133,7 +1258,7 @@ class DatabasePrincipalListRequest(msrest.serialization.Model): """The list Kusto database principals operation request. :param value: The list of Kusto database principals. - :type value: list[~azure.mgmt.kusto.models.DatabasePrincipal] + :type value: list[~kusto_management_client.models.DatabasePrincipal] """ _attribute_map = { @@ -1152,7 +1277,7 @@ class DatabasePrincipalListResult(msrest.serialization.Model): """The list Kusto database principals operation response. :param value: The list of Kusto database principals. - :type value: list[~azure.mgmt.kusto.models.DatabasePrincipal] + :type value: list[~kusto_management_client.models.DatabasePrincipal] """ _attribute_map = { @@ -1208,7 +1333,7 @@ class DataConnection(ProxyResource): :type location: str :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server. Possible values include: "EventHub", "EventGrid", "IotHub". - :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + :type kind: str or ~kusto_management_client.models.DataConnectionKind """ _validation = { @@ -1248,8 +1373,8 @@ class DataConnectionCheckNameRequest(msrest.serialization.Model): :param name: Required. Data Connection name. :type name: str - :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. - Default value: "Microsoft.Kusto/clusters/databases/dataConnections". + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. Has + constant value: "Microsoft.Kusto/clusters/databases/dataConnections". :vartype type: str """ @@ -1277,7 +1402,7 @@ class DataConnectionListResult(msrest.serialization.Model): """The list Kusto data connections operation response. :param value: The list of Kusto data connections. - :type value: list[~azure.mgmt.kusto.models.DataConnection] + :type value: list[~kusto_management_client.models.DataConnection] """ _attribute_map = { @@ -1298,7 +1423,7 @@ class DataConnectionValidation(msrest.serialization.Model): :param data_connection_name: The name of the data connection. :type data_connection_name: str :param properties: The data connection properties to validate. - :type properties: ~azure.mgmt.kusto.models.DataConnection + :type properties: ~kusto_management_client.models.DataConnection """ _attribute_map = { @@ -1319,7 +1444,7 @@ class DataConnectionValidationListResult(msrest.serialization.Model): """The list Kusto data connection validation result. :param value: The list of Kusto data connection validation errors. - :type value: list[~azure.mgmt.kusto.models.DataConnectionValidationResult] + :type value: list[~kusto_management_client.models.DataConnectionValidationResult] """ _attribute_map = { @@ -1372,6 +1497,48 @@ def __init__( self.findings = kwargs.get('findings', None) +class EndpointDependency(msrest.serialization.Model): + """A domain name that a service is reached at, including details of the current connection status. + + :param domain_name: The domain name of the dependency. + :type domain_name: str + :param endpoint_details: The ports used when connecting to DomainName. + :type endpoint_details: list[~kusto_management_client.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.endpoint_details = kwargs.get('endpoint_details', None) + + +class EndpointDetail(msrest.serialization.Model): + """Current TCP connectivity information from the Kusto cluster to a single endpoint. + + :param port: The port an endpoint is connected to. + :type port: int + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointDetail, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + + class EventGridDataConnection(DataConnection): """Class representing an Event Grid data connection. @@ -1391,7 +1558,7 @@ class EventGridDataConnection(DataConnection): :type location: str :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server. Possible values include: "EventHub", "EventGrid", "IotHub". - :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + :type kind: str or ~kusto_management_client.models.DataConnectionKind :param storage_account_resource_id: The resource ID of the storage account where the data resides. :type storage_account_resource_id: str @@ -1410,16 +1577,16 @@ class EventGridDataConnection(DataConnection): each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE". - :type data_format: str or ~azure.mgmt.kusto.models.EventGridDataFormat + :type data_format: str or ~kusto_management_client.models.EventGridDataFormat :param ignore_first_record: A Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file. :type ignore_first_record: bool :param blob_storage_event_type: The name of blob storage event type to process. Possible values include: "Microsoft.Storage.BlobCreated", "Microsoft.Storage.BlobRenamed". - :type blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType + :type blob_storage_event_type: str or ~kusto_management_client.models.BlobStorageEventType :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -1483,7 +1650,7 @@ class EventHubDataConnection(DataConnection): :type location: str :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server. Possible values include: "EventHub", "EventGrid", "IotHub". - :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + :type kind: str or ~kusto_management_client.models.DataConnectionKind :param event_hub_resource_id: The resource ID of the event hub to be used to create a data connection. :type event_hub_resource_id: str @@ -1499,15 +1666,15 @@ class EventHubDataConnection(DataConnection): each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE". - :type data_format: str or ~azure.mgmt.kusto.models.EventHubDataFormat + :type data_format: str or ~kusto_management_client.models.EventHubDataFormat :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". Default value: "None". - :type compression: str or ~azure.mgmt.kusto.models.Compression + :type compression: str or ~kusto_management_client.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 + :vartype provisioning_state: str or ~kusto_management_client.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 @@ -1599,7 +1766,7 @@ class FollowerDatabaseListResult(msrest.serialization.Model): """The list Kusto database principals operation response. :param value: The list of follower database result. - :type value: list[~azure.mgmt.kusto.models.FollowerDatabaseDefinition] + :type value: list[~kusto_management_client.models.FollowerDatabaseDefinition] """ _attribute_map = { @@ -1629,12 +1796,12 @@ class Identity(msrest.serialization.Model): UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove all identities. Possible values include: "None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned". - :type type: str or ~azure.mgmt.kusto.models.IdentityType + :type type: str or ~kusto_management_client.models.IdentityType :param user_assigned_identities: The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.kusto.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] + ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -1680,7 +1847,7 @@ class IotHubDataConnection(DataConnection): :type location: str :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server. Possible values include: "EventHub", "EventGrid", "IotHub". - :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + :type kind: str or ~kusto_management_client.models.DataConnectionKind :param iot_hub_resource_id: The resource ID of the Iot hub to be used to create a data connection. :type iot_hub_resource_id: str @@ -1696,14 +1863,14 @@ class IotHubDataConnection(DataConnection): each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE". - :type data_format: str or ~azure.mgmt.kusto.models.IotHubDataFormat + :type data_format: str or ~kusto_management_client.models.IotHubDataFormat :param event_system_properties: System properties of the iot hub. :type event_system_properties: list[str] :param shared_access_policy_name: The name of the share access policy. :type shared_access_policy_name: str :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -1749,23 +1916,16 @@ def __init__( class KeyVaultProperties(msrest.serialization.Model): """Properties of the key vault. - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. The name of the key vault key. + :param key_name: The name of the key vault key. :type key_name: str :param key_version: The version of the key vault key. :type key_version: str - :param key_vault_uri: Required. The Uri of the key vault. + :param key_vault_uri: The Uri of the key vault. :type key_vault_uri: str :param user_identity: The user assigned identity (ARM resource id) that has access to the key. :type user_identity: str """ - _validation = { - 'key_name': {'required': True}, - 'key_vault_uri': {'required': True}, - } - _attribute_map = { 'key_name': {'key': 'keyName', 'type': 'str'}, 'key_version': {'key': 'keyVersion', 'type': 'str'}, @@ -1778,9 +1938,9 @@ def __init__( **kwargs ): super(KeyVaultProperties, self).__init__(**kwargs) - self.key_name = kwargs['key_name'] + self.key_name = kwargs.get('key_name', None) self.key_version = kwargs.get('key_version', None) - self.key_vault_uri = kwargs['key_vault_uri'] + self.key_vault_uri = kwargs.get('key_vault_uri', None) self.user_identity = kwargs.get('user_identity', None) @@ -1789,7 +1949,7 @@ class LanguageExtension(msrest.serialization.Model): :param language_extension_name: The language extension name. Possible values include: "PYTHON", "R". - :type language_extension_name: str or ~azure.mgmt.kusto.models.LanguageExtensionName + :type language_extension_name: str or ~kusto_management_client.models.LanguageExtensionName """ _attribute_map = { @@ -1808,7 +1968,7 @@ class LanguageExtensionsList(msrest.serialization.Model): """The list of language extension objects. :param value: The list of language extensions. - :type value: list[~azure.mgmt.kusto.models.LanguageExtension] + :type value: list[~kusto_management_client.models.LanguageExtension] """ _attribute_map = { @@ -1827,7 +1987,7 @@ class ListResourceSkusResult(msrest.serialization.Model): """List of available SKUs for a Kusto Cluster. :param value: The collection of available SKUs for an existing resource. - :type value: list[~azure.mgmt.kusto.models.AzureResourceSku] + :type value: list[~kusto_management_client.models.AzureResourceSku] """ _attribute_map = { @@ -1842,17 +2002,134 @@ def __init__( self.value = kwargs.get('value', None) +class ManagedPrivateEndpoint(ProxyResource): + """Class representing a managed private endpoint. + + 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: ~kusto_management_client.models.SystemData + :param private_link_resource_id: The ARM resource ID of the resource for which the managed + private endpoint is created. + :type private_link_resource_id: str + :param private_link_resource_region: The region of the resource to which the managed private + endpoint is created. + :type private_link_resource_region: str + :param group_id: The groupId in which the managed private endpoint is created. + :type group_id: str + :param request_message: The user request message. + :type request_message: str + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving". + :vartype provisioning_state: str or ~kusto_management_client.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'}, + 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'}, + 'private_link_resource_region': {'key': 'properties.privateLinkResourceRegion', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedPrivateEndpoint, self).__init__(**kwargs) + self.system_data = None + self.private_link_resource_id = kwargs.get('private_link_resource_id', None) + self.private_link_resource_region = kwargs.get('private_link_resource_region', None) + self.group_id = kwargs.get('group_id', None) + self.request_message = kwargs.get('request_message', None) + self.provisioning_state = None + + +class ManagedPrivateEndpointListResult(msrest.serialization.Model): + """The list managed private endpoints operation response. + + :param value: The list of managed private endpoints. + :type value: list[~kusto_management_client.models.ManagedPrivateEndpoint] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedPrivateEndpoint]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedPrivateEndpointListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ManagedPrivateEndpointsCheckNameRequest(msrest.serialization.Model): + """The result returned from a managedPrivateEndpoints check 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. Managed private endpoint resource name. + :type name: str + :ivar type: The type of resource, for instance + Microsoft.Kusto/clusters/managedPrivateEndpoints. Has constant value: + "Microsoft.Kusto/clusters/managedPrivateEndpoints". + :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/managedPrivateEndpoints" + + def __init__( + self, + **kwargs + ): + super(ManagedPrivateEndpointsCheckNameRequest, self).__init__(**kwargs) + self.name = kwargs['name'] + + class Operation(msrest.serialization.Model): """A REST API operation. :param name: This is of the format {provider}/{resource}/{operation}. :type name: str :param display: The object that describes the operation. - :type display: ~azure.mgmt.kusto.models.OperationDisplay + :type display: ~kusto_management_client.models.OperationDisplay :param origin: The intended executor of the operation. :type origin: str :param properties: Any object. - :type properties: object + :type properties: any """ _attribute_map = { @@ -1908,7 +2185,7 @@ class OperationListResult(msrest.serialization.Model): """Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. :param value: The list of operations supported by the resource provider. - :type value: list[~azure.mgmt.kusto.models.Operation] + :type value: list[~kusto_management_client.models.Operation] :param next_link: The URL to get the next set of operation list results if there are any. :type next_link: str """ @@ -1938,7 +2215,7 @@ class OperationResult(msrest.serialization.Model): :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 + :vartype status: str or ~kusto_management_client.models.Status :param start_time: The operation start time. :type start_time: ~datetime.datetime :param end_time: The operation end time. @@ -2033,6 +2310,303 @@ def __init__( self.maximum = kwargs['maximum'] +class OutboundNetworkDependenciesEndpoint(ProxyResource): + """Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound network access to. + + 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 etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param category: The type of service accessed by the Kusto Service Environment, e.g., Azure + Storage, Azure SQL Database, and Azure Active Directory. + :type category: str + :param endpoints: The endpoints that the Kusto Service Environment reaches the service at. + :type endpoints: list[~kusto_management_client.models.EndpointDependency] + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving". + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[EndpointDependency]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundNetworkDependenciesEndpoint, self).__init__(**kwargs) + self.etag = None + self.category = kwargs.get('category', None) + self.endpoints = kwargs.get('endpoints', None) + self.provisioning_state = None + + +class OutboundNetworkDependenciesEndpointListResult(msrest.serialization.Model): + """Collection of Outbound Environment Endpoints. + + 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 value: Required. Collection of resources. + :type value: list[~kusto_management_client.models.OutboundNetworkDependenciesEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundNetworkDependenciesEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundNetworkDependenciesEndpointListResult, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. + + 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: ~kusto_management_client.models.SystemData + :ivar private_endpoint: Private endpoint which the connection belongs to. + :vartype private_endpoint: ~kusto_management_client.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection State of the Private Endpoint + Connection. + :type private_link_service_connection_state: + ~kusto_management_client.models.PrivateLinkServiceConnectionStateProperty + :ivar group_id: Group id of the private endpoint. + :vartype group_id: str + :ivar provisioning_state: Provisioning state of the private endpoint. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'group_id': {'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'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.system_data = None + self.private_endpoint = None + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.group_id = None + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + :param value: Array of private endpoint connections. + :type value: list[~kusto_management_client.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateEndpointProperty(msrest.serialization.Model): + """Private endpoint which the connection belongs to. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource id of the private endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointProperty, self).__init__(**kwargs) + self.id = None + + +class PrivateLinkResource(Resource): + """A private link resource. + + 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: ~kusto_management_client.models.SystemData + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: The private link resource required zone names. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'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'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.system_data = None + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~kusto_management_client.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): + """Connection State of the Private Endpoint Connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param status: The private link service connection status. + :type status: str + :param description: The private link service connection description. + :type description: str + :ivar actions_required: Any action that is required beyond basic workflow (approve/ reject/ + disconnect). + :vartype actions_required: str + """ + + _validation = { + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = None + + class ReadOnlyFollowingDatabase(Database): """Class representing a read only following database. @@ -2052,10 +2626,10 @@ class ReadOnlyFollowingDatabase(Database): :type location: str :param kind: Required. Kind of the database.Constant filled by server. Possible values include: "ReadWrite", "ReadOnlyFollowing". - :type kind: str or ~azure.mgmt.kusto.models.Kind + :type kind: str or ~kusto_management_client.models.Kind :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :ivar soft_delete_period: The time the data should be kept before it stops being accessible to queries in TimeSpan. :vartype soft_delete_period: ~datetime.timedelta @@ -2063,7 +2637,7 @@ class ReadOnlyFollowingDatabase(Database): TimeSpan. :type hot_cache_period: ~datetime.timedelta :ivar statistics: The statistics of the database. - :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + :vartype statistics: ~kusto_management_client.models.DatabaseStatistics :ivar leader_cluster_resource_id: The name of the leader cluster. :vartype leader_cluster_resource_id: str :ivar attached_database_configuration_name: The name of the attached database configuration @@ -2072,7 +2646,7 @@ class ReadOnlyFollowingDatabase(Database): :ivar principals_modification_kind: The principals modification kind of the database. Possible values include: "Union", "Replace", "None". :vartype principals_modification_kind: str or - ~azure.mgmt.kusto.models.PrincipalsModificationKind + ~kusto_management_client.models.PrincipalsModificationKind """ _validation = { @@ -2137,10 +2711,10 @@ class ReadWriteDatabase(Database): :type location: str :param kind: Required. Kind of the database.Constant filled by server. Possible values include: "ReadWrite", "ReadOnlyFollowing". - :type kind: str or ~azure.mgmt.kusto.models.Kind + :type kind: str or ~kusto_management_client.models.Kind :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :param soft_delete_period: The time the data should be kept before it stops being accessible to queries in TimeSpan. :type soft_delete_period: ~datetime.timedelta @@ -2148,7 +2722,7 @@ class ReadWriteDatabase(Database): TimeSpan. :type hot_cache_period: ~datetime.timedelta :ivar statistics: The statistics of the database. - :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + :vartype statistics: ~kusto_management_client.models.DatabaseStatistics :ivar is_followed: Indicates whether the database is followed. :vartype is_followed: bool """ @@ -2203,7 +2777,7 @@ class Script(ProxyResource): "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 + :vartype system_data: ~kusto_management_client.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. @@ -2214,7 +2788,7 @@ class Script(ProxyResource): :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -2259,7 +2833,7 @@ class ScriptCheckNameRequest(msrest.serialization.Model): :param name: Required. Script name. :type name: str - :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/scripts. Default + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/scripts. Has constant value: "Microsoft.Kusto/clusters/databases/scripts". :vartype type: str """ @@ -2288,7 +2862,7 @@ 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] + :type value: list[~kusto_management_client.models.Script] """ _attribute_map = { @@ -2317,9 +2891,9 @@ class SkuDescription(msrest.serialization.Model): :ivar locations: The set of locations that the SKU is available. :vartype locations: list[str] :ivar location_info: Locations and zones. - :vartype location_info: list[~azure.mgmt.kusto.models.SkuLocationInfoItem] + :vartype location_info: list[~kusto_management_client.models.SkuLocationInfoItem] :ivar restrictions: The restrictions because of which SKU cannot be used. - :vartype restrictions: list[object] + :vartype restrictions: list[any] """ _validation = { @@ -2359,7 +2933,7 @@ class SkuDescriptionList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: SKU descriptions. - :vartype value: list[~azure.mgmt.kusto.models.SkuDescription] + :vartype value: list[~kusto_management_client.models.SkuDescription] """ _validation = { @@ -2414,14 +2988,14 @@ class SystemData(msrest.serialization.Model): :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 + :type created_by_type: str or ~kusto_management_client.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 + :type last_modified_by_type: str or ~kusto_management_client.models.CreatedByType :param last_modified_at: The timestamp of resource last modification (UTC). :type last_modified_at: ~datetime.datetime """ 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 e519944f8764..426241adbfbd 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 @@ -7,13 +7,34 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union import msrest.serialization from ._kusto_management_client_enums import * +class AcceptedAudiences(msrest.serialization.Model): + """Represents an accepted audience trusted by the cluster. + + :param value: GUID or valid URL representing an accepted audience. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + **kwargs + ): + super(AcceptedAudiences, self).__init__(**kwargs) + self.value = value + + class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. @@ -102,7 +123,7 @@ class AttachedDatabaseConfiguration(ProxyResource): :type location: str :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :param database_name: The name of the database which you would like to attach, use * if you want to follow all current and future databases. :type database_name: str @@ -115,9 +136,10 @@ class AttachedDatabaseConfiguration(ProxyResource): :param default_principals_modification_kind: The default principals modification kind. Possible values include: "Union", "Replace", "None". :type default_principals_modification_kind: str or - ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind + ~kusto_management_client.models.DefaultPrincipalsModificationKind :param table_level_sharing_properties: Table level sharing specifications. - :type table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties + :type table_level_sharing_properties: + ~kusto_management_client.models.TableLevelSharingProperties """ _validation = { @@ -165,7 +187,7 @@ class AttachedDatabaseConfigurationListResult(msrest.serialization.Model): """The list attached database configurations operation response. :param value: The list of attached database configurations. - :type value: list[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :type value: list[~kusto_management_client.models.AttachedDatabaseConfiguration] """ _attribute_map = { @@ -182,6 +204,43 @@ def __init__( self.value = value +class AttachedDatabaseConfigurationsCheckNameRequest(msrest.serialization.Model): + """The result returned from a AttachedDatabaseConfigurations check 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. Attached database resource name. + :type name: str + :ivar type: The type of resource, for instance + Microsoft.Kusto/clusters/attachedDatabaseConfigurations. Has constant value: + "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". + :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/attachedDatabaseConfigurations" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(AttachedDatabaseConfigurationsCheckNameRequest, self).__init__(**kwargs) + self.name = name + + class AzureCapacity(msrest.serialization.Model): """Azure capacity definition. @@ -189,7 +248,7 @@ class AzureCapacity(msrest.serialization.Model): :param scale_type: Required. Scale type. Possible values include: "automatic", "manual", "none". - :type scale_type: str or ~azure.mgmt.kusto.models.AzureScaleType + :type scale_type: str or ~kusto_management_client.models.AzureScaleType :param minimum: Required. Minimum allowed capacity. :type minimum: int :param maximum: Required. Maximum allowed capacity. @@ -234,9 +293,9 @@ class AzureResourceSku(msrest.serialization.Model): :param resource_type: Resource Namespace and Type. :type resource_type: str :param sku: The SKU details. - :type sku: ~azure.mgmt.kusto.models.AzureSku + :type sku: ~kusto_management_client.models.AzureSku :param capacity: The number of instances of the cluster. - :type capacity: ~azure.mgmt.kusto.models.AzureCapacity + :type capacity: ~kusto_management_client.models.AzureCapacity """ _attribute_map = { @@ -272,11 +331,11 @@ class AzureSku(msrest.serialization.Model): "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 + :type name: str or ~kusto_management_client.models.AzureSkuName :param capacity: The number of instances of the cluster. :type capacity: int :param tier: Required. SKU tier. Possible values include: "Basic", "Standard". - :type tier: str or ~azure.mgmt.kusto.models.AzureSkuTier + :type tier: str or ~kusto_management_client.models.AzureSkuTier """ _validation = { @@ -314,7 +373,7 @@ class CheckNameRequest(msrest.serialization.Model): :param type: Required. The type of resource, for instance Microsoft.Kusto/clusters/databases. Possible values include: "Microsoft.Kusto/clusters/databases", "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". - :type type: str or ~azure.mgmt.kusto.models.Type + :type type: str or ~kusto_management_client.models.Type """ _validation = { @@ -351,7 +410,7 @@ class CheckNameResult(msrest.serialization.Model): :type message: str :param reason: Message providing the reason why the given name is invalid. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.kusto.models.Reason + :type reason: str or ~kusto_management_client.models.Reason """ _attribute_map = { @@ -390,7 +449,7 @@ class CloudErrorBody(msrest.serialization.Model): error. :type target: str :param details: A list of additional details about the error. - :type details: list[~azure.mgmt.kusto.models.CloudErrorBody] + :type details: list[~kusto_management_client.models.CloudErrorBody] """ _attribute_map = { @@ -484,19 +543,21 @@ class Cluster(TrackedResource): :param location: Required. The geo-location where the resource lives. :type location: str :param sku: Required. The SKU of the cluster. - :type sku: ~azure.mgmt.kusto.models.AzureSku + :type sku: ~kusto_management_client.models.AzureSku + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~kusto_management_client.models.SystemData :param zones: The availability zones of the cluster. :type zones: list[str] :param identity: The identity of the cluster, if configured. - :type identity: ~azure.mgmt.kusto.models.Identity + :type identity: ~kusto_management_client.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 + :vartype state: str or ~kusto_management_client.models.State :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :ivar uri: The cluster URI. :vartype uri: str :ivar data_ingestion_uri: The cluster data ingestion URI. @@ -504,9 +565,9 @@ class Cluster(TrackedResource): :ivar state_reason: The reason for the cluster's current state. :vartype state_reason: str :param trusted_external_tenants: The cluster's external tenants. - :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :type trusted_external_tenants: list[~kusto_management_client.models.TrustedExternalTenant] :param optimized_autoscale: Optimized auto scale definition. - :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale + :type optimized_autoscale: ~kusto_management_client.models.OptimizedAutoscale :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are encrypted. :type enable_disk_encryption: bool @@ -514,18 +575,39 @@ class Cluster(TrackedResource): enabled. :type enable_streaming_ingest: bool :param virtual_network_configuration: Virtual network definition. - :type virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration + :type virtual_network_configuration: + ~kusto_management_client.models.VirtualNetworkConfiguration :param key_vault_properties: KeyVault properties for the cluster encryption. - :type key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties + :type key_vault_properties: ~kusto_management_client.models.KeyVaultProperties :param enable_purge: A boolean value that indicates if the purge operations are enabled. :type enable_purge: bool :ivar language_extensions: List of the cluster's language extensions. - :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList + :vartype language_extensions: ~kusto_management_client.models.LanguageExtensionsList :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. :type enable_double_encryption: bool + :param public_network_access: Public network access to the cluster is enabled by default. When + disabled, only private endpoint connection to the cluster is allowed. Possible values include: + "Enabled", "Disabled". Default value: "Enabled". + :type public_network_access: str or ~kusto_management_client.models.PublicNetworkAccess + :param allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the + cluster. + :type allowed_ip_range_list: list[str] :param engine_type: The engine type. Possible values include: "V2", "V3". Default value: "V3". - :type engine_type: str or ~azure.mgmt.kusto.models.EngineType + :type engine_type: str or ~kusto_management_client.models.EngineType + :param accepted_audiences: The cluster's accepted audiences. + :type accepted_audiences: list[~kusto_management_client.models.AcceptedAudiences] + :param enable_auto_stop: A boolean value that indicates if the cluster could be automatically + stopped (due to lack of data or no activity for many days). + :type enable_auto_stop: bool + :param restrict_outbound_network_access: Whether or not to restrict outbound network access. + Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: + "Enabled", "Disabled". + :type restrict_outbound_network_access: str or + ~kusto_management_client.models.ClusterNetworkAccessFlag + :param allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from + Cluster. + :type allowed_fqdn_list: list[str] """ _validation = { @@ -534,6 +616,7 @@ class Cluster(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'sku': {'required': True}, + 'system_data': {'readonly': True}, 'etag': {'readonly': True}, 'state': {'readonly': True}, 'provisioning_state': {'readonly': True}, @@ -550,6 +633,7 @@ class Cluster(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'AzureSku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'zones': {'key': 'zones', 'type': '[str]'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'etag': {'key': 'etag', 'type': 'str'}, @@ -567,7 +651,13 @@ class Cluster(TrackedResource): 'enable_purge': {'key': 'properties.enablePurge', 'type': 'bool'}, 'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'}, 'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'allowed_ip_range_list': {'key': 'properties.allowedIpRangeList', 'type': '[str]'}, 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'accepted_audiences': {'key': 'properties.acceptedAudiences', 'type': '[AcceptedAudiences]'}, + 'enable_auto_stop': {'key': 'properties.enableAutoStop', 'type': 'bool'}, + 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, + 'allowed_fqdn_list': {'key': 'properties.allowedFqdnList', 'type': '[str]'}, } def __init__( @@ -586,11 +676,18 @@ def __init__( key_vault_properties: Optional["KeyVaultProperties"] = None, enable_purge: Optional[bool] = False, enable_double_encryption: Optional[bool] = False, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", + allowed_ip_range_list: Optional[List[str]] = None, engine_type: Optional[Union[str, "EngineType"]] = "V3", + accepted_audiences: Optional[List["AcceptedAudiences"]] = None, + enable_auto_stop: Optional[bool] = True, + restrict_outbound_network_access: Optional[Union[str, "ClusterNetworkAccessFlag"]] = None, + allowed_fqdn_list: Optional[List[str]] = None, **kwargs ): super(Cluster, self).__init__(tags=tags, location=location, **kwargs) self.sku = sku + self.system_data = None self.zones = zones self.identity = identity self.etag = None @@ -608,7 +705,13 @@ def __init__( self.enable_purge = enable_purge self.language_extensions = None self.enable_double_encryption = enable_double_encryption + self.public_network_access = public_network_access + self.allowed_ip_range_list = allowed_ip_range_list self.engine_type = engine_type + self.accepted_audiences = accepted_audiences + self.enable_auto_stop = enable_auto_stop + self.restrict_outbound_network_access = restrict_outbound_network_access + self.allowed_fqdn_list = allowed_fqdn_list class ClusterCheckNameRequest(msrest.serialization.Model): @@ -620,7 +723,7 @@ class ClusterCheckNameRequest(msrest.serialization.Model): :param name: Required. Cluster name. :type name: str - :ivar type: Required. The type of resource, Microsoft.Kusto/clusters. Default value: + :ivar type: The type of resource, Microsoft.Kusto/clusters. Has constant value: "Microsoft.Kusto/clusters". :vartype type: str """ @@ -651,7 +754,7 @@ class ClusterListResult(msrest.serialization.Model): """The list Kusto clusters operation response. :param value: The list of Kusto clusters. - :type value: list[~azure.mgmt.kusto.models.Cluster] + :type value: list[~kusto_management_client.models.Cluster] """ _attribute_map = { @@ -686,18 +789,18 @@ class ClusterPrincipalAssignment(ProxyResource): :type principal_id: str :param role: Cluster principal role. Possible values include: "AllDatabasesAdmin", "AllDatabasesViewer". - :type role: str or ~azure.mgmt.kusto.models.ClusterPrincipalRole + :type role: str or ~kusto_management_client.models.ClusterPrincipalRole :param tenant_id: The tenant id of the principal. :type tenant_id: str :param principal_type: Principal type. Possible values include: "App", "Group", "User". - :type principal_type: str or ~azure.mgmt.kusto.models.PrincipalType + :type principal_type: str or ~kusto_management_client.models.PrincipalType :ivar tenant_name: The tenant name of the principal. :vartype tenant_name: str :ivar principal_name: The principal name. :vartype principal_name: str :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -750,8 +853,8 @@ class ClusterPrincipalAssignmentCheckNameRequest(msrest.serialization.Model): :param name: Required. Principal Assignment resource name. :type name: str - :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/principalAssignments. - Default value: "Microsoft.Kusto/clusters/principalAssignments". + :ivar type: The type of resource, Microsoft.Kusto/clusters/principalAssignments. Has constant + value: "Microsoft.Kusto/clusters/principalAssignments". :vartype type: str """ @@ -781,7 +884,7 @@ class ClusterPrincipalAssignmentListResult(msrest.serialization.Model): """The list Kusto cluster principal assignments operation response. :param value: The list of Kusto cluster principal assignments. - :type value: list[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :type value: list[~kusto_management_client.models.ClusterPrincipalAssignment] """ _attribute_map = { @@ -816,15 +919,15 @@ class ClusterUpdate(Resource): :param location: Resource location. :type location: str :param sku: The SKU of the cluster. - :type sku: ~azure.mgmt.kusto.models.AzureSku + :type sku: ~kusto_management_client.models.AzureSku :param identity: The identity of the cluster, if configured. - :type identity: ~azure.mgmt.kusto.models.Identity + :type identity: ~kusto_management_client.models.Identity :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 + :vartype state: str or ~kusto_management_client.models.State :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :ivar uri: The cluster URI. :vartype uri: str :ivar data_ingestion_uri: The cluster data ingestion URI. @@ -832,9 +935,9 @@ class ClusterUpdate(Resource): :ivar state_reason: The reason for the cluster's current state. :vartype state_reason: str :param trusted_external_tenants: The cluster's external tenants. - :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :type trusted_external_tenants: list[~kusto_management_client.models.TrustedExternalTenant] :param optimized_autoscale: Optimized auto scale definition. - :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale + :type optimized_autoscale: ~kusto_management_client.models.OptimizedAutoscale :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are encrypted. :type enable_disk_encryption: bool @@ -842,18 +945,39 @@ class ClusterUpdate(Resource): enabled. :type enable_streaming_ingest: bool :param virtual_network_configuration: Virtual network definition. - :type virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration + :type virtual_network_configuration: + ~kusto_management_client.models.VirtualNetworkConfiguration :param key_vault_properties: KeyVault properties for the cluster encryption. - :type key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties + :type key_vault_properties: ~kusto_management_client.models.KeyVaultProperties :param enable_purge: A boolean value that indicates if the purge operations are enabled. :type enable_purge: bool :ivar language_extensions: List of the cluster's language extensions. - :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList + :vartype language_extensions: ~kusto_management_client.models.LanguageExtensionsList :param enable_double_encryption: A boolean value that indicates if double encryption is enabled. :type enable_double_encryption: bool + :param public_network_access: Public network access to the cluster is enabled by default. When + disabled, only private endpoint connection to the cluster is allowed. Possible values include: + "Enabled", "Disabled". Default value: "Enabled". + :type public_network_access: str or ~kusto_management_client.models.PublicNetworkAccess + :param allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the + cluster. + :type allowed_ip_range_list: list[str] :param engine_type: The engine type. Possible values include: "V2", "V3". Default value: "V3". - :type engine_type: str or ~azure.mgmt.kusto.models.EngineType + :type engine_type: str or ~kusto_management_client.models.EngineType + :param accepted_audiences: The cluster's accepted audiences. + :type accepted_audiences: list[~kusto_management_client.models.AcceptedAudiences] + :param enable_auto_stop: A boolean value that indicates if the cluster could be automatically + stopped (due to lack of data or no activity for many days). + :type enable_auto_stop: bool + :param restrict_outbound_network_access: Whether or not to restrict outbound network access. + Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: + "Enabled", "Disabled". + :type restrict_outbound_network_access: str or + ~kusto_management_client.models.ClusterNetworkAccessFlag + :param allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from + Cluster. + :type allowed_fqdn_list: list[str] """ _validation = { @@ -890,7 +1014,13 @@ class ClusterUpdate(Resource): 'enable_purge': {'key': 'properties.enablePurge', 'type': 'bool'}, 'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'}, 'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'allowed_ip_range_list': {'key': 'properties.allowedIpRangeList', 'type': '[str]'}, 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'accepted_audiences': {'key': 'properties.acceptedAudiences', 'type': '[AcceptedAudiences]'}, + 'enable_auto_stop': {'key': 'properties.enableAutoStop', 'type': 'bool'}, + 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, + 'allowed_fqdn_list': {'key': 'properties.allowedFqdnList', 'type': '[str]'}, } def __init__( @@ -908,7 +1038,13 @@ def __init__( key_vault_properties: Optional["KeyVaultProperties"] = None, enable_purge: Optional[bool] = False, enable_double_encryption: Optional[bool] = False, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", + allowed_ip_range_list: Optional[List[str]] = None, engine_type: Optional[Union[str, "EngineType"]] = "V3", + accepted_audiences: Optional[List["AcceptedAudiences"]] = None, + enable_auto_stop: Optional[bool] = True, + restrict_outbound_network_access: Optional[Union[str, "ClusterNetworkAccessFlag"]] = None, + allowed_fqdn_list: Optional[List[str]] = None, **kwargs ): super(ClusterUpdate, self).__init__(**kwargs) @@ -930,7 +1066,13 @@ def __init__( self.enable_purge = enable_purge self.language_extensions = None self.enable_double_encryption = enable_double_encryption + self.public_network_access = public_network_access + self.allowed_ip_range_list = allowed_ip_range_list self.engine_type = engine_type + self.accepted_audiences = accepted_audiences + self.enable_auto_stop = enable_auto_stop + self.restrict_outbound_network_access = restrict_outbound_network_access + self.allowed_fqdn_list = allowed_fqdn_list class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): @@ -985,7 +1127,7 @@ class Database(ProxyResource): :type location: str :param kind: Required. Kind of the database.Constant filled by server. Possible values include: "ReadWrite", "ReadOnlyFollowing". - :type kind: str or ~azure.mgmt.kusto.models.Kind + :type kind: str or ~kusto_management_client.models.Kind """ _validation = { @@ -1022,7 +1164,7 @@ class DatabaseListResult(msrest.serialization.Model): """The list Kusto databases operation response. :param value: The list of Kusto databases. - :type value: list[~azure.mgmt.kusto.models.Database] + :type value: list[~kusto_management_client.models.Database] """ _attribute_map = { @@ -1048,12 +1190,12 @@ class DatabasePrincipal(msrest.serialization.Model): :param role: Required. Database principal role. Possible values include: "Admin", "Ingestor", "Monitor", "User", "UnrestrictedViewer", "Viewer". - :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole + :type role: str or ~kusto_management_client.models.DatabasePrincipalRole :param name: Required. Database principal name. :type name: str :param type: Required. Database principal type. Possible values include: "App", "Group", "User". - :type type: str or ~azure.mgmt.kusto.models.DatabasePrincipalType + :type type: str or ~kusto_management_client.models.DatabasePrincipalType :param fqn: Database principal fully qualified name. :type fqn: str :param email: Database principal email if exists. @@ -1120,18 +1262,18 @@ class DatabasePrincipalAssignment(ProxyResource): :type principal_id: str :param role: Database principal role. Possible values include: "Admin", "Ingestor", "Monitor", "User", "UnrestrictedViewer", "Viewer". - :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole + :type role: str or ~kusto_management_client.models.DatabasePrincipalRole :param tenant_id: The tenant id of the principal. :type tenant_id: str :param principal_type: Principal type. Possible values include: "App", "Group", "User". - :type principal_type: str or ~azure.mgmt.kusto.models.PrincipalType + :type principal_type: str or ~kusto_management_client.models.PrincipalType :ivar tenant_name: The tenant name of the principal. :vartype tenant_name: str :ivar principal_name: The principal name. :vartype principal_name: str :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -1184,9 +1326,8 @@ class DatabasePrincipalAssignmentCheckNameRequest(msrest.serialization.Model): :param name: Required. Principal Assignment resource name. :type name: str - :ivar type: Required. The type of resource, - Microsoft.Kusto/clusters/databases/principalAssignments. Default value: - "Microsoft.Kusto/clusters/databases/principalAssignments". + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. Has + constant value: "Microsoft.Kusto/clusters/databases/principalAssignments". :vartype type: str """ @@ -1216,7 +1357,7 @@ class DatabasePrincipalAssignmentListResult(msrest.serialization.Model): """The list Kusto database principal assignments operation response. :param value: The list of Kusto database principal assignments. - :type value: list[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :type value: list[~kusto_management_client.models.DatabasePrincipalAssignment] """ _attribute_map = { @@ -1237,7 +1378,7 @@ class DatabasePrincipalListRequest(msrest.serialization.Model): """The list Kusto database principals operation request. :param value: The list of Kusto database principals. - :type value: list[~azure.mgmt.kusto.models.DatabasePrincipal] + :type value: list[~kusto_management_client.models.DatabasePrincipal] """ _attribute_map = { @@ -1258,7 +1399,7 @@ class DatabasePrincipalListResult(msrest.serialization.Model): """The list Kusto database principals operation response. :param value: The list of Kusto database principals. - :type value: list[~azure.mgmt.kusto.models.DatabasePrincipal] + :type value: list[~kusto_management_client.models.DatabasePrincipal] """ _attribute_map = { @@ -1318,7 +1459,7 @@ class DataConnection(ProxyResource): :type location: str :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server. Possible values include: "EventHub", "EventGrid", "IotHub". - :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + :type kind: str or ~kusto_management_client.models.DataConnectionKind """ _validation = { @@ -1360,8 +1501,8 @@ class DataConnectionCheckNameRequest(msrest.serialization.Model): :param name: Required. Data Connection name. :type name: str - :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. - Default value: "Microsoft.Kusto/clusters/databases/dataConnections". + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. Has + constant value: "Microsoft.Kusto/clusters/databases/dataConnections". :vartype type: str """ @@ -1391,7 +1532,7 @@ class DataConnectionListResult(msrest.serialization.Model): """The list Kusto data connections operation response. :param value: The list of Kusto data connections. - :type value: list[~azure.mgmt.kusto.models.DataConnection] + :type value: list[~kusto_management_client.models.DataConnection] """ _attribute_map = { @@ -1414,7 +1555,7 @@ class DataConnectionValidation(msrest.serialization.Model): :param data_connection_name: The name of the data connection. :type data_connection_name: str :param properties: The data connection properties to validate. - :type properties: ~azure.mgmt.kusto.models.DataConnection + :type properties: ~kusto_management_client.models.DataConnection """ _attribute_map = { @@ -1438,7 +1579,7 @@ class DataConnectionValidationListResult(msrest.serialization.Model): """The list Kusto data connection validation result. :param value: The list of Kusto data connection validation errors. - :type value: list[~azure.mgmt.kusto.models.DataConnectionValidationResult] + :type value: list[~kusto_management_client.models.DataConnectionValidationResult] """ _attribute_map = { @@ -1497,6 +1638,53 @@ def __init__( self.findings = findings +class EndpointDependency(msrest.serialization.Model): + """A domain name that a service is reached at, including details of the current connection status. + + :param domain_name: The domain name of the dependency. + :type domain_name: str + :param endpoint_details: The ports used when connecting to DomainName. + :type endpoint_details: list[~kusto_management_client.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["EndpointDetail"]] = None, + **kwargs + ): + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(msrest.serialization.Model): + """Current TCP connectivity information from the Kusto cluster to a single endpoint. + + :param port: The port an endpoint is connected to. + :type port: int + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + **kwargs + ): + super(EndpointDetail, self).__init__(**kwargs) + self.port = port + + class EventGridDataConnection(DataConnection): """Class representing an Event Grid data connection. @@ -1516,7 +1704,7 @@ class EventGridDataConnection(DataConnection): :type location: str :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server. Possible values include: "EventHub", "EventGrid", "IotHub". - :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + :type kind: str or ~kusto_management_client.models.DataConnectionKind :param storage_account_resource_id: The resource ID of the storage account where the data resides. :type storage_account_resource_id: str @@ -1535,16 +1723,16 @@ class EventGridDataConnection(DataConnection): each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE". - :type data_format: str or ~azure.mgmt.kusto.models.EventGridDataFormat + :type data_format: str or ~kusto_management_client.models.EventGridDataFormat :param ignore_first_record: A Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file. :type ignore_first_record: bool :param blob_storage_event_type: The name of blob storage event type to process. Possible values include: "Microsoft.Storage.BlobCreated", "Microsoft.Storage.BlobRenamed". - :type blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType + :type blob_storage_event_type: str or ~kusto_management_client.models.BlobStorageEventType :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -1618,7 +1806,7 @@ class EventHubDataConnection(DataConnection): :type location: str :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server. Possible values include: "EventHub", "EventGrid", "IotHub". - :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + :type kind: str or ~kusto_management_client.models.DataConnectionKind :param event_hub_resource_id: The resource ID of the event hub to be used to create a data connection. :type event_hub_resource_id: str @@ -1634,15 +1822,15 @@ class EventHubDataConnection(DataConnection): each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE". - :type data_format: str or ~azure.mgmt.kusto.models.EventHubDataFormat + :type data_format: str or ~kusto_management_client.models.EventHubDataFormat :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". Default value: "None". - :type compression: str or ~azure.mgmt.kusto.models.Compression + :type compression: str or ~kusto_management_client.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 + :vartype provisioning_state: str or ~kusto_management_client.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 @@ -1747,7 +1935,7 @@ class FollowerDatabaseListResult(msrest.serialization.Model): """The list Kusto database principals operation response. :param value: The list of follower database result. - :type value: list[~azure.mgmt.kusto.models.FollowerDatabaseDefinition] + :type value: list[~kusto_management_client.models.FollowerDatabaseDefinition] """ _attribute_map = { @@ -1779,12 +1967,12 @@ class Identity(msrest.serialization.Model): UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove all identities. Possible values include: "None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned". - :type type: str or ~azure.mgmt.kusto.models.IdentityType + :type type: str or ~kusto_management_client.models.IdentityType :param user_assigned_identities: The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :type user_assigned_identities: dict[str, - ~azure.mgmt.kusto.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] + ~kusto_management_client.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -1833,7 +2021,7 @@ class IotHubDataConnection(DataConnection): :type location: str :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server. Possible values include: "EventHub", "EventGrid", "IotHub". - :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + :type kind: str or ~kusto_management_client.models.DataConnectionKind :param iot_hub_resource_id: The resource ID of the Iot hub to be used to create a data connection. :type iot_hub_resource_id: str @@ -1849,14 +2037,14 @@ class IotHubDataConnection(DataConnection): each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE". - :type data_format: str or ~azure.mgmt.kusto.models.IotHubDataFormat + :type data_format: str or ~kusto_management_client.models.IotHubDataFormat :param event_system_properties: System properties of the iot hub. :type event_system_properties: list[str] :param shared_access_policy_name: The name of the share access policy. :type shared_access_policy_name: str :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -1911,23 +2099,16 @@ def __init__( class KeyVaultProperties(msrest.serialization.Model): """Properties of the key vault. - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. The name of the key vault key. + :param key_name: The name of the key vault key. :type key_name: str :param key_version: The version of the key vault key. :type key_version: str - :param key_vault_uri: Required. The Uri of the key vault. + :param key_vault_uri: The Uri of the key vault. :type key_vault_uri: str :param user_identity: The user assigned identity (ARM resource id) that has access to the key. :type user_identity: str """ - _validation = { - 'key_name': {'required': True}, - 'key_vault_uri': {'required': True}, - } - _attribute_map = { 'key_name': {'key': 'keyName', 'type': 'str'}, 'key_version': {'key': 'keyVersion', 'type': 'str'}, @@ -1938,9 +2119,9 @@ class KeyVaultProperties(msrest.serialization.Model): def __init__( self, *, - key_name: str, - key_vault_uri: str, + key_name: Optional[str] = None, key_version: Optional[str] = None, + key_vault_uri: Optional[str] = None, user_identity: Optional[str] = None, **kwargs ): @@ -1956,7 +2137,7 @@ class LanguageExtension(msrest.serialization.Model): :param language_extension_name: The language extension name. Possible values include: "PYTHON", "R". - :type language_extension_name: str or ~azure.mgmt.kusto.models.LanguageExtensionName + :type language_extension_name: str or ~kusto_management_client.models.LanguageExtensionName """ _attribute_map = { @@ -1977,7 +2158,7 @@ class LanguageExtensionsList(msrest.serialization.Model): """The list of language extension objects. :param value: The list of language extensions. - :type value: list[~azure.mgmt.kusto.models.LanguageExtension] + :type value: list[~kusto_management_client.models.LanguageExtension] """ _attribute_map = { @@ -1998,7 +2179,7 @@ class ListResourceSkusResult(msrest.serialization.Model): """List of available SKUs for a Kusto Cluster. :param value: The collection of available SKUs for an existing resource. - :type value: list[~azure.mgmt.kusto.models.AzureResourceSku] + :type value: list[~kusto_management_client.models.AzureResourceSku] """ _attribute_map = { @@ -2015,17 +2196,143 @@ def __init__( self.value = value +class ManagedPrivateEndpoint(ProxyResource): + """Class representing a managed private endpoint. + + 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: ~kusto_management_client.models.SystemData + :param private_link_resource_id: The ARM resource ID of the resource for which the managed + private endpoint is created. + :type private_link_resource_id: str + :param private_link_resource_region: The region of the resource to which the managed private + endpoint is created. + :type private_link_resource_region: str + :param group_id: The groupId in which the managed private endpoint is created. + :type group_id: str + :param request_message: The user request message. + :type request_message: str + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving". + :vartype provisioning_state: str or ~kusto_management_client.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'}, + 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'}, + 'private_link_resource_region': {'key': 'properties.privateLinkResourceRegion', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_link_resource_id: Optional[str] = None, + private_link_resource_region: Optional[str] = None, + group_id: Optional[str] = None, + request_message: Optional[str] = None, + **kwargs + ): + super(ManagedPrivateEndpoint, self).__init__(**kwargs) + self.system_data = None + self.private_link_resource_id = private_link_resource_id + self.private_link_resource_region = private_link_resource_region + self.group_id = group_id + self.request_message = request_message + self.provisioning_state = None + + +class ManagedPrivateEndpointListResult(msrest.serialization.Model): + """The list managed private endpoints operation response. + + :param value: The list of managed private endpoints. + :type value: list[~kusto_management_client.models.ManagedPrivateEndpoint] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedPrivateEndpoint]'}, + } + + def __init__( + self, + *, + value: Optional[List["ManagedPrivateEndpoint"]] = None, + **kwargs + ): + super(ManagedPrivateEndpointListResult, self).__init__(**kwargs) + self.value = value + + +class ManagedPrivateEndpointsCheckNameRequest(msrest.serialization.Model): + """The result returned from a managedPrivateEndpoints check 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. Managed private endpoint resource name. + :type name: str + :ivar type: The type of resource, for instance + Microsoft.Kusto/clusters/managedPrivateEndpoints. Has constant value: + "Microsoft.Kusto/clusters/managedPrivateEndpoints". + :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/managedPrivateEndpoints" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(ManagedPrivateEndpointsCheckNameRequest, self).__init__(**kwargs) + self.name = name + + class Operation(msrest.serialization.Model): """A REST API operation. :param name: This is of the format {provider}/{resource}/{operation}. :type name: str :param display: The object that describes the operation. - :type display: ~azure.mgmt.kusto.models.OperationDisplay + :type display: ~kusto_management_client.models.OperationDisplay :param origin: The intended executor of the operation. :type origin: str :param properties: Any object. - :type properties: object + :type properties: any """ _attribute_map = { @@ -2041,7 +2348,7 @@ def __init__( name: Optional[str] = None, display: Optional["OperationDisplay"] = None, origin: Optional[str] = None, - properties: Optional[object] = None, + properties: Optional[Any] = None, **kwargs ): super(Operation, self).__init__(**kwargs) @@ -2091,7 +2398,7 @@ class OperationListResult(msrest.serialization.Model): """Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. :param value: The list of operations supported by the resource provider. - :type value: list[~azure.mgmt.kusto.models.Operation] + :type value: list[~kusto_management_client.models.Operation] :param next_link: The URL to get the next set of operation list results if there are any. :type next_link: str """ @@ -2124,7 +2431,7 @@ class OperationResult(msrest.serialization.Model): :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 + :vartype status: str or ~kusto_management_client.models.Status :param start_time: The operation start time. :type start_time: ~datetime.datetime :param end_time: The operation end time. @@ -2232,6 +2539,317 @@ def __init__( self.maximum = maximum +class OutboundNetworkDependenciesEndpoint(ProxyResource): + """Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound network access to. + + 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 etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param category: The type of service accessed by the Kusto Service Environment, e.g., Azure + Storage, Azure SQL Database, and Azure Active Directory. + :type category: str + :param endpoints: The endpoints that the Kusto Service Environment reaches the service at. + :type endpoints: list[~kusto_management_client.models.EndpointDependency] + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving". + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[EndpointDependency]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["EndpointDependency"]] = None, + **kwargs + ): + super(OutboundNetworkDependenciesEndpoint, self).__init__(**kwargs) + self.etag = None + self.category = category + self.endpoints = endpoints + self.provisioning_state = None + + +class OutboundNetworkDependenciesEndpointListResult(msrest.serialization.Model): + """Collection of Outbound Environment Endpoints. + + 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 value: Required. Collection of resources. + :type value: list[~kusto_management_client.models.OutboundNetworkDependenciesEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundNetworkDependenciesEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["OutboundNetworkDependenciesEndpoint"], + **kwargs + ): + super(OutboundNetworkDependenciesEndpointListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. + + 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: ~kusto_management_client.models.SystemData + :ivar private_endpoint: Private endpoint which the connection belongs to. + :vartype private_endpoint: ~kusto_management_client.models.PrivateEndpointProperty + :param private_link_service_connection_state: Connection State of the Private Endpoint + Connection. + :type private_link_service_connection_state: + ~kusto_management_client.models.PrivateLinkServiceConnectionStateProperty + :ivar group_id: Group id of the private endpoint. + :vartype group_id: str + :ivar provisioning_state: Provisioning state of the private endpoint. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'group_id': {'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'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionStateProperty"] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.system_data = None + self.private_endpoint = None + self.private_link_service_connection_state = private_link_service_connection_state + self.group_id = None + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + :param value: Array of private endpoint connections. + :type value: list[~kusto_management_client.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateEndpointProperty(msrest.serialization.Model): + """Private endpoint which the connection belongs to. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource id of the private endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointProperty, self).__init__(**kwargs) + self.id = None + + +class PrivateLinkResource(Resource): + """A private link resource. + + 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: ~kusto_management_client.models.SystemData + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: The private link resource required zone names. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'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'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.system_data = None + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~kusto_management_client.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): + """Connection State of the Private Endpoint Connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param status: The private link service connection status. + :type status: str + :param description: The private link service connection description. + :type description: str + :ivar actions_required: Any action that is required beyond basic workflow (approve/ reject/ + disconnect). + :vartype actions_required: str + """ + + _validation = { + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = None + + class ReadOnlyFollowingDatabase(Database): """Class representing a read only following database. @@ -2251,10 +2869,10 @@ class ReadOnlyFollowingDatabase(Database): :type location: str :param kind: Required. Kind of the database.Constant filled by server. Possible values include: "ReadWrite", "ReadOnlyFollowing". - :type kind: str or ~azure.mgmt.kusto.models.Kind + :type kind: str or ~kusto_management_client.models.Kind :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :ivar soft_delete_period: The time the data should be kept before it stops being accessible to queries in TimeSpan. :vartype soft_delete_period: ~datetime.timedelta @@ -2262,7 +2880,7 @@ class ReadOnlyFollowingDatabase(Database): TimeSpan. :type hot_cache_period: ~datetime.timedelta :ivar statistics: The statistics of the database. - :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + :vartype statistics: ~kusto_management_client.models.DatabaseStatistics :ivar leader_cluster_resource_id: The name of the leader cluster. :vartype leader_cluster_resource_id: str :ivar attached_database_configuration_name: The name of the attached database configuration @@ -2271,7 +2889,7 @@ class ReadOnlyFollowingDatabase(Database): :ivar principals_modification_kind: The principals modification kind of the database. Possible values include: "Union", "Replace", "None". :vartype principals_modification_kind: str or - ~azure.mgmt.kusto.models.PrincipalsModificationKind + ~kusto_management_client.models.PrincipalsModificationKind """ _validation = { @@ -2339,10 +2957,10 @@ class ReadWriteDatabase(Database): :type location: str :param kind: Required. Kind of the database.Constant filled by server. Possible values include: "ReadWrite", "ReadOnlyFollowing". - :type kind: str or ~azure.mgmt.kusto.models.Kind + :type kind: str or ~kusto_management_client.models.Kind :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState :param soft_delete_period: The time the data should be kept before it stops being accessible to queries in TimeSpan. :type soft_delete_period: ~datetime.timedelta @@ -2350,7 +2968,7 @@ class ReadWriteDatabase(Database): TimeSpan. :type hot_cache_period: ~datetime.timedelta :ivar statistics: The statistics of the database. - :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + :vartype statistics: ~kusto_management_client.models.DatabaseStatistics :ivar is_followed: Indicates whether the database is followed. :vartype is_followed: bool """ @@ -2409,7 +3027,7 @@ class Script(ProxyResource): "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 + :vartype system_data: ~kusto_management_client.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. @@ -2420,7 +3038,7 @@ class Script(ProxyResource): :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 + :vartype provisioning_state: str or ~kusto_management_client.models.ProvisioningState """ _validation = { @@ -2470,7 +3088,7 @@ class ScriptCheckNameRequest(msrest.serialization.Model): :param name: Required. Script name. :type name: str - :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/scripts. Default + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/scripts. Has constant value: "Microsoft.Kusto/clusters/databases/scripts". :vartype type: str """ @@ -2501,7 +3119,7 @@ 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] + :type value: list[~kusto_management_client.models.Script] """ _attribute_map = { @@ -2532,9 +3150,9 @@ class SkuDescription(msrest.serialization.Model): :ivar locations: The set of locations that the SKU is available. :vartype locations: list[str] :ivar location_info: Locations and zones. - :vartype location_info: list[~azure.mgmt.kusto.models.SkuLocationInfoItem] + :vartype location_info: list[~kusto_management_client.models.SkuLocationInfoItem] :ivar restrictions: The restrictions because of which SKU cannot be used. - :vartype restrictions: list[object] + :vartype restrictions: list[any] """ _validation = { @@ -2574,7 +3192,7 @@ class SkuDescriptionList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: SKU descriptions. - :vartype value: list[~azure.mgmt.kusto.models.SkuDescription] + :vartype value: list[~kusto_management_client.models.SkuDescription] """ _validation = { @@ -2632,14 +3250,14 @@ class SystemData(msrest.serialization.Model): :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 + :type created_by_type: str or ~kusto_management_client.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 + :type last_modified_by_type: str or ~kusto_management_client.models.CreatedByType :param last_modified_at: The timestamp of resource last modification (UTC). :type last_modified_at: ~datetime.datetime """ 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 27917c1aa7d5..9547038985cb 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 @@ -9,9 +9,12 @@ from ._clusters_operations import ClustersOperations from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations from ._databases_operations import DatabasesOperations +from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations +from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations from ._scripts_operations import ScriptsOperations -from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._data_connections_operations import DataConnectionsOperations from ._operations import Operations from ._operations_results_operations import OperationsResultsOperations @@ -20,9 +23,12 @@ 'ClustersOperations', 'ClusterPrincipalAssignmentsOperations', 'DatabasesOperations', + 'AttachedDatabaseConfigurationsOperations', + 'ManagedPrivateEndpointsOperations', 'DatabasePrincipalAssignmentsOperations', 'ScriptsOperations', - 'AttachedDatabaseConfigurationsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', '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 585ff07b2e8a..61e0f13ae945 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 @@ -32,7 +32,7 @@ class AttachedDatabaseConfigurationsOperations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,6 +47,74 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def check_name_availability( + self, + resource_group_name, # type: str + cluster_name, # type: str + resource_name, # type: "_models.AttachedDatabaseConfigurationsCheckNameRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameResult" + """Checks that the attached database configuration resource 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 resource_name: The name of the resource. + :type resource_name: ~kusto_management_client.models.AttachedDatabaseConfigurationsCheckNameRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult, or the result of cls(response) + :rtype: ~kusto_management_client.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-08-27" + 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'), + '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(resource_name, 'AttachedDatabaseConfigurationsCheckNameRequest') + 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}/attachedDatabaseConfigurationCheckNameAvailability'} # type: ignore + def list_by_cluster( self, resource_group_name, # type: str @@ -62,7 +130,7 @@ def list_by_cluster( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AttachedDatabaseConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.AttachedDatabaseConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.AttachedDatabaseConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AttachedDatabaseConfigurationListResult"] @@ -70,7 +138,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -140,7 +208,7 @@ def get( :type attached_database_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AttachedDatabaseConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :rtype: ~kusto_management_client.models.AttachedDatabaseConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AttachedDatabaseConfiguration"] @@ -148,7 +216,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -199,7 +267,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -266,15 +334,15 @@ def begin_create_or_update( :param attached_database_configuration_name: The name of the attached database configuration. :type attached_database_configuration_name: str :param parameters: The database parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.AttachedDatabaseConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -338,7 +406,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -390,8 +458,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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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 037d6f357c61..eefbf7483a7e 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 @@ -32,7 +32,7 @@ class ClusterPrincipalAssignmentsOperations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -62,10 +62,10 @@ def check_name_availability( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param principal_assignment_name: The name of the principal assignment. - :type principal_assignment_name: ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest + :type principal_assignment_name: ~kusto_management_client.models.ClusterPrincipalAssignmentCheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -73,7 +73,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -132,7 +132,7 @@ def get( :type principal_assignment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ClusterPrincipalAssignment, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment + :rtype: ~kusto_management_client.models.ClusterPrincipalAssignment :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignment"] @@ -140,7 +140,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -256,15 +256,15 @@ def begin_create_or_update( :type principal_assignment_name: str :param parameters: The Kusto cluster principalAssignment's parameters supplied for the operation. - :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.ClusterPrincipalAssignment] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -328,7 +328,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -447,7 +447,7 @@ def list( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterPrincipalAssignmentListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ClusterPrincipalAssignmentListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.ClusterPrincipalAssignmentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignmentListResult"] @@ -455,7 +455,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 a39d2052a6c9..9548cd4332da 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 @@ -32,7 +32,7 @@ class ClustersOperations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -62,7 +62,7 @@ def get( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Cluster + :rtype: ~kusto_management_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -121,7 +121,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -187,7 +187,7 @@ def begin_create_or_update( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.Cluster + :type parameters: ~kusto_management_client.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. @@ -197,12 +197,12 @@ def begin_create_or_update( :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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.Cluster] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -267,7 +267,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,19 +333,19 @@ def begin_update( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param parameters: The Kusto cluster parameters supplied to the Update operation. - :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.Cluster] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -407,7 +407,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -455,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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -517,7 +517,7 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -565,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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -627,7 +627,7 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -675,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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -741,7 +741,7 @@ def list_follower_databases( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FollowerDatabaseListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.FollowerDatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.FollowerDatabaseListResult"] @@ -749,7 +749,7 @@ def list_follower_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -814,7 +814,7 @@ def _detach_follower_databases_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -867,11 +867,11 @@ def begin_detach_follower_databases( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param follower_database_to_remove: The follower databases properties to remove. - :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition + :type follower_database_to_remove: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -933,7 +933,7 @@ def _diagnose_virtual_network_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -987,12 +987,12 @@ 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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DiagnoseVirtualNetworkResult] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.DiagnoseVirtualNetworkResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1052,7 +1052,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ClusterListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.ClusterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] @@ -1060,7 +1060,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1120,7 +1120,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ClusterListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.ClusterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] @@ -1128,7 +1128,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1187,7 +1187,7 @@ def list_skus( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SkuDescriptionList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.SkuDescriptionList] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.SkuDescriptionList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuDescriptionList"] @@ -1195,7 +1195,7 @@ def list_skus( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1257,10 +1257,10 @@ def check_name_availability( :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 + :type cluster_name: ~kusto_management_client.models.ClusterCheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -1268,7 +1268,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1323,7 +1323,7 @@ def list_skus_by_resource( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ListResourceSkusResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ListResourceSkusResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.ListResourceSkusResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ListResourceSkusResult"] @@ -1331,7 +1331,7 @@ def list_skus_by_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1383,6 +1383,81 @@ def get_next(next_link=None): ) list_skus_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'} # type: ignore + def list_outbound_network_dependencies_endpoints( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OutboundNetworkDependenciesEndpointListResult"] + """Gets the network endpoints of all outbound dependencies of a Kusto cluster. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OutboundNetworkDependenciesEndpointListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.OutboundNetworkDependenciesEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundNetworkDependenciesEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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_outbound_network_dependencies_endpoints.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'), + } + 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('OutboundNetworkDependenciesEndpointListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or 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_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/outboundNetworkDependenciesEndpoints'} # type: ignore + def list_language_extensions( self, resource_group_name, # type: str @@ -1398,7 +1473,7 @@ def list_language_extensions( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LanguageExtensionsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.LanguageExtensionsList] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.LanguageExtensionsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LanguageExtensionsList"] @@ -1406,7 +1481,7 @@ def list_language_extensions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -1471,7 +1546,7 @@ def _add_language_extensions_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1524,11 +1599,11 @@ def begin_add_language_extensions( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param language_extensions_to_add: The language extensions to add. - :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList + :type language_extensions_to_add: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -1591,7 +1666,7 @@ def _remove_language_extensions_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1644,11 +1719,11 @@ def begin_remove_language_extensions( :param cluster_name: The name of the Kusto cluster. :type cluster_name: str :param language_extensions_to_remove: The language extensions to remove. - :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList + :type language_extensions_to_remove: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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 f50ac661f300..50906d690f4d 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 @@ -32,7 +32,7 @@ class DataConnectionsOperations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,7 +65,7 @@ def list_by_database( :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 DataConnectionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DataConnectionListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.DataConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnectionListResult"] @@ -73,7 +73,7 @@ def list_by_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -202,15 +202,15 @@ def begin_data_connection_validation( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.DataConnectionValidationListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -279,10 +279,10 @@ def check_name_availability( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param data_connection_name: The name of the data connection. - :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest + :type data_connection_name: ~kusto_management_client.models.DataConnectionCheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -290,7 +290,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -353,7 +353,7 @@ def get( :type data_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataConnection, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DataConnection + :rtype: ~kusto_management_client.models.DataConnection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnection"] @@ -361,7 +361,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -485,15 +485,15 @@ def begin_create_or_update( :param data_connection_name: The name of the data connection. :type data_connection_name: str :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.DataConnection + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.DataConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -561,7 +561,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -632,15 +632,15 @@ def begin_update( :param data_connection_name: The name of the data connection. :type data_connection_name: str :param parameters: The data connection parameters supplied to the Update operation. - :type parameters: ~azure.mgmt.kusto.models.DataConnection + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.DataConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -707,7 +707,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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 d9236fa714a0..4c50d9a84964 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 @@ -32,7 +32,7 @@ class DatabasePrincipalAssignmentsOperations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,10 +65,10 @@ def check_name_availability( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param principal_assignment_name: The name of the resource. - :type principal_assignment_name: ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest + :type principal_assignment_name: ~kusto_management_client.models.DatabasePrincipalAssignmentCheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -76,7 +76,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -139,7 +139,7 @@ def get( :type principal_assignment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DatabasePrincipalAssignment, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment + :rtype: ~kusto_management_client.models.DatabasePrincipalAssignment :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignment"] @@ -147,7 +147,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -268,15 +268,15 @@ def begin_create_or_update( :param principal_assignment_name: The name of the Kusto principalAssignment. :type principal_assignment_name: str :param parameters: The Kusto principalAssignments parameters supplied for the operation. - :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.DatabasePrincipalAssignment] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -343,7 +343,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -471,7 +471,7 @@ def list( :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 DatabasePrincipalAssignmentListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DatabasePrincipalAssignmentListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.DatabasePrincipalAssignmentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignmentListResult"] @@ -479,7 +479,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 b49e7dd9d35f..c27615f1cd5f 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 @@ -32,7 +32,7 @@ class DatabasesOperations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,17 +55,17 @@ def check_name_availability( **kwargs # type: Any ): # type: (...) -> "_models.CheckNameResult" - """Checks that the database name is valid and is not already in use. + """Checks that the databases resource 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 resource_name: The name of the resource. - :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest + :type resource_name: ~kusto_management_client.models.CheckNameRequest :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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -73,7 +73,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -129,7 +129,7 @@ def list_by_cluster( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DatabaseListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] @@ -137,7 +137,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -207,7 +207,7 @@ def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Database + :rtype: ~kusto_management_client.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] @@ -215,7 +215,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,15 +333,15 @@ def begin_create_or_update( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param parameters: The database parameters supplied to the CreateOrUpdate operation. - :type parameters: ~azure.mgmt.kusto.models.Database + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -406,7 +406,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -473,15 +473,15 @@ def begin_update( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param parameters: The database parameters supplied to the Update operation. - :type parameters: ~azure.mgmt.kusto.models.Database + :type parameters: ~kusto_management_client.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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -545,7 +545,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -667,7 +667,7 @@ def list_principals( :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 DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DatabasePrincipalListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.DatabasePrincipalListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalListResult"] @@ -675,7 +675,7 @@ def list_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -746,10 +746,10 @@ def add_principals( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param database_principals_to_add: List of database principals to add. - :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest + :type database_principals_to_add: ~kusto_management_client.models.DatabasePrincipalListRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: DatabasePrincipalListResult, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :rtype: ~kusto_management_client.models.DatabasePrincipalListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalListResult"] @@ -757,7 +757,7 @@ def add_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -817,10 +817,10 @@ def remove_principals( :param database_name: The name of the database in the Kusto cluster. :type database_name: str :param database_principals_to_remove: List of database principals to remove. - :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest + :type database_principals_to_remove: ~kusto_management_client.models.DatabasePrincipalListRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: DatabasePrincipalListResult, or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :rtype: ~kusto_management_client.models.DatabasePrincipalListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalListResult"] @@ -828,7 +828,7 @@ def remove_principals( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py new file mode 100644 index 000000000000..7ce935eb26b3 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py @@ -0,0 +1,647 @@ +# 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 ManagedPrivateEndpointsOperations(object): + """ManagedPrivateEndpointsOperations 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: ~kusto_management_client.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 check_name_availability( + self, + resource_group_name, # type: str + cluster_name, # type: str + resource_name, # type: "_models.ManagedPrivateEndpointsCheckNameRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameResult" + """Checks that the managed private endpoints resource 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 resource_name: The name of the resource. + :type resource_name: ~kusto_management_client.models.ManagedPrivateEndpointsCheckNameRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult, or the result of cls(response) + :rtype: ~kusto_management_client.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-08-27" + 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'), + '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(resource_name, 'ManagedPrivateEndpointsCheckNameRequest') + 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}/managedPrivateEndpointsCheckNameAvailability'} # type: ignore + + def list( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedPrivateEndpointListResult"] + """Returns the list of managed private endpoints. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedPrivateEndpointListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.ManagedPrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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.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'), + } + 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('ManagedPrivateEndpointListResult', 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints'} # type: ignore + + def get( + self, + resource_group_name, # type: str + cluster_name, # type: str + managed_private_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedPrivateEndpoint" + """Gets a managed private endpoint. + + :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 managed_private_endpoint_name: The name of the managed private endpoint. + :type managed_private_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedPrivateEndpoint, or the result of cls(response) + :rtype: ~kusto_management_client.models.ManagedPrivateEndpoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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('ManagedPrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + managed_private_endpoint_name, # type: str + parameters, # type: "_models.ManagedPrivateEndpoint" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedPrivateEndpoint" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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, 'ManagedPrivateEndpoint') + 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('ManagedPrivateEndpoint', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ManagedPrivateEndpoint', 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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + cluster_name, # type: str + managed_private_endpoint_name, # type: str + parameters, # type: "_models.ManagedPrivateEndpoint" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedPrivateEndpoint"] + """Creates a managed private endpoint. + + :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 managed_private_endpoint_name: The name of the managed private endpoint. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. + :type parameters: ~kusto_management_client.models.ManagedPrivateEndpoint + :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: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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 ManagedPrivateEndpoint or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + 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, + managed_private_endpoint_name=managed_private_endpoint_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('ManagedPrivateEndpoint', 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + managed_private_endpoint_name, # type: str + parameters, # type: "_models.ManagedPrivateEndpoint" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedPrivateEndpoint" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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, 'ManagedPrivateEndpoint') + 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('ManagedPrivateEndpoint', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + cluster_name, # type: str + managed_private_endpoint_name, # type: str + parameters, # type: "_models.ManagedPrivateEndpoint" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedPrivateEndpoint"] + """Updates a managed private endpoint. + + :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 managed_private_endpoint_name: The name of the managed private endpoint. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. + :type parameters: ~kusto_management_client.models.ManagedPrivateEndpoint + :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: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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 ManagedPrivateEndpoint or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] + 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, + managed_private_endpoint_name=managed_private_endpoint_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('ManagedPrivateEndpoint', 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + managed_private_endpoint_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-08-27" + 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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + cluster_name, # type: str + managed_private_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a managed private endpoint. + + :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 managed_private_endpoint_name: The name of the managed private endpoint. + :type managed_private_endpoint_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: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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, + managed_private_endpoint_name=managed_private_endpoint_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'), + 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_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}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore 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 f31beb271e5b..5ea3e2a77050 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 @@ -30,7 +30,7 @@ class Operations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.OperationListResult] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" 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 index 82115fbd0309..f0329491c150 100644 --- 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 @@ -29,7 +29,7 @@ class OperationsResultsOperations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,7 @@ def get( :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 + :rtype: ~kusto_management_client.models.OperationResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResult"] @@ -67,7 +67,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..32cb1d1b8130 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,440 @@ +# 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 PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations 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: ~kusto_management_client.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( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """Returns the list of private endpoint connections. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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.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'), + } + 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('PrivateEndpointConnectionListResult', 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + cluster_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets a private endpoint connection. + + :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 private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~kusto_management_client.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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, 'PrivateEndpointConnection') + 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]: + 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('PrivateEndpointConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnection', 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}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + cluster_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + """Approve or reject a private endpoint connection with a given name. + + :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 private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: + :type parameters: ~kusto_management_client.models.PrivateEndpointConnection + :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: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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 PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + 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, + private_endpoint_connection_name=private_endpoint_connection_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('PrivateEndpointConnection', 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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + private_endpoint_connection_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-08-27" + 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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + cluster_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a private endpoint connection with a given name. + + :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 private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_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: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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, + private_endpoint_connection_name=private_endpoint_connection_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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..498605b005eb --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py @@ -0,0 +1,184 @@ +# 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.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, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations 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: ~kusto_management_client.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( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] + """Returns the list of private link resources. + + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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.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'), + } + 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('PrivateLinkResourceListResult', 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources'} # type: ignore + + def get( + self, + resource_group_name, # type: str + cluster_name, # type: str + private_link_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" + """Gets a private link resource. + + :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 private_link_resource_name: The name of the private link resource. + :type private_link_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~kusto_management_client.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-27" + 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'), + 'privateLinkResourceName': self._serialize.url("private_link_resource_name", private_link_resource_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('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName}'} # 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 index 81aee3982c31..a746929566d2 100644 --- 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 @@ -32,7 +32,7 @@ class ScriptsOperations(object): 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 + :type models: ~kusto_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,7 +65,7 @@ def list_by_database( :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] + :rtype: ~azure.core.paging.ItemPaged[~kusto_management_client.models.ScriptListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptListResult"] @@ -73,7 +73,7 @@ def list_by_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" def prepare_request(next_link=None): @@ -147,7 +147,7 @@ def get( :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 + :rtype: ~kusto_management_client.models.Script :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Script"] @@ -155,7 +155,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -208,7 +208,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -279,15 +279,15 @@ def begin_create_or_update( :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 + :type parameters: ~kusto_management_client.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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.Script] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -355,7 +355,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -423,15 +423,15 @@ def begin_update( :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 + :type parameters: ~kusto_management_client.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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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] + :rtype: ~azure.core.polling.LROPoller[~kusto_management_client.models.Script] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -498,7 +498,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" accept = "application/json" # Construct URL @@ -554,8 +554,8 @@ def begin_delete( :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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -626,10 +626,10 @@ def check_name_availability( :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 + :type script_name: ~kusto_management_client.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 + :rtype: ~kusto_management_client.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -637,7 +637,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" + api_version = "2021-08-27" content_type = kwargs.pop("content_type", "application/json") accept = "application/json"