diff --git a/sdk/synapse/azure-mgmt-synapse/_meta.json b/sdk/synapse/azure-mgmt-synapse/_meta.json index 8a43b073bfe1..d7091cd1f61d 100644 --- a/sdk/synapse/azure-mgmt-synapse/_meta.json +++ b/sdk/synapse/azure-mgmt-synapse/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.0.6369", - "use": "@autorest/python@5.6.2", - "commit": "e6a01441f54c719b8713490ee37e51d6220073c2", + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.0", + "@autorest/modelerfour@4.19.2" + ], + "commit": "9fe18584f7899699c71b6443e78e0bd73550b1fd", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/synapse/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.2 --version=3.0.6369", + "autorest_command": "autorest specification/synapse/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.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", "readme": "specification/synapse/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_configuration.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_configuration.py index 3f15587fc020..e360691bc896 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_configuration.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-06-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-synapse/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json index ea3022a0daa7..5661a1945d2d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-03-01", - "total_api_version_list": ["2021-03-01"], + "chosen_version": "2021-06-01-preview", + "total_api_version_list": ["2021-06-01-preview"], "client": { "name": "SynapseManagementClient", "filename": "_synapse_management_client", @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SynapseManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SynapseManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SynapseManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SynapseManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -111,6 +111,12 @@ "integration_runtime_monitoring_data": "IntegrationRuntimeMonitoringDataOperations", "integration_runtime_status": "IntegrationRuntimeStatusOperations", "keys": "KeysOperations", + "kusto_operations": "KustoOperationsOperations", + "kusto_pools": "KustoPoolsOperations", + "databases": "DatabasesOperations", + "data_connections": "DataConnectionsOperations", + "kusto_pool_principal_assignments": "KustoPoolPrincipalAssignmentsOperations", + "database_principal_assignments": "DatabasePrincipalAssignmentsOperations", "library": "LibraryOperations", "libraries": "LibrariesOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", @@ -159,11 +165,5 @@ "workspace_sql_aad_admins": "WorkspaceSqlAadAdminsOperations", "workspace_managed_identity_sql_control_settings": "WorkspaceManagedIdentitySqlControlSettingsOperations", "restorable_dropped_sql_pools": "RestorableDroppedSqlPoolsOperations" - }, - "operation_mixins": { - "sync_imports": "None", - "async_imports": "None", - "operations": { - } } } \ No newline at end of file diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py index f3d64a882b2b..e4ebc29c7fd0 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import SynapseManagementClientConfiguration from .operations import BigDataPoolsOperations @@ -31,6 +32,12 @@ from .operations import IntegrationRuntimeMonitoringDataOperations from .operations import IntegrationRuntimeStatusOperations from .operations import KeysOperations +from .operations import KustoOperationsOperations +from .operations import KustoPoolsOperations +from .operations import DatabasesOperations +from .operations import DataConnectionsOperations +from .operations import KustoPoolPrincipalAssignmentsOperations +from .operations import DatabasePrincipalAssignmentsOperations from .operations import LibraryOperations from .operations import LibrariesOperations from .operations import PrivateEndpointConnectionsOperations @@ -111,6 +118,18 @@ class SynapseManagementClient(object): :vartype integration_runtime_status: azure.mgmt.synapse.operations.IntegrationRuntimeStatusOperations :ivar keys: KeysOperations operations :vartype keys: azure.mgmt.synapse.operations.KeysOperations + :ivar kusto_operations: KustoOperationsOperations operations + :vartype kusto_operations: azure.mgmt.synapse.operations.KustoOperationsOperations + :ivar kusto_pools: KustoPoolsOperations operations + :vartype kusto_pools: azure.mgmt.synapse.operations.KustoPoolsOperations + :ivar databases: DatabasesOperations operations + :vartype databases: azure.mgmt.synapse.operations.DatabasesOperations + :ivar data_connections: DataConnectionsOperations operations + :vartype data_connections: azure.mgmt.synapse.operations.DataConnectionsOperations + :ivar kusto_pool_principal_assignments: KustoPoolPrincipalAssignmentsOperations operations + :vartype kusto_pool_principal_assignments: azure.mgmt.synapse.operations.KustoPoolPrincipalAssignmentsOperations + :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations + :vartype database_principal_assignments: azure.mgmt.synapse.operations.DatabasePrincipalAssignmentsOperations :ivar library: LibraryOperations operations :vartype library: azure.mgmt.synapse.operations.LibraryOperations :ivar libraries: LibrariesOperations operations @@ -259,6 +278,18 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.keys = KeysOperations( self._client, self._config, self._serialize, self._deserialize) + self.kusto_operations = KustoOperationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.kusto_pools = KustoPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_connections = DataConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.kusto_pool_principal_assignments = KustoPoolPrincipalAssignmentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( + self._client, self._config, self._serialize, self._deserialize) self.library = LibraryOperations( self._client, self._config, self._serialize, self._deserialize) self.libraries = LibrariesOperations( @@ -356,6 +387,24 @@ def __init__( self.restorable_dropped_sql_pools = RestorableDroppedSqlPoolsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_version.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_version.py index 48944bf3938a..eae7c95b6fbd 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_version.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_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 = "0.1.0" diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_configuration.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_configuration.py index ca976a204d5a..984ddc682b14 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_configuration.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-06-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-synapse/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py index 4b93c99c1a5d..95888af702d1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -29,6 +30,12 @@ from .operations import IntegrationRuntimeMonitoringDataOperations from .operations import IntegrationRuntimeStatusOperations from .operations import KeysOperations +from .operations import KustoOperationsOperations +from .operations import KustoPoolsOperations +from .operations import DatabasesOperations +from .operations import DataConnectionsOperations +from .operations import KustoPoolPrincipalAssignmentsOperations +from .operations import DatabasePrincipalAssignmentsOperations from .operations import LibraryOperations from .operations import LibrariesOperations from .operations import PrivateEndpointConnectionsOperations @@ -109,6 +116,18 @@ class SynapseManagementClient(object): :vartype integration_runtime_status: azure.mgmt.synapse.aio.operations.IntegrationRuntimeStatusOperations :ivar keys: KeysOperations operations :vartype keys: azure.mgmt.synapse.aio.operations.KeysOperations + :ivar kusto_operations: KustoOperationsOperations operations + :vartype kusto_operations: azure.mgmt.synapse.aio.operations.KustoOperationsOperations + :ivar kusto_pools: KustoPoolsOperations operations + :vartype kusto_pools: azure.mgmt.synapse.aio.operations.KustoPoolsOperations + :ivar databases: DatabasesOperations operations + :vartype databases: azure.mgmt.synapse.aio.operations.DatabasesOperations + :ivar data_connections: DataConnectionsOperations operations + :vartype data_connections: azure.mgmt.synapse.aio.operations.DataConnectionsOperations + :ivar kusto_pool_principal_assignments: KustoPoolPrincipalAssignmentsOperations operations + :vartype kusto_pool_principal_assignments: azure.mgmt.synapse.aio.operations.KustoPoolPrincipalAssignmentsOperations + :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations + :vartype database_principal_assignments: azure.mgmt.synapse.aio.operations.DatabasePrincipalAssignmentsOperations :ivar library: LibraryOperations operations :vartype library: azure.mgmt.synapse.aio.operations.LibraryOperations :ivar libraries: LibrariesOperations operations @@ -256,6 +275,18 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.keys = KeysOperations( self._client, self._config, self._serialize, self._deserialize) + self.kusto_operations = KustoOperationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.kusto_pools = KustoPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_connections = DataConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.kusto_pool_principal_assignments = KustoPoolPrincipalAssignmentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( + self._client, self._config, self._serialize, self._deserialize) self.library = LibraryOperations( self._client, self._config, self._serialize, self._deserialize) self.libraries = LibrariesOperations( @@ -353,6 +384,23 @@ def __init__( self.restorable_dropped_sql_pools = RestorableDroppedSqlPoolsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/__init__.py index 52f9baffdfa9..3dd6cf2928f3 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/__init__.py @@ -19,6 +19,12 @@ from ._integration_runtime_monitoring_data_operations import IntegrationRuntimeMonitoringDataOperations from ._integration_runtime_status_operations import IntegrationRuntimeStatusOperations from ._keys_operations import KeysOperations +from ._kusto_operations_operations import KustoOperationsOperations +from ._kusto_pools_operations import KustoPoolsOperations +from ._databases_operations import DatabasesOperations +from ._data_connections_operations import DataConnectionsOperations +from ._kusto_pool_principal_assignments_operations import KustoPoolPrincipalAssignmentsOperations +from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations from ._library_operations import LibraryOperations from ._libraries_operations import LibrariesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations @@ -82,6 +88,12 @@ 'IntegrationRuntimeMonitoringDataOperations', 'IntegrationRuntimeStatusOperations', 'KeysOperations', + 'KustoOperationsOperations', + 'KustoPoolsOperations', + 'DatabasesOperations', + 'DataConnectionsOperations', + 'KustoPoolPrincipalAssignmentsOperations', + 'DatabasePrincipalAssignmentsOperations', 'LibraryOperations', 'LibrariesOperations', 'PrivateEndpointConnectionsOperations', diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_big_data_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_big_data_pools_operations.py index 039944803db8..c9681dd93ffd 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_big_data_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_big_data_pools_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, workspace_name: str, big_data_pool_name: str, - **kwargs + **kwargs: Any ) -> "_models.BigDataPoolResourceInfo": """Get Big Data pool. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -114,7 +114,7 @@ async def update( workspace_name: str, big_data_pool_name: str, big_data_pool_patch_info: "_models.BigDataPoolPatchInfo", - **kwargs + **kwargs: Any ) -> "_models.BigDataPoolResourceInfo": """Update a Big Data pool. @@ -138,7 +138,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -146,7 +146,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -188,14 +188,14 @@ async def _create_or_update_initial( big_data_pool_name: str, big_data_pool_info: "_models.BigDataPoolResourceInfo", force: Optional[bool] = False, - **kwargs + **kwargs: Any ) -> "_models.BigDataPoolResourceInfo": cls = kwargs.pop('cls', None) # type: ClsType["_models.BigDataPoolResourceInfo"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -203,7 +203,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -251,7 +251,7 @@ async def begin_create_or_update( big_data_pool_name: str, big_data_pool_info: "_models.BigDataPoolResourceInfo", force: Optional[bool] = False, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.BigDataPoolResourceInfo"]: """Create a Big Data pool. @@ -269,8 +269,8 @@ async def begin_create_or_update( :type force: bool :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 BigDataPoolResourceInfo or the result of cls(response) @@ -307,7 +307,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -331,21 +331,21 @@ async def _delete_initial( resource_group_name: str, workspace_name: str, big_data_pool_name: str, - **kwargs - ) -> Optional[object]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + **kwargs: Any + ) -> Optional[Any]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -386,8 +386,8 @@ async def begin_delete( resource_group_name: str, workspace_name: str, big_data_pool_name: str, - **kwargs - ) -> AsyncLROPoller[object]: + **kwargs: Any + ) -> AsyncLROPoller[Any]: """Delete a Big Data pool. Delete a Big Data pool from the workspace. @@ -400,16 +400,16 @@ async def begin_delete( :type big_data_pool_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 object or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[object] + :return: An instance of AsyncLROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -436,7 +436,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -459,7 +459,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.BigDataPoolResourceInfoListResult"]: """List the Big Data pools in a workspace. @@ -479,7 +479,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -492,7 +492,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_connections_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_connections_operations.py new file mode 100644 index 000000000000..829fa35ef095 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_connections_operations.py @@ -0,0 +1,628 @@ +# 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 DataConnectionsOperations: + """DataConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_database( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DataConnectionListResult"]: + """Returns the list of data connections of the given Kusto pool database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :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.synapse.models.DataConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataConnectionListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + data_connection_name: str, + **kwargs: Any + ) -> "_models.DataConnection": + """Returns a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param data_connection_name: The name of the data connection. + :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.synapse.models.DataConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + data_connection_name: str, + parameters: "_models.DataConnection", + **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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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, 'DataConnection') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + data_connection_name: str, + parameters: "_models.DataConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.DataConnection"]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :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.synapse.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: 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.synapse.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnection"] + 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + data_connection_name=data_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('DataConnection', 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + data_connection_name: str, + parameters: "_models.DataConnection", + **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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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, 'DataConnection') + 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, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + data_connection_name: str, + parameters: "_models.DataConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.DataConnection"]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :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.synapse.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: 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.synapse.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnection"] + 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + data_connection_name=data_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('DataConnection', 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + data_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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + data_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the data connection with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param data_connection_name: The name of the data connection. + :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: 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + data_connection_name=data_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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_policies_operations.py index 96957b0f9192..8099c81bc69c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_policies_operations.py @@ -46,7 +46,7 @@ async def create_or_update( workspace_name: str, sql_pool_name: str, parameters: "_models.DataMaskingPolicy", - **kwargs + **kwargs: Any ) -> "_models.DataMaskingPolicy": """Creates or updates a Sql pool data masking policy. @@ -68,7 +68,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -77,7 +77,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), @@ -118,7 +118,7 @@ async def get( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> "_models.DataMaskingPolicy": """Gets a Sql pool data masking policy. @@ -138,7 +138,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" accept = "application/json" @@ -146,7 +146,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_rules_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_rules_operations.py index ed8b91ed3e59..b38011976f8f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_rules_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_rules_operations.py @@ -48,7 +48,7 @@ async def create_or_update( sql_pool_name: str, data_masking_rule_name: str, parameters: "_models.DataMaskingRule", - **kwargs + **kwargs: Any ) -> "_models.DataMaskingRule": """Creates or updates a Sql pool data masking rule. @@ -72,7 +72,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -81,7 +81,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), @@ -128,7 +128,7 @@ async def get( workspace_name: str, sql_pool_name: str, data_masking_rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.DataMaskingRule": """Gets the specific Sql pool data masking rule. @@ -150,7 +150,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" accept = "application/json" @@ -158,7 +158,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), @@ -196,7 +196,7 @@ def list_by_sql_pool( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DataMaskingRuleListResult"]: """Gets a list of Sql pool data masking rules. @@ -216,7 +216,7 @@ def list_by_sql_pool( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" accept = "application/json" @@ -230,7 +230,7 @@ def prepare_request(next_link=None): url = self.list_by_sql_pool.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_database_principal_assignments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_database_principal_assignments_operations.py new file mode 100644 index 000000000000..01e02de17426 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_database_principal_assignments_operations.py @@ -0,0 +1,478 @@ +# 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 DatabasePrincipalAssignmentsOperations: + """DatabasePrincipalAssignmentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.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, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DatabasePrincipalAssignmentListResult"]: + """Lists all Kusto pool database principalAssignments. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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 DatabasePrincipalAssignmentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.synapse.models.DatabasePrincipalAssignmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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('DatabasePrincipalAssignmentListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments'} # type: ignore + + async def get( + self, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + principal_assignment_name: str, + resource_group_name: str, + **kwargs: Any + ) -> "_models.DatabasePrincipalAssignment": + """Gets a Kusto pool database principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_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.synapse.models.DatabasePrincipalAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatabasePrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + async def _create_or_update_initial( + self, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + principal_assignment_name: str, + resource_group_name: str, + parameters: "_models.DatabasePrincipalAssignment", + **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-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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, 'DatabasePrincipalAssignment') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DatabasePrincipalAssignment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DatabasePrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + async def begin_create_or_update( + self, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + principal_assignment_name: str, + resource_group_name: str, + parameters: "_models.DatabasePrincipalAssignment", + **kwargs: Any + ) -> AsyncLROPoller["_models.DatabasePrincipalAssignment"]: + """Creates a Kusto pool database principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. + :type parameters: ~azure.mgmt.synapse.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: 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.synapse.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignment"] + 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( + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + resource_group_name=resource_group_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('DatabasePrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + async def _delete_initial( + self, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + principal_assignment_name: str, + resource_group_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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + async def begin_delete( + self, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + principal_assignment_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Kusto pool principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_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( + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + resource_group_name=resource_group_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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_databases_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_databases_operations.py new file mode 100644 index 000000000000..8d659f96d2f2 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_databases_operations.py @@ -0,0 +1,599 @@ +# 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 DatabasesOperations: + """DatabasesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_kusto_pool( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DatabaseListResult"]: + """Returns the list of databases of the given Kusto pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_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.synapse.models.DatabaseListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_kusto_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_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('DatabaseListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_kusto_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases'} # type: ignore + + async def get( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + **kwargs: Any + ) -> "_models.Database": + """Returns a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :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.synapse.models.Database + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + parameters: "_models.Database", + **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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # 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, 'Database') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Database', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + parameters: "_models.Database", + **kwargs: Any + ) -> AsyncLROPoller["_models.Database"]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. + :type parameters: ~azure.mgmt.synapse.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: 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.synapse.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] + 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_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('Database', 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + parameters: "_models.Database", + **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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # 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, 'Database') + 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, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Database', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + parameters: "_models.Database", + **kwargs: Any + ) -> AsyncLROPoller["_models.Database"]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. + :type parameters: ~azure.mgmt.synapse.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: 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.synapse.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] + 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_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('Database', 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + kusto_pool_name: str, + database_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the database with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :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: 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_extended_sql_pool_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_extended_sql_pool_blob_auditing_policies_operations.py index c82f223979b5..c07e790199e2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_extended_sql_pool_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_extended_sql_pool_blob_auditing_policies_operations.py @@ -46,7 +46,7 @@ async def get( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> "_models.ExtendedSqlPoolBlobAuditingPolicy": """Gets an extended Sql pool's blob auditing policy. @@ -66,7 +66,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" blob_auditing_policy_name = "default" accept = "application/json" @@ -74,7 +74,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), @@ -111,7 +111,7 @@ async def create_or_update( workspace_name: str, sql_pool_name: str, parameters: "_models.ExtendedSqlPoolBlobAuditingPolicy", - **kwargs + **kwargs: Any ) -> "_models.ExtendedSqlPoolBlobAuditingPolicy": """Creates or updates an extended Sql pool's blob auditing policy. @@ -133,7 +133,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" blob_auditing_policy_name = "default" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -142,7 +142,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), @@ -186,7 +186,7 @@ def list_by_sql_pool( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ExtendedSqlPoolBlobAuditingPolicyListResult"]: """Lists extended auditing settings of a Sql pool. @@ -206,7 +206,7 @@ def list_by_sql_pool( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -219,7 +219,7 @@ def prepare_request(next_link=None): url = self.list_by_sql_pool.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_auth_keys_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_auth_keys_operations.py index f4bb72cccb12..591bbf0d2c75 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_auth_keys_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_auth_keys_operations.py @@ -46,7 +46,7 @@ async def regenerate( workspace_name: str, integration_runtime_name: str, regenerate_key_parameters: "_models.IntegrationRuntimeRegenerateKeyParameters", - **kwargs + **kwargs: Any ) -> "_models.IntegrationRuntimeAuthKeys": """Regenerate integration runtime authentication key. @@ -71,7 +71,7 @@ async def regenerate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -79,7 +79,7 @@ async def regenerate( url = self.regenerate.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -119,7 +119,7 @@ async def list( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> "_models.IntegrationRuntimeAuthKeys": """List integration runtime authentication keys. @@ -141,14 +141,14 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_connection_infos_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_connection_infos_operations.py index 025f88c15bb2..3d050daffb91 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_connection_infos_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_connection_infos_operations.py @@ -45,7 +45,7 @@ async def get( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> "_models.IntegrationRuntimeConnectionInfo": """Get integration runtime connection info. @@ -67,14 +67,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_credentials_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_credentials_operations.py index 1dff4ff2079c..e72c416991e2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_credentials_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_credentials_operations.py @@ -45,7 +45,7 @@ async def sync( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> None: """Sync integration runtime credentials. @@ -70,14 +70,14 @@ async def sync( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.sync.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_monitoring_data_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_monitoring_data_operations.py index eecb2695b061..1e7d8f13aefb 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_monitoring_data_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_monitoring_data_operations.py @@ -45,7 +45,7 @@ async def list( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> "_models.IntegrationRuntimeMonitoringData": """Get integration runtime monitoring data. @@ -67,14 +67,14 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_node_ip_address_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_node_ip_address_operations.py index 60d34a886cf6..0f601af35d46 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_node_ip_address_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_node_ip_address_operations.py @@ -46,7 +46,7 @@ async def get( workspace_name: str, integration_runtime_name: str, node_name: str, - **kwargs + **kwargs: Any ) -> "_models.IntegrationRuntimeNodeIpAddress": """Get integration runtime node IP address. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), 'nodeName': self._serialize.url("node_name", node_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_nodes_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_nodes_operations.py index 9f99057f4905..a5d1366772ab 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_nodes_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_nodes_operations.py @@ -46,7 +46,7 @@ async def get( workspace_name: str, integration_runtime_name: str, node_name: str, - **kwargs + **kwargs: Any ) -> "_models.SelfHostedIntegrationRuntimeNode": """Get integration runtime node. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), 'nodeName': self._serialize.url("node_name", node_name, 'str'), @@ -116,7 +116,7 @@ async def update( integration_runtime_name: str, node_name: str, update_integration_runtime_node_request: "_models.UpdateIntegrationRuntimeNodeRequest", - **kwargs + **kwargs: Any ) -> "_models.SelfHostedIntegrationRuntimeNode": """Create integration runtime node. @@ -143,7 +143,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -151,7 +151,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), 'nodeName': self._serialize.url("node_name", node_name, 'str'), @@ -193,7 +193,7 @@ async def delete( workspace_name: str, integration_runtime_name: str, node_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete integration runtime node. @@ -217,14 +217,14 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), 'nodeName': self._serialize.url("node_name", node_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_object_metadata_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_object_metadata_operations.py index c416a9e8a3ae..45eea51195b0 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_object_metadata_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_object_metadata_operations.py @@ -48,7 +48,7 @@ async def list( workspace_name: str, integration_runtime_name: str, get_metadata_request: Optional["_models.GetSsisObjectMetadataRequest"] = None, - **kwargs + **kwargs: Any ) -> "_models.SsisObjectMetadataListResponse": """Get integration runtime object metadata. @@ -72,7 +72,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -80,7 +80,7 @@ async def list( url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -123,21 +123,21 @@ async def _refresh_initial( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.SsisObjectMetadataStatusResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SsisObjectMetadataStatusResponse"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._refresh_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -175,7 +175,7 @@ async def begin_refresh( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.SsisObjectMetadataStatusResponse"]: """Refresh integration runtime object metadata. @@ -189,8 +189,8 @@ async def begin_refresh( :type integration_runtime_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 SsisObjectMetadataStatusResponse or the result of cls(response) @@ -225,7 +225,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_status_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_status_operations.py index f81aebfa46f7..d28fd3931d73 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_status_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtime_status_operations.py @@ -45,7 +45,7 @@ async def get( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> "_models.IntegrationRuntimeStatusResponse": """Get integration runtime status. @@ -67,14 +67,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtimes_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtimes_operations.py index 777db6862ac3..6a2d95898871 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtimes_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_integration_runtimes_operations.py @@ -49,7 +49,7 @@ async def update( workspace_name: str, integration_runtime_name: str, update_integration_runtime_request: "_models.UpdateIntegrationRuntimeRequest", - **kwargs + **kwargs: Any ) -> "_models.IntegrationRuntimeResource": """Update integration runtime. @@ -73,7 +73,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -81,7 +81,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -122,7 +122,7 @@ async def get( workspace_name: str, integration_runtime_name: str, if_none_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.IntegrationRuntimeResource"]: """Get integration runtime. @@ -148,14 +148,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -197,14 +197,14 @@ async def _create_initial( integration_runtime_name: str, integration_runtime: "_models.IntegrationRuntimeResource", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.IntegrationRuntimeResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.IntegrationRuntimeResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -212,7 +212,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -258,7 +258,7 @@ async def begin_create( integration_runtime_name: str, integration_runtime: "_models.IntegrationRuntimeResource", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.IntegrationRuntimeResource"]: """Create integration runtime. @@ -277,8 +277,8 @@ async def begin_create( :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 IntegrationRuntimeResource or the result of cls(response) @@ -315,7 +315,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -339,21 +339,21 @@ async def _delete_initial( resource_group_name: str, workspace_name: str, integration_runtime_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-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -386,7 +386,7 @@ async def begin_delete( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete integration runtime. @@ -400,8 +400,8 @@ async def begin_delete( :type integration_runtime_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) @@ -433,7 +433,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -457,7 +457,7 @@ async def upgrade( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> None: """Upgrade integration runtime. @@ -479,14 +479,14 @@ async def upgrade( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.upgrade.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -518,7 +518,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IntegrationRuntimeListResponse"]: """List integration runtimes. @@ -538,7 +538,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -551,7 +551,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -596,21 +596,21 @@ async def _start_initial( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.IntegrationRuntimeStatusResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.IntegrationRuntimeStatusResponse"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._start_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -648,7 +648,7 @@ async def begin_start( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.IntegrationRuntimeStatusResponse"]: """Start integration runtime. @@ -662,8 +662,8 @@ async def begin_start( :type integration_runtime_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 IntegrationRuntimeStatusResponse or the result of cls(response) @@ -698,7 +698,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -722,21 +722,21 @@ async def _stop_initial( resource_group_name: str, workspace_name: str, integration_runtime_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-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._stop_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -769,7 +769,7 @@ async def begin_stop( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Stop integration runtime. @@ -783,8 +783,8 @@ async def begin_stop( :type integration_runtime_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) @@ -816,7 +816,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -840,21 +840,21 @@ async def _enable_interactive_query_initial( resource_group_name: str, workspace_name: str, integration_runtime_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-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._enable_interactive_query_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -887,7 +887,7 @@ async def begin_enable_interactive_query( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Enable interactive query in integration runtime. @@ -899,8 +899,8 @@ async def begin_enable_interactive_query( :type integration_runtime_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) @@ -932,7 +932,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -956,21 +956,21 @@ async def _disable_interactive_query_initial( resource_group_name: str, workspace_name: str, integration_runtime_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-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._disable_interactive_query_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -1003,7 +1003,7 @@ async def begin_disable_interactive_query( resource_group_name: str, workspace_name: str, integration_runtime_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Disable interactive query in integration runtime. @@ -1015,8 +1015,8 @@ async def begin_disable_interactive_query( :type integration_runtime_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) @@ -1048,7 +1048,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_ip_firewall_rules_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_ip_firewall_rules_operations.py index 48e25274f376..b8868d9ce845 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_ip_firewall_rules_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_ip_firewall_rules_operations.py @@ -47,7 +47,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IpFirewallRuleInfoListResult"]: """Returns a list of firewall rules. @@ -65,7 +65,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -124,14 +124,14 @@ async def _create_or_update_initial( workspace_name: str, rule_name: str, ip_firewall_rule_info: "_models.IpFirewallRuleInfo", - **kwargs + **kwargs: Any ) -> "_models.IpFirewallRuleInfo": cls = kwargs.pop('cls', None) # type: ClsType["_models.IpFirewallRuleInfo"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -139,7 +139,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -184,7 +184,7 @@ async def begin_create_or_update( workspace_name: str, rule_name: str, ip_firewall_rule_info: "_models.IpFirewallRuleInfo", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.IpFirewallRuleInfo"]: """Creates or updates a firewall rule. @@ -198,8 +198,8 @@ async def begin_create_or_update( :type ip_firewall_rule_info: ~azure.mgmt.synapse.models.IpFirewallRuleInfo :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 IpFirewallRuleInfo or the result of cls(response) @@ -235,7 +235,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -259,21 +259,21 @@ async def _delete_initial( resource_group_name: str, workspace_name: str, rule_name: str, - **kwargs - ) -> Optional[object]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + **kwargs: Any + ) -> Optional[Any]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -311,8 +311,8 @@ async def begin_delete( resource_group_name: str, workspace_name: str, rule_name: str, - **kwargs - ) -> AsyncLROPoller[object]: + **kwargs: Any + ) -> AsyncLROPoller[Any]: """Deletes a firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -323,16 +323,16 @@ async def begin_delete( :type rule_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 object or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[object] + :return: An instance of AsyncLROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -359,7 +359,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -383,7 +383,7 @@ async def get( resource_group_name: str, workspace_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.IpFirewallRuleInfo": """Get a firewall rule. @@ -403,14 +403,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -446,14 +446,14 @@ async def _replace_all_initial( resource_group_name: str, workspace_name: str, request: "_models.ReplaceAllIpFirewallRulesRequest", - **kwargs + **kwargs: Any ) -> Optional["_models.ReplaceAllFirewallRulesOperationResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ReplaceAllFirewallRulesOperationResponse"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -461,7 +461,7 @@ async def _replace_all_initial( url = self._replace_all_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -502,7 +502,7 @@ async def begin_replace_all( resource_group_name: str, workspace_name: str, request: "_models.ReplaceAllIpFirewallRulesRequest", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ReplaceAllFirewallRulesOperationResponse"]: """Replaces firewall rules. @@ -514,8 +514,8 @@ async def begin_replace_all( :type request: ~azure.mgmt.synapse.models.ReplaceAllIpFirewallRulesRequest :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 ReplaceAllFirewallRulesOperationResponse or the result of cls(response) @@ -550,7 +550,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_keys_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_keys_operations.py index 96a8d63b0702..415d77100dfb 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_keys_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_keys_operations.py @@ -45,7 +45,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.KeyInfoListResult"]: """Returns a list of keys in a workspace. @@ -63,7 +63,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -76,7 +76,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -121,7 +121,7 @@ async def get( resource_group_name: str, workspace_name: str, key_name: str, - **kwargs + **kwargs: Any ) -> "_models.Key": """Gets a workspace key. @@ -141,14 +141,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'keyName': self._serialize.url("key_name", key_name, 'str'), } @@ -185,7 +185,7 @@ async def create_or_update( workspace_name: str, key_name: str, key_properties: "_models.Key", - **kwargs + **kwargs: Any ) -> "_models.Key": """Creates or updates a workspace key. @@ -207,7 +207,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -215,7 +215,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'keyName': self._serialize.url("key_name", key_name, 'str'), } @@ -255,7 +255,7 @@ async def delete( resource_group_name: str, workspace_name: str, key_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.Key"]: """Deletes a workspace key. @@ -275,14 +275,14 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'keyName': self._serialize.url("key_name", key_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_operations_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_operations_operations.py new file mode 100644 index 000000000000..a1ee25ef5816 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_operations_operations.py @@ -0,0 +1,105 @@ +# 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 KustoOperationsOperations: + """KustoOperationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.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, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Lists available operations for the Kusto sub-resources inside Microsoft.Synapse 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.synapse.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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 + # 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('OperationListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Synapse/kustooperations'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_principal_assignments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_principal_assignments_operations.py new file mode 100644 index 000000000000..fdcc80ebb202 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_principal_assignments_operations.py @@ -0,0 +1,456 @@ +# 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 KustoPoolPrincipalAssignmentsOperations: + """KustoPoolPrincipalAssignmentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.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, + workspace_name: str, + kusto_pool_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ClusterPrincipalAssignmentListResult"]: + """Lists all Kusto pool principalAssignments. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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 ClusterPrincipalAssignmentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.synapse.models.ClusterPrincipalAssignmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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('ClusterPrincipalAssignmentListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments'} # type: ignore + + async def get( + self, + workspace_name: str, + kusto_pool_name: str, + principal_assignment_name: str, + resource_group_name: str, + **kwargs: Any + ) -> "_models.ClusterPrincipalAssignment": + """Gets a Kusto pool principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_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.synapse.models.ClusterPrincipalAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterPrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + async def _create_or_update_initial( + self, + workspace_name: str, + kusto_pool_name: str, + principal_assignment_name: str, + resource_group_name: str, + parameters: "_models.ClusterPrincipalAssignment", + **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-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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, 'ClusterPrincipalAssignment') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ClusterPrincipalAssignment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ClusterPrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + async def begin_create_or_update( + self, + workspace_name: str, + kusto_pool_name: str, + principal_assignment_name: str, + resource_group_name: str, + parameters: "_models.ClusterPrincipalAssignment", + **kwargs: Any + ) -> AsyncLROPoller["_models.ClusterPrincipalAssignment"]: + """Create a Kusto pool principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param parameters: The Kusto pool principalAssignment's parameters supplied for the operation. + :type parameters: ~azure.mgmt.synapse.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: 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.synapse.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignment"] + 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( + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + principal_assignment_name=principal_assignment_name, + resource_group_name=resource_group_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('ClusterPrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + async def _delete_initial( + self, + workspace_name: str, + kusto_pool_name: str, + principal_assignment_name: str, + resource_group_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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + async def begin_delete( + self, + workspace_name: str, + kusto_pool_name: str, + principal_assignment_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Kusto pool principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_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( + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + principal_assignment_name=principal_assignment_name, + resource_group_name=resource_group_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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pools_operations.py new file mode 100644 index 000000000000..ab34b01006c6 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pools_operations.py @@ -0,0 +1,645 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.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 KustoPoolsOperations: + """KustoPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.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 list_by_workspace( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.KustoPoolListResult": + """List Kusto pools. + + List all Kusto pools. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KustoPoolListResult, or the result of cls(response) + :rtype: ~azure.mgmt.synapse.models.KustoPoolListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('KustoPoolListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools'} # type: ignore + + async def get( + self, + workspace_name: str, + kusto_pool_name: str, + resource_group_name: str, + **kwargs: Any + ) -> "_models.KustoPool": + """Gets a Kusto pool. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KustoPool, or the result of cls(response) + :rtype: ~azure.mgmt.synapse.models.KustoPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + async def _create_or_update_initial( + self, + workspace_name: str, + resource_group_name: str, + kusto_pool_name: str, + parameters: "_models.KustoPool", + if_match: Optional[str] = None, + if_none_match: Optional[str] = None, + **kwargs: Any + ) -> "_models.KustoPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + 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] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'KustoPool') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KustoPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + workspace_name: str, + resource_group_name: str, + kusto_pool_name: str, + parameters: "_models.KustoPool", + if_match: Optional[str] = None, + if_none_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.KustoPool"]: + """Create or update a Kusto pool. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param parameters: The Kusto pool parameters supplied to the CreateOrUpdate operation. + :type parameters: ~azure.mgmt.synapse.models.KustoPool + :param if_match: The ETag of the Kusto Pool. Omit this value to always overwrite the current + Kusto Pool. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + changes. + :type if_match: str + :param if_none_match: Set to '*' to allow a new Kusto Pool to be created, but to prevent + updating an existing Kusto Pool. Other values will result in a 412 Pre-condition Failed + response. + :type if_none_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: 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 KustoPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.synapse.models.KustoPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + 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( + workspace_name=workspace_name, + resource_group_name=resource_group_name, + kusto_pool_name=kusto_pool_name, + parameters=parameters, + if_match=if_match, + if_none_match=if_none_match, + 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('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + async def _update_initial( + self, + workspace_name: str, + resource_group_name: str, + kusto_pool_name: str, + parameters: "_models.KustoPoolUpdate", + if_match: Optional[str] = None, + **kwargs: Any + ) -> "_models.KustoPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + 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] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'KustoPoolUpdate') + 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, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KustoPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + async def begin_update( + self, + workspace_name: str, + resource_group_name: str, + kusto_pool_name: str, + parameters: "_models.KustoPoolUpdate", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.KustoPool"]: + """Update a Kusto Kusto Pool. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param parameters: The Kusto pool parameters supplied to the Update operation. + :type parameters: ~azure.mgmt.synapse.models.KustoPoolUpdate + :param if_match: The ETag of the Kusto Pool. Omit this value to always overwrite the current + Kusto Pool. 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: 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 KustoPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.synapse.models.KustoPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + 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( + workspace_name=workspace_name, + resource_group_name=resource_group_name, + kusto_pool_name=kusto_pool_name, + parameters=parameters, + if_match=if_match, + 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('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + async def _delete_initial( + self, + workspace_name: str, + resource_group_name: str, + kusto_pool_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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + async def begin_delete( + self, + workspace_name: str, + resource_group_name: str, + kusto_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Kusto pool. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_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( + workspace_name=workspace_name, + resource_group_name=resource_group_name, + kusto_pool_name=kusto_pool_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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + async def check_name_availability( + self, + location: str, + kusto_pool_name: "_models.KustoPoolCheckNameRequest", + **kwargs: Any + ) -> "_models.CheckNameResult": + """Checks that the kusto pool name is valid and is not already in use. + + :param location: The name of Azure region. + :type location: str + :param kusto_pool_name: The name of the cluster. + :type kusto_pool_name: ~azure.mgmt.synapse.models.KustoPoolCheckNameRequest + :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.synapse.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-06-01-preview" + 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 = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str', min_length=1), + } + 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(kusto_pool_name, 'KustoPoolCheckNameRequest') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, 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}/providers/Microsoft.Synapse/locations/{location}/kustoPoolCheckNameAvailability'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_libraries_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_libraries_operations.py index f7d7db642e66..a0ec176edc3a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_libraries_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_libraries_operations.py @@ -45,7 +45,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LibraryListResponse"]: """List the libraries in a workspace. @@ -65,7 +65,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_library_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_library_operations.py index 4a791f87a9ba..bb03b6eff83c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_library_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_library_operations.py @@ -45,7 +45,7 @@ async def get( resource_group_name: str, library_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> "_models.LibraryResource": """Get library by name. @@ -67,14 +67,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'libraryName': self._serialize.url("library_name", library_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_operations.py index 512837dcdeb3..69eccc78b73f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def check_name_availability( self, request: "_models.CheckNameAvailabilityRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResponse": """Check name availability. @@ -61,7 +61,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -103,7 +103,7 @@ async def check_name_availability( async def list( self, - **kwargs + **kwargs: Any ) -> List["_models.AvailableRpOperation"]: """All operations. @@ -153,7 +153,7 @@ async def get_location_header_result( resource_group_name: str, workspace_name: str, operation_id: str, - **kwargs + **kwargs: Any ) -> None: """Get operation result. @@ -175,14 +175,14 @@ async def get_location_header_result( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.get_location_header_result.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), } @@ -215,7 +215,7 @@ async def get_azure_async_header_result( resource_group_name: str, workspace_name: str, operation_id: str, - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResource"]: """Get operation status. @@ -237,14 +237,14 @@ async def get_azure_async_header_result( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.get_azure_async_header_result.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_endpoint_connections_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_endpoint_connections_operations.py index 8291cc699881..ba9ed216c0e3 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_endpoint_connections_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, workspace_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Gets a private endpoint connection. @@ -68,14 +68,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -112,14 +112,14 @@ async def _create_initial( workspace_name: str, private_endpoint_connection_name: str, request: "_models.PrivateEndpointConnection", - **kwargs + **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-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -127,7 +127,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -172,7 +172,7 @@ async def begin_create( workspace_name: str, private_endpoint_connection_name: str, request: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Approve or reject a private endpoint connection. @@ -186,8 +186,8 @@ async def begin_create( :type request: ~azure.mgmt.synapse.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: 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 PrivateEndpointConnection or the result of cls(response) @@ -223,7 +223,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -247,21 +247,21 @@ async def _delete_initial( resource_group_name: str, workspace_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -299,7 +299,7 @@ async def begin_delete( resource_group_name: str, workspace_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResource"]: """Delete a private endpoint connection. @@ -311,8 +311,8 @@ async def begin_delete( :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: 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) @@ -347,7 +347,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -370,7 +370,7 @@ def list( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateEndpointConnectionList"]: """Lists private endpoint connection in workspace. @@ -388,7 +388,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -401,7 +401,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_endpoint_connections_private_link_hub_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_endpoint_connections_private_link_hub_operations.py index 79c80b116f8f..3fa38f3eac8e 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_endpoint_connections_private_link_hub_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_endpoint_connections_private_link_hub_operations.py @@ -45,7 +45,7 @@ def list( self, resource_group_name: str, private_link_hub_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse"]: """Get all PrivateEndpointConnections in the PrivateLinkHub. @@ -63,7 +63,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -76,7 +76,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -115,3 +115,66 @@ async def get_next(next_link=None): get_next, extract_data ) list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + private_link_hub_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionForPrivateLinkHub": + """Get all PrivateEndpointConnection in the PrivateLinkHub by name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_link_hub_name: Name of the privateLinkHub. + :type private_link_hub_name: str + :param private_endpoint_connection_name: Name of the privateEndpointConnection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionForPrivateLinkHub, or the result of cls(response) + :rtype: ~azure.mgmt.synapse.models.PrivateEndpointConnectionForPrivateLinkHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionForPrivateLinkHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionForPrivateLinkHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_hub_private_link_resources_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_hub_private_link_resources_operations.py index c4599e5290b1..074af75dda31 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_hub_private_link_resources_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_hub_private_link_resources_operations.py @@ -45,7 +45,7 @@ def list( self, resource_group_name: str, private_link_hub_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: """Private Link Resources. @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, private_link_hub_name: str, private_link_resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResource": """Get Private Link Hub Private Link Resource. @@ -145,14 +145,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), 'privateLinkResourceName': self._serialize.url("private_link_resource_name", private_link_resource_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_hubs_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_hubs_operations.py index 1213c73f2b9a..07f87d075ce8 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_hubs_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_hubs_operations.py @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateLinkHubInfoListResult"]: """Returns a list of privateLinkHubs in a resource group. @@ -62,7 +62,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -75,7 +75,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -118,7 +118,7 @@ async def get( self, resource_group_name: str, private_link_hub_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkHub": """Gets a privateLinkHub. @@ -136,14 +136,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -178,7 +178,7 @@ async def update( resource_group_name: str, private_link_hub_name: str, private_link_hub_patch_info: "_models.PrivateLinkHubPatchInfo", - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkHub": """Updates a privateLinkHub. @@ -198,7 +198,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -206,7 +206,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -249,7 +249,7 @@ async def create_or_update( resource_group_name: str, private_link_hub_name: str, private_link_hub_info: "_models.PrivateLinkHub", - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkHub": """Creates or updates a privateLinkHub. @@ -269,7 +269,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -277,7 +277,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -319,21 +319,21 @@ async def _delete_initial( self, resource_group_name: str, private_link_hub_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-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -364,7 +364,7 @@ async def begin_delete( self, resource_group_name: str, private_link_hub_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a privateLinkHub. @@ -374,8 +374,8 @@ async def begin_delete( :type private_link_hub_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) @@ -406,7 +406,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } @@ -426,7 +426,7 @@ def get_long_running_output(pipeline_response): def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateLinkHubInfoListResult"]: """Returns a list of privateLinkHubs in a subscription. @@ -440,7 +440,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_resources_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_resources_operations.py index 0e569b6b6e61..c116a093917d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_resources_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_private_link_resources_operations.py @@ -45,7 +45,7 @@ def list( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: """Private Link Resources. @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, workspace_name: str, private_link_resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResource": """Get Private Link Resource. @@ -145,14 +145,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateLinkResourceName': self._serialize.url("private_link_resource_name", private_link_resource_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_restorable_dropped_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_restorable_dropped_sql_pools_operations.py index 15b9829f6fb2..a291365bee00 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_restorable_dropped_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_restorable_dropped_sql_pools_operations.py @@ -46,7 +46,7 @@ async def get( resource_group_name: str, workspace_name: str, restorable_dropped_sql_pool_id: str, - **kwargs + **kwargs: Any ) -> "_models.RestorableDroppedSqlPool": """Gets a deleted sql pool that can be restored. @@ -67,14 +67,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'restorableDroppedSqlPoolId': self._serialize.url("restorable_dropped_sql_pool_id", restorable_dropped_sql_pool_id, 'str'), } @@ -109,7 +109,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RestorableDroppedSqlPoolListResult"]: """Gets a list of deleted Sql pools that can be restored. @@ -127,7 +127,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -140,7 +140,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_blob_auditing_policies_operations.py index 9009f42b88cc..635ff410c1d1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_blob_auditing_policies_operations.py @@ -46,7 +46,7 @@ async def get( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> "_models.SqlPoolBlobAuditingPolicy": """Get a SQL pool's blob auditing policy. @@ -68,7 +68,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" blob_auditing_policy_name = "default" accept = "application/json" @@ -76,7 +76,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), @@ -113,7 +113,7 @@ async def create_or_update( workspace_name: str, sql_pool_name: str, parameters: "_models.SqlPoolBlobAuditingPolicy", - **kwargs + **kwargs: Any ) -> "_models.SqlPoolBlobAuditingPolicy": """Creates or updates a SQL pool's blob auditing policy. @@ -137,7 +137,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" blob_auditing_policy_name = "default" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -146,7 +146,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), @@ -190,7 +190,7 @@ def list_by_sql_pool( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SqlPoolBlobAuditingPolicyListResult"]: """Lists auditing settings of a Sql pool. @@ -210,7 +210,7 @@ def list_by_sql_pool( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -223,7 +223,7 @@ def prepare_request(next_link=None): url = self.list_by_sql_pool.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_columns_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_columns_operations.py index f7ee4ffdfa75..cfdb66216377 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_columns_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_columns_operations.py @@ -48,7 +48,7 @@ async def get( schema_name: str, table_name: str, column_name: str, - **kwargs + **kwargs: Any ) -> "_models.SqlPoolColumn": """Get Sql pool column. @@ -74,14 +74,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_connection_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_connection_policies_operations.py index 5557e9d938e5..af76a413e8e1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_connection_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_connection_policies_operations.py @@ -46,7 +46,7 @@ async def get( workspace_name: str, sql_pool_name: str, connection_policy_name: Union[str, "_models.ConnectionPolicyName"], - **kwargs + **kwargs: Any ) -> "_models.SqlPoolConnectionPolicy": """Get a Sql pool's connection policy, which is used with table auditing. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'connectionPolicyName': self._serialize.url("connection_policy_name", connection_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_data_warehouse_user_activities_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_data_warehouse_user_activities_operations.py index cb0ce059d2b7..fc4be7b9cddd 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_data_warehouse_user_activities_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_data_warehouse_user_activities_operations.py @@ -46,7 +46,7 @@ async def get( workspace_name: str, sql_pool_name: str, data_warehouse_user_activity_name: Union[str, "_models.DataWarehouseUserActivityName"], - **kwargs + **kwargs: Any ) -> "_models.DataWarehouseUserActivities": """Get SQL pool user activities. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataWarehouseUserActivityName': self._serialize.url("data_warehouse_user_activity_name", data_warehouse_user_activity_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_geo_backup_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_geo_backup_policies_operations.py index 7b7f7e8e43a6..2d1d79a408af 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_geo_backup_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_geo_backup_policies_operations.py @@ -46,7 +46,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GeoBackupPolicyListResult"]: """List SQL pool geo backup policies. @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -129,7 +129,7 @@ async def create_or_update( sql_pool_name: str, geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], parameters: "_models.GeoBackupPolicy", - **kwargs + **kwargs: Any ) -> "_models.GeoBackupPolicy": """Updates a SQL Pool geo backup policy. @@ -153,7 +153,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -161,7 +161,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'geoBackupPolicyName': self._serialize.url("geo_backup_policy_name", geo_backup_policy_name, 'str'), @@ -207,7 +207,7 @@ async def get( workspace_name: str, sql_pool_name: str, geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], - **kwargs + **kwargs: Any ) -> "_models.GeoBackupPolicy": """Get a SQL pool geo backup policy. @@ -231,14 +231,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'geoBackupPolicyName': self._serialize.url("geo_backup_policy_name", geo_backup_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_maintenance_window_options_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_maintenance_window_options_operations.py index dcf4863de830..29aa692490e2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_maintenance_window_options_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_maintenance_window_options_operations.py @@ -46,7 +46,7 @@ async def get( workspace_name: str, sql_pool_name: str, maintenance_window_options_name: str, - **kwargs + **kwargs: Any ) -> "_models.MaintenanceWindowOptions": """SQL pool's available maintenance windows. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_maintenance_windows_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_maintenance_windows_operations.py index 53b8af510504..eeb6e2890222 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_maintenance_windows_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_maintenance_windows_operations.py @@ -46,7 +46,7 @@ async def get( workspace_name: str, sql_pool_name: str, maintenance_window_name: str, - **kwargs + **kwargs: Any ) -> "_models.MaintenanceWindows": """Get a SQL pool's Maintenance Windows. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -116,7 +116,7 @@ async def create_or_update( sql_pool_name: str, maintenance_window_name: str, parameters: "_models.MaintenanceWindows", - **kwargs + **kwargs: Any ) -> None: """Creates or updates a Sql pool's maintenance windows settings. @@ -143,14 +143,14 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_metadata_sync_configs_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_metadata_sync_configs_operations.py index 74a624dfc27e..1ec8c9f36142 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_metadata_sync_configs_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_metadata_sync_configs_operations.py @@ -45,7 +45,7 @@ async def get( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.MetadataSyncConfig"]: """Get SQL pool metadata sync config. @@ -67,14 +67,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -113,7 +113,7 @@ async def create( workspace_name: str, sql_pool_name: str, metadata_sync_configuration: "_models.MetadataSyncConfig", - **kwargs + **kwargs: Any ) -> Optional["_models.MetadataSyncConfig"]: """Set SQL pool metadata sync config. @@ -137,7 +137,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -145,7 +145,7 @@ async def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_operation_results_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_operation_results_operations.py index 05e944daa725..12385e9a3e89 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_operation_results_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_operation_results_operations.py @@ -46,8 +46,8 @@ async def get_location_header_result( workspace_name: str, sql_pool_name: str, operation_id: str, - **kwargs - ) -> object: + **kwargs: Any + ) -> Any: """Get SQL pool operation status. Get the status of a SQL pool operation. @@ -61,23 +61,23 @@ async def get_location_header_result( :param operation_id: Operation ID. :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: object, or the result of cls(response) - :rtype: object + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.get_location_header_result.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_operations_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_operations_operations.py index 5f724ebf5ac5..ad88bb31999e 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_operations_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_operations_operations.py @@ -46,7 +46,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SqlPoolBlobAuditingPolicySqlPoolOperationListResult"]: """Gets a list of operations performed on the SQL pool. @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_recommended_sensitivity_labels_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_recommended_sensitivity_labels_operations.py index 88e21fe5edb7..3c1d19f4a4f2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_recommended_sensitivity_labels_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_recommended_sensitivity_labels_operations.py @@ -46,7 +46,7 @@ async def update( workspace_name: str, sql_pool_name: str, parameters: "_models.RecommendedSensitivityLabelUpdateList", - **kwargs + **kwargs: Any ) -> None: """Update recommended sensitivity labels states of a given SQL Pool using an operations batch. @@ -68,14 +68,14 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_replication_links_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_replication_links_operations.py index 9bde873ef02e..0f9a7d54f3a2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_replication_links_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_replication_links_operations.py @@ -46,7 +46,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReplicationLinkListResult"]: """Get SQL pool replication links. @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -128,7 +128,7 @@ async def get_by_name( workspace_name: str, sql_pool_name: str, link_id: str, - **kwargs + **kwargs: Any ) -> "_models.ReplicationLink": """Get SQL pool replication link by name. @@ -152,14 +152,14 @@ async def get_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.get_by_name.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'linkId': self._serialize.url("link_id", link_id, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_restore_points_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_restore_points_operations.py index c52a840e68fc..2ae55969a57a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_restore_points_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_restore_points_operations.py @@ -48,7 +48,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RestorePointListResult"]: """Get SQL pool backup. @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -130,14 +130,14 @@ async def _create_initial( workspace_name: str, sql_pool_name: str, parameters: "_models.CreateSqlPoolRestorePointDefinition", - **kwargs + **kwargs: Any ) -> Optional["_models.RestorePoint"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RestorePoint"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -145,7 +145,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -190,7 +190,7 @@ async def begin_create( workspace_name: str, sql_pool_name: str, parameters: "_models.CreateSqlPoolRestorePointDefinition", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.RestorePoint"]: """Creates a restore point for a data warehouse. @@ -204,8 +204,8 @@ async def begin_create( :type parameters: ~azure.mgmt.synapse.models.CreateSqlPoolRestorePointDefinition :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 RestorePoint or the result of cls(response) @@ -241,7 +241,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -266,7 +266,7 @@ async def get( workspace_name: str, sql_pool_name: str, restore_point_name: str, - **kwargs + **kwargs: Any ) -> "_models.RestorePoint": """Gets a restore point. @@ -288,14 +288,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'restorePointName': self._serialize.url("restore_point_name", restore_point_name, 'str'), @@ -332,7 +332,7 @@ async def delete( workspace_name: str, sql_pool_name: str, restore_point_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a restore point. @@ -354,13 +354,13 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'restorePointName': self._serialize.url("restore_point_name", restore_point_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_schemas_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_schemas_operations.py index 70f92e1c6a88..133b54038ec8 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_schemas_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_schemas_operations.py @@ -47,7 +47,7 @@ def list( workspace_name: str, sql_pool_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SqlPoolSchemaListResult"]: """Gets schemas of a given SQL pool. @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -84,7 +84,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -132,7 +132,7 @@ async def get( workspace_name: str, sql_pool_name: str, schema_name: str, - **kwargs + **kwargs: Any ) -> "_models.SqlPoolSchema": """Get Sql Pool schema. @@ -154,14 +154,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_security_alert_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_security_alert_policies_operations.py index d524649a37da..da1f0a623204 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_security_alert_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_security_alert_policies_operations.py @@ -46,7 +46,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ListSqlPoolSecurityAlertPolicies"]: """List Sql pool's security alert policies. @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -127,7 +127,7 @@ async def get( workspace_name: str, sql_pool_name: str, security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], - **kwargs + **kwargs: Any ) -> "_models.SqlPoolSecurityAlertPolicy": """Get a Sql pool's security alert policy. @@ -151,14 +151,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), @@ -196,7 +196,7 @@ async def create_or_update( sql_pool_name: str, security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], parameters: "_models.SqlPoolSecurityAlertPolicy", - **kwargs + **kwargs: Any ) -> "_models.SqlPoolSecurityAlertPolicy": """Create or update a Sql pool's security alert policy. @@ -222,7 +222,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -230,7 +230,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_sensitivity_labels_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_sensitivity_labels_operations.py index b72db082d49a..bca5bad8464c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_sensitivity_labels_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_sensitivity_labels_operations.py @@ -47,7 +47,7 @@ def list_current( workspace_name: str, sql_pool_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SensitivityLabelListResult"]: """Gets SQL pool sensitivity labels. @@ -71,7 +71,7 @@ def list_current( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -84,7 +84,7 @@ def prepare_request(next_link=None): url = self.list_current.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -133,7 +133,7 @@ async def update( workspace_name: str, sql_pool_name: str, parameters: "_models.SensitivityLabelUpdateList", - **kwargs + **kwargs: Any ) -> None: """Update sensitivity labels of a given SQL Pool using an operations batch. @@ -155,14 +155,14 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -200,7 +200,7 @@ def list_recommended( include_disabled_recommendations: Optional[bool] = None, skip_token: Optional[str] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SensitivityLabelListResult"]: """Gets sensitivity labels of a given SQL pool. @@ -230,7 +230,7 @@ def list_recommended( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -243,7 +243,7 @@ def prepare_request(next_link=None): url = self.list_recommended.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -298,7 +298,7 @@ async def create_or_update( table_name: str, column_name: str, parameters: "_models.SensitivityLabel", - **kwargs + **kwargs: Any ) -> "_models.SensitivityLabel": """Creates or updates the sensitivity label of a given column in a Sql pool. @@ -326,7 +326,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" sensitivity_label_source = "current" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -385,7 +385,7 @@ async def delete( schema_name: str, table_name: str, column_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the sensitivity label of a given column in a Sql pool. @@ -411,14 +411,14 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" sensitivity_label_source = "current" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -457,7 +457,7 @@ async def get( table_name: str, column_name: str, sensitivity_label_source: Union[str, "_models.SensitivityLabelSource"], - **kwargs + **kwargs: Any ) -> "_models.SensitivityLabel": """Gets the sensitivity label of a given column. @@ -485,14 +485,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -534,7 +534,7 @@ async def enable_recommendation( schema_name: str, table_name: str, column_name: str, - **kwargs + **kwargs: Any ) -> None: """Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). @@ -561,14 +561,14 @@ async def enable_recommendation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" sensitivity_label_source = "recommended" # Construct URL url = self.enable_recommendation.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -606,7 +606,7 @@ async def disable_recommendation( schema_name: str, table_name: str, column_name: str, - **kwargs + **kwargs: Any ) -> None: """Disables sensitivity recommendations on a given column. @@ -632,14 +632,14 @@ async def disable_recommendation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" sensitivity_label_source = "recommended" # Construct URL url = self.disable_recommendation.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_table_columns_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_table_columns_operations.py index ab2068de9644..90c6f6c96ff7 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_table_columns_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_table_columns_operations.py @@ -49,7 +49,7 @@ def list_by_table_name( schema_name: str, table_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SqlPoolColumnListResult"]: """Gets columns in a given table in a SQL pool. @@ -77,7 +77,7 @@ def list_by_table_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -90,7 +90,7 @@ def prepare_request(next_link=None): url = self.list_by_table_name.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_tables_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_tables_operations.py index c146c4c10ae5..3d6e6ef4f6df 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_tables_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_tables_operations.py @@ -48,7 +48,7 @@ def list_by_schema( sql_pool_name: str, schema_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SqlPoolTableListResult"]: """Gets tables of a given schema in a SQL pool. @@ -74,7 +74,7 @@ def list_by_schema( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -87,7 +87,7 @@ def prepare_request(next_link=None): url = self.list_by_schema.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -137,7 +137,7 @@ async def get( sql_pool_name: str, schema_name: str, table_name: str, - **kwargs + **kwargs: Any ) -> "_models.SqlPoolTable": """Get Sql pool table. @@ -161,14 +161,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_transparent_data_encryptions_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_transparent_data_encryptions_operations.py index cee5c214b336..1ec9424f3365 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_transparent_data_encryptions_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_transparent_data_encryptions_operations.py @@ -47,7 +47,7 @@ async def get( workspace_name: str, sql_pool_name: str, transparent_data_encryption_name: Union[str, "_models.TransparentDataEncryptionName"], - **kwargs + **kwargs: Any ) -> "_models.TransparentDataEncryption": """Get a SQL pool's transparent data encryption configuration. @@ -72,14 +72,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'transparentDataEncryptionName': self._serialize.url("transparent_data_encryption_name", transparent_data_encryption_name, 'str'), @@ -118,7 +118,7 @@ async def create_or_update( sql_pool_name: str, transparent_data_encryption_name: Union[str, "_models.TransparentDataEncryptionName"], parameters: "_models.TransparentDataEncryption", - **kwargs + **kwargs: Any ) -> "_models.TransparentDataEncryption": """Creates or updates a Sql pool's transparent data encryption configuration. @@ -146,7 +146,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -154,7 +154,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'transparentDataEncryptionName': self._serialize.url("transparent_data_encryption_name", transparent_data_encryption_name, 'str'), @@ -199,7 +199,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TransparentDataEncryptionListResult"]: """SQL pool's transparent data encryption configurations. @@ -221,7 +221,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -234,7 +234,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_usages_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_usages_operations.py index e88d610d5062..471a6dfe9eb7 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_usages_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_usages_operations.py @@ -46,7 +46,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SqlPoolUsageListResult"]: """Gets SQL pool usages. @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py index 87c9e105d71d..015b861044dc 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py @@ -49,7 +49,7 @@ async def create_or_update( rule_id: str, baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], parameters: "_models.SqlPoolVulnerabilityAssessmentRuleBaseline", - **kwargs + **kwargs: Any ) -> "_models.SqlPoolVulnerabilityAssessmentRuleBaseline": """Creates or updates a Sql pool's vulnerability assessment rule baseline. @@ -78,7 +78,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -86,7 +86,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -131,7 +131,7 @@ async def delete( vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], rule_id: str, baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], - **kwargs + **kwargs: Any ) -> None: """Removes the database's vulnerability assessment rule baseline. @@ -158,13 +158,13 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -201,7 +201,7 @@ async def get( vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], rule_id: str, baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], - **kwargs + **kwargs: Any ) -> "_models.SqlPoolVulnerabilityAssessmentRuleBaseline": """Gets a SqlPool's vulnerability assessment rule baseline. @@ -228,14 +228,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessment_scans_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessment_scans_operations.py index 536224fa0826..3f5199efc171 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessment_scans_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessment_scans_operations.py @@ -49,7 +49,7 @@ def list( workspace_name: str, sql_pool_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VulnerabilityAssessmentScanRecordListResult"]: """Lists the vulnerability assessment scans of a SQL pool. @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -86,7 +86,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -134,20 +134,20 @@ async def _initiate_scan_initial( sql_pool_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], scan_id: 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-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self._initiate_scan_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -182,7 +182,7 @@ async def begin_initiate_scan( sql_pool_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], scan_id: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Executes a Vulnerability Assessment database scan. @@ -198,8 +198,8 @@ async def begin_initiate_scan( :type scan_id: 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) @@ -233,7 +233,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -261,7 +261,7 @@ async def export( sql_pool_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], scan_id: str, - **kwargs + **kwargs: Any ) -> "_models.SqlPoolVulnerabilityAssessmentScansExport": """Convert an existing scan result to a human readable format. If already exists nothing happens. @@ -285,14 +285,14 @@ async def export( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.export.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -335,7 +335,7 @@ async def get( sql_pool_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], scan_id: str, - **kwargs + **kwargs: Any ) -> "_models.VulnerabilityAssessmentScanRecord": """Gets a vulnerability assessment scan record of a Sql pool. @@ -359,14 +359,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessments_operations.py index 0736e8c891e7..6011bb38cb53 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessments_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_vulnerability_assessments_operations.py @@ -46,7 +46,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SqlPoolVulnerabilityAssessmentListResult"]: """Lists the vulnerability assessment policies associated with a SQL pool. @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -127,7 +127,7 @@ async def get( workspace_name: str, sql_pool_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - **kwargs + **kwargs: Any ) -> "_models.SqlPoolVulnerabilityAssessment": """Gets the Sql pool's vulnerability assessment. @@ -151,14 +151,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -196,7 +196,7 @@ async def create_or_update( sql_pool_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], parameters: "_models.SqlPoolVulnerabilityAssessment", - **kwargs + **kwargs: Any ) -> "_models.SqlPoolVulnerabilityAssessment": """Creates or updates the Sql pool vulnerability assessment. @@ -222,7 +222,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -230,7 +230,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -275,7 +275,7 @@ async def delete( workspace_name: str, sql_pool_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - **kwargs + **kwargs: Any ) -> None: """Removes the database's vulnerability assessment. @@ -299,13 +299,13 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_workload_classifier_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_workload_classifier_operations.py index b2039a09cc54..d657d80236b4 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_workload_classifier_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_workload_classifier_operations.py @@ -50,7 +50,7 @@ async def get( sql_pool_name: str, workload_group_name: str, workload_classifier_name: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadClassifier": """Get workload classifier. @@ -76,14 +76,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -123,14 +123,14 @@ async def _create_or_update_initial( workload_group_name: str, workload_classifier_name: str, parameters: "_models.WorkloadClassifier", - **kwargs + **kwargs: Any ) -> Optional["_models.WorkloadClassifier"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadClassifier"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -138,7 +138,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -187,7 +187,7 @@ async def begin_create_or_update( workload_group_name: str, workload_classifier_name: str, parameters: "_models.WorkloadClassifier", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadClassifier"]: """Create Or Update workload classifier. @@ -207,8 +207,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.WorkloadClassifier :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 WorkloadClassifier or the result of cls(response) @@ -246,7 +246,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -274,20 +274,20 @@ async def _delete_initial( sql_pool_name: str, workload_group_name: str, workload_classifier_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-03-01" + api_version = "2021-06-01-preview" # 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -322,7 +322,7 @@ async def begin_delete( sql_pool_name: str, workload_group_name: str, workload_classifier_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Remove workload classifier. @@ -340,8 +340,8 @@ async def begin_delete( :type workload_classifier_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) @@ -375,7 +375,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -402,7 +402,7 @@ def list( workspace_name: str, sql_pool_name: str, workload_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadClassifierListResult"]: """Sql pool's workload classifier. @@ -426,7 +426,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -439,7 +439,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_workload_group_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_workload_group_operations.py index 051a81597d59..26492729fa76 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_workload_group_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_workload_group_operations.py @@ -49,7 +49,7 @@ async def get( workspace_name: str, sql_pool_name: str, workload_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.WorkloadGroup": """Sql pool's workload group. @@ -73,14 +73,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -118,14 +118,14 @@ async def _create_or_update_initial( sql_pool_name: str, workload_group_name: str, parameters: "_models.WorkloadGroup", - **kwargs + **kwargs: Any ) -> Optional["_models.WorkloadGroup"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadGroup"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -133,7 +133,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -180,7 +180,7 @@ async def begin_create_or_update( sql_pool_name: str, workload_group_name: str, parameters: "_models.WorkloadGroup", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkloadGroup"]: """Create Or Update workload group. @@ -198,8 +198,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.WorkloadGroup :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 WorkloadGroup or the result of cls(response) @@ -236,7 +236,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -262,20 +262,20 @@ async def _delete_initial( workspace_name: str, sql_pool_name: str, workload_group_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-03-01" + api_version = "2021-06-01-preview" # 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -308,7 +308,7 @@ async def begin_delete( workspace_name: str, sql_pool_name: str, workload_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Remove workload group. @@ -324,8 +324,8 @@ async def begin_delete( :type workload_group_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) @@ -358,7 +358,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -383,7 +383,7 @@ def list( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkloadGroupListResult"]: """Sql pool's workload groups. @@ -405,7 +405,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -418,7 +418,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pools_operations.py index 101759d8dabd..738c594bebb2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pools_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> "_models.SqlPool": """Get SQL pool. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -114,7 +114,7 @@ async def update( workspace_name: str, sql_pool_name: str, sql_pool_info: "_models.SqlPoolPatchInfo", - **kwargs + **kwargs: Any ) -> Optional["_models.SqlPool"]: """Update SQL pool. @@ -138,7 +138,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -146,7 +146,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -189,14 +189,14 @@ async def _create_initial( workspace_name: str, sql_pool_name: str, sql_pool_info: "_models.SqlPool", - **kwargs + **kwargs: Any ) -> Optional["_models.SqlPool"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SqlPool"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -204,7 +204,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -247,7 +247,7 @@ async def begin_create( workspace_name: str, sql_pool_name: str, sql_pool_info: "_models.SqlPool", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.SqlPool"]: """Create SQL pool. @@ -263,8 +263,8 @@ async def begin_create( :type sql_pool_info: ~azure.mgmt.synapse.models.SqlPool :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 SqlPool or the result of cls(response) @@ -300,7 +300,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -324,21 +324,21 @@ async def _delete_initial( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs - ) -> Optional[object]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + **kwargs: Any + ) -> Optional[Any]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -379,8 +379,8 @@ async def begin_delete( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs - ) -> AsyncLROPoller[object]: + **kwargs: Any + ) -> AsyncLROPoller[Any]: """Delete SQL pool. Delete a SQL pool. @@ -393,16 +393,16 @@ async def begin_delete( :type sql_pool_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 object or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[object] + :return: An instance of AsyncLROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -429,7 +429,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -452,7 +452,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SqlPoolInfoListResult"]: """List SQL pools. @@ -472,7 +472,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -485,7 +485,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -530,21 +530,21 @@ async def _pause_initial( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs - ) -> Optional[object]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + **kwargs: Any + ) -> Optional[Any]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._pause_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -582,8 +582,8 @@ async def begin_pause( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs - ) -> AsyncLROPoller[object]: + **kwargs: Any + ) -> AsyncLROPoller[Any]: """Pause SQL pool. Pause a SQL pool. @@ -596,16 +596,16 @@ async def begin_pause( :type sql_pool_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 object or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[object] + :return: An instance of AsyncLROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -632,7 +632,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -656,21 +656,21 @@ async def _resume_initial( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs - ) -> Optional[object]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + **kwargs: Any + ) -> Optional[Any]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._resume_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -708,8 +708,8 @@ async def begin_resume( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs - ) -> AsyncLROPoller[object]: + **kwargs: Any + ) -> AsyncLROPoller[Any]: """Resume SQL pool. Resume a SQL pool. @@ -722,16 +722,16 @@ async def begin_resume( :type sql_pool_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 object or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[object] + :return: An instance of AsyncLROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -758,7 +758,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -783,7 +783,7 @@ async def rename( workspace_name: str, sql_pool_name: str, parameters: "_models.ResourceMoveDefinition", - **kwargs + **kwargs: Any ) -> None: """Rename a SQL pool. @@ -807,14 +807,14 @@ async def rename( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") # Construct URL url = self.rename.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_aad_admins_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_aad_admins_operations.py index 82842c3c7999..d0f0871fda5a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_aad_admins_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_aad_admins_operations.py @@ -46,7 +46,7 @@ async def get( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> "_models.WorkspaceAadAdminInfo": """Gets a workspace active directory admin. @@ -64,14 +64,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -106,14 +106,14 @@ async def _create_or_update_initial( resource_group_name: str, workspace_name: str, aad_admin_info: "_models.WorkspaceAadAdminInfo", - **kwargs + **kwargs: Any ) -> "_models.WorkspaceAadAdminInfo": cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceAadAdminInfo"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -121,7 +121,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -164,7 +164,7 @@ async def begin_create_or_update( resource_group_name: str, workspace_name: str, aad_admin_info: "_models.WorkspaceAadAdminInfo", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkspaceAadAdminInfo"]: """Creates or updates a workspace active directory admin. @@ -176,8 +176,8 @@ async def begin_create_or_update( :type aad_admin_info: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo :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 WorkspaceAadAdminInfo or the result of cls(response) @@ -212,7 +212,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -234,21 +234,21 @@ async def _delete_initial( self, resource_group_name: str, workspace_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-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -279,7 +279,7 @@ async def begin_delete( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a workspace active directory admin. @@ -289,8 +289,8 @@ async def begin_delete( :type workspace_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) @@ -321,7 +321,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_identity_sql_control_settings_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_identity_sql_control_settings_operations.py index 9b44fdc54189..b6eea9657c86 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_identity_sql_control_settings_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_identity_sql_control_settings_operations.py @@ -46,7 +46,7 @@ async def get( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> "_models.ManagedIdentitySqlControlSettingsModel": """Get Managed Identity Sql Control Settings. @@ -66,14 +66,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -108,14 +108,14 @@ async def _create_or_update_initial( resource_group_name: str, workspace_name: str, managed_identity_sql_control_settings: "_models.ManagedIdentitySqlControlSettingsModel", - **kwargs + **kwargs: Any ) -> Optional["_models.ManagedIdentitySqlControlSettingsModel"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ManagedIdentitySqlControlSettingsModel"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -123,7 +123,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -164,7 +164,7 @@ async def begin_create_or_update( resource_group_name: str, workspace_name: str, managed_identity_sql_control_settings: "_models.ManagedIdentitySqlControlSettingsModel", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ManagedIdentitySqlControlSettingsModel"]: """Create or update Managed Identity Sql Control Settings. @@ -178,8 +178,8 @@ async def begin_create_or_update( :type managed_identity_sql_control_settings: ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModel :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 ManagedIdentitySqlControlSettingsModel or the result of cls(response) @@ -214,7 +214,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py index c047f4e09ccd..fb37c57a6ed8 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, workspace_name: str, blob_auditing_policy_name: Union[str, "_models.BlobAuditingPolicyName"], - **kwargs + **kwargs: Any ) -> "_models.ServerBlobAuditingPolicy": """Get server's blob auditing policy. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -113,14 +113,14 @@ async def _create_or_update_initial( workspace_name: str, blob_auditing_policy_name: Union[str, "_models.BlobAuditingPolicyName"], parameters: "_models.ServerBlobAuditingPolicy", - **kwargs + **kwargs: Any ) -> Optional["_models.ServerBlobAuditingPolicy"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerBlobAuditingPolicy"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -128,7 +128,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -170,7 +170,7 @@ async def begin_create_or_update( workspace_name: str, blob_auditing_policy_name: Union[str, "_models.BlobAuditingPolicyName"], parameters: "_models.ServerBlobAuditingPolicy", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ServerBlobAuditingPolicy"]: """Create or Update server's blob auditing policy. @@ -186,8 +186,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.ServerBlobAuditingPolicy :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 ServerBlobAuditingPolicy or the result of cls(response) @@ -223,7 +223,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -246,7 +246,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ServerBlobAuditingPolicyListResult"]: """List workspace server's blob auditing policies. @@ -266,7 +266,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -279,7 +279,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_encryption_protector_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_encryption_protector_operations.py index d4864ef6da02..32ac7ac36393 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_encryption_protector_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_encryption_protector_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, workspace_name: str, encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], - **kwargs + **kwargs: Any ) -> "_models.EncryptionProtector": """Get workspace server's encryption protector. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } @@ -114,14 +114,14 @@ async def _create_or_update_initial( workspace_name: str, encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], parameters: "_models.EncryptionProtector", - **kwargs + **kwargs: Any ) -> Optional["_models.EncryptionProtector"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EncryptionProtector"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -129,7 +129,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } @@ -172,7 +172,7 @@ async def begin_create_or_update( workspace_name: str, encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], parameters: "_models.EncryptionProtector", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.EncryptionProtector"]: """Updates workspace server's encryption protector. @@ -188,8 +188,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.EncryptionProtector :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 EncryptionProtector or the result of cls(response) @@ -225,7 +225,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } @@ -248,7 +248,7 @@ def list( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EncryptionProtectorListResult"]: """Get list of encryption protectors for the server. @@ -268,7 +268,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -281,7 +281,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -325,20 +325,20 @@ async def _revalidate_initial( resource_group_name: str, workspace_name: str, encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], - **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-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self._revalidate_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } @@ -369,7 +369,7 @@ async def begin_revalidate( resource_group_name: str, workspace_name: str, encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Revalidates server's existing encryption protector. @@ -383,8 +383,8 @@ async def begin_revalidate( :type encryption_protector_name: str or ~azure.mgmt.synapse.models.EncryptionProtectorName :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) @@ -416,7 +416,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py index b1e77d6d0e74..b758332561ea 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, workspace_name: str, blob_auditing_policy_name: Union[str, "_models.BlobAuditingPolicyName"], - **kwargs + **kwargs: Any ) -> "_models.ExtendedServerBlobAuditingPolicy": """Get server's extended blob auditing policy. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -113,14 +113,14 @@ async def _create_or_update_initial( workspace_name: str, blob_auditing_policy_name: Union[str, "_models.BlobAuditingPolicyName"], parameters: "_models.ExtendedServerBlobAuditingPolicy", - **kwargs + **kwargs: Any ) -> Optional["_models.ExtendedServerBlobAuditingPolicy"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExtendedServerBlobAuditingPolicy"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -128,7 +128,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -170,7 +170,7 @@ async def begin_create_or_update( workspace_name: str, blob_auditing_policy_name: Union[str, "_models.BlobAuditingPolicyName"], parameters: "_models.ExtendedServerBlobAuditingPolicy", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ExtendedServerBlobAuditingPolicy"]: """Create or Update server's extended blob auditing policy. @@ -186,8 +186,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.ExtendedServerBlobAuditingPolicy :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 ExtendedServerBlobAuditingPolicy or the result of cls(response) @@ -223,7 +223,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -246,7 +246,7 @@ def list_by_workspace( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ExtendedServerBlobAuditingPolicyListResult"]: """List server's extended blob auditing policies. @@ -266,7 +266,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -279,7 +279,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py index 839a85434750..3bc90aa8d3d1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py @@ -45,7 +45,7 @@ def list( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RecoverableSqlPoolListResult"]: """Get list of recoverable sql pools for the server. @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -122,7 +122,7 @@ async def get( resource_group_name: str, workspace_name: str, sql_pool_name: str, - **kwargs + **kwargs: Any ) -> "_models.RecoverableSqlPool": """Get recoverable sql pools for the server. @@ -144,14 +144,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_security_alert_policy_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_security_alert_policy_operations.py index a590cd3647cf..0f7d89fe6176 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_security_alert_policy_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_security_alert_policy_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, workspace_name: str, security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyNameAutoGenerated"], - **kwargs + **kwargs: Any ) -> "_models.ServerSecurityAlertPolicy": """Get server's security alert policy. @@ -70,14 +70,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), } @@ -113,14 +113,14 @@ async def _create_or_update_initial( workspace_name: str, security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyNameAutoGenerated"], parameters: "_models.ServerSecurityAlertPolicy", - **kwargs + **kwargs: Any ) -> Optional["_models.ServerSecurityAlertPolicy"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerSecurityAlertPolicy"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -128,7 +128,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), } @@ -170,7 +170,7 @@ async def begin_create_or_update( workspace_name: str, security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyNameAutoGenerated"], parameters: "_models.ServerSecurityAlertPolicy", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ServerSecurityAlertPolicy"]: """Create or Update server's threat detection policy. @@ -186,8 +186,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.ServerSecurityAlertPolicy :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 ServerSecurityAlertPolicy or the result of cls(response) @@ -223,7 +223,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), } @@ -246,7 +246,7 @@ def list( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ServerSecurityAlertPolicyListResult"]: """Get server's threat detection policies. @@ -266,7 +266,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -279,7 +279,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_usages_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_usages_operations.py index 057ae2b60fbb..febff7d4f943 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_usages_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_usages_operations.py @@ -45,7 +45,7 @@ def list( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ServerUsageListResult"]: """Get list of usages metric for the server. @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py index e5f6d14d0440..962a9d6a06c3 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py @@ -46,7 +46,7 @@ async def get( resource_group_name: str, workspace_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - **kwargs + **kwargs: Any ) -> "_models.ServerVulnerabilityAssessment": """Get server's vulnerability assessment. @@ -68,14 +68,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), } @@ -111,7 +111,7 @@ async def create_or_update( workspace_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], parameters: "_models.ServerVulnerabilityAssessment", - **kwargs + **kwargs: Any ) -> "_models.ServerVulnerabilityAssessment": """Create or Update server's vulnerability assessment. @@ -135,7 +135,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -143,7 +143,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), } @@ -186,7 +186,7 @@ async def delete( resource_group_name: str, workspace_name: str, vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - **kwargs + **kwargs: Any ) -> None: """Remove server's vulnerability assessment. @@ -208,13 +208,13 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), } @@ -244,7 +244,7 @@ def list( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ServerVulnerabilityAssessmentListResult"]: """Lists the vulnerability assessment policies associated with a server. @@ -264,7 +264,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -277,7 +277,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_sql_aad_admins_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_sql_aad_admins_operations.py index 04b614453e66..bcb7e6f98130 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_sql_aad_admins_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_sql_aad_admins_operations.py @@ -46,7 +46,7 @@ async def get( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> "_models.WorkspaceAadAdminInfo": """Gets a workspace SQL active directory admin. @@ -64,14 +64,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -106,14 +106,14 @@ async def _create_or_update_initial( resource_group_name: str, workspace_name: str, aad_admin_info: "_models.WorkspaceAadAdminInfo", - **kwargs + **kwargs: Any ) -> "_models.WorkspaceAadAdminInfo": cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceAadAdminInfo"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -121,7 +121,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -164,7 +164,7 @@ async def begin_create_or_update( resource_group_name: str, workspace_name: str, aad_admin_info: "_models.WorkspaceAadAdminInfo", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WorkspaceAadAdminInfo"]: """Creates or updates a workspace SQL active directory admin. @@ -176,8 +176,8 @@ async def begin_create_or_update( :type aad_admin_info: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo :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 WorkspaceAadAdminInfo or the result of cls(response) @@ -212,7 +212,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -234,21 +234,21 @@ async def _delete_initial( self, resource_group_name: str, workspace_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-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -279,7 +279,7 @@ async def begin_delete( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a workspace SQL active directory admin. @@ -289,8 +289,8 @@ async def begin_delete( :type workspace_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) @@ -321,7 +321,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspaces_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspaces_operations.py index 10323bd245d7..b292524cba97 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspaces_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspaces_operations.py @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkspaceInfoListResult"]: """Returns a list of workspaces in a resource group. @@ -62,7 +62,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -75,7 +75,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -118,7 +118,7 @@ async def get( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> "_models.Workspace": """Gets a workspace. @@ -136,14 +136,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -178,14 +178,14 @@ async def _update_initial( resource_group_name: str, workspace_name: str, workspace_patch_info: "_models.WorkspacePatchInfo", - **kwargs + **kwargs: Any ) -> "_models.Workspace": cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -193,7 +193,7 @@ async def _update_initial( url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -236,7 +236,7 @@ async def begin_update( resource_group_name: str, workspace_name: str, workspace_patch_info: "_models.WorkspacePatchInfo", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Workspace"]: """Updates a workspace. @@ -248,8 +248,8 @@ async def begin_update( :type workspace_patch_info: ~azure.mgmt.synapse.models.WorkspacePatchInfo :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 Workspace or the result of cls(response) @@ -284,7 +284,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -307,14 +307,14 @@ async def _create_or_update_initial( resource_group_name: str, workspace_name: str, workspace_info: "_models.Workspace", - **kwargs + **kwargs: Any ) -> "_models.Workspace": cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -322,7 +322,7 @@ async def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -365,7 +365,7 @@ async def begin_create_or_update( resource_group_name: str, workspace_name: str, workspace_info: "_models.Workspace", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Workspace"]: """Creates or updates a workspace. @@ -377,8 +377,8 @@ async def begin_create_or_update( :type workspace_info: ~azure.mgmt.synapse.models.Workspace :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 Workspace or the result of cls(response) @@ -413,7 +413,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -435,21 +435,21 @@ async def _delete_initial( self, resource_group_name: str, workspace_name: str, - **kwargs - ) -> Optional[object]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + **kwargs: Any + ) -> Optional[Any]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -488,8 +488,8 @@ async def begin_delete( self, resource_group_name: str, workspace_name: str, - **kwargs - ) -> AsyncLROPoller[object]: + **kwargs: Any + ) -> AsyncLROPoller[Any]: """Deletes a workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -498,16 +498,16 @@ async def begin_delete( :type workspace_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 object or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[object] + :return: An instance of AsyncLROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -533,7 +533,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -553,7 +553,7 @@ def get_long_running_output(pipeline_response): def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkspaceInfoListResult"]: """Returns a list of workspaces in a subscription. @@ -567,7 +567,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py index 93f9104697f9..4e24f01fb8cd 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py @@ -12,21 +12,33 @@ from ._models_py3 import AvailableRpOperation from ._models_py3 import AvailableRpOperationDisplayInfo from ._models_py3 import AzureEntityResource + from ._models_py3 import AzureSku from ._models_py3 import BigDataPoolPatchInfo from ._models_py3 import BigDataPoolResourceInfo from ._models_py3 import BigDataPoolResourceInfoListResult from ._models_py3 import CheckNameAvailabilityRequest from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import CheckNameResult + from ._models_py3 import ClusterPrincipalAssignment + from ._models_py3 import ClusterPrincipalAssignmentListResult from ._models_py3 import CmdkeySetup from ._models_py3 import ComponentSetup from ._models_py3 import CreateSqlPoolRestorePointDefinition + from ._models_py3 import CspWorkspaceAdminProperties from ._models_py3 import CustomSetupBase from ._models_py3 import CustomerManagedKeyDetails + from ._models_py3 import DataConnection + from ._models_py3 import DataConnectionListResult from ._models_py3 import DataLakeStorageAccountDetails from ._models_py3 import DataMaskingPolicy from ._models_py3 import DataMaskingRule from ._models_py3 import DataMaskingRuleListResult from ._models_py3 import DataWarehouseUserActivities + from ._models_py3 import Database + from ._models_py3 import DatabaseListResult + from ._models_py3 import DatabasePrincipalAssignment + from ._models_py3 import DatabasePrincipalAssignmentListResult + from ._models_py3 import DatabaseStatistics from ._models_py3 import DynamicExecutorAllocation from ._models_py3 import EncryptionDetails from ._models_py3 import EncryptionProtector @@ -36,6 +48,8 @@ from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import EventGridDataConnection + from ._models_py3 import EventHubDataConnection from ._models_py3 import ExtendedServerBlobAuditingPolicy from ._models_py3 import ExtendedServerBlobAuditingPolicyListResult from ._models_py3 import ExtendedSqlPoolBlobAuditingPolicy @@ -61,11 +75,17 @@ from ._models_py3 import IntegrationRuntimeStatus from ._models_py3 import IntegrationRuntimeStatusResponse from ._models_py3 import IntegrationRuntimeVNetProperties + from ._models_py3 import IotHubDataConnection from ._models_py3 import IpFirewallRuleInfo from ._models_py3 import IpFirewallRuleInfoListResult from ._models_py3 import IpFirewallRuleProperties + from ._models_py3 import KekIdentityProperties from ._models_py3 import Key from ._models_py3 import KeyInfoListResult + from ._models_py3 import KustoPool + from ._models_py3 import KustoPoolCheckNameRequest + from ._models_py3 import KustoPoolListResult + from ._models_py3 import KustoPoolUpdate from ._models_py3 import LibraryInfo from ._models_py3 import LibraryListResponse from ._models_py3 import LibraryRequirements @@ -88,6 +108,9 @@ from ._models_py3 import ManagedIntegrationRuntimeStatus from ._models_py3 import ManagedVirtualNetworkSettings from ._models_py3 import MetadataSyncConfig + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult from ._models_py3 import OperationMetaLogSpecification from ._models_py3 import OperationMetaMetricDimensionSpecification from ._models_py3 import OperationMetaMetricSpecification @@ -113,6 +136,7 @@ from ._models_py3 import QueryInterval from ._models_py3 import QueryMetric from ._models_py3 import QueryStatistic + from ._models_py3 import ReadWriteDatabase from ._models_py3 import RecommendedSensitivityLabelUpdate from ._models_py3 import RecommendedSensitivityLabelUpdateList from ._models_py3 import RecoverableSqlPool @@ -178,6 +202,7 @@ from ._models_py3 import SsisProject from ._models_py3 import SsisVariable from ._models_py3 import SubResource + from ._models_py3 import SystemData from ._models_py3 import TopQueries from ._models_py3 import TopQueriesListResult from ._models_py3 import TrackedResource @@ -206,21 +231,33 @@ from ._models import AvailableRpOperation # type: ignore from ._models import AvailableRpOperationDisplayInfo # type: ignore from ._models import AzureEntityResource # type: ignore + from ._models import AzureSku # type: ignore from ._models import BigDataPoolPatchInfo # type: ignore from ._models import BigDataPoolResourceInfo # type: ignore from ._models import BigDataPoolResourceInfoListResult # type: ignore from ._models import CheckNameAvailabilityRequest # type: ignore from ._models import CheckNameAvailabilityResponse # type: ignore + from ._models import CheckNameResult # type: ignore + from ._models import ClusterPrincipalAssignment # type: ignore + from ._models import ClusterPrincipalAssignmentListResult # type: ignore from ._models import CmdkeySetup # type: ignore from ._models import ComponentSetup # type: ignore from ._models import CreateSqlPoolRestorePointDefinition # type: ignore + from ._models import CspWorkspaceAdminProperties # type: ignore from ._models import CustomSetupBase # type: ignore from ._models import CustomerManagedKeyDetails # type: ignore + from ._models import DataConnection # type: ignore + from ._models import DataConnectionListResult # type: ignore from ._models import DataLakeStorageAccountDetails # type: ignore from ._models import DataMaskingPolicy # type: ignore from ._models import DataMaskingRule # type: ignore from ._models import DataMaskingRuleListResult # type: ignore from ._models import DataWarehouseUserActivities # type: ignore + from ._models import Database # type: ignore + from ._models import DatabaseListResult # type: ignore + from ._models import DatabasePrincipalAssignment # type: ignore + from ._models import DatabasePrincipalAssignmentListResult # type: ignore + from ._models import DatabaseStatistics # type: ignore from ._models import DynamicExecutorAllocation # type: ignore from ._models import EncryptionDetails # type: ignore from ._models import EncryptionProtector # type: ignore @@ -230,6 +267,8 @@ from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore + from ._models import EventGridDataConnection # type: ignore + from ._models import EventHubDataConnection # type: ignore from ._models import ExtendedServerBlobAuditingPolicy # type: ignore from ._models import ExtendedServerBlobAuditingPolicyListResult # type: ignore from ._models import ExtendedSqlPoolBlobAuditingPolicy # type: ignore @@ -255,11 +294,17 @@ from ._models import IntegrationRuntimeStatus # type: ignore from ._models import IntegrationRuntimeStatusResponse # type: ignore from ._models import IntegrationRuntimeVNetProperties # type: ignore + from ._models import IotHubDataConnection # type: ignore from ._models import IpFirewallRuleInfo # type: ignore from ._models import IpFirewallRuleInfoListResult # type: ignore from ._models import IpFirewallRuleProperties # type: ignore + from ._models import KekIdentityProperties # type: ignore from ._models import Key # type: ignore from ._models import KeyInfoListResult # type: ignore + from ._models import KustoPool # type: ignore + from ._models import KustoPoolCheckNameRequest # type: ignore + from ._models import KustoPoolListResult # type: ignore + from ._models import KustoPoolUpdate # type: ignore from ._models import LibraryInfo # type: ignore from ._models import LibraryListResponse # type: ignore from ._models import LibraryRequirements # type: ignore @@ -282,6 +327,9 @@ from ._models import ManagedIntegrationRuntimeStatus # type: ignore from ._models import ManagedVirtualNetworkSettings # type: ignore from ._models import MetadataSyncConfig # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationListResult # type: ignore from ._models import OperationMetaLogSpecification # type: ignore from ._models import OperationMetaMetricDimensionSpecification # type: ignore from ._models import OperationMetaMetricSpecification # type: ignore @@ -307,6 +355,7 @@ from ._models import QueryInterval # type: ignore from ._models import QueryMetric # type: ignore from ._models import QueryStatistic # type: ignore + from ._models import ReadWriteDatabase # type: ignore from ._models import RecommendedSensitivityLabelUpdate # type: ignore from ._models import RecommendedSensitivityLabelUpdateList # type: ignore from ._models import RecoverableSqlPool # type: ignore @@ -372,6 +421,7 @@ from ._models import SsisProject # type: ignore from ._models import SsisVariable # type: ignore from ._models import SubResource # type: ignore + from ._models import SystemData # type: ignore from ._models import TopQueries # type: ignore from ._models import TopQueriesListResult # type: ignore from ._models import TrackedResource # type: ignore @@ -396,17 +446,28 @@ from ._models import WorkspaceRepositoryConfiguration # type: ignore from ._synapse_management_client_enums import ( + AzureSkuName, + AzureSkuTier, BlobAuditingPolicyName, BlobAuditingPolicyState, + BlobStorageEventType, + ClusterPrincipalRole, ColumnDataType, + Compression, ConnectionPolicyName, + CreatedByType, + DataConnectionKind, DataFlowComputeType, DataMaskingFunction, DataMaskingRuleState, DataMaskingState, DataWarehouseUserActivityName, + DatabasePrincipalRole, DayOfWeek, EncryptionProtectorName, + EngineType, + EventGridDataFormat, + EventHubDataFormat, GeoBackupPolicyName, GeoBackupPolicyState, IntegrationRuntimeAuthKeyName, @@ -419,6 +480,8 @@ IntegrationRuntimeState, IntegrationRuntimeType, IntegrationRuntimeUpdateResult, + IotHubDataFormat, + Kind, ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityActualState, ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityDesiredState, ManagedIntegrationRuntimeNodeStatus, @@ -426,15 +489,18 @@ NodeSize, NodeSizeFamily, OperationStatus, + PrincipalType, ProvisioningState, QueryAggregationFunction, QueryExecutionType, QueryMetricUnit, QueryObservedMetricType, + Reason, RecommendedSensitivityLabelUpdateKind, ReplicationRole, ReplicationState, ResourceIdentityType, + ResourceProvisioningState, RestorePointType, SecurityAlertPolicyName, SecurityAlertPolicyNameAutoGenerated, @@ -445,6 +511,7 @@ SensitivityLabelUpdateKind, ServerKeyType, SsisObjectMetadataType, + State, StorageAccountType, TransparentDataEncryptionName, TransparentDataEncryptionStatus, @@ -461,21 +528,33 @@ 'AvailableRpOperation', 'AvailableRpOperationDisplayInfo', 'AzureEntityResource', + 'AzureSku', 'BigDataPoolPatchInfo', 'BigDataPoolResourceInfo', 'BigDataPoolResourceInfoListResult', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', + 'CheckNameResult', + 'ClusterPrincipalAssignment', + 'ClusterPrincipalAssignmentListResult', 'CmdkeySetup', 'ComponentSetup', 'CreateSqlPoolRestorePointDefinition', + 'CspWorkspaceAdminProperties', 'CustomSetupBase', 'CustomerManagedKeyDetails', + 'DataConnection', + 'DataConnectionListResult', 'DataLakeStorageAccountDetails', 'DataMaskingPolicy', 'DataMaskingRule', 'DataMaskingRuleListResult', 'DataWarehouseUserActivities', + 'Database', + 'DatabaseListResult', + 'DatabasePrincipalAssignment', + 'DatabasePrincipalAssignmentListResult', + 'DatabaseStatistics', 'DynamicExecutorAllocation', 'EncryptionDetails', 'EncryptionProtector', @@ -485,6 +564,8 @@ 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', + 'EventGridDataConnection', + 'EventHubDataConnection', 'ExtendedServerBlobAuditingPolicy', 'ExtendedServerBlobAuditingPolicyListResult', 'ExtendedSqlPoolBlobAuditingPolicy', @@ -510,11 +591,17 @@ 'IntegrationRuntimeStatus', 'IntegrationRuntimeStatusResponse', 'IntegrationRuntimeVNetProperties', + 'IotHubDataConnection', 'IpFirewallRuleInfo', 'IpFirewallRuleInfoListResult', 'IpFirewallRuleProperties', + 'KekIdentityProperties', 'Key', 'KeyInfoListResult', + 'KustoPool', + 'KustoPoolCheckNameRequest', + 'KustoPoolListResult', + 'KustoPoolUpdate', 'LibraryInfo', 'LibraryListResponse', 'LibraryRequirements', @@ -537,6 +624,9 @@ 'ManagedIntegrationRuntimeStatus', 'ManagedVirtualNetworkSettings', 'MetadataSyncConfig', + 'Operation', + 'OperationDisplay', + 'OperationListResult', 'OperationMetaLogSpecification', 'OperationMetaMetricDimensionSpecification', 'OperationMetaMetricSpecification', @@ -562,6 +652,7 @@ 'QueryInterval', 'QueryMetric', 'QueryStatistic', + 'ReadWriteDatabase', 'RecommendedSensitivityLabelUpdate', 'RecommendedSensitivityLabelUpdateList', 'RecoverableSqlPool', @@ -627,6 +718,7 @@ 'SsisProject', 'SsisVariable', 'SubResource', + 'SystemData', 'TopQueries', 'TopQueriesListResult', 'TrackedResource', @@ -649,17 +741,28 @@ 'WorkspaceKeyDetails', 'WorkspacePatchInfo', 'WorkspaceRepositoryConfiguration', + 'AzureSkuName', + 'AzureSkuTier', 'BlobAuditingPolicyName', 'BlobAuditingPolicyState', + 'BlobStorageEventType', + 'ClusterPrincipalRole', 'ColumnDataType', + 'Compression', 'ConnectionPolicyName', + 'CreatedByType', + 'DataConnectionKind', 'DataFlowComputeType', 'DataMaskingFunction', 'DataMaskingRuleState', 'DataMaskingState', 'DataWarehouseUserActivityName', + 'DatabasePrincipalRole', 'DayOfWeek', 'EncryptionProtectorName', + 'EngineType', + 'EventGridDataFormat', + 'EventHubDataFormat', 'GeoBackupPolicyName', 'GeoBackupPolicyState', 'IntegrationRuntimeAuthKeyName', @@ -672,6 +775,8 @@ 'IntegrationRuntimeState', 'IntegrationRuntimeType', 'IntegrationRuntimeUpdateResult', + 'IotHubDataFormat', + 'Kind', 'ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityActualState', 'ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityDesiredState', 'ManagedIntegrationRuntimeNodeStatus', @@ -679,15 +784,18 @@ 'NodeSize', 'NodeSizeFamily', 'OperationStatus', + 'PrincipalType', 'ProvisioningState', 'QueryAggregationFunction', 'QueryExecutionType', 'QueryMetricUnit', 'QueryObservedMetricType', + 'Reason', 'RecommendedSensitivityLabelUpdateKind', 'ReplicationRole', 'ReplicationState', 'ResourceIdentityType', + 'ResourceProvisioningState', 'RestorePointType', 'SecurityAlertPolicyName', 'SecurityAlertPolicyNameAutoGenerated', @@ -698,6 +806,7 @@ 'SensitivityLabelUpdateKind', 'ServerKeyType', 'SsisObjectMetadataType', + 'State', 'StorageAccountType', 'TransparentDataEncryptionName', 'TransparentDataEncryptionStatus', diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py index d0c96edb62e9..74beec47a19f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py @@ -203,6 +203,47 @@ def __init__( self.etag = None +class AzureSku(msrest.serialization.Model): + """Azure SKU definition. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. SKU name. Possible values include: "Standard_DS13_v2+1TB_PS", + "Standard_DS13_v2+2TB_PS", "Standard_DS14_v2+3TB_PS", "Standard_DS14_v2+4TB_PS", + "Standard_D13_v2", "Standard_D14_v2", "Standard_L8s", "Standard_L16s", "Standard_L8s_v2", + "Standard_L16s_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_L4s", "Dev(No + SLA)_Standard_D11_v2", "Standard_E64i_v3", "Standard_E80ids_v4", "Standard_E2a_v4", + "Standard_E4a_v4", "Standard_E8a_v4", "Standard_E16a_v4", "Standard_E8as_v4+1TB_PS", + "Standard_E8as_v4+2TB_PS", "Standard_E16as_v4+3TB_PS", "Standard_E16as_v4+4TB_PS", "Dev(No + SLA)_Standard_E2a_v4". + :type name: str or ~azure.mgmt.synapse.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.synapse.models.AzureSkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureSku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.capacity = kwargs.get('capacity', None) + self.tier = kwargs['tier'] + + class BigDataPoolPatchInfo(msrest.serialization.Model): """Properties patch for a Big Data pool. @@ -320,7 +361,7 @@ class BigDataPoolResourceInfo(TrackedResource): values include: "None", "Small", "Medium", "Large", "XLarge", "XXLarge", "XXXLarge". :type node_size: str or ~azure.mgmt.synapse.models.NodeSize :param node_size_family: The kind of nodes that the Big Data pool provides. Possible values - include: "None", "MemoryOptimized". + include: "None", "MemoryOptimized", "HardwareAcceleratedFPGA", "HardwareAcceleratedGPU". :type node_size_family: str or ~azure.mgmt.synapse.models.NodeSizeFamily :ivar last_succeeded_timestamp: The time when the Big Data pool was updated successfully. :vartype last_succeeded_timestamp: ~datetime.datetime @@ -462,6 +503,166 @@ def __init__( self.name = kwargs.get('name', None) +class CheckNameResult(msrest.serialization.Model): + """The result returned from a check name availability request. + + :param name_available: Specifies a Boolean value that indicates if the name is available. + :type name_available: bool + :param name: The name that was checked. + :type name: str + :param message: Message indicating an unavailable name due to a conflict, or a description of + the naming rules that are violated. + :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.synapse.models.Reason + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameResult, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.name = kwargs.get('name', None) + self.message = kwargs.get('message', None) + self.reason = kwargs.get('reason', None) + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class ClusterPrincipalAssignment(ProxyResource): + """Class representing a cluster principal assignment. + + 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: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :param principal_id: The principal ID assigned to the cluster principal. It can be a user + email, application ID, or security group name. + :type principal_id: str + :param role: Cluster principal role. Possible values include: "AllDatabasesAdmin", + "AllDatabasesViewer". + :type role: str or ~azure.mgmt.synapse.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.synapse.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", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'tenant_name': {'readonly': True}, + 'principal_name': {'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'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'principal_type': {'key': 'properties.principalType', 'type': 'str'}, + 'tenant_name': {'key': 'properties.tenantName', 'type': 'str'}, + 'principal_name': {'key': 'properties.principalName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterPrincipalAssignment, self).__init__(**kwargs) + self.system_data = None + self.principal_id = kwargs.get('principal_id', None) + self.role = kwargs.get('role', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.principal_type = kwargs.get('principal_type', None) + self.tenant_name = None + self.principal_name = None + self.provisioning_state = None + + +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.synapse.models.ClusterPrincipalAssignment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ClusterPrincipalAssignment]'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterPrincipalAssignmentListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class CustomSetupBase(msrest.serialization.Model): """The base definition of the custom setup. @@ -502,9 +703,9 @@ class CmdkeySetup(CustomSetupBase): :param type: Required. The type of custom setup.Constant filled by server. :type type: str :param target_name: Required. The server name of data source access. - :type target_name: object + :type target_name: any :param user_name: Required. The user name of data source access. - :type user_name: object + :type user_name: any :param password: Required. The password of data source access. :type password: ~azure.mgmt.synapse.models.SecretBase """ @@ -593,6 +794,25 @@ def __init__( self.restore_point_label = kwargs['restore_point_label'] +class CspWorkspaceAdminProperties(msrest.serialization.Model): + """Initial workspace AAD admin properties for a CSP subscription. + + :param initial_workspace_admin_object_id: AAD object ID of initial workspace admin. + :type initial_workspace_admin_object_id: str + """ + + _attribute_map = { + 'initial_workspace_admin_object_id': {'key': 'initialWorkspaceAdminObjectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CspWorkspaceAdminProperties, self).__init__(**kwargs) + self.initial_workspace_admin_object_id = kwargs.get('initial_workspace_admin_object_id', None) + + class CustomerManagedKeyDetails(msrest.serialization.Model): """Details of the customer managed key associated with the workspace. @@ -602,6 +822,8 @@ class CustomerManagedKeyDetails(msrest.serialization.Model): :vartype status: str :param key: The key object of the workspace. :type key: ~azure.mgmt.synapse.models.WorkspaceKeyDetails + :param kek_identity: Key encryption key. + :type kek_identity: ~azure.mgmt.synapse.models.KekIdentityProperties """ _validation = { @@ -611,6 +833,7 @@ class CustomerManagedKeyDetails(msrest.serialization.Model): _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'key': {'key': 'key', 'type': 'WorkspaceKeyDetails'}, + 'kek_identity': {'key': 'kekIdentity', 'type': 'KekIdentityProperties'}, } def __init__( @@ -620,33 +843,89 @@ def __init__( super(CustomerManagedKeyDetails, self).__init__(**kwargs) self.status = None self.key = kwargs.get('key', None) + self.kek_identity = kwargs.get('kek_identity', None) -class DataLakeStorageAccountDetails(msrest.serialization.Model): - """Details of the data lake storage account associated with the workspace. +class Database(ProxyResource): + """Class representing a Kusto database. - :param account_url: Account URL. - :type account_url: str - :param filesystem: Filesystem name. - :type filesystem: str + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ReadWriteDatabase. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.Kind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + _attribute_map = { - 'account_url': {'key': 'accountUrl', 'type': 'str'}, - 'filesystem': {'key': 'filesystem', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'ReadWrite': 'ReadWriteDatabase'} } def __init__( self, **kwargs ): - super(DataLakeStorageAccountDetails, self).__init__(**kwargs) - self.account_url = kwargs.get('account_url', None) - self.filesystem = kwargs.get('filesystem', None) + super(Database, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.kind = 'Database' # type: str + self.system_data = None -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. +class DatabaseListResult(msrest.serialization.Model): + """The list Kusto databases operation response. + + :param value: The list of Kusto databases. + :type value: list[~azure.mgmt.synapse.models.Database] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Database]'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class DatabasePrincipalAssignment(ProxyResource): + """Class representing a database principal assignment. Variables are only populated by the server, and will be ignored when sending a request. @@ -658,25 +937,204 @@ class ProxyResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :param principal_id: The principal ID assigned to the database principal. It can be a user + email, application ID, or security group name. + :type principal_id: str + :param role: Database principal role. Possible values include: "Admin", "Ingestor", "Monitor", + "User", "UnrestrictedViewer", "Viewer". + :type role: str or ~azure.mgmt.synapse.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.synapse.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", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'tenant_name': {'readonly': True}, + 'principal_name': {'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'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'principal_type': {'key': 'properties.principalType', 'type': 'str'}, + 'tenant_name': {'key': 'properties.tenantName', 'type': 'str'}, + 'principal_name': {'key': 'properties.principalName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, **kwargs ): - super(ProxyResource, self).__init__(**kwargs) + super(DatabasePrincipalAssignment, self).__init__(**kwargs) + self.system_data = None + self.principal_id = kwargs.get('principal_id', None) + self.role = kwargs.get('role', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.principal_type = kwargs.get('principal_type', None) + self.tenant_name = None + self.principal_name = None + self.provisioning_state = None + + +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.synapse.models.DatabasePrincipalAssignment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DatabasePrincipalAssignment]'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabasePrincipalAssignmentListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class DatabaseStatistics(msrest.serialization.Model): + """A class that contains database statistics information. + + :param size: The database size - the total size of compressed data and index in bytes. + :type size: float + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseStatistics, self).__init__(**kwargs) + self.size = kwargs.get('size', None) + + +class DataConnection(ProxyResource): + """Class representing a data connection. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EventGridDataConnection, EventHubDataConnection, IotHubDataConnection. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.DataConnectionKind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'EventGrid': 'EventGridDataConnection', 'EventHub': 'EventHubDataConnection', 'IotHub': 'IotHubDataConnection'} + } + + def __init__( + self, + **kwargs + ): + super(DataConnection, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.kind = 'DataConnection' # type: str + self.system_data = None + + +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.synapse.models.DataConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class DataLakeStorageAccountDetails(msrest.serialization.Model): + """Details of the data lake storage account associated with the workspace. + + :param account_url: Account URL. + :type account_url: str + :param filesystem: Filesystem name. + :type filesystem: str + """ + + _attribute_map = { + 'account_url': {'key': 'accountUrl', 'type': 'str'}, + 'filesystem': {'key': 'filesystem', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataLakeStorageAccountDetails, self).__init__(**kwargs) + self.account_url = kwargs.get('account_url', None) + self.filesystem = kwargs.get('filesystem', None) class DataMaskingPolicy(ProxyResource): @@ -1125,7 +1583,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -1192,23 +1650,211 @@ def __init__( self.additional_info = None -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~azure.mgmt.synapse.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class EventGridDataConnection(DataConnection): + """Class representing an Event Grid data connection. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.DataConnectionKind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :param storage_account_resource_id: The resource ID of the storage account where the data + resides. + :type storage_account_resource_id: str + :param event_hub_resource_id: The resource ID where the event grid is configured to send + events. + :type event_hub_resource_id: str + :param consumer_group: The event hub consumer group. + :type consumer_group: str + :param table_name: The table where the data should be ingested. Optionally the table + information can be added to each message. + :type table_name: str + :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the + mapping information can be added to each message. + :type mapping_rule_name: str + :param data_format: The data format of the message. Optionally the data format can be added to + 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.synapse.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.synapse.models.BlobStorageEventType + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'event_hub_resource_id': {'key': 'properties.eventHubResourceId', 'type': 'str'}, + 'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'ignore_first_record': {'key': 'properties.ignoreFirstRecord', 'type': 'bool'}, + 'blob_storage_event_type': {'key': 'properties.blobStorageEventType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EventGridDataConnection, self).__init__(**kwargs) + self.kind = 'EventGrid' # type: str + self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) + self.event_hub_resource_id = kwargs.get('event_hub_resource_id', None) + self.consumer_group = kwargs.get('consumer_group', None) + self.table_name = kwargs.get('table_name', None) + self.mapping_rule_name = kwargs.get('mapping_rule_name', None) + self.data_format = kwargs.get('data_format', None) + self.ignore_first_record = kwargs.get('ignore_first_record', None) + self.blob_storage_event_type = kwargs.get('blob_storage_event_type', None) + self.provisioning_state = None + + +class EventHubDataConnection(DataConnection): + """Class representing an event hub data connection. + + 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 error: The error object. - :type error: ~azure.mgmt.synapse.models.ErrorDetail + :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 + :param location: Resource location. + :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.synapse.models.DataConnectionKind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :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 + :param consumer_group: The event hub consumer group. + :type consumer_group: str + :param table_name: The table where the data should be ingested. Optionally the table + information can be added to each message. + :type table_name: str + :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the + mapping information can be added to each message. + :type mapping_rule_name: str + :param data_format: The data format of the message. Optionally the data format can be added to + 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.synapse.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". + :type compression: str or ~azure.mgmt.synapse.models.Compression + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'event_hub_resource_id': {'key': 'properties.eventHubResourceId', 'type': 'str'}, + 'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, + 'compression': {'key': 'properties.compression', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + super(EventHubDataConnection, self).__init__(**kwargs) + self.kind = 'EventHub' # type: str + self.event_hub_resource_id = kwargs.get('event_hub_resource_id', None) + self.consumer_group = kwargs.get('consumer_group', None) + self.table_name = kwargs.get('table_name', None) + self.mapping_rule_name = kwargs.get('mapping_rule_name', None) + self.data_format = kwargs.get('data_format', None) + self.event_system_properties = kwargs.get('event_system_properties', None) + self.compression = kwargs.get('compression', None) + self.provisioning_state = None class ExtendedServerBlobAuditingPolicy(ProxyResource): @@ -1291,9 +1937,8 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): database, and should not be used in combination with other groups as this will result in duplicate audit logs. - For more information, see `Database-Level Audit Action Groups `_. + For more information, see `Database-Level Audit Action Groups + `_. For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: @@ -1317,9 +1962,8 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public - For more information, see `Database-Level Audit Actions `_. + For more information, see `Database-Level Audit Actions + `_. :type audit_actions_and_groups: list[str] :param storage_account_subscription_id: Specifies the blob storage subscription Id. :type storage_account_subscription_id: str @@ -1337,8 +1981,7 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): Diagnostic Settings URI format: PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- - version=2017-05-01-preview + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview For more information, see `Diagnostic Settings REST API `_ @@ -1499,9 +2142,8 @@ class ExtendedSqlPoolBlobAuditingPolicy(ProxyResource): database, and should not be used in combination with other groups as this will result in duplicate audit logs. - For more information, see `Database-Level Audit Action Groups `_. + For more information, see `Database-Level Audit Action Groups + `_. For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: @@ -1525,9 +2167,8 @@ class ExtendedSqlPoolBlobAuditingPolicy(ProxyResource): SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public - For more information, see `Database-Level Audit Actions `_. + For more information, see `Database-Level Audit Actions + `_. :type audit_actions_and_groups: list[str] :param storage_account_subscription_id: Specifies the blob storage subscription Id. :type storage_account_subscription_id: str @@ -1545,8 +2186,7 @@ class ExtendedSqlPoolBlobAuditingPolicy(ProxyResource): Diagnostic Settings URI format: PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- - version=2017-05-01-preview + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview For more information, see `Diagnostic Settings REST API `_ @@ -1732,7 +2372,7 @@ class IntegrationRuntime(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -1792,10 +2432,10 @@ class IntegrationRuntimeComputeProperties(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param location: The location for managed integration runtime. The supported regions could be - found on https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement- - activities. + found on + https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities. :type location: str :param node_size: The node size requirement to managed integration runtime. :type node_size: str @@ -1846,7 +2486,7 @@ class IntegrationRuntimeConnectionInfo(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar service_token: The token generated in service. Callers use this token to authenticate to integration runtime. :vartype service_token: str @@ -1926,7 +2566,7 @@ class IntegrationRuntimeDataFlowProperties(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param compute_type: Compute type of the cluster which will execute data flow job. Possible values include: "General", "MemoryOptimized", "ComputeOptimized". :type compute_type: str or ~azure.mgmt.synapse.models.DataFlowComputeType @@ -2071,7 +2711,7 @@ class IntegrationRuntimeNodeMonitoringData(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar node_name: Name of the integration runtime node. :vartype node_name: str :ivar available_memory_in_mb: Available memory (MB) on the integration runtime node. @@ -2238,7 +2878,7 @@ class IntegrationRuntimeSsisCatalogInfo(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param catalog_server_endpoint: The catalog database server URL. :type catalog_server_endpoint: str :param catalog_admin_user_name: The administrator user name of catalog database. @@ -2282,7 +2922,7 @@ class IntegrationRuntimeSsisProperties(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param catalog_info: Catalog information for managed dedicated integration runtime. :type catalog_info: ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogInfo :param license_type: License type for bringing your own license scenario. Possible values @@ -2339,7 +2979,7 @@ class IntegrationRuntimeStatus(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -2416,7 +3056,7 @@ class IntegrationRuntimeVNetProperties(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param v_net_id: The ID of the VNet that this integration runtime will join. :type v_net_id: str :param subnet: The name of the subnet this integration runtime will join. @@ -2444,11 +3084,299 @@ def __init__( self.public_i_ps = kwargs.get('public_i_ps', None) -class IpFirewallRuleInfo(ProxyResource): - """IP firewall rule. +class IotHubDataConnection(DataConnection): + """Class representing an iot hub data connection. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.DataConnectionKind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :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 + :param consumer_group: The iot hub consumer group. + :type consumer_group: str + :param table_name: The table where the data should be ingested. Optionally the table + information can be added to each message. + :type table_name: str + :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the + mapping information can be added to each message. + :type mapping_rule_name: str + :param data_format: The data format of the message. Optionally the data format can be added to + 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.synapse.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", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'iot_hub_resource_id': {'key': 'properties.iotHubResourceId', 'type': 'str'}, + 'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, + 'shared_access_policy_name': {'key': 'properties.sharedAccessPolicyName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IotHubDataConnection, self).__init__(**kwargs) + self.kind = 'IotHub' # type: str + self.iot_hub_resource_id = kwargs.get('iot_hub_resource_id', None) + self.consumer_group = kwargs.get('consumer_group', None) + self.table_name = kwargs.get('table_name', None) + self.mapping_rule_name = kwargs.get('mapping_rule_name', None) + self.data_format = kwargs.get('data_format', None) + self.event_system_properties = kwargs.get('event_system_properties', None) + self.shared_access_policy_name = kwargs.get('shared_access_policy_name', None) + self.provisioning_state = None + + +class IpFirewallRuleInfo(ProxyResource): + """IP firewall rule. + + 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 + :param end_ip_address: The end IP address of the firewall rule. Must be IPv4 format. Must be + greater than or equal to startIpAddress. + :type end_ip_address: str + :ivar provisioning_state: Resource provisioning state. Possible values include: "Provisioning", + "Succeeded", "Deleting", "Failed", "DeleteError". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ProvisioningState + :param start_ip_address: The start IP address of the firewall rule. Must be IPv4 format. + :type start_ip_address: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IpFirewallRuleInfo, self).__init__(**kwargs) + self.end_ip_address = kwargs.get('end_ip_address', None) + self.provisioning_state = None + self.start_ip_address = kwargs.get('start_ip_address', None) + + +class IpFirewallRuleInfoListResult(msrest.serialization.Model): + """List of IP firewall rules. + + :param next_link: Link to next page of results. + :type next_link: str + :param value: List of IP firewall rules. + :type value: list[~azure.mgmt.synapse.models.IpFirewallRuleInfo] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[IpFirewallRuleInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(IpFirewallRuleInfoListResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class IpFirewallRuleProperties(msrest.serialization.Model): + """IP firewall rule properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param end_ip_address: The end IP address of the firewall rule. Must be IPv4 format. Must be + greater than or equal to startIpAddress. + :type end_ip_address: str + :ivar provisioning_state: Resource provisioning state. Possible values include: "Provisioning", + "Succeeded", "Deleting", "Failed", "DeleteError". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ProvisioningState + :param start_ip_address: The start IP address of the firewall rule. Must be IPv4 format. + :type start_ip_address: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'end_ip_address': {'key': 'endIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'start_ip_address': {'key': 'startIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IpFirewallRuleProperties, self).__init__(**kwargs) + self.end_ip_address = kwargs.get('end_ip_address', None) + self.provisioning_state = None + self.start_ip_address = kwargs.get('start_ip_address', None) + + +class KekIdentityProperties(msrest.serialization.Model): + """Key encryption key properties. + + :param user_assigned_identity: User assigned identity resource Id. + :type user_assigned_identity: str + :param use_system_assigned_identity: Boolean specifying whether to use system assigned identity + or not. + :type use_system_assigned_identity: any + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + 'use_system_assigned_identity': {'key': 'useSystemAssignedIdentity', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(KekIdentityProperties, self).__init__(**kwargs) + self.user_assigned_identity = kwargs.get('user_assigned_identity', None) + self.use_system_assigned_identity = kwargs.get('use_system_assigned_identity', None) + + +class Key(ProxyResource): + """A workspace key. + + 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 + :param is_active_cmk: Used to activate the workspace after a customer managed key is provided. + :type is_active_cmk: bool + :param key_vault_url: The Key Vault Url of the workspace key. + :type key_vault_url: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_active_cmk': {'key': 'properties.isActiveCMK', 'type': 'bool'}, + 'key_vault_url': {'key': 'properties.keyVaultUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Key, self).__init__(**kwargs) + self.is_active_cmk = kwargs.get('is_active_cmk', None) + self.key_vault_url = kwargs.get('key_vault_url', None) + + +class KeyInfoListResult(msrest.serialization.Model): + """List of keys. + + :param next_link: Link to the next page of results. + :type next_link: str + :param value: List of keys. + :type value: list[~azure.mgmt.synapse.models.Key] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Key]'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyInfoListResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class KustoPool(TrackedResource): + """Class representing a Kusto kusto pool. 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. + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str @@ -2457,102 +3385,140 @@ class IpFirewallRuleInfo(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param end_ip_address: The end IP address of the firewall rule. Must be IPv4 format. Must be - greater than or equal to startIpAddress. - :type end_ip_address: str - :ivar provisioning_state: Resource provisioning state. Possible values include: "Provisioning", - "Succeeded", "Deleting", "Failed", "DeleteError". - :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ProvisioningState - :param start_ip_address: The start IP address of the firewall rule. Must be IPv4 format. - :type start_ip_address: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + :param sku: Required. The SKU of the kusto pool. + :type sku: ~azure.mgmt.synapse.models.AzureSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :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.synapse.models.State + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + :ivar uri: The Kusto Pool URI. + :vartype uri: str + :ivar data_ingestion_uri: The Kusto Pool data ingestion URI. + :vartype data_ingestion_uri: str + :ivar state_reason: The reason for the Kusto Pool's current state. + :vartype state_reason: str + :param engine_type: The engine type. Possible values include: "V2", "V3". + :type engine_type: str or ~azure.mgmt.synapse.models.EngineType + :param workspace_uid: The workspace unique identifier. + :type workspace_uid: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'uri': {'readonly': True}, + 'data_ingestion_uri': {'readonly': True}, + 'state_reason': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'state': {'key': 'properties.state', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'}, + 'state_reason': {'key': 'properties.stateReason', 'type': 'str'}, + 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'workspace_uid': {'key': 'properties.workspaceUid', 'type': 'str'}, } def __init__( self, **kwargs ): - super(IpFirewallRuleInfo, self).__init__(**kwargs) - self.end_ip_address = kwargs.get('end_ip_address', None) + super(KustoPool, self).__init__(**kwargs) + self.sku = kwargs['sku'] + self.etag = None + self.system_data = None + self.state = None self.provisioning_state = None - self.start_ip_address = kwargs.get('start_ip_address', None) + self.uri = None + self.data_ingestion_uri = None + self.state_reason = None + self.engine_type = kwargs.get('engine_type', None) + self.workspace_uid = kwargs.get('workspace_uid', None) -class IpFirewallRuleInfoListResult(msrest.serialization.Model): - """List of IP firewall rules. +class KustoPoolCheckNameRequest(msrest.serialization.Model): + """The object sent for a kusto pool check name availability request. - :param next_link: Link to next page of results. - :type next_link: str - :param value: List of IP firewall rules. - :type value: list[~azure.mgmt.synapse.models.IpFirewallRuleInfo] + 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. Kusto Pool name. + :type name: str + :ivar type: Required. The type of resource, Microsoft.Synapse/workspaces/kustoPools. Default + value: "Microsoft.Synapse/workspaces/kustoPools". + :vartype type: str """ + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[IpFirewallRuleInfo]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } + type = "Microsoft.Synapse/workspaces/kustoPools" + def __init__( self, **kwargs ): - super(IpFirewallRuleInfoListResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) - + super(KustoPoolCheckNameRequest, self).__init__(**kwargs) + self.name = kwargs['name'] -class IpFirewallRuleProperties(msrest.serialization.Model): - """IP firewall rule properties. - Variables are only populated by the server, and will be ignored when sending a request. +class KustoPoolListResult(msrest.serialization.Model): + """The list Kusto pools operation response. - :param end_ip_address: The end IP address of the firewall rule. Must be IPv4 format. Must be - greater than or equal to startIpAddress. - :type end_ip_address: str - :ivar provisioning_state: Resource provisioning state. Possible values include: "Provisioning", - "Succeeded", "Deleting", "Failed", "DeleteError". - :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ProvisioningState - :param start_ip_address: The start IP address of the firewall rule. Must be IPv4 format. - :type start_ip_address: str + :param value: The list of Kusto pools. + :type value: list[~azure.mgmt.synapse.models.KustoPool] """ - _validation = { - 'provisioning_state': {'readonly': True}, - } - _attribute_map = { - 'end_ip_address': {'key': 'endIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'start_ip_address': {'key': 'startIpAddress', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[KustoPool]'}, } def __init__( self, **kwargs ): - super(IpFirewallRuleProperties, self).__init__(**kwargs) - self.end_ip_address = kwargs.get('end_ip_address', None) - self.provisioning_state = None - self.start_ip_address = kwargs.get('start_ip_address', None) + super(KustoPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) -class Key(ProxyResource): - """A workspace key. +class KustoPoolUpdate(Resource): + """Class representing an update to a Kusto kusto pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -2564,56 +3530,68 @@ class Key(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param is_active_cmk: Used to activate the workspace after a customer managed key is provided. - :type is_active_cmk: bool - :param key_vault_url: The Key Vault Url of the workspace key. - :type key_vault_url: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The SKU of the kusto pool. + :type sku: ~azure.mgmt.synapse.models.AzureSku + :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.synapse.models.State + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + :ivar uri: The Kusto Pool URI. + :vartype uri: str + :ivar data_ingestion_uri: The Kusto Pool data ingestion URI. + :vartype data_ingestion_uri: str + :ivar state_reason: The reason for the Kusto Pool's current state. + :vartype state_reason: str + :param engine_type: The engine type. Possible values include: "V2", "V3". + :type engine_type: str or ~azure.mgmt.synapse.models.EngineType + :param workspace_uid: The workspace unique identifier. + :type workspace_uid: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'uri': {'readonly': True}, + 'data_ingestion_uri': {'readonly': True}, + 'state_reason': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'is_active_cmk': {'key': 'properties.isActiveCMK', 'type': 'bool'}, - 'key_vault_url': {'key': 'properties.keyVaultUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Key, self).__init__(**kwargs) - self.is_active_cmk = kwargs.get('is_active_cmk', None) - self.key_vault_url = kwargs.get('key_vault_url', None) - - -class KeyInfoListResult(msrest.serialization.Model): - """List of keys. - - :param next_link: Link to the next page of results. - :type next_link: str - :param value: List of keys. - :type value: list[~azure.mgmt.synapse.models.Key] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[Key]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'}, + 'state_reason': {'key': 'properties.stateReason', 'type': 'str'}, + 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'workspace_uid': {'key': 'properties.workspaceUid', 'type': 'str'}, } def __init__( self, **kwargs ): - super(KeyInfoListResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + super(KustoPoolUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.state = None + self.provisioning_state = None + self.uri = None + self.data_ingestion_uri = None + self.state_reason = None + self.engine_type = kwargs.get('engine_type', None) + self.workspace_uid = kwargs.get('workspace_uid', None) class LibraryInfo(msrest.serialization.Model): @@ -3215,7 +4193,7 @@ class ManagedIntegrationRuntime(IntegrationRuntime): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -3263,7 +4241,7 @@ class ManagedIntegrationRuntimeError(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar time: The time when the error occurred. :vartype time: ~datetime.datetime :ivar code: Error code. @@ -3308,7 +4286,7 @@ class ManagedIntegrationRuntimeNode(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar node_id: The managed integration runtime node id. :vartype node_id: str :ivar status: The managed integration runtime node status. Possible values include: "Starting", @@ -3348,7 +4326,7 @@ class ManagedIntegrationRuntimeOperationResult(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar type: The operation type. Could be start or stop. :vartype type: str :ivar start_time: The start time of the operation. @@ -3405,7 +4383,7 @@ class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -3527,6 +4505,97 @@ def __init__( self.sync_interval_in_minutes = kwargs.get('sync_interval_in_minutes', None) +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.synapse.models.OperationDisplay + :param origin: The intended executor of the operation. + :type origin: str + :param properties: Any object. + :type properties: any + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationDisplay(msrest.serialization.Model): + """The object that describes the operation. + + :param provider: Friendly name of the resource provider. + :type provider: str + :param operation: For example: read, write, delete. + :type operation: str + :param resource: The resource type on which the operation is performed. + :type resource: str + :param description: The friendly name of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) + + +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. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of operations supported by the resource provider. + :type value: list[~azure.mgmt.synapse.models.Operation] + :ivar next_link: The URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + class OperationMetaLogSpecification(msrest.serialization.Model): """What is this?. @@ -3675,7 +4744,7 @@ class OperationResource(msrest.serialization.Model): "Canceled". :type status: str or ~azure.mgmt.synapse.models.OperationStatus :param properties: Operation properties. - :type properties: object + :type properties: any :param error: Errors from the operation. :type error: ~azure.mgmt.synapse.models.ErrorDetail :param start_time: Operation start time. @@ -4323,6 +5392,82 @@ def __init__( self.intervals = None +class ReadWriteDatabase(Database): + """Class representing a read write database. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.Kind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + :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 + :param hot_cache_period: The time the data should be kept in cache for fast queries in + TimeSpan. + :type hot_cache_period: ~datetime.timedelta + :ivar statistics: The statistics of the database. + :vartype statistics: ~azure.mgmt.synapse.models.DatabaseStatistics + :ivar is_followed: Indicates whether the database is followed. + :vartype is_followed: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'statistics': {'readonly': True}, + 'is_followed': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'}, + 'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'}, + 'statistics': {'key': 'properties.statistics', 'type': 'DatabaseStatistics'}, + 'is_followed': {'key': 'properties.isFollowed', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ReadWriteDatabase, self).__init__(**kwargs) + self.kind = 'ReadWrite' # type: str + self.provisioning_state = None + self.soft_delete_period = kwargs.get('soft_delete_period', None) + self.hot_cache_period = kwargs.get('hot_cache_period', None) + self.statistics = None + self.is_followed = None + + class RecommendedSensitivityLabelUpdate(ProxyResource): """A recommended sensitivity label update operation. @@ -4925,7 +6070,7 @@ class SelfHostedIntegrationRuntime(IntegrationRuntime): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -4962,7 +6107,7 @@ class SelfHostedIntegrationRuntimeNode(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar node_name: Name of the integration runtime node. :vartype node_name: str :ivar machine_name: Machine name of the integration runtime node. @@ -5085,7 +6230,7 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -5472,9 +6617,8 @@ class ServerBlobAuditingPolicy(ProxyResource): database, and should not be used in combination with other groups as this will result in duplicate audit logs. - For more information, see `Database-Level Audit Action Groups `_. + For more information, see `Database-Level Audit Action Groups + `_. For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: @@ -5498,9 +6642,8 @@ class ServerBlobAuditingPolicy(ProxyResource): SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public - For more information, see `Database-Level Audit Actions `_. + For more information, see `Database-Level Audit Actions + `_. :type audit_actions_and_groups: list[str] :param storage_account_subscription_id: Specifies the blob storage subscription Id. :type storage_account_subscription_id: str @@ -5518,8 +6661,7 @@ class ServerBlobAuditingPolicy(ProxyResource): Diagnostic Settings URI format: PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- - version=2017-05-01-preview + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview For more information, see `Diagnostic Settings REST API `_ @@ -6059,9 +7201,8 @@ class SqlPoolBlobAuditingPolicy(ProxyResource): database, and should not be used in combination with other groups as this will result in duplicate audit logs. - For more information, see `Database-Level Audit Action Groups `_. + For more information, see `Database-Level Audit Action Groups + `_. For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: @@ -6085,9 +7226,8 @@ class SqlPoolBlobAuditingPolicy(ProxyResource): SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public - For more information, see `Database-Level Audit Actions `_. + For more information, see `Database-Level Audit Actions + `_. :type audit_actions_and_groups: list[str] :param storage_account_subscription_id: Specifies the blob storage subscription Id. :type storage_account_subscription_id: str @@ -6105,8 +7245,7 @@ class SqlPoolBlobAuditingPolicy(ProxyResource): Diagnostic Settings URI format: PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- - version=2017-05-01-preview + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview For more information, see `Diagnostic Settings REST API `_ @@ -7452,6 +8591,47 @@ def __init__( self.sensitive_value = kwargs.get('sensitive_value', None) +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.synapse.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.synapse.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + class TopQueries(msrest.serialization.Model): """A database query. @@ -8070,7 +9250,7 @@ class Workspace(TrackedResource): :ivar workspace_uid: The workspace unique identifier. :vartype workspace_uid: str :ivar extra_properties: Workspace level configs and feature flags. - :vartype extra_properties: dict[str, object] + :vartype extra_properties: dict[str, any] :param managed_virtual_network_settings: Managed Virtual Network Settings. :type managed_virtual_network_settings: ~azure.mgmt.synapse.models.ManagedVirtualNetworkSettings @@ -8081,9 +9261,12 @@ class Workspace(TrackedResource): :type purview_configuration: ~azure.mgmt.synapse.models.PurviewConfiguration :ivar adla_resource_id: The ADLA resource ID. :vartype adla_resource_id: str - :param public_network_access: Enable or Disable pubic network access to workspace. Possible + :param public_network_access: Enable or Disable public network access to workspace. Possible values include: "Enabled", "Disabled". :type public_network_access: str or ~azure.mgmt.synapse.models.WorkspacePublicNetworkAccess + :param csp_workspace_admin_properties: Initial workspace AAD admin properties for a CSP + subscription. + :type csp_workspace_admin_properties: ~azure.mgmt.synapse.models.CspWorkspaceAdminProperties """ _validation = { @@ -8121,6 +9304,7 @@ class Workspace(TrackedResource): 'purview_configuration': {'key': 'properties.purviewConfiguration', 'type': 'PurviewConfiguration'}, 'adla_resource_id': {'key': 'properties.adlaResourceId', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'csp_workspace_admin_properties': {'key': 'properties.cspWorkspaceAdminProperties', 'type': 'CspWorkspaceAdminProperties'}, } def __init__( @@ -8146,6 +9330,7 @@ def __init__( self.purview_configuration = kwargs.get('purview_configuration', None) self.adla_resource_id = None self.public_network_access = kwargs.get('public_network_access', None) + self.csp_workspace_admin_properties = kwargs.get('csp_workspace_admin_properties', None) class WorkspaceAadAdminInfo(ProxyResource): @@ -8267,7 +9452,7 @@ class WorkspacePatchInfo(msrest.serialization.Model): :vartype provisioning_state: str :param encryption: The encryption details of the workspace. :type encryption: ~azure.mgmt.synapse.models.EncryptionDetails - :param public_network_access: Enable or Disable pubic network access to workspace. Possible + :param public_network_access: Enable or Disable public network access to workspace. Possible values include: "Enabled", "Disabled". :type public_network_access: str or ~azure.mgmt.synapse.models.WorkspacePublicNetworkAccess """ diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py index c8aa28cfbba2..9c94aa5a65fb 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -226,6 +226,51 @@ def __init__( self.etag = None +class AzureSku(msrest.serialization.Model): + """Azure SKU definition. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. SKU name. Possible values include: "Standard_DS13_v2+1TB_PS", + "Standard_DS13_v2+2TB_PS", "Standard_DS14_v2+3TB_PS", "Standard_DS14_v2+4TB_PS", + "Standard_D13_v2", "Standard_D14_v2", "Standard_L8s", "Standard_L16s", "Standard_L8s_v2", + "Standard_L16s_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_L4s", "Dev(No + SLA)_Standard_D11_v2", "Standard_E64i_v3", "Standard_E80ids_v4", "Standard_E2a_v4", + "Standard_E4a_v4", "Standard_E8a_v4", "Standard_E16a_v4", "Standard_E8as_v4+1TB_PS", + "Standard_E8as_v4+2TB_PS", "Standard_E16as_v4+3TB_PS", "Standard_E16as_v4+4TB_PS", "Dev(No + SLA)_Standard_E2a_v4". + :type name: str or ~azure.mgmt.synapse.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.synapse.models.AzureSkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "AzureSkuName"], + tier: Union[str, "AzureSkuTier"], + capacity: Optional[int] = None, + **kwargs + ): + super(AzureSku, self).__init__(**kwargs) + self.name = name + self.capacity = capacity + self.tier = tier + + class BigDataPoolPatchInfo(msrest.serialization.Model): """Properties patch for a Big Data pool. @@ -348,7 +393,7 @@ class BigDataPoolResourceInfo(TrackedResource): values include: "None", "Small", "Medium", "Large", "XLarge", "XXLarge", "XXXLarge". :type node_size: str or ~azure.mgmt.synapse.models.NodeSize :param node_size_family: The kind of nodes that the Big Data pool provides. Possible values - include: "None", "MemoryOptimized". + include: "None", "MemoryOptimized", "HardwareAcceleratedFPGA", "HardwareAcceleratedGPU". :type node_size_family: str or ~azure.mgmt.synapse.models.NodeSizeFamily :ivar last_succeeded_timestamp: The time when the Big Data pool was updated successfully. :vartype last_succeeded_timestamp: ~datetime.datetime @@ -521,6 +566,178 @@ def __init__( self.name = name +class CheckNameResult(msrest.serialization.Model): + """The result returned from a check name availability request. + + :param name_available: Specifies a Boolean value that indicates if the name is available. + :type name_available: bool + :param name: The name that was checked. + :type name: str + :param message: Message indicating an unavailable name due to a conflict, or a description of + the naming rules that are violated. + :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.synapse.models.Reason + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + name: Optional[str] = None, + message: Optional[str] = None, + reason: Optional[Union[str, "Reason"]] = None, + **kwargs + ): + super(CheckNameResult, self).__init__(**kwargs) + self.name_available = name_available + self.name = name + self.message = message + self.reason = reason + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class ClusterPrincipalAssignment(ProxyResource): + """Class representing a cluster principal assignment. + + 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: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :param principal_id: The principal ID assigned to the cluster principal. It can be a user + email, application ID, or security group name. + :type principal_id: str + :param role: Cluster principal role. Possible values include: "AllDatabasesAdmin", + "AllDatabasesViewer". + :type role: str or ~azure.mgmt.synapse.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.synapse.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", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'tenant_name': {'readonly': True}, + 'principal_name': {'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'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'principal_type': {'key': 'properties.principalType', 'type': 'str'}, + 'tenant_name': {'key': 'properties.tenantName', 'type': 'str'}, + 'principal_name': {'key': 'properties.principalName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + principal_id: Optional[str] = None, + role: Optional[Union[str, "ClusterPrincipalRole"]] = None, + tenant_id: Optional[str] = None, + principal_type: Optional[Union[str, "PrincipalType"]] = None, + **kwargs + ): + super(ClusterPrincipalAssignment, self).__init__(**kwargs) + self.system_data = None + self.principal_id = principal_id + self.role = role + self.tenant_id = tenant_id + self.principal_type = principal_type + self.tenant_name = None + self.principal_name = None + self.provisioning_state = None + + +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.synapse.models.ClusterPrincipalAssignment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ClusterPrincipalAssignment]'}, + } + + def __init__( + self, + *, + value: Optional[List["ClusterPrincipalAssignment"]] = None, + **kwargs + ): + super(ClusterPrincipalAssignmentListResult, self).__init__(**kwargs) + self.value = value + + class CustomSetupBase(msrest.serialization.Model): """The base definition of the custom setup. @@ -561,9 +778,9 @@ class CmdkeySetup(CustomSetupBase): :param type: Required. The type of custom setup.Constant filled by server. :type type: str :param target_name: Required. The server name of data source access. - :type target_name: object + :type target_name: any :param user_name: Required. The user name of data source access. - :type user_name: object + :type user_name: any :param password: Required. The password of data source access. :type password: ~azure.mgmt.synapse.models.SecretBase """ @@ -585,8 +802,8 @@ class CmdkeySetup(CustomSetupBase): def __init__( self, *, - target_name: object, - user_name: object, + target_name: Any, + user_name: Any, password: "SecretBase", **kwargs ): @@ -661,6 +878,27 @@ def __init__( self.restore_point_label = restore_point_label +class CspWorkspaceAdminProperties(msrest.serialization.Model): + """Initial workspace AAD admin properties for a CSP subscription. + + :param initial_workspace_admin_object_id: AAD object ID of initial workspace admin. + :type initial_workspace_admin_object_id: str + """ + + _attribute_map = { + 'initial_workspace_admin_object_id': {'key': 'initialWorkspaceAdminObjectId', 'type': 'str'}, + } + + def __init__( + self, + *, + initial_workspace_admin_object_id: Optional[str] = None, + **kwargs + ): + super(CspWorkspaceAdminProperties, self).__init__(**kwargs) + self.initial_workspace_admin_object_id = initial_workspace_admin_object_id + + class CustomerManagedKeyDetails(msrest.serialization.Model): """Details of the customer managed key associated with the workspace. @@ -670,6 +908,8 @@ class CustomerManagedKeyDetails(msrest.serialization.Model): :vartype status: str :param key: The key object of the workspace. :type key: ~azure.mgmt.synapse.models.WorkspaceKeyDetails + :param kek_identity: Key encryption key. + :type kek_identity: ~azure.mgmt.synapse.models.KekIdentityProperties """ _validation = { @@ -679,47 +919,106 @@ class CustomerManagedKeyDetails(msrest.serialization.Model): _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'key': {'key': 'key', 'type': 'WorkspaceKeyDetails'}, + 'kek_identity': {'key': 'kekIdentity', 'type': 'KekIdentityProperties'}, } def __init__( self, *, key: Optional["WorkspaceKeyDetails"] = None, + kek_identity: Optional["KekIdentityProperties"] = None, **kwargs ): super(CustomerManagedKeyDetails, self).__init__(**kwargs) self.status = None self.key = key + self.kek_identity = kek_identity -class DataLakeStorageAccountDetails(msrest.serialization.Model): - """Details of the data lake storage account associated with the workspace. +class Database(ProxyResource): + """Class representing a Kusto database. - :param account_url: Account URL. - :type account_url: str - :param filesystem: Filesystem name. - :type filesystem: str + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ReadWriteDatabase. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.Kind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + _attribute_map = { - 'account_url': {'key': 'accountUrl', 'type': 'str'}, - 'filesystem': {'key': 'filesystem', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'ReadWrite': 'ReadWriteDatabase'} } def __init__( self, *, - account_url: Optional[str] = None, - filesystem: Optional[str] = None, + location: Optional[str] = None, **kwargs ): - super(DataLakeStorageAccountDetails, self).__init__(**kwargs) - self.account_url = account_url - self.filesystem = filesystem + super(Database, self).__init__(**kwargs) + self.location = location + self.kind = 'Database' # type: str + self.system_data = None -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. +class DatabaseListResult(msrest.serialization.Model): + """The list Kusto databases operation response. + + :param value: The list of Kusto databases. + :type value: list[~azure.mgmt.synapse.models.Database] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Database]'}, + } + + def __init__( + self, + *, + value: Optional[List["Database"]] = None, + **kwargs + ): + super(DatabaseListResult, self).__init__(**kwargs) + self.value = value + + +class DatabasePrincipalAssignment(ProxyResource): + """Class representing a database principal assignment. Variables are only populated by the server, and will be ignored when sending a request. @@ -731,25 +1030,220 @@ class ProxyResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :param principal_id: The principal ID assigned to the database principal. It can be a user + email, application ID, or security group name. + :type principal_id: str + :param role: Database principal role. Possible values include: "Admin", "Ingestor", "Monitor", + "User", "UnrestrictedViewer", "Viewer". + :type role: str or ~azure.mgmt.synapse.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.synapse.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", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'tenant_name': {'readonly': True}, + 'principal_name': {'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'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'principal_type': {'key': 'properties.principalType', 'type': 'str'}, + 'tenant_name': {'key': 'properties.tenantName', 'type': 'str'}, + 'principal_name': {'key': 'properties.principalName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, + *, + principal_id: Optional[str] = None, + role: Optional[Union[str, "DatabasePrincipalRole"]] = None, + tenant_id: Optional[str] = None, + principal_type: Optional[Union[str, "PrincipalType"]] = None, **kwargs ): - super(ProxyResource, self).__init__(**kwargs) + super(DatabasePrincipalAssignment, self).__init__(**kwargs) + self.system_data = None + self.principal_id = principal_id + self.role = role + self.tenant_id = tenant_id + self.principal_type = principal_type + self.tenant_name = None + self.principal_name = None + self.provisioning_state = None + + +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.synapse.models.DatabasePrincipalAssignment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DatabasePrincipalAssignment]'}, + } + + def __init__( + self, + *, + value: Optional[List["DatabasePrincipalAssignment"]] = None, + **kwargs + ): + super(DatabasePrincipalAssignmentListResult, self).__init__(**kwargs) + self.value = value + + +class DatabaseStatistics(msrest.serialization.Model): + """A class that contains database statistics information. + + :param size: The database size - the total size of compressed data and index in bytes. + :type size: float + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'float'}, + } + + def __init__( + self, + *, + size: Optional[float] = None, + **kwargs + ): + super(DatabaseStatistics, self).__init__(**kwargs) + self.size = size + + +class DataConnection(ProxyResource): + """Class representing a data connection. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EventGridDataConnection, EventHubDataConnection, IotHubDataConnection. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.DataConnectionKind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'EventGrid': 'EventGridDataConnection', 'EventHub': 'EventHubDataConnection', 'IotHub': 'IotHubDataConnection'} + } + + def __init__( + self, + *, + location: Optional[str] = None, + **kwargs + ): + super(DataConnection, self).__init__(**kwargs) + self.location = location + self.kind = 'DataConnection' # type: str + self.system_data = None + + +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.synapse.models.DataConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["DataConnection"]] = None, + **kwargs + ): + super(DataConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class DataLakeStorageAccountDetails(msrest.serialization.Model): + """Details of the data lake storage account associated with the workspace. + + :param account_url: Account URL. + :type account_url: str + :param filesystem: Filesystem name. + :type filesystem: str + """ + + _attribute_map = { + 'account_url': {'key': 'accountUrl', 'type': 'str'}, + 'filesystem': {'key': 'filesystem', 'type': 'str'}, + } + + def __init__( + self, + *, + account_url: Optional[str] = None, + filesystem: Optional[str] = None, + **kwargs + ): + super(DataLakeStorageAccountDetails, self).__init__(**kwargs) + self.account_url = account_url + self.filesystem = filesystem class DataMaskingPolicy(ProxyResource): @@ -1228,7 +1722,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -1309,11 +1803,218 @@ class ErrorResponse(msrest.serialization.Model): def __init__( self, *, - error: Optional["ErrorDetail"] = None, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class EventGridDataConnection(DataConnection): + """Class representing an Event Grid data connection. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.DataConnectionKind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :param storage_account_resource_id: The resource ID of the storage account where the data + resides. + :type storage_account_resource_id: str + :param event_hub_resource_id: The resource ID where the event grid is configured to send + events. + :type event_hub_resource_id: str + :param consumer_group: The event hub consumer group. + :type consumer_group: str + :param table_name: The table where the data should be ingested. Optionally the table + information can be added to each message. + :type table_name: str + :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the + mapping information can be added to each message. + :type mapping_rule_name: str + :param data_format: The data format of the message. Optionally the data format can be added to + 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.synapse.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.synapse.models.BlobStorageEventType + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'event_hub_resource_id': {'key': 'properties.eventHubResourceId', 'type': 'str'}, + 'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'ignore_first_record': {'key': 'properties.ignoreFirstRecord', 'type': 'bool'}, + 'blob_storage_event_type': {'key': 'properties.blobStorageEventType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + storage_account_resource_id: Optional[str] = None, + event_hub_resource_id: Optional[str] = None, + consumer_group: Optional[str] = None, + table_name: Optional[str] = None, + mapping_rule_name: Optional[str] = None, + data_format: Optional[Union[str, "EventGridDataFormat"]] = None, + ignore_first_record: Optional[bool] = None, + blob_storage_event_type: Optional[Union[str, "BlobStorageEventType"]] = None, + **kwargs + ): + super(EventGridDataConnection, self).__init__(location=location, **kwargs) + self.kind = 'EventGrid' # type: str + self.storage_account_resource_id = storage_account_resource_id + self.event_hub_resource_id = event_hub_resource_id + self.consumer_group = consumer_group + self.table_name = table_name + self.mapping_rule_name = mapping_rule_name + self.data_format = data_format + self.ignore_first_record = ignore_first_record + self.blob_storage_event_type = blob_storage_event_type + self.provisioning_state = None + + +class EventHubDataConnection(DataConnection): + """Class representing an event hub data connection. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.DataConnectionKind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :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 + :param consumer_group: The event hub consumer group. + :type consumer_group: str + :param table_name: The table where the data should be ingested. Optionally the table + information can be added to each message. + :type table_name: str + :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the + mapping information can be added to each message. + :type mapping_rule_name: str + :param data_format: The data format of the message. Optionally the data format can be added to + 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.synapse.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". + :type compression: str or ~azure.mgmt.synapse.models.Compression + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'event_hub_resource_id': {'key': 'properties.eventHubResourceId', 'type': 'str'}, + 'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, + 'compression': {'key': 'properties.compression', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + event_hub_resource_id: Optional[str] = None, + consumer_group: Optional[str] = None, + table_name: Optional[str] = None, + mapping_rule_name: Optional[str] = None, + data_format: Optional[Union[str, "EventHubDataFormat"]] = None, + event_system_properties: Optional[List[str]] = None, + compression: Optional[Union[str, "Compression"]] = None, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = error + super(EventHubDataConnection, self).__init__(location=location, **kwargs) + self.kind = 'EventHub' # type: str + self.event_hub_resource_id = event_hub_resource_id + self.consumer_group = consumer_group + self.table_name = table_name + self.mapping_rule_name = mapping_rule_name + self.data_format = data_format + self.event_system_properties = event_system_properties + self.compression = compression + self.provisioning_state = None class ExtendedServerBlobAuditingPolicy(ProxyResource): @@ -1396,9 +2097,8 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): database, and should not be used in combination with other groups as this will result in duplicate audit logs. - For more information, see `Database-Level Audit Action Groups `_. + For more information, see `Database-Level Audit Action Groups + `_. For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: @@ -1422,9 +2122,8 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public - For more information, see `Database-Level Audit Actions `_. + For more information, see `Database-Level Audit Actions + `_. :type audit_actions_and_groups: list[str] :param storage_account_subscription_id: Specifies the blob storage subscription Id. :type storage_account_subscription_id: str @@ -1442,8 +2141,7 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): Diagnostic Settings URI format: PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- - version=2017-05-01-preview + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview For more information, see `Diagnostic Settings REST API `_ @@ -1615,9 +2313,8 @@ class ExtendedSqlPoolBlobAuditingPolicy(ProxyResource): database, and should not be used in combination with other groups as this will result in duplicate audit logs. - For more information, see `Database-Level Audit Action Groups `_. + For more information, see `Database-Level Audit Action Groups + `_. For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: @@ -1641,9 +2338,8 @@ class ExtendedSqlPoolBlobAuditingPolicy(ProxyResource): SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public - For more information, see `Database-Level Audit Actions `_. + For more information, see `Database-Level Audit Actions + `_. :type audit_actions_and_groups: list[str] :param storage_account_subscription_id: Specifies the blob storage subscription Id. :type storage_account_subscription_id: str @@ -1661,8 +2357,7 @@ class ExtendedSqlPoolBlobAuditingPolicy(ProxyResource): Diagnostic Settings URI format: PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- - version=2017-05-01-preview + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview For more information, see `Diagnostic Settings REST API `_ @@ -1865,7 +2560,7 @@ class IntegrationRuntime(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -1890,7 +2585,7 @@ class IntegrationRuntime(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, description: Optional[str] = None, **kwargs ): @@ -1931,10 +2626,10 @@ class IntegrationRuntimeComputeProperties(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param location: The location for managed integration runtime. The supported regions could be - found on https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement- - activities. + found on + https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities. :type location: str :param node_size: The node size requirement to managed integration runtime. :type node_size: str @@ -1967,7 +2662,7 @@ class IntegrationRuntimeComputeProperties(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, location: Optional[str] = None, node_size: Optional[str] = None, number_of_nodes: Optional[int] = None, @@ -1993,7 +2688,7 @@ class IntegrationRuntimeConnectionInfo(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar service_token: The token generated in service. Callers use this token to authenticate to integration runtime. :vartype service_token: str @@ -2033,7 +2728,7 @@ class IntegrationRuntimeConnectionInfo(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(IntegrationRuntimeConnectionInfo, self).__init__(**kwargs) @@ -2078,7 +2773,7 @@ class IntegrationRuntimeDataFlowProperties(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param compute_type: Compute type of the cluster which will execute data flow job. Possible values include: "General", "MemoryOptimized", "ComputeOptimized". :type compute_type: str or ~azure.mgmt.synapse.models.DataFlowComputeType @@ -2104,7 +2799,7 @@ class IntegrationRuntimeDataFlowProperties(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, compute_type: Optional[Union[str, "DataFlowComputeType"]] = None, core_count: Optional[int] = None, time_to_live: Optional[int] = None, @@ -2238,7 +2933,7 @@ class IntegrationRuntimeNodeMonitoringData(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar node_name: Name of the integration runtime node. :vartype node_name: str :ivar available_memory_in_mb: Available memory (MB) on the integration runtime node. @@ -2284,7 +2979,7 @@ class IntegrationRuntimeNodeMonitoringData(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) @@ -2411,7 +3106,7 @@ class IntegrationRuntimeSsisCatalogInfo(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param catalog_server_endpoint: The catalog database server URL. :type catalog_server_endpoint: str :param catalog_admin_user_name: The administrator user name of catalog database. @@ -2441,7 +3136,7 @@ class IntegrationRuntimeSsisCatalogInfo(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, catalog_server_endpoint: Optional[str] = None, catalog_admin_user_name: Optional[str] = None, catalog_admin_password: Optional["SecureString"] = None, @@ -2461,7 +3156,7 @@ class IntegrationRuntimeSsisProperties(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param catalog_info: Catalog information for managed dedicated integration runtime. :type catalog_info: ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogInfo :param license_type: License type for bringing your own license scenario. Possible values @@ -2495,7 +3190,7 @@ class IntegrationRuntimeSsisProperties(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, catalog_info: Optional["IntegrationRuntimeSsisCatalogInfo"] = None, license_type: Optional[Union[str, "IntegrationRuntimeLicenseType"]] = None, custom_setup_script_properties: Optional["IntegrationRuntimeCustomSetupScriptProperties"] = None, @@ -2526,7 +3221,7 @@ class IntegrationRuntimeStatus(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -2558,7 +3253,7 @@ class IntegrationRuntimeStatus(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(IntegrationRuntimeStatus, self).__init__(**kwargs) @@ -2607,7 +3302,7 @@ class IntegrationRuntimeVNetProperties(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param v_net_id: The ID of the VNet that this integration runtime will join. :type v_net_id: str :param subnet: The name of the subnet this integration runtime will join. @@ -2627,7 +3322,7 @@ class IntegrationRuntimeVNetProperties(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, v_net_id: Optional[str] = None, subnet: Optional[str] = None, public_i_ps: Optional[List[str]] = None, @@ -2640,6 +3335,105 @@ def __init__( self.public_i_ps = public_i_ps +class IotHubDataConnection(DataConnection): + """Class representing an iot hub data connection. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.DataConnectionKind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :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 + :param consumer_group: The iot hub consumer group. + :type consumer_group: str + :param table_name: The table where the data should be ingested. Optionally the table + information can be added to each message. + :type table_name: str + :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the + mapping information can be added to each message. + :type mapping_rule_name: str + :param data_format: The data format of the message. Optionally the data format can be added to + 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.synapse.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", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'iot_hub_resource_id': {'key': 'properties.iotHubResourceId', 'type': 'str'}, + 'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'}, + 'data_format': {'key': 'properties.dataFormat', 'type': 'str'}, + 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, + 'shared_access_policy_name': {'key': 'properties.sharedAccessPolicyName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + iot_hub_resource_id: Optional[str] = None, + consumer_group: Optional[str] = None, + table_name: Optional[str] = None, + mapping_rule_name: Optional[str] = None, + data_format: Optional[Union[str, "IotHubDataFormat"]] = None, + event_system_properties: Optional[List[str]] = None, + shared_access_policy_name: Optional[str] = None, + **kwargs + ): + super(IotHubDataConnection, self).__init__(location=location, **kwargs) + self.kind = 'IotHub' # type: str + self.iot_hub_resource_id = iot_hub_resource_id + self.consumer_group = consumer_group + self.table_name = table_name + self.mapping_rule_name = mapping_rule_name + self.data_format = data_format + self.event_system_properties = event_system_properties + self.shared_access_policy_name = shared_access_policy_name + self.provisioning_state = None + + class IpFirewallRuleInfo(ProxyResource): """IP firewall rule. @@ -2674,90 +3468,345 @@ class IpFirewallRuleInfo(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + end_ip_address: Optional[str] = None, + start_ip_address: Optional[str] = None, + **kwargs + ): + super(IpFirewallRuleInfo, self).__init__(**kwargs) + self.end_ip_address = end_ip_address + self.provisioning_state = None + self.start_ip_address = start_ip_address + + +class IpFirewallRuleInfoListResult(msrest.serialization.Model): + """List of IP firewall rules. + + :param next_link: Link to next page of results. + :type next_link: str + :param value: List of IP firewall rules. + :type value: list[~azure.mgmt.synapse.models.IpFirewallRuleInfo] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[IpFirewallRuleInfo]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["IpFirewallRuleInfo"]] = None, + **kwargs + ): + super(IpFirewallRuleInfoListResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class IpFirewallRuleProperties(msrest.serialization.Model): + """IP firewall rule properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param end_ip_address: The end IP address of the firewall rule. Must be IPv4 format. Must be + greater than or equal to startIpAddress. + :type end_ip_address: str + :ivar provisioning_state: Resource provisioning state. Possible values include: "Provisioning", + "Succeeded", "Deleting", "Failed", "DeleteError". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ProvisioningState + :param start_ip_address: The start IP address of the firewall rule. Must be IPv4 format. + :type start_ip_address: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'end_ip_address': {'key': 'endIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'start_ip_address': {'key': 'startIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + end_ip_address: Optional[str] = None, + start_ip_address: Optional[str] = None, + **kwargs + ): + super(IpFirewallRuleProperties, self).__init__(**kwargs) + self.end_ip_address = end_ip_address + self.provisioning_state = None + self.start_ip_address = start_ip_address + + +class KekIdentityProperties(msrest.serialization.Model): + """Key encryption key properties. + + :param user_assigned_identity: User assigned identity resource Id. + :type user_assigned_identity: str + :param use_system_assigned_identity: Boolean specifying whether to use system assigned identity + or not. + :type use_system_assigned_identity: any + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + 'use_system_assigned_identity': {'key': 'useSystemAssignedIdentity', 'type': 'object'}, + } + + def __init__( + self, + *, + user_assigned_identity: Optional[str] = None, + use_system_assigned_identity: Optional[Any] = None, + **kwargs + ): + super(KekIdentityProperties, self).__init__(**kwargs) + self.user_assigned_identity = user_assigned_identity + self.use_system_assigned_identity = use_system_assigned_identity + + +class Key(ProxyResource): + """A workspace key. + + 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 + :param is_active_cmk: Used to activate the workspace after a customer managed key is provided. + :type is_active_cmk: bool + :param key_vault_url: The Key Vault Url of the workspace key. + :type key_vault_url: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_active_cmk': {'key': 'properties.isActiveCMK', 'type': 'bool'}, + 'key_vault_url': {'key': 'properties.keyVaultUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + is_active_cmk: Optional[bool] = None, + key_vault_url: Optional[str] = None, + **kwargs + ): + super(Key, self).__init__(**kwargs) + self.is_active_cmk = is_active_cmk + self.key_vault_url = key_vault_url + + +class KeyInfoListResult(msrest.serialization.Model): + """List of keys. + + :param next_link: Link to the next page of results. + :type next_link: str + :param value: List of keys. + :type value: list[~azure.mgmt.synapse.models.Key] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Key]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["Key"]] = None, + **kwargs + ): + super(KeyInfoListResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class KustoPool(TrackedResource): + """Class representing a Kusto kusto pool. + + 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. + + :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 + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + :param sku: Required. The SKU of the kusto pool. + :type sku: ~azure.mgmt.synapse.models.AzureSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :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.synapse.models.State + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + :ivar uri: The Kusto Pool URI. + :vartype uri: str + :ivar data_ingestion_uri: The Kusto Pool data ingestion URI. + :vartype data_ingestion_uri: str + :ivar state_reason: The reason for the Kusto Pool's current state. + :vartype state_reason: str + :param engine_type: The engine type. Possible values include: "V2", "V3". + :type engine_type: str or ~azure.mgmt.synapse.models.EngineType + :param workspace_uid: The workspace unique identifier. + :type workspace_uid: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'uri': {'readonly': True}, + 'data_ingestion_uri': {'readonly': True}, + 'state_reason': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'state': {'key': 'properties.state', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'}, + 'state_reason': {'key': 'properties.stateReason', 'type': 'str'}, + 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'workspace_uid': {'key': 'properties.workspaceUid', 'type': 'str'}, } def __init__( self, *, - end_ip_address: Optional[str] = None, - start_ip_address: Optional[str] = None, + location: str, + sku: "AzureSku", + tags: Optional[Dict[str, str]] = None, + engine_type: Optional[Union[str, "EngineType"]] = None, + workspace_uid: Optional[str] = None, **kwargs ): - super(IpFirewallRuleInfo, self).__init__(**kwargs) - self.end_ip_address = end_ip_address + super(KustoPool, self).__init__(tags=tags, location=location, **kwargs) + self.sku = sku + self.etag = None + self.system_data = None + self.state = None self.provisioning_state = None - self.start_ip_address = start_ip_address + self.uri = None + self.data_ingestion_uri = None + self.state_reason = None + self.engine_type = engine_type + self.workspace_uid = workspace_uid -class IpFirewallRuleInfoListResult(msrest.serialization.Model): - """List of IP firewall rules. +class KustoPoolCheckNameRequest(msrest.serialization.Model): + """The object sent for a kusto pool check name availability request. - :param next_link: Link to next page of results. - :type next_link: str - :param value: List of IP firewall rules. - :type value: list[~azure.mgmt.synapse.models.IpFirewallRuleInfo] + 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. Kusto Pool name. + :type name: str + :ivar type: Required. The type of resource, Microsoft.Synapse/workspaces/kustoPools. Default + value: "Microsoft.Synapse/workspaces/kustoPools". + :vartype type: str """ + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[IpFirewallRuleInfo]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } + type = "Microsoft.Synapse/workspaces/kustoPools" + def __init__( self, *, - next_link: Optional[str] = None, - value: Optional[List["IpFirewallRuleInfo"]] = None, + name: str, **kwargs ): - super(IpFirewallRuleInfoListResult, self).__init__(**kwargs) - self.next_link = next_link - self.value = value - + super(KustoPoolCheckNameRequest, self).__init__(**kwargs) + self.name = name -class IpFirewallRuleProperties(msrest.serialization.Model): - """IP firewall rule properties. - Variables are only populated by the server, and will be ignored when sending a request. +class KustoPoolListResult(msrest.serialization.Model): + """The list Kusto pools operation response. - :param end_ip_address: The end IP address of the firewall rule. Must be IPv4 format. Must be - greater than or equal to startIpAddress. - :type end_ip_address: str - :ivar provisioning_state: Resource provisioning state. Possible values include: "Provisioning", - "Succeeded", "Deleting", "Failed", "DeleteError". - :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ProvisioningState - :param start_ip_address: The start IP address of the firewall rule. Must be IPv4 format. - :type start_ip_address: str + :param value: The list of Kusto pools. + :type value: list[~azure.mgmt.synapse.models.KustoPool] """ - _validation = { - 'provisioning_state': {'readonly': True}, - } - _attribute_map = { - 'end_ip_address': {'key': 'endIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'start_ip_address': {'key': 'startIpAddress', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[KustoPool]'}, } def __init__( self, *, - end_ip_address: Optional[str] = None, - start_ip_address: Optional[str] = None, + value: Optional[List["KustoPool"]] = None, **kwargs ): - super(IpFirewallRuleProperties, self).__init__(**kwargs) - self.end_ip_address = end_ip_address - self.provisioning_state = None - self.start_ip_address = start_ip_address + super(KustoPoolListResult, self).__init__(**kwargs) + self.value = value -class Key(ProxyResource): - """A workspace key. +class KustoPoolUpdate(Resource): + """Class representing an update to a Kusto kusto pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -2769,62 +3818,73 @@ class Key(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param is_active_cmk: Used to activate the workspace after a customer managed key is provided. - :type is_active_cmk: bool - :param key_vault_url: The Key Vault Url of the workspace key. - :type key_vault_url: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The SKU of the kusto pool. + :type sku: ~azure.mgmt.synapse.models.AzureSku + :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.synapse.models.State + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + :ivar uri: The Kusto Pool URI. + :vartype uri: str + :ivar data_ingestion_uri: The Kusto Pool data ingestion URI. + :vartype data_ingestion_uri: str + :ivar state_reason: The reason for the Kusto Pool's current state. + :vartype state_reason: str + :param engine_type: The engine type. Possible values include: "V2", "V3". + :type engine_type: str or ~azure.mgmt.synapse.models.EngineType + :param workspace_uid: The workspace unique identifier. + :type workspace_uid: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'uri': {'readonly': True}, + 'data_ingestion_uri': {'readonly': True}, + 'state_reason': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'is_active_cmk': {'key': 'properties.isActiveCMK', 'type': 'bool'}, - 'key_vault_url': {'key': 'properties.keyVaultUrl', 'type': 'str'}, - } - - def __init__( - self, - *, - is_active_cmk: Optional[bool] = None, - key_vault_url: Optional[str] = None, - **kwargs - ): - super(Key, self).__init__(**kwargs) - self.is_active_cmk = is_active_cmk - self.key_vault_url = key_vault_url - - -class KeyInfoListResult(msrest.serialization.Model): - """List of keys. - - :param next_link: Link to the next page of results. - :type next_link: str - :param value: List of keys. - :type value: list[~azure.mgmt.synapse.models.Key] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[Key]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'}, + 'state_reason': {'key': 'properties.stateReason', 'type': 'str'}, + 'engine_type': {'key': 'properties.engineType', 'type': 'str'}, + 'workspace_uid': {'key': 'properties.workspaceUid', 'type': 'str'}, } def __init__( self, *, - next_link: Optional[str] = None, - value: Optional[List["Key"]] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["AzureSku"] = None, + engine_type: Optional[Union[str, "EngineType"]] = None, + workspace_uid: Optional[str] = None, **kwargs ): - super(KeyInfoListResult, self).__init__(**kwargs) - self.next_link = next_link - self.value = value + super(KustoPoolUpdate, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + self.state = None + self.provisioning_state = None + self.uri = None + self.data_ingestion_uri = None + self.state_reason = None + self.engine_type = engine_type + self.workspace_uid = workspace_uid class LibraryInfo(msrest.serialization.Model): @@ -3466,7 +4526,7 @@ class ManagedIntegrationRuntime(IntegrationRuntime): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -3499,7 +4559,7 @@ class ManagedIntegrationRuntime(IntegrationRuntime): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, description: Optional[str] = None, compute_properties: Optional["IntegrationRuntimeComputeProperties"] = None, ssis_properties: Optional["IntegrationRuntimeSsisProperties"] = None, @@ -3519,7 +4579,7 @@ class ManagedIntegrationRuntimeError(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar time: The time when the error occurred. :vartype time: ~datetime.datetime :ivar code: Error code. @@ -3548,7 +4608,7 @@ class ManagedIntegrationRuntimeError(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) @@ -3566,7 +4626,7 @@ class ManagedIntegrationRuntimeNode(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar node_id: The managed integration runtime node id. :vartype node_id: str :ivar status: The managed integration runtime node status. Possible values include: "Starting", @@ -3591,7 +4651,7 @@ class ManagedIntegrationRuntimeNode(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, errors: Optional[List["ManagedIntegrationRuntimeError"]] = None, **kwargs ): @@ -3609,7 +4669,7 @@ class ManagedIntegrationRuntimeOperationResult(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar type: The operation type. Could be start or stop. :vartype type: str :ivar start_time: The start time of the operation. @@ -3646,7 +4706,7 @@ class ManagedIntegrationRuntimeOperationResult(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) @@ -3668,7 +4728,7 @@ class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -3712,7 +4772,7 @@ class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(ManagedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) @@ -3799,6 +4859,109 @@ def __init__( self.sync_interval_in_minutes = sync_interval_in_minutes +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.synapse.models.OperationDisplay + :param origin: The intended executor of the operation. + :type origin: str + :param properties: Any object. + :type properties: any + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["OperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional[Any] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class OperationDisplay(msrest.serialization.Model): + """The object that describes the operation. + + :param provider: Friendly name of the resource provider. + :type provider: str + :param operation: For example: read, write, delete. + :type operation: str + :param resource: The resource type on which the operation is performed. + :type resource: str + :param description: The friendly name of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + operation: Optional[str] = None, + resource: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.operation = operation + self.resource = resource + self.description = description + + +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. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of operations supported by the resource provider. + :type value: list[~azure.mgmt.synapse.models.Operation] + :ivar next_link: The URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Operation"]] = None, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + class OperationMetaLogSpecification(msrest.serialization.Model): """What is this?. @@ -3970,7 +5133,7 @@ class OperationResource(msrest.serialization.Model): "Canceled". :type status: str or ~azure.mgmt.synapse.models.OperationStatus :param properties: Operation properties. - :type properties: object + :type properties: any :param error: Errors from the operation. :type error: ~azure.mgmt.synapse.models.ErrorDetail :param start_time: Operation start time. @@ -3998,7 +5161,7 @@ def __init__( id: Optional[str] = None, name: Optional[str] = None, status: Optional[Union[str, "OperationStatus"]] = None, - properties: Optional[object] = None, + properties: Optional[Any] = None, error: Optional["ErrorDetail"] = None, start_time: Optional[datetime.datetime] = None, end_time: Optional[datetime.datetime] = None, @@ -4661,6 +5824,86 @@ def __init__( self.intervals = None +class ReadWriteDatabase(Database): + """Class representing a read write database. + + 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. + + :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 + :param location: Resource location. + :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.synapse.models.Kind + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.synapse.models.SystemData + :ivar provisioning_state: The provisioned state of the resource. Possible values include: + "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + :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 + :param hot_cache_period: The time the data should be kept in cache for fast queries in + TimeSpan. + :type hot_cache_period: ~datetime.timedelta + :ivar statistics: The statistics of the database. + :vartype statistics: ~azure.mgmt.synapse.models.DatabaseStatistics + :ivar is_followed: Indicates whether the database is followed. + :vartype is_followed: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'statistics': {'readonly': True}, + 'is_followed': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'}, + 'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'}, + 'statistics': {'key': 'properties.statistics', 'type': 'DatabaseStatistics'}, + 'is_followed': {'key': 'properties.isFollowed', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + soft_delete_period: Optional[datetime.timedelta] = None, + hot_cache_period: Optional[datetime.timedelta] = None, + **kwargs + ): + super(ReadWriteDatabase, self).__init__(location=location, **kwargs) + self.kind = 'ReadWrite' # type: str + self.provisioning_state = None + self.soft_delete_period = soft_delete_period + self.hot_cache_period = hot_cache_period + self.statistics = None + self.is_followed = None + + class RecommendedSensitivityLabelUpdate(ProxyResource): """A recommended sensitivity label update operation. @@ -5282,7 +6525,7 @@ class SelfHostedIntegrationRuntime(IntegrationRuntime): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -5306,7 +6549,7 @@ class SelfHostedIntegrationRuntime(IntegrationRuntime): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, description: Optional[str] = None, linked_info: Optional["LinkedIntegrationRuntimeType"] = None, **kwargs @@ -5323,7 +6566,7 @@ class SelfHostedIntegrationRuntimeNode(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :ivar node_name: Name of the integration runtime node. :vartype node_name: str :ivar machine_name: Machine name of the integration runtime node. @@ -5414,7 +6657,7 @@ class SelfHostedIntegrationRuntimeNode(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) @@ -5448,7 +6691,7 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param type: Required. Type of integration runtime.Constant filled by server. Possible values include: "Managed", "SelfHosted". :type type: str or ~azure.mgmt.synapse.models.IntegrationRuntimeType @@ -5551,7 +6794,7 @@ class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, nodes: Optional[List["SelfHostedIntegrationRuntimeNode"]] = None, links: Optional[List["LinkedIntegrationRuntime"]] = None, **kwargs @@ -5853,9 +7096,8 @@ class ServerBlobAuditingPolicy(ProxyResource): database, and should not be used in combination with other groups as this will result in duplicate audit logs. - For more information, see `Database-Level Audit Action Groups `_. + For more information, see `Database-Level Audit Action Groups + `_. For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: @@ -5879,9 +7121,8 @@ class ServerBlobAuditingPolicy(ProxyResource): SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public - For more information, see `Database-Level Audit Actions `_. + For more information, see `Database-Level Audit Actions + `_. :type audit_actions_and_groups: list[str] :param storage_account_subscription_id: Specifies the blob storage subscription Id. :type storage_account_subscription_id: str @@ -5899,8 +7140,7 @@ class ServerBlobAuditingPolicy(ProxyResource): Diagnostic Settings URI format: PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- - version=2017-05-01-preview + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview For more information, see `Diagnostic Settings REST API `_ @@ -6483,9 +7723,8 @@ class SqlPoolBlobAuditingPolicy(ProxyResource): database, and should not be used in combination with other groups as this will result in duplicate audit logs. - For more information, see `Database-Level Audit Action Groups `_. + For more information, see `Database-Level Audit Action Groups + `_. For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: @@ -6509,9 +7748,8 @@ class SqlPoolBlobAuditingPolicy(ProxyResource): SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public - For more information, see `Database-Level Audit Actions `_. + For more information, see `Database-Level Audit Actions + `_. :type audit_actions_and_groups: list[str] :param storage_account_subscription_id: Specifies the blob storage subscription Id. :type storage_account_subscription_id: str @@ -6529,8 +7767,7 @@ class SqlPoolBlobAuditingPolicy(ProxyResource): Diagnostic Settings URI format: PUT - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- - version=2017-05-01-preview + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview For more information, see `Diagnostic Settings REST API `_ @@ -7995,6 +9232,54 @@ def __init__( self.sensitive_value = sensitive_value +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.synapse.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.synapse.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + class TopQueries(msrest.serialization.Model): """A database query. @@ -8642,7 +9927,7 @@ class Workspace(TrackedResource): :ivar workspace_uid: The workspace unique identifier. :vartype workspace_uid: str :ivar extra_properties: Workspace level configs and feature flags. - :vartype extra_properties: dict[str, object] + :vartype extra_properties: dict[str, any] :param managed_virtual_network_settings: Managed Virtual Network Settings. :type managed_virtual_network_settings: ~azure.mgmt.synapse.models.ManagedVirtualNetworkSettings @@ -8653,9 +9938,12 @@ class Workspace(TrackedResource): :type purview_configuration: ~azure.mgmt.synapse.models.PurviewConfiguration :ivar adla_resource_id: The ADLA resource ID. :vartype adla_resource_id: str - :param public_network_access: Enable or Disable pubic network access to workspace. Possible + :param public_network_access: Enable or Disable public network access to workspace. Possible values include: "Enabled", "Disabled". :type public_network_access: str or ~azure.mgmt.synapse.models.WorkspacePublicNetworkAccess + :param csp_workspace_admin_properties: Initial workspace AAD admin properties for a CSP + subscription. + :type csp_workspace_admin_properties: ~azure.mgmt.synapse.models.CspWorkspaceAdminProperties """ _validation = { @@ -8693,6 +9981,7 @@ class Workspace(TrackedResource): 'purview_configuration': {'key': 'properties.purviewConfiguration', 'type': 'PurviewConfiguration'}, 'adla_resource_id': {'key': 'properties.adlaResourceId', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'csp_workspace_admin_properties': {'key': 'properties.cspWorkspaceAdminProperties', 'type': 'CspWorkspaceAdminProperties'}, } def __init__( @@ -8714,6 +10003,7 @@ def __init__( workspace_repository_configuration: Optional["WorkspaceRepositoryConfiguration"] = None, purview_configuration: Optional["PurviewConfiguration"] = None, public_network_access: Optional[Union[str, "WorkspacePublicNetworkAccess"]] = None, + csp_workspace_admin_properties: Optional["CspWorkspaceAdminProperties"] = None, **kwargs ): super(Workspace, self).__init__(tags=tags, location=location, **kwargs) @@ -8735,6 +10025,7 @@ def __init__( self.purview_configuration = purview_configuration self.adla_resource_id = None self.public_network_access = public_network_access + self.csp_workspace_admin_properties = csp_workspace_admin_properties class WorkspaceAadAdminInfo(ProxyResource): @@ -8867,7 +10158,7 @@ class WorkspacePatchInfo(msrest.serialization.Model): :vartype provisioning_state: str :param encryption: The encryption details of the workspace. :type encryption: ~azure.mgmt.synapse.models.EncryptionDetails - :param public_network_access: Enable or Disable pubic network access to workspace. Possible + :param public_network_access: Enable or Disable public network access to workspace. Possible values include: "Enabled", "Disabled". :type public_network_access: str or ~azure.mgmt.synapse.models.WorkspacePublicNetworkAccess """ diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py index 5c72a5dab071..8d33f8c251ca 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py @@ -26,6 +26,43 @@ def __getattr__(cls, name): raise AttributeError(name) +class AzureSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU name. + """ + + STANDARD_DS13_V2_1_TB_PS = "Standard_DS13_v2+1TB_PS" + STANDARD_DS13_V2_2_TB_PS = "Standard_DS13_v2+2TB_PS" + STANDARD_DS14_V2_3_TB_PS = "Standard_DS14_v2+3TB_PS" + STANDARD_DS14_V2_4_TB_PS = "Standard_DS14_v2+4TB_PS" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_L8_S = "Standard_L8s" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L8_S_V2 = "Standard_L8s_v2" + STANDARD_L16_S_V2 = "Standard_L16s_v2" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_L4_S = "Standard_L4s" + DEV_NO_SLA_STANDARD_D11_V2 = "Dev(No SLA)_Standard_D11_v2" + STANDARD_E64_I_V3 = "Standard_E64i_v3" + STANDARD_E80_IDS_V4 = "Standard_E80ids_v4" + STANDARD_E2_A_V4 = "Standard_E2a_v4" + STANDARD_E4_A_V4 = "Standard_E4a_v4" + STANDARD_E8_A_V4 = "Standard_E8a_v4" + STANDARD_E16_A_V4 = "Standard_E16a_v4" + STANDARD_E8_AS_V4_1_TB_PS = "Standard_E8as_v4+1TB_PS" + STANDARD_E8_AS_V4_2_TB_PS = "Standard_E8as_v4+2TB_PS" + STANDARD_E16_AS_V4_3_TB_PS = "Standard_E16as_v4+3TB_PS" + STANDARD_E16_AS_V4_4_TB_PS = "Standard_E16as_v4+4TB_PS" + DEV_NO_SLA_STANDARD_E2_A_V4 = "Dev(No SLA)_Standard_E2a_v4" + +class AzureSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU tier. + """ + + BASIC = "Basic" + STANDARD = "Standard" + class BlobAuditingPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT = "default" @@ -38,6 +75,20 @@ class BlobAuditingPolicyState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum ENABLED = "Enabled" DISABLED = "Disabled" +class BlobStorageEventType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The name of blob storage event type to process. + """ + + MICROSOFT_STORAGE_BLOB_CREATED = "Microsoft.Storage.BlobCreated" + MICROSOFT_STORAGE_BLOB_RENAMED = "Microsoft.Storage.BlobRenamed" + +class ClusterPrincipalRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Cluster principal role. + """ + + ALL_DATABASES_ADMIN = "AllDatabasesAdmin" + ALL_DATABASES_VIEWER = "AllDatabasesViewer" + class ColumnDataType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The column data type. """ @@ -77,10 +128,45 @@ class ColumnDataType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): XML = "xml" SYSNAME = "sysname" +class Compression(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The compression type + """ + + NONE = "None" + G_ZIP = "GZip" + class ConnectionPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT = "default" +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class DatabasePrincipalRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Database principal role. + """ + + ADMIN = "Admin" + INGESTOR = "Ingestor" + MONITOR = "Monitor" + USER = "User" + UNRESTRICTED_VIEWER = "UnrestrictedViewer" + VIEWER = "Viewer" + +class DataConnectionKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Kind of the endpoint for the data connection + """ + + EVENT_HUB = "EventHub" + EVENT_GRID = "EventGrid" + IOT_HUB = "IotHub" + class DataFlowComputeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Compute type of the cluster which will execute data flow job. """ @@ -137,6 +223,55 @@ class EncryptionProtectorName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum CURRENT = "current" +class EngineType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The engine type + """ + + V2 = "V2" + V3 = "V3" + +class EventGridDataFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The data format of the message. Optionally the data format can be added to each message. + """ + + MULTIJSON = "MULTIJSON" + JSON = "JSON" + CSV = "CSV" + TSV = "TSV" + SCSV = "SCSV" + SOHSV = "SOHSV" + PSV = "PSV" + TXT = "TXT" + RAW = "RAW" + SINGLEJSON = "SINGLEJSON" + AVRO = "AVRO" + TSVE = "TSVE" + PARQUET = "PARQUET" + ORC = "ORC" + APACHEAVRO = "APACHEAVRO" + W3_CLOGFILE = "W3CLOGFILE" + +class EventHubDataFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The data format of the message. Optionally the data format can be added to each message. + """ + + MULTIJSON = "MULTIJSON" + JSON = "JSON" + CSV = "CSV" + TSV = "TSV" + SCSV = "SCSV" + SOHSV = "SOHSV" + PSV = "PSV" + TXT = "TXT" + RAW = "RAW" + SINGLEJSON = "SINGLEJSON" + AVRO = "AVRO" + TSVE = "TSVE" + PARQUET = "PARQUET" + ORC = "ORC" + APACHEAVRO = "APACHEAVRO" + W3_CLOGFILE = "W3CLOGFILE" + class GeoBackupPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT = "Default" @@ -232,6 +367,34 @@ class IntegrationRuntimeUpdateResult(with_metaclass(_CaseInsensitiveEnumMeta, st SUCCEED = "Succeed" FAIL = "Fail" +class IotHubDataFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The data format of the message. Optionally the data format can be added to each message. + """ + + MULTIJSON = "MULTIJSON" + JSON = "JSON" + CSV = "CSV" + TSV = "TSV" + SCSV = "SCSV" + SOHSV = "SOHSV" + PSV = "PSV" + TXT = "TXT" + RAW = "RAW" + SINGLEJSON = "SINGLEJSON" + AVRO = "AVRO" + TSVE = "TSVE" + PARQUET = "PARQUET" + ORC = "ORC" + APACHEAVRO = "APACHEAVRO" + W3_CLOGFILE = "W3CLOGFILE" + +class Kind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Kind of the database + """ + + READ_WRITE = "ReadWrite" + READ_ONLY_FOLLOWING = "ReadOnlyFollowing" + class ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityActualState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Actual state """ @@ -287,6 +450,8 @@ class NodeSizeFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NONE = "None" MEMORY_OPTIMIZED = "MemoryOptimized" + HARDWARE_ACCELERATED_FPGA = "HardwareAcceleratedFPGA" + HARDWARE_ACCELERATED_GPU = "HardwareAcceleratedGPU" class OperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Operation status @@ -297,6 +462,14 @@ class OperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FAILED = "Failed" CANCELED = "Canceled" +class PrincipalType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Principal type. + """ + + APP = "App" + GROUP = "Group" + USER = "User" + class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Resource provisioning state """ @@ -344,6 +517,13 @@ class QueryObservedMetricType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum DURATION = "duration" EXECUTION_COUNT = "executionCount" +class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Message providing the reason why the given name is invalid. + """ + + INVALID = "Invalid" + ALREADY_EXISTS = "AlreadyExists" + class RecommendedSensitivityLabelUpdateKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ENABLE = "enable" @@ -375,6 +555,18 @@ class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NONE = "None" SYSTEM_ASSIGNED = "SystemAssigned" +class ResourceProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The provisioned state of the resource. + """ + + RUNNING = "Running" + CREATING = "Creating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + MOVING = "Moving" + CANCELED = "Canceled" + class RestorePointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of restore point """ @@ -445,6 +637,20 @@ class SsisObjectMetadataType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) PACKAGE = "Package" ENVIRONMENT = "Environment" +class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of the resource. + """ + + CREATING = "Creating" + UNAVAILABLE = "Unavailable" + RUNNING = "Running" + DELETING = "Deleting" + DELETED = "Deleted" + STOPPING = "Stopping" + STOPPED = "Stopped" + STARTING = "Starting" + UPDATING = "Updating" + class StorageAccountType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The storage account type used to store backups for this sql pool. """ @@ -490,7 +696,7 @@ class VulnerabilityAssessmentScanTriggerType(with_metaclass(_CaseInsensitiveEnum RECURRING = "Recurring" class WorkspacePublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Enable or Disable pubic network access to workspace + """Enable or Disable public network access to workspace """ ENABLED = "Enabled" diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py index 52f9baffdfa9..3dd6cf2928f3 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py @@ -19,6 +19,12 @@ from ._integration_runtime_monitoring_data_operations import IntegrationRuntimeMonitoringDataOperations from ._integration_runtime_status_operations import IntegrationRuntimeStatusOperations from ._keys_operations import KeysOperations +from ._kusto_operations_operations import KustoOperationsOperations +from ._kusto_pools_operations import KustoPoolsOperations +from ._databases_operations import DatabasesOperations +from ._data_connections_operations import DataConnectionsOperations +from ._kusto_pool_principal_assignments_operations import KustoPoolPrincipalAssignmentsOperations +from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations from ._library_operations import LibraryOperations from ._libraries_operations import LibrariesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations @@ -82,6 +88,12 @@ 'IntegrationRuntimeMonitoringDataOperations', 'IntegrationRuntimeStatusOperations', 'KeysOperations', + 'KustoOperationsOperations', + 'KustoPoolsOperations', + 'DatabasesOperations', + 'DataConnectionsOperations', + 'KustoPoolPrincipalAssignmentsOperations', + 'DatabasePrincipalAssignmentsOperations', 'LibraryOperations', 'LibrariesOperations', 'PrivateEndpointConnectionsOperations', diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py index 55f85e6e8a40..70e8b88f7d13 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -144,7 +144,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -152,7 +152,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -202,7 +202,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -210,7 +210,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -277,8 +277,8 @@ def begin_create_or_update( :type force: bool :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 BigDataPoolResourceInfo or the result of cls(response) @@ -315,7 +315,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -341,20 +341,20 @@ def _delete_initial( big_data_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional[object] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + # type: (...) -> Optional[Any] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -397,7 +397,7 @@ def begin_delete( big_data_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[object] + # type: (...) -> LROPoller[Any] """Delete a Big Data pool. Delete a Big Data pool from the workspace. @@ -410,16 +410,16 @@ def begin_delete( :type big_data_pool_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 object or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[object] + :return: An instance of LROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -446,7 +446,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'bigDataPoolName': self._serialize.url("big_data_pool_name", big_data_pool_name, 'str'), } @@ -490,7 +490,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -503,7 +503,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_connections_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_connections_operations.py new file mode 100644 index 000000000000..9042581ca104 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_connections_operations.py @@ -0,0 +1,640 @@ +# 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 DataConnectionsOperations(object): + """DataConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_database( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataConnectionListResult"] + """Returns the list of data connections of the given Kusto pool database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :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.synapse.models.DataConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataConnectionListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + data_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DataConnection" + """Returns a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param data_connection_name: The name of the data connection. + :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.synapse.models.DataConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + data_connection_name, # type: str + parameters, # type: "_models.DataConnection" + **kwargs # type: Any + ): + # type: (...) -> "_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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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, 'DataConnection') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + data_connection_name, # type: str + parameters, # type: "_models.DataConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DataConnection"] + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :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.synapse.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: 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.synapse.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnection"] + 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + data_connection_name=data_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('DataConnection', 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + data_connection_name, # type: str + parameters, # type: "_models.DataConnection" + **kwargs # type: Any + ): + # type: (...) -> "_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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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, 'DataConnection') + 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, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + data_connection_name, # type: str + parameters, # type: "_models.DataConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DataConnection"] + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :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.synapse.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: 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.synapse.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataConnection"] + 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + data_connection_name=data_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('DataConnection', 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + data_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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + data_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the data connection with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param data_connection_name: The name of the data connection. + :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: 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + data_connection_name=data_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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'dataConnectionName': self._serialize.url("data_connection_name", data_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py index ba786b2777ad..49f974df0a52 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py @@ -73,7 +73,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -82,7 +82,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), @@ -144,7 +144,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" accept = "application/json" @@ -152,7 +152,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py index 3417131cc694..1ba28238bd4a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py @@ -77,7 +77,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -86,7 +86,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), @@ -156,7 +156,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" accept = "application/json" @@ -164,7 +164,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), @@ -223,7 +223,7 @@ def list_by_sql_pool( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" data_masking_policy_name = "Default" accept = "application/json" @@ -237,7 +237,7 @@ def prepare_request(next_link=None): url = self.list_by_sql_pool.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataMaskingPolicyName': self._serialize.url("data_masking_policy_name", data_masking_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_database_principal_assignments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_database_principal_assignments_operations.py new file mode 100644 index 000000000000..63b5b59a99c0 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_database_principal_assignments_operations.py @@ -0,0 +1,488 @@ +# 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 DatabasePrincipalAssignmentsOperations(object): + """DatabasePrincipalAssignmentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.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, + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DatabasePrincipalAssignmentListResult"] + """Lists all Kusto pool database principalAssignments. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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 DatabasePrincipalAssignmentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.synapse.models.DatabasePrincipalAssignmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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('DatabasePrincipalAssignmentListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments'} # type: ignore + + def get( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + principal_assignment_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DatabasePrincipalAssignment" + """Gets a Kusto pool database principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_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.synapse.models.DatabasePrincipalAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatabasePrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + def _create_or_update_initial( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + principal_assignment_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.DatabasePrincipalAssignment" + **kwargs # type: Any + ): + # type: (...) -> "_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-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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, 'DatabasePrincipalAssignment') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DatabasePrincipalAssignment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DatabasePrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + def begin_create_or_update( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + principal_assignment_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.DatabasePrincipalAssignment" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DatabasePrincipalAssignment"] + """Creates a Kusto pool database principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. + :type parameters: ~azure.mgmt.synapse.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: 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.synapse.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabasePrincipalAssignment"] + 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( + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + resource_group_name=resource_group_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('DatabasePrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + def _delete_initial( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + principal_assignment_name, # type: str + resource_group_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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + def begin_delete( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + principal_assignment_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a Kusto pool principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_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( + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + resource_group_name=resource_group_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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_databases_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_databases_operations.py new file mode 100644 index 000000000000..2c1e2163f3a7 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_databases_operations.py @@ -0,0 +1,611 @@ +# 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 DatabasesOperations(object): + """DatabasesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_kusto_pool( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DatabaseListResult"] + """Returns the list of databases of the given Kusto pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_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.synapse.models.DatabaseListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_kusto_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_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('DatabaseListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_kusto_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases'} # type: ignore + + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Database" + """Returns a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :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.synapse.models.Database + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + parameters, # type: "_models.Database" + **kwargs # type: Any + ): + # type: (...) -> "_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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # 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, 'Database') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Database', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + parameters, # type: "_models.Database" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Database"] + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. + :type parameters: ~azure.mgmt.synapse.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: 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.synapse.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] + 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_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('Database', 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + parameters, # type: "_models.Database" + **kwargs # type: Any + ): + # type: (...) -> "_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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # 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, 'Database') + 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, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Database', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + parameters, # type: "_models.Database" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Database"] + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. + :type parameters: ~azure.mgmt.synapse.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: 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.synapse.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] + 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_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('Database', 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_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-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + kusto_pool_name, # type: str + database_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the database with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param database_name: The name of the database in the Kusto pool. + :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: 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, + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + database_name=database_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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py index ac156fca2476..fcde0b4d1e81 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py @@ -71,7 +71,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" blob_auditing_policy_name = "default" accept = "application/json" @@ -79,7 +79,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), @@ -139,7 +139,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" blob_auditing_policy_name = "default" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -148,7 +148,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), @@ -213,7 +213,7 @@ def list_by_sql_pool( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -226,7 +226,7 @@ def prepare_request(next_link=None): url = self.list_by_sql_pool.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py index 4d4b897f8820..41c31120b88f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py @@ -76,7 +76,7 @@ def regenerate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -84,7 +84,7 @@ def regenerate( url = self.regenerate.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -147,14 +147,14 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py index 9cc393d01508..f2784c8a86a4 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py @@ -72,14 +72,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py index dfdafc6ccdd8..eb9211a2e4e4 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py @@ -75,14 +75,14 @@ def sync( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.sync.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py index bdb234c74355..ad41ca0d0a45 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py @@ -72,14 +72,14 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py index 5c4233a58246..87e7c236ddf6 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), 'nodeName': self._serialize.url("node_name", node_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py index b44af0ef54b7..395f03b3c4f0 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), 'nodeName': self._serialize.url("node_name", node_name, 'str'), @@ -149,7 +149,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -157,7 +157,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), 'nodeName': self._serialize.url("node_name", node_name, 'str'), @@ -224,14 +224,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), 'nodeName': self._serialize.url("node_name", node_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py index b0e7a2982188..aa1d234f8bd2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py @@ -77,7 +77,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -85,7 +85,7 @@ def list( url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -136,14 +136,14 @@ def _refresh_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._refresh_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -196,8 +196,8 @@ def begin_refresh( :type integration_runtime_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 SsisObjectMetadataStatusResponse or the result of cls(response) @@ -232,7 +232,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py index e1fa76205190..b85efa01a48a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py @@ -72,14 +72,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py index e5257f10add9..f31d8fcbbda9 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py @@ -78,7 +78,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -86,7 +86,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -154,14 +154,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -211,7 +211,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -219,7 +219,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -285,8 +285,8 @@ def begin_create( :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 IntegrationRuntimeResource or the result of cls(response) @@ -323,7 +323,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -355,14 +355,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -410,8 +410,8 @@ def begin_delete( :type integration_runtime_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) @@ -443,7 +443,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -490,14 +490,14 @@ def upgrade( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.upgrade.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -550,7 +550,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -563,7 +563,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -616,14 +616,14 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._start_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -676,8 +676,8 @@ def begin_start( :type integration_runtime_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 IntegrationRuntimeStatusResponse or the result of cls(response) @@ -712,7 +712,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -744,14 +744,14 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._stop_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -799,8 +799,8 @@ def begin_stop( :type integration_runtime_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) @@ -832,7 +832,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -864,14 +864,14 @@ def _enable_interactive_query_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._enable_interactive_query_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -917,8 +917,8 @@ def begin_enable_interactive_query( :type integration_runtime_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) @@ -950,7 +950,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -982,14 +982,14 @@ def _disable_interactive_query_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._disable_interactive_query_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } @@ -1035,8 +1035,8 @@ def begin_disable_interactive_query( :type integration_runtime_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) @@ -1068,7 +1068,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py index 6833453b7dcc..4f924118215f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py @@ -70,7 +70,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -137,7 +137,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -145,7 +145,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -205,8 +205,8 @@ def begin_create_or_update( :type ip_firewall_rule_info: ~azure.mgmt.synapse.models.IpFirewallRuleInfo :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 IpFirewallRuleInfo or the result of cls(response) @@ -242,7 +242,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -268,20 +268,20 @@ def _delete_initial( rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional[object] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + # type: (...) -> Optional[Any] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -321,7 +321,7 @@ def begin_delete( rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[object] + # type: (...) -> LROPoller[Any] """Deletes a firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -332,16 +332,16 @@ def begin_delete( :type rule_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 object or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[object] + :return: An instance of LROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -368,7 +368,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -413,14 +413,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -464,7 +464,7 @@ def _replace_all_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -472,7 +472,7 @@ def _replace_all_initial( url = self._replace_all_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -526,8 +526,8 @@ def begin_replace_all( :type request: ~azure.mgmt.synapse.models.ReplaceAllIpFirewallRulesRequest :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 ReplaceAllFirewallRulesOperationResponse or the result of cls(response) @@ -562,7 +562,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py index ef18ed03df06..81dea6dd2de4 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py @@ -68,7 +68,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -147,14 +147,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'keyName': self._serialize.url("key_name", key_name, 'str'), } @@ -214,7 +214,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -222,7 +222,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'keyName': self._serialize.url("key_name", key_name, 'str'), } @@ -283,14 +283,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'keyName': self._serialize.url("key_name", key_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_operations_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_operations_operations.py new file mode 100644 index 000000000000..9847f7e3f5e1 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_operations_operations.py @@ -0,0 +1,110 @@ +# 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 KustoOperationsOperations(object): + """KustoOperationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.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, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] + """Lists available operations for the Kusto sub-resources inside Microsoft.Synapse 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.paging.ItemPaged[~azure.mgmt.synapse.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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 + # 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('OperationListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Synapse/kustooperations'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pool_principal_assignments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pool_principal_assignments_operations.py new file mode 100644 index 000000000000..bf8f57a378b4 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pool_principal_assignments_operations.py @@ -0,0 +1,466 @@ +# 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 KustoPoolPrincipalAssignmentsOperations(object): + """KustoPoolPrincipalAssignmentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.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, + workspace_name, # type: str + kusto_pool_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ClusterPrincipalAssignmentListResult"] + """Lists all Kusto pool principalAssignments. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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 ClusterPrincipalAssignmentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.synapse.models.ClusterPrincipalAssignmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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('ClusterPrincipalAssignmentListResult', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments'} # type: ignore + + def get( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + principal_assignment_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterPrincipalAssignment" + """Gets a Kusto pool principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_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.synapse.models.ClusterPrincipalAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterPrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + def _create_or_update_initial( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + principal_assignment_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.ClusterPrincipalAssignment" + **kwargs # type: Any + ): + # type: (...) -> "_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-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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, 'ClusterPrincipalAssignment') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ClusterPrincipalAssignment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ClusterPrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + def begin_create_or_update( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + principal_assignment_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.ClusterPrincipalAssignment" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ClusterPrincipalAssignment"] + """Create a Kusto pool principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param parameters: The Kusto pool principalAssignment's parameters supplied for the operation. + :type parameters: ~azure.mgmt.synapse.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: 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.synapse.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterPrincipalAssignment"] + 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( + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + principal_assignment_name=principal_assignment_name, + resource_group_name=resource_group_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('ClusterPrincipalAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + def _delete_initial( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + principal_assignment_name, # type: str + resource_group_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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore + + def begin_delete( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + principal_assignment_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a Kusto pool principalAssignment. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. + :type principal_assignment_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_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( + workspace_name=workspace_name, + kusto_pool_name=kusto_pool_name, + principal_assignment_name=principal_assignment_name, + resource_group_name=resource_group_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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'principalAssignmentName': self._serialize.url("principal_assignment_name", principal_assignment_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pools_operations.py new file mode 100644 index 000000000000..2b3b6ed8bcc0 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pools_operations.py @@ -0,0 +1,658 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.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, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class KustoPoolsOperations(object): + """KustoPoolsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.synapse.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_workspace( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.KustoPoolListResult" + """List Kusto pools. + + List all Kusto pools. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KustoPoolListResult, or the result of cls(response) + :rtype: ~azure.mgmt.synapse.models.KustoPoolListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('KustoPoolListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools'} # type: ignore + + def get( + self, + workspace_name, # type: str + kusto_pool_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.KustoPool" + """Gets a Kusto pool. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: KustoPool, or the result of cls(response) + :rtype: ~azure.mgmt.synapse.models.KustoPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + def _create_or_update_initial( + self, + workspace_name, # type: str + resource_group_name, # type: str + kusto_pool_name, # type: str + parameters, # type: "_models.KustoPool" + if_match=None, # type: Optional[str] + if_none_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.KustoPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + 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] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'KustoPool') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KustoPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + def begin_create_or_update( + self, + workspace_name, # type: str + resource_group_name, # type: str + kusto_pool_name, # type: str + parameters, # type: "_models.KustoPool" + if_match=None, # type: Optional[str] + if_none_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.KustoPool"] + """Create or update a Kusto pool. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param parameters: The Kusto pool parameters supplied to the CreateOrUpdate operation. + :type parameters: ~azure.mgmt.synapse.models.KustoPool + :param if_match: The ETag of the Kusto Pool. Omit this value to always overwrite the current + Kusto Pool. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + changes. + :type if_match: str + :param if_none_match: Set to '*' to allow a new Kusto Pool to be created, but to prevent + updating an existing Kusto Pool. Other values will result in a 412 Pre-condition Failed + response. + :type if_none_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: 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 KustoPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.synapse.models.KustoPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + 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( + workspace_name=workspace_name, + resource_group_name=resource_group_name, + kusto_pool_name=kusto_pool_name, + parameters=parameters, + if_match=if_match, + if_none_match=if_none_match, + 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('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + def _update_initial( + self, + workspace_name, # type: str + resource_group_name, # type: str + kusto_pool_name, # type: str + parameters, # type: "_models.KustoPoolUpdate" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.KustoPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + 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] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'KustoPoolUpdate') + 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, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('KustoPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + def begin_update( + self, + workspace_name, # type: str + resource_group_name, # type: str + kusto_pool_name, # type: str + parameters, # type: "_models.KustoPoolUpdate" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.KustoPool"] + """Update a Kusto Kusto Pool. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_name: str + :param parameters: The Kusto pool parameters supplied to the Update operation. + :type parameters: ~azure.mgmt.synapse.models.KustoPoolUpdate + :param if_match: The ETag of the Kusto Pool. Omit this value to always overwrite the current + Kusto Pool. 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: 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 KustoPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.synapse.models.KustoPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.KustoPool"] + 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( + workspace_name=workspace_name, + resource_group_name=resource_group_name, + kusto_pool_name=kusto_pool_name, + parameters=parameters, + if_match=if_match, + 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('KustoPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + def _delete_initial( + self, + workspace_name, # type: str + resource_group_name, # type: str + kusto_pool_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-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + def begin_delete( + self, + workspace_name, # type: str + resource_group_name, # type: str + kusto_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a Kusto pool. + + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param kusto_pool_name: The name of the Kusto pool. + :type kusto_pool_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( + workspace_name=workspace_name, + resource_group_name=resource_group_name, + kusto_pool_name=kusto_pool_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 = { + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'kustoPoolName': self._serialize.url("kusto_pool_name", kusto_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + 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.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}'} # type: ignore + + def check_name_availability( + self, + location, # type: str + kusto_pool_name, # type: "_models.KustoPoolCheckNameRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameResult" + """Checks that the kusto pool name is valid and is not already in use. + + :param location: The name of Azure region. + :type location: str + :param kusto_pool_name: The name of the cluster. + :type kusto_pool_name: ~azure.mgmt.synapse.models.KustoPoolCheckNameRequest + :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.synapse.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-06-01-preview" + 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 = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str', min_length=1), + } + 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(kusto_pool_name, 'KustoPoolCheckNameRequest') + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, 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}/providers/Microsoft.Synapse/locations/{location}/kustoPoolCheckNameAvailability'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_libraries_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_libraries_operations.py index d7e970ba964f..c33f189675ff 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_libraries_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_libraries_operations.py @@ -70,7 +70,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_library_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_library_operations.py index 3e5318c3a28c..70178507b5ef 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_library_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_library_operations.py @@ -72,14 +72,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'libraryName': self._serialize.url("library_name", library_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py index bbdc6aec3b70..138a93821630 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py @@ -66,7 +66,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -182,14 +182,14 @@ def get_location_header_result( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.get_location_header_result.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), } @@ -245,14 +245,14 @@ def get_azure_async_header_result( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.get_azure_async_header_result.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py index c47e5b4f78d9..e67d327fdb1a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py @@ -73,14 +73,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -125,7 +125,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -133,7 +133,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -193,8 +193,8 @@ def begin_create( :type request: ~azure.mgmt.synapse.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: 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 PrivateEndpointConnection or the result of cls(response) @@ -230,7 +230,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -262,14 +262,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -320,8 +320,8 @@ def begin_delete( :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: 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) @@ -356,7 +356,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -398,7 +398,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -411,7 +411,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py index 4c760588f84d..9d5074620bd1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -120,3 +120,67 @@ def get_next(next_link=None): get_next, extract_data ) list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_link_hub_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionForPrivateLinkHub" + """Get all PrivateEndpointConnection in the PrivateLinkHub by name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_link_hub_name: Name of the privateLinkHub. + :type private_link_hub_name: str + :param private_endpoint_connection_name: Name of the privateEndpointConnection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionForPrivateLinkHub, or the result of cls(response) + :rtype: ~azure.mgmt.synapse.models.PrivateEndpointConnectionForPrivateLinkHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionForPrivateLinkHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionForPrivateLinkHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hub_private_link_resources_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hub_private_link_resources_operations.py index 5527d2b58060..92953edc09c1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hub_private_link_resources_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hub_private_link_resources_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -151,14 +151,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), 'privateLinkResourceName': self._serialize.url("private_link_resource_name", private_link_resource_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py index 6eb4e9890872..bc19a158139d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py @@ -67,7 +67,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -80,7 +80,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -142,14 +142,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -205,7 +205,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -213,7 +213,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -277,7 +277,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -285,7 +285,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -335,14 +335,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -384,8 +384,8 @@ def begin_delete( :type private_link_hub_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) @@ -416,7 +416,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str'), } @@ -451,7 +451,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py index 74e7f569b513..00355792c217 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -151,14 +151,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'privateLinkResourceName': self._serialize.url("private_link_resource_name", private_link_resource_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py index 6fe9f1e894e4..a16abd07080b 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py @@ -72,14 +72,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'restorableDroppedSqlPoolId': self._serialize.url("restorable_dropped_sql_pool_id", restorable_dropped_sql_pool_id, 'str'), } @@ -133,7 +133,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py index 89c9ac54c16b..89a9b16a963f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py @@ -73,7 +73,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" blob_auditing_policy_name = "default" accept = "application/json" @@ -81,7 +81,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), @@ -143,7 +143,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" blob_auditing_policy_name = "default" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -152,7 +152,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), @@ -217,7 +217,7 @@ def list_by_sql_pool( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -230,7 +230,7 @@ def prepare_request(next_link=None): url = self.list_by_sql_pool.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py index b4c7316245e4..255770f2a4e5 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py @@ -79,14 +79,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py index 2ba0afbf0722..98ea09cf9f69 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'connectionPolicyName': self._serialize.url("connection_policy_name", connection_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_data_warehouse_user_activities_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_data_warehouse_user_activities_operations.py index 6d33f063a76b..c057485d4b71 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_data_warehouse_user_activities_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_data_warehouse_user_activities_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'dataWarehouseUserActivityName': self._serialize.url("data_warehouse_user_activity_name", data_warehouse_user_activity_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py index d2ec661b3a66..eb72748f2207 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -86,7 +86,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -159,7 +159,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -167,7 +167,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'geoBackupPolicyName': self._serialize.url("geo_backup_policy_name", geo_backup_policy_name, 'str'), @@ -238,14 +238,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'geoBackupPolicyName': self._serialize.url("geo_backup_policy_name", geo_backup_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_window_options_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_window_options_operations.py index 15eee7ffbc67..c1c185b22afb 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_window_options_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_window_options_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_windows_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_windows_operations.py index a9f6376dc8b7..dbaeca9f315a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_windows_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_maintenance_windows_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -149,14 +149,14 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py index 762a0e0736d7..ebf4f6ffd448 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py @@ -72,14 +72,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -143,7 +143,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -151,7 +151,7 @@ def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py index bfac9be3384e..4840cfb5f6e2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py @@ -52,7 +52,7 @@ def get_location_header_result( operation_id, # type: str **kwargs # type: Any ): - # type: (...) -> object + # type: (...) -> Any """Get SQL pool operation status. Get the status of a SQL pool operation. @@ -66,23 +66,23 @@ def get_location_header_result( :param operation_id: Operation ID. :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: object, or the result of cls(response) - :rtype: object + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.get_location_header_result.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operations_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operations_operations.py index 12d5919ed749..f7fb36c9b99e 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operations_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operations_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -86,7 +86,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_recommended_sensitivity_labels_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_recommended_sensitivity_labels_operations.py index 5bf7f39abd72..2a052817bfeb 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_recommended_sensitivity_labels_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_recommended_sensitivity_labels_operations.py @@ -73,14 +73,14 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py index 522f59d367b3..9dfd9df8a8e8 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -86,7 +86,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -158,14 +158,14 @@ def get_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.get_by_name.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'linkId': self._serialize.url("link_id", link_id, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py index a00fb7533b16..7d60126b6079 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -88,7 +88,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -143,7 +143,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -151,7 +151,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -211,8 +211,8 @@ def begin_create( :type parameters: ~azure.mgmt.synapse.models.CreateSqlPoolRestorePointDefinition :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 RestorePoint or the result of cls(response) @@ -248,7 +248,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -296,14 +296,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'restorePointName': self._serialize.url("restore_point_name", restore_point_name, 'str'), @@ -363,13 +363,13 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'restorePointName': self._serialize.url("restore_point_name", restore_point_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py index 2d066a41508c..ae69281be33c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py @@ -76,7 +76,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -89,7 +89,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -160,14 +160,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py index bb5a7df30078..9b0f9bbfdd86 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -86,7 +86,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -157,14 +157,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), @@ -229,7 +229,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -237,7 +237,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py index 088710c68f6b..4e79dee223cf 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py @@ -76,7 +76,7 @@ def list_current( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -89,7 +89,7 @@ def prepare_request(next_link=None): url = self.list_current.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -161,14 +161,14 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -237,7 +237,7 @@ def list_recommended( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -250,7 +250,7 @@ def prepare_request(next_link=None): url = self.list_recommended.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -334,7 +334,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" sensitivity_label_source = "current" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -343,7 +343,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -420,14 +420,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" sensitivity_label_source = "current" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -495,14 +495,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -572,14 +572,14 @@ def enable_recommendation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" sensitivity_label_source = "recommended" # Construct URL url = self.enable_recommendation.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -644,14 +644,14 @@ def disable_recommendation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" sensitivity_label_source = "recommended" # Construct URL url = self.disable_recommendation.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_table_columns_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_table_columns_operations.py index 2ee42a47c290..04d42e60a22f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_table_columns_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_table_columns_operations.py @@ -82,7 +82,7 @@ def list_by_table_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -95,7 +95,7 @@ def prepare_request(next_link=None): url = self.list_by_table_name.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py index 61158990a484..82c72ffbe5d5 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py @@ -79,7 +79,7 @@ def list_by_schema( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -92,7 +92,7 @@ def prepare_request(next_link=None): url = self.list_by_schema.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), @@ -167,14 +167,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py index 968febe0246a..a3ec9aeab480 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py @@ -77,14 +77,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'transparentDataEncryptionName': self._serialize.url("transparent_data_encryption_name", transparent_data_encryption_name, 'str'), @@ -152,7 +152,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -160,7 +160,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'transparentDataEncryptionName': self._serialize.url("transparent_data_encryption_name", transparent_data_encryption_name, 'str'), @@ -228,7 +228,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -241,7 +241,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py index af011a3010a5..ccf631917cf9 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -86,7 +86,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py index 9aa23ef6f2e9..0db77b96c2b9 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py @@ -83,7 +83,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -91,7 +91,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -164,13 +164,13 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -235,14 +235,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py index 2bd15e424944..cb2384fa3498 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py @@ -78,7 +78,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -91,7 +91,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -147,13 +147,13 @@ def _initiate_scan_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self._initiate_scan_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -205,8 +205,8 @@ def begin_initiate_scan( :type scan_id: 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) @@ -240,7 +240,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -293,14 +293,14 @@ def export( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self.export.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -368,14 +368,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py index 970d425de493..554c0a77cc42 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -86,7 +86,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -157,14 +157,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -229,7 +229,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -237,7 +237,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), @@ -307,13 +307,13 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py index 28c60e2187e6..86c1eb11fe6c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py @@ -81,14 +81,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -136,7 +136,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -144,7 +144,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -214,8 +214,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.WorkloadClassifier :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 WorkloadClassifier or the result of cls(response) @@ -253,7 +253,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -289,13 +289,13 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -349,8 +349,8 @@ def begin_delete( :type workload_classifier_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) @@ -384,7 +384,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -436,7 +436,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -449,7 +449,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py index 9155129e134e..42c0e664b4b7 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py @@ -78,14 +78,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -131,7 +131,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -139,7 +139,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -205,8 +205,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.WorkloadGroup :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 WorkloadGroup or the result of cls(response) @@ -243,7 +243,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -277,13 +277,13 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -333,8 +333,8 @@ def begin_delete( :type workload_group_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) @@ -367,7 +367,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), @@ -415,7 +415,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -428,7 +428,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py index a53ff3b619f3..c9543ad416c6 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -144,7 +144,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -152,7 +152,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -203,7 +203,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -211,7 +211,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -271,8 +271,8 @@ def begin_create( :type sql_pool_info: ~azure.mgmt.synapse.models.SqlPool :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 SqlPool or the result of cls(response) @@ -308,7 +308,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -334,20 +334,20 @@ def _delete_initial( sql_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional[object] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + # type: (...) -> Optional[Any] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -390,7 +390,7 @@ def begin_delete( sql_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[object] + # type: (...) -> LROPoller[Any] """Delete SQL pool. Delete a SQL pool. @@ -403,16 +403,16 @@ def begin_delete( :type sql_pool_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 object or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[object] + :return: An instance of LROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -439,7 +439,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -483,7 +483,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -496,7 +496,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -543,20 +543,20 @@ def _pause_initial( sql_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional[object] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + # type: (...) -> Optional[Any] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._pause_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -596,7 +596,7 @@ def begin_pause( sql_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[object] + # type: (...) -> LROPoller[Any] """Pause SQL pool. Pause a SQL pool. @@ -609,16 +609,16 @@ def begin_pause( :type sql_pool_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 object or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[object] + :return: An instance of LROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -645,7 +645,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -671,20 +671,20 @@ def _resume_initial( sql_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional[object] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + # type: (...) -> Optional[Any] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" # Construct URL url = self._resume_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -724,7 +724,7 @@ def begin_resume( sql_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[object] + # type: (...) -> LROPoller[Any] """Resume SQL pool. Resume a SQL pool. @@ -737,16 +737,16 @@ def begin_resume( :type sql_pool_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 object or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[object] + :return: An instance of LROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -773,7 +773,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } @@ -823,14 +823,14 @@ def rename( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") # Construct URL url = self.rename.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py index 9899db3d52fd..7678e00007f8 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py @@ -69,14 +69,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -119,7 +119,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -127,7 +127,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -183,8 +183,8 @@ def begin_create_or_update( :type aad_admin_info: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo :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 WorkspaceAadAdminInfo or the result of cls(response) @@ -219,7 +219,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -249,14 +249,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -298,8 +298,8 @@ def begin_delete( :type workspace_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) @@ -330,7 +330,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py index 3f1bbe3a015c..2c0075a0fde0 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_identity_sql_control_settings_operations.py @@ -71,14 +71,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -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-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -129,7 +129,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -185,8 +185,8 @@ def begin_create_or_update( :type managed_identity_sql_control_settings: ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModel :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 ManagedIdentitySqlControlSettingsModel or the result of cls(response) @@ -221,7 +221,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py index ac62a823c52c..9ae7722fb1ef 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -126,7 +126,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -134,7 +134,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -193,8 +193,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.ServerBlobAuditingPolicy :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 ServerBlobAuditingPolicy or the result of cls(response) @@ -230,7 +230,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -274,7 +274,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -287,7 +287,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py index 19915d27cecb..b1b1dd94eb51 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } @@ -127,7 +127,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -135,7 +135,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } @@ -195,8 +195,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.EncryptionProtector :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 EncryptionProtector or the result of cls(response) @@ -232,7 +232,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } @@ -276,7 +276,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -289,7 +289,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -341,13 +341,13 @@ def _revalidate_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self._revalidate_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } @@ -393,8 +393,8 @@ def begin_revalidate( :type encryption_protector_name: str or ~azure.mgmt.synapse.models.EncryptionProtectorName :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) @@ -426,7 +426,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'encryptionProtectorName': self._serialize.url("encryption_protector_name", encryption_protector_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py index 85c053e4d2f2..3b4afa0e023d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -126,7 +126,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -134,7 +134,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -193,8 +193,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.ExtendedServerBlobAuditingPolicy :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 ExtendedServerBlobAuditingPolicy or the result of cls(response) @@ -230,7 +230,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'blobAuditingPolicyName': self._serialize.url("blob_auditing_policy_name", blob_auditing_policy_name, 'str'), } @@ -274,7 +274,7 @@ def list_by_workspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -287,7 +287,7 @@ def prepare_request(next_link=None): url = self.list_by_workspace.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py index d162b2bdf1ee..f6bbc01d2210 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sql_pools_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -150,14 +150,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py index 94ff08c35e69..1160365059bb 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py @@ -75,14 +75,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), } @@ -126,7 +126,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -134,7 +134,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), } @@ -193,8 +193,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.synapse.models.ServerSecurityAlertPolicy :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 ServerSecurityAlertPolicy or the result of cls(response) @@ -230,7 +230,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'securityAlertPolicyName': self._serialize.url("security_alert_policy_name", security_alert_policy_name, 'str'), } @@ -274,7 +274,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -287,7 +287,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py index 4586ab75b6ec..b2d4779cceda 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py index f0a6744908c2..8662a2088d4e 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py @@ -73,14 +73,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), } @@ -141,7 +141,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -149,7 +149,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), } @@ -215,13 +215,13 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'vulnerabilityAssessmentName': self._serialize.url("vulnerability_assessment_name", vulnerability_assessment_name, 'str'), } @@ -272,7 +272,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -285,7 +285,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py index 844a5238d0fa..c4c9b4fdf75b 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py @@ -69,14 +69,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -119,7 +119,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -127,7 +127,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -183,8 +183,8 @@ def begin_create_or_update( :type aad_admin_info: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo :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 WorkspaceAadAdminInfo or the result of cls(response) @@ -219,7 +219,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -249,14 +249,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -298,8 +298,8 @@ def begin_delete( :type workspace_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) @@ -330,7 +330,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py index 8de5cd4dd3e8..5ce39182318c 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py @@ -67,7 +67,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -80,7 +80,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -142,14 +142,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -192,7 +192,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -200,7 +200,7 @@ def _update_initial( url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -256,8 +256,8 @@ def begin_update( :type workspace_patch_info: ~azure.mgmt.synapse.models.WorkspacePatchInfo :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 Workspace or the result of cls(response) @@ -292,7 +292,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -323,7 +323,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -331,7 +331,7 @@ def _create_or_update_initial( 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -387,8 +387,8 @@ def begin_create_or_update( :type workspace_info: ~azure.mgmt.synapse.models.Workspace :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 Workspace or the result of cls(response) @@ -423,7 +423,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -447,20 +447,20 @@ def _delete_initial( workspace_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional[object] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]] + # type: (...) -> Optional[Any] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" 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', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -501,7 +501,7 @@ def begin_delete( workspace_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[object] + # type: (...) -> LROPoller[Any] """Deletes a workspace. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -510,16 +510,16 @@ def begin_delete( :type workspace_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 object or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[object] + :return: An instance of LROPoller that returns either any or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[any] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -545,7 +545,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), } @@ -580,7 +580,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None):