From a48631840253c5992bfa8a78300a45b1f14c0ad0 Mon Sep 17 00:00:00 2001 From: Xiang Yan Date: Mon, 3 Jan 2022 14:13:26 -0800 Subject: [PATCH 1/3] synapse artifacts jan updates --- .../azure/synapse/artifacts/__init__.py | 9 +- .../synapse/artifacts/_artifacts_client.py | 5 +- .../azure/synapse/artifacts/_patch.py | 31 ++ .../azure/synapse/artifacts/aio/__init__.py | 9 +- .../artifacts/aio/_artifacts_client.py | 5 +- .../azure/synapse/artifacts/aio/_patch.py | 31 ++ .../artifacts/aio/operations/__init__.py | 2 + .../_data_flow_debug_session_operations.py | 16 +- .../aio/operations/_data_flow_operations.py | 8 +- .../aio/operations/_dataset_operations.py | 8 +- .../aio/operations/_kql_script_operations.py | 8 +- .../aio/operations/_library_operations.py | 4 +- .../operations/_linked_service_operations.py | 8 +- .../aio/operations/_metastore_operations.py | 281 ++++++++++++ .../aio/operations/_notebook_operations.py | 8 +- .../aio/operations/_pipeline_operations.py | 14 +- .../operations/_pipeline_run_operations.py | 8 +- .../_spark_configuration_operations.py | 8 +- .../_spark_job_definition_operations.py | 12 +- .../aio/operations/_sql_script_operations.py | 8 +- .../aio/operations/_trigger_operations.py | 4 +- .../aio/operations/_trigger_run_operations.py | 4 +- ...orkspace_git_repo_management_operations.py | 4 +- .../synapse/artifacts/models/__init__.py | 24 + .../models/_artifacts_client_enums.py | 25 + .../azure/synapse/artifacts/models/_models.py | 230 +++++++++- .../synapse/artifacts/models/_models_py3.py | 248 +++++++++- .../synapse/artifacts/operations/__init__.py | 2 + .../operations/_big_data_pools_operations.py | 1 + .../_data_flow_debug_session_operations.py | 17 +- .../operations/_data_flow_operations.py | 9 +- .../operations/_dataset_operations.py | 9 +- .../_integration_runtimes_operations.py | 1 + .../operations/_kql_script_operations.py | 9 +- .../operations/_kql_scripts_operations.py | 1 + .../operations/_library_operations.py | 5 +- .../operations/_linked_service_operations.py | 9 +- .../operations/_metastore_operations.py | 431 ++++++++++++++++++ .../_notebook_operation_result_operations.py | 1 + .../operations/_notebook_operations.py | 9 +- .../operations/_pipeline_operations.py | 15 +- .../operations/_pipeline_run_operations.py | 9 +- .../_spark_configuration_operations.py | 9 +- .../_spark_job_definition_operations.py | 13 +- .../operations/_sql_pools_operations.py | 1 + .../operations/_sql_script_operations.py | 9 +- .../operations/_trigger_operations.py | 5 +- .../operations/_trigger_run_operations.py | 5 +- ...orkspace_git_repo_management_operations.py | 5 +- .../operations/_workspace_operations.py | 1 + 50 files changed, 1417 insertions(+), 181 deletions(-) create mode 100644 sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_patch.py create mode 100644 sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_patch.py create mode 100644 sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_metastore_operations.py create mode 100644 sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_metastore_operations.py diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/__init__.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/__init__.py index 03703237ffc5..f89de51ed5f0 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/__init__.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/__init__.py @@ -12,8 +12,7 @@ __version__ = VERSION __all__ = ['ArtifactsClient'] -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_artifacts_client.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_artifacts_client.py index 62e7a60fb6ec..976dca409c84 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_artifacts_client.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_artifacts_client.py @@ -14,7 +14,7 @@ from . import models from ._configuration import ArtifactsClientConfiguration -from .operations import BigDataPoolsOperations, DataFlowDebugSessionOperations, DataFlowOperations, DatasetOperations, IntegrationRuntimesOperations, KqlScriptOperations, KqlScriptsOperations, LibraryOperations, LinkedServiceOperations, NotebookOperationResultOperations, NotebookOperations, PipelineOperations, PipelineRunOperations, SparkConfigurationOperations, SparkJobDefinitionOperations, SqlPoolsOperations, SqlScriptOperations, TriggerOperations, TriggerRunOperations, WorkspaceGitRepoManagementOperations, WorkspaceOperations +from .operations import BigDataPoolsOperations, DataFlowDebugSessionOperations, DataFlowOperations, DatasetOperations, IntegrationRuntimesOperations, KqlScriptOperations, KqlScriptsOperations, LibraryOperations, LinkedServiceOperations, MetastoreOperations, NotebookOperationResultOperations, NotebookOperations, PipelineOperations, PipelineRunOperations, SparkConfigurationOperations, SparkJobDefinitionOperations, SqlPoolsOperations, SqlScriptOperations, TriggerOperations, TriggerRunOperations, WorkspaceGitRepoManagementOperations, WorkspaceOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,6 +30,8 @@ class ArtifactsClient(object): :vartype kql_scripts: azure.synapse.artifacts.operations.KqlScriptsOperations :ivar kql_script: KqlScriptOperations operations :vartype kql_script: azure.synapse.artifacts.operations.KqlScriptOperations + :ivar metastore: MetastoreOperations operations + :vartype metastore: azure.synapse.artifacts.operations.MetastoreOperations :ivar spark_configuration: SparkConfigurationOperations operations :vartype spark_configuration: azure.synapse.artifacts.operations.SparkConfigurationOperations :ivar big_data_pools: BigDataPoolsOperations operations @@ -97,6 +99,7 @@ def __init__( self._serialize.client_side_validation = False self.kql_scripts = KqlScriptsOperations(self._client, self._config, self._serialize, self._deserialize) self.kql_script = KqlScriptOperations(self._client, self._config, self._serialize, self._deserialize) + self.metastore = MetastoreOperations(self._client, self._config, self._serialize, self._deserialize) self.spark_configuration = SparkConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) self.big_data_pools = BigDataPoolsOperations(self._client, self._config, self._serialize, self._deserialize) self.data_flow = DataFlowOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_patch.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/__init__.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/__init__.py index 0a8d3bc734b7..0b03ea9fdf7e 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/__init__.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/__init__.py @@ -9,8 +9,7 @@ from ._artifacts_client import ArtifactsClient __all__ = ['ArtifactsClient'] -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_artifacts_client.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_artifacts_client.py index b682aff5cb96..db94f3a17dc4 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_artifacts_client.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_artifacts_client.py @@ -15,7 +15,7 @@ from .. import models from ._configuration import ArtifactsClientConfiguration -from .operations import BigDataPoolsOperations, DataFlowDebugSessionOperations, DataFlowOperations, DatasetOperations, IntegrationRuntimesOperations, KqlScriptOperations, KqlScriptsOperations, LibraryOperations, LinkedServiceOperations, NotebookOperationResultOperations, NotebookOperations, PipelineOperations, PipelineRunOperations, SparkConfigurationOperations, SparkJobDefinitionOperations, SqlPoolsOperations, SqlScriptOperations, TriggerOperations, TriggerRunOperations, WorkspaceGitRepoManagementOperations, WorkspaceOperations +from .operations import BigDataPoolsOperations, DataFlowDebugSessionOperations, DataFlowOperations, DatasetOperations, IntegrationRuntimesOperations, KqlScriptOperations, KqlScriptsOperations, LibraryOperations, LinkedServiceOperations, MetastoreOperations, NotebookOperationResultOperations, NotebookOperations, PipelineOperations, PipelineRunOperations, SparkConfigurationOperations, SparkJobDefinitionOperations, SqlPoolsOperations, SqlScriptOperations, TriggerOperations, TriggerRunOperations, WorkspaceGitRepoManagementOperations, WorkspaceOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -28,6 +28,8 @@ class ArtifactsClient: :vartype kql_scripts: azure.synapse.artifacts.aio.operations.KqlScriptsOperations :ivar kql_script: KqlScriptOperations operations :vartype kql_script: azure.synapse.artifacts.aio.operations.KqlScriptOperations + :ivar metastore: MetastoreOperations operations + :vartype metastore: azure.synapse.artifacts.aio.operations.MetastoreOperations :ivar spark_configuration: SparkConfigurationOperations operations :vartype spark_configuration: azure.synapse.artifacts.aio.operations.SparkConfigurationOperations @@ -97,6 +99,7 @@ def __init__( self._serialize.client_side_validation = False self.kql_scripts = KqlScriptsOperations(self._client, self._config, self._serialize, self._deserialize) self.kql_script = KqlScriptOperations(self._client, self._config, self._serialize, self._deserialize) + self.metastore = MetastoreOperations(self._client, self._config, self._serialize, self._deserialize) self.spark_configuration = SparkConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) self.big_data_pools = BigDataPoolsOperations(self._client, self._config, self._serialize, self._deserialize) self.data_flow = DataFlowOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_patch.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/__init__.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/__init__.py index 7b2bd054134a..2589ba343fe0 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/__init__.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/__init__.py @@ -8,6 +8,7 @@ from ._kql_scripts_operations import KqlScriptsOperations from ._kql_script_operations import KqlScriptOperations +from ._metastore_operations import MetastoreOperations from ._spark_configuration_operations import SparkConfigurationOperations from ._big_data_pools_operations import BigDataPoolsOperations from ._data_flow_operations import DataFlowOperations @@ -31,6 +32,7 @@ __all__ = [ 'KqlScriptsOperations', 'KqlScriptOperations', + 'MetastoreOperations', 'SparkConfigurationOperations', 'BigDataPoolsOperations', 'DataFlowOperations', diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_data_flow_debug_session_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_data_flow_debug_session_operations.py index fb999f569896..19ed23c012fc 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_data_flow_debug_session_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_data_flow_debug_session_operations.py @@ -61,12 +61,12 @@ async def _create_data_flow_debug_session_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(request, 'CreateDataFlowDebugSessionRequest') + _json = self._serialize.body(request, 'CreateDataFlowDebugSessionRequest') request = build_create_data_flow_debug_session_request_initial( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._create_data_flow_debug_session_initial.metadata['url'], ) request = _convert_request(request) @@ -280,12 +280,12 @@ async def add_data_flow( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(request, 'DataFlowDebugPackage') + _json = self._serialize.body(request, 'DataFlowDebugPackage') request = build_add_data_flow_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.add_data_flow.metadata['url'], ) request = _convert_request(request) @@ -339,12 +339,12 @@ async def delete_data_flow_debug_session( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(request, 'DeleteDataFlowDebugSessionRequest') + _json = self._serialize.body(request, 'DeleteDataFlowDebugSessionRequest') request = build_delete_data_flow_debug_session_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.delete_data_flow_debug_session.metadata['url'], ) request = _convert_request(request) @@ -381,12 +381,12 @@ async def _execute_command_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(request, 'DataFlowDebugCommandRequest') + _json = self._serialize.body(request, 'DataFlowDebugCommandRequest') request = build_execute_command_request_initial( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._execute_command_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_data_flow_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_data_flow_operations.py index fa71f73ed31b..7af36f8a0260 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_data_flow_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_data_flow_operations.py @@ -64,13 +64,13 @@ async def _create_or_update_data_flow_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _data_flow = _models.DataFlowResource(properties=properties) - json = self._serialize.body(_data_flow, 'DataFlowResource') + _json = self._serialize.body(_data_flow, 'DataFlowResource') request = build_create_or_update_data_flow_request_initial( data_flow_name=data_flow_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_data_flow_initial.metadata['url'], ) @@ -361,13 +361,13 @@ async def _rename_data_flow_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_data_flow_request_initial( data_flow_name=data_flow_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_data_flow_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_dataset_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_dataset_operations.py index 7c00b71fbf05..4be832c7b75b 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_dataset_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_dataset_operations.py @@ -144,13 +144,13 @@ async def _create_or_update_dataset_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _dataset = _models.DatasetResource(properties=properties) - json = self._serialize.body(_dataset, 'DatasetResource') + _json = self._serialize.body(_dataset, 'DatasetResource') request = build_create_or_update_dataset_request_initial( dataset_name=dataset_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_dataset_initial.metadata['url'], ) @@ -443,13 +443,13 @@ async def _rename_dataset_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_dataset_request_initial( dataset_name=dataset_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_dataset_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_kql_script_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_kql_script_operations.py index b1d7a182edff..7e407e9d8327 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_kql_script_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_kql_script_operations.py @@ -60,13 +60,13 @@ async def _create_or_update_initial( api_version = kwargs.pop('api_version', "2021-11-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(kql_script, 'KqlScriptResource') + _json = self._serialize.body(kql_script, 'KqlScriptResource') request = build_create_or_update_request_initial( kql_script_name=kql_script_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._create_or_update_initial.metadata['url'], ) request = _convert_request(request) @@ -346,13 +346,13 @@ async def _rename_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _rename_request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_rename_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_rename_request, 'ArtifactRenameRequest') request = build_rename_request_initial( kql_script_name=kql_script_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_library_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_library_operations.py index 6cb1665acb65..bee38d92c7bd 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_library_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_library_operations.py @@ -634,14 +634,14 @@ async def append( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/octet-stream") # type: Optional[str] - content = content + _content = content request = build_append_request( library_name=library_name, comp=comp, api_version=api_version, content_type=content_type, - content=content, + content=_content, blob_condition_append_position=blob_condition_append_position, template_url=self.append.metadata['url'], ) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_linked_service_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_linked_service_operations.py index 19e89dd75d3f..4ccd3bf2aa46 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_linked_service_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_linked_service_operations.py @@ -145,13 +145,13 @@ async def _create_or_update_linked_service_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _linked_service = _models.LinkedServiceResource(properties=properties) - json = self._serialize.body(_linked_service, 'LinkedServiceResource') + _json = self._serialize.body(_linked_service, 'LinkedServiceResource') request = build_create_or_update_linked_service_request_initial( linked_service_name=linked_service_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_linked_service_initial.metadata['url'], ) @@ -446,13 +446,13 @@ async def _rename_linked_service_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_linked_service_request_initial( linked_service_name=linked_service_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_linked_service_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_metastore_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_metastore_operations.py new file mode 100644 index 000000000000..5dc8f5bc6167 --- /dev/null +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_metastore_operations.py @@ -0,0 +1,281 @@ +# 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. +# -------------------------------------------------------------------------- +import functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._metastore_operations import build_delete_request, build_get_database_operations_request, build_register_request, build_update_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MetastoreOperations: + """MetastoreOperations 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.synapse.artifacts.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 + + @distributed_trace_async + async def register( + self, + id: str, + input_folder: str, + **kwargs: Any + ) -> "_models.MetastoreRegistrationResponse": + """Register files in Syms. + + :param id: The name of the database to be created. The name can contain only alphanumeric + characters and should not exceed 24 characters. + :type id: str + :param input_folder: The input folder containing CDM files. + :type input_folder: str + :keyword api_version: Api Version. The default value is "2021-07-01-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MetastoreRegistrationResponse, or the result of cls(response) + :rtype: ~azure.synapse.artifacts.models.MetastoreRegistrationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MetastoreRegistrationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _register_body = _models.MetastoreRegisterObject(input_folder=input_folder) + _json = self._serialize.body(_register_body, 'MetastoreRegisterObject') + + request = build_register_request( + id=id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.register.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('MetastoreRegistrationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + register.metadata = {'url': '/metastore/create-database-operations/{id}'} # type: ignore + + + @distributed_trace_async + async def get_database_operations( + self, + id: str, + **kwargs: Any + ) -> "_models.MetastoreRequestSuccessResponse": + """Gets status of the database. + + :param id: + :type id: str + :keyword api_version: Api Version. The default value is "2021-07-01-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MetastoreRequestSuccessResponse, or the result of cls(response) + :rtype: ~azure.synapse.artifacts.models.MetastoreRequestSuccessResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MetastoreRequestSuccessResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + + + request = build_get_database_operations_request( + id=id, + api_version=api_version, + template_url=self.get_database_operations.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + 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.ErrorContract, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('MetastoreRequestSuccessResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_database_operations.metadata = {'url': '/metastore/create-database-operations/{id}'} # type: ignore + + + @distributed_trace_async + async def update( + self, + id: str, + input_folder: str, + **kwargs: Any + ) -> "_models.MetastoreUpdationResponse": + """Update files in Syms. + + :param id: The name of the database to be updated. + :type id: str + :param input_folder: The input folder containing CDM files. + :type input_folder: str + :keyword api_version: Api Version. The default value is "2021-07-01-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MetastoreUpdationResponse, or the result of cls(response) + :rtype: ~azure.synapse.artifacts.models.MetastoreUpdationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MetastoreUpdationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _update_body = _models.MetastoreUpdateObject(input_folder=input_folder) + _json = self._serialize.body(_update_body, 'MetastoreUpdateObject') + + request = build_update_request( + id=id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('MetastoreUpdationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': '/metastore/update-database-operations/{id}'} # type: ignore + + + @distributed_trace_async + async def delete( + self, + id: str, + **kwargs: Any + ) -> None: + """Remove files in Syms. + + :param id: + :type id: str + :keyword api_version: Api Version. The default value is "2021-07-01-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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 = kwargs.pop('api_version', "2021-07-01-preview") # type: str + + + request = build_delete_request( + id=id, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, pipeline_response) + raise HttpResponseError(response=response, model=error) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/metastore/databases/{id}'} # type: ignore + diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_notebook_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_notebook_operations.py index 0539559770f1..2d02885ff10b 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_notebook_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_notebook_operations.py @@ -225,13 +225,13 @@ async def _create_or_update_notebook_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(notebook, 'NotebookResource') + _json = self._serialize.body(notebook, 'NotebookResource') request = build_create_or_update_notebook_request_initial( notebook_name=notebook_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_notebook_initial.metadata['url'], ) @@ -524,13 +524,13 @@ async def _rename_notebook_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_notebook_request_initial( notebook_name=notebook_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_notebook_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_pipeline_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_pipeline_operations.py index 7eb182d70e0b..efa69a74289d 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_pipeline_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_pipeline_operations.py @@ -144,13 +144,13 @@ async def _create_or_update_pipeline_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(pipeline, 'PipelineResource') + _json = self._serialize.body(pipeline, 'PipelineResource') request = build_create_or_update_pipeline_request_initial( pipeline_name=pipeline_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_pipeline_initial.metadata['url'], ) @@ -443,13 +443,13 @@ async def _rename_pipeline_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_pipeline_request_initial( pipeline_name=pipeline_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_pipeline_initial.metadata['url'], ) request = _convert_request(request) @@ -587,15 +587,15 @@ async def create_pipeline_run( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if parameters is not None: - json = self._serialize.body(parameters, '{object}') + _json = self._serialize.body(parameters, '{object}') else: - json = None + _json = None request = build_create_pipeline_run_request( pipeline_name=pipeline_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, reference_pipeline_run_id=reference_pipeline_run_id, is_recovery=is_recovery, start_activity_name=start_activity_name, diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_pipeline_run_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_pipeline_run_operations.py index c7276be3cf94..6b0663eabf7e 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_pipeline_run_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_pipeline_run_operations.py @@ -70,12 +70,12 @@ async def query_pipeline_runs_by_workspace( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(filter_parameters, 'RunFilterParameters') + _json = self._serialize.body(filter_parameters, 'RunFilterParameters') request = build_query_pipeline_runs_by_workspace_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.query_pipeline_runs_by_workspace.metadata['url'], ) request = _convert_request(request) @@ -191,14 +191,14 @@ async def query_activity_runs( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(filter_parameters, 'RunFilterParameters') + _json = self._serialize.body(filter_parameters, 'RunFilterParameters') request = build_query_activity_runs_request( pipeline_name=pipeline_name, run_id=run_id, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.query_activity_runs.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_spark_configuration_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_spark_configuration_operations.py index 9d6d4ecd0487..30c75eca025e 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_spark_configuration_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_spark_configuration_operations.py @@ -145,13 +145,13 @@ async def _create_or_update_spark_configuration_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _spark_configuration = _models.SparkConfigurationResource(properties=properties) - json = self._serialize.body(_spark_configuration, 'SparkConfigurationResource') + _json = self._serialize.body(_spark_configuration, 'SparkConfigurationResource') request = build_create_or_update_spark_configuration_request_initial( spark_configuration_name=spark_configuration_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_spark_configuration_initial.metadata['url'], ) @@ -446,13 +446,13 @@ async def _rename_spark_configuration_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_spark_configuration_request_initial( spark_configuration_name=spark_configuration_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_spark_configuration_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_spark_job_definition_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_spark_job_definition_operations.py index fc85c6f201ab..881a53a6ccbf 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_spark_job_definition_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_spark_job_definition_operations.py @@ -145,13 +145,13 @@ async def _create_or_update_spark_job_definition_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _spark_job_definition = _models.SparkJobDefinitionResource(properties=properties) - json = self._serialize.body(_spark_job_definition, 'SparkJobDefinitionResource') + _json = self._serialize.body(_spark_job_definition, 'SparkJobDefinitionResource') request = build_create_or_update_spark_job_definition_request_initial( spark_job_definition_name=spark_job_definition_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_spark_job_definition_initial.metadata['url'], ) @@ -562,13 +562,13 @@ async def _rename_spark_job_definition_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_spark_job_definition_request_initial( spark_job_definition_name=spark_job_definition_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_spark_job_definition_initial.metadata['url'], ) request = _convert_request(request) @@ -677,12 +677,12 @@ async def _debug_spark_job_definition_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _spark_job_definition_azure_resource = _models.SparkJobDefinitionResource(properties=properties) - json = self._serialize.body(_spark_job_definition_azure_resource, 'SparkJobDefinitionResource') + _json = self._serialize.body(_spark_job_definition_azure_resource, 'SparkJobDefinitionResource') request = build_debug_spark_job_definition_request_initial( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._debug_spark_job_definition_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_sql_script_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_sql_script_operations.py index fcce3817ec2b..95289641101e 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_sql_script_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_sql_script_operations.py @@ -144,13 +144,13 @@ async def _create_or_update_sql_script_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(sql_script, 'SqlScriptResource') + _json = self._serialize.body(sql_script, 'SqlScriptResource') request = build_create_or_update_sql_script_request_initial( sql_script_name=sql_script_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_sql_script_initial.metadata['url'], ) @@ -443,13 +443,13 @@ async def _rename_sql_script_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_sql_script_request_initial( sql_script_name=sql_script_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_sql_script_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_trigger_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_trigger_operations.py index c919c6c191ca..90698d69bbe8 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_trigger_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_trigger_operations.py @@ -144,13 +144,13 @@ async def _create_or_update_trigger_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _trigger = _models.TriggerResource(properties=properties) - json = self._serialize.body(_trigger, 'TriggerResource') + _json = self._serialize.body(_trigger, 'TriggerResource') request = build_create_or_update_trigger_request_initial( trigger_name=trigger_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_trigger_initial.metadata['url'], ) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_trigger_run_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_trigger_run_operations.py index 95d5ec86124d..0d383427cbea 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_trigger_run_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_trigger_run_operations.py @@ -182,12 +182,12 @@ async def query_trigger_runs_by_workspace( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(filter_parameters, 'RunFilterParameters') + _json = self._serialize.body(filter_parameters, 'RunFilterParameters') request = build_query_trigger_runs_by_workspace_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.query_trigger_runs_by_workspace.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_workspace_git_repo_management_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_workspace_git_repo_management_operations.py index b0de2c7cc719..88e0580756ba 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_workspace_git_repo_management_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_workspace_git_repo_management_operations.py @@ -74,12 +74,12 @@ async def get_git_hub_access_token( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(git_hub_access_token_request, 'GitHubAccessTokenRequest') + _json = self._serialize.body(git_hub_access_token_request, 'GitHubAccessTokenRequest') request = build_get_git_hub_access_token_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, client_request_id=client_request_id, template_url=self.get_git_hub_access_token.metadata['url'], ) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/__init__.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/__init__.py index 3f581a441020..a660edae2737 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/__init__.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/__init__.py @@ -381,6 +381,11 @@ from ._models_py3 import MarketoLinkedService from ._models_py3 import MarketoObjectDataset from ._models_py3 import MarketoSource + from ._models_py3 import MetastoreRegisterObject + from ._models_py3 import MetastoreRegistrationResponse + from ._models_py3 import MetastoreRequestSuccessResponse + from ._models_py3 import MetastoreUpdateObject + from ._models_py3 import MetastoreUpdationResponse from ._models_py3 import MicrosoftAccessLinkedService from ._models_py3 import MicrosoftAccessSink from ._models_py3 import MicrosoftAccessSource @@ -411,6 +416,7 @@ from ._models_py3 import NotebookLanguageInfo from ._models_py3 import NotebookListResponse from ._models_py3 import NotebookMetadata + from ._models_py3 import NotebookParameter from ._models_py3 import NotebookResource from ._models_py3 import NotebookSessionProperties from ._models_py3 import ODataLinkedService @@ -1056,6 +1062,11 @@ from ._models import MarketoLinkedService # type: ignore from ._models import MarketoObjectDataset # type: ignore from ._models import MarketoSource # type: ignore + from ._models import MetastoreRegisterObject # type: ignore + from ._models import MetastoreRegistrationResponse # type: ignore + from ._models import MetastoreRequestSuccessResponse # type: ignore + from ._models import MetastoreUpdateObject # type: ignore + from ._models import MetastoreUpdationResponse # type: ignore from ._models import MicrosoftAccessLinkedService # type: ignore from ._models import MicrosoftAccessSink # type: ignore from ._models import MicrosoftAccessSource # type: ignore @@ -1086,6 +1097,7 @@ from ._models import NotebookLanguageInfo # type: ignore from ._models import NotebookListResponse # type: ignore from ._models import NotebookMetadata # type: ignore + from ._models import NotebookParameter # type: ignore from ._models import NotebookResource # type: ignore from ._models import NotebookSessionProperties # type: ignore from ._models import ODataLinkedService # type: ignore @@ -1408,6 +1420,7 @@ NetezzaPartitionOption, NodeSize, NodeSizeFamily, + NotebookParameterType, NotebookReferenceType, ODataAadServicePrincipalCredentialType, ODataAuthenticationType, @@ -1421,7 +1434,9 @@ PolybaseSettingsRejectType, PrestoAuthenticationType, RecurrenceFrequency, + RequestStatus, ResourceIdentityType, + ResourceStatus, RestServiceAuthenticationType, RunQueryFilterOperand, RunQueryFilterOperator, @@ -1839,6 +1854,11 @@ 'MarketoLinkedService', 'MarketoObjectDataset', 'MarketoSource', + 'MetastoreRegisterObject', + 'MetastoreRegistrationResponse', + 'MetastoreRequestSuccessResponse', + 'MetastoreUpdateObject', + 'MetastoreUpdationResponse', 'MicrosoftAccessLinkedService', 'MicrosoftAccessSink', 'MicrosoftAccessSource', @@ -1869,6 +1889,7 @@ 'NotebookLanguageInfo', 'NotebookListResponse', 'NotebookMetadata', + 'NotebookParameter', 'NotebookResource', 'NotebookSessionProperties', 'ODataLinkedService', @@ -2189,6 +2210,7 @@ 'NetezzaPartitionOption', 'NodeSize', 'NodeSizeFamily', + 'NotebookParameterType', 'NotebookReferenceType', 'ODataAadServicePrincipalCredentialType', 'ODataAuthenticationType', @@ -2202,7 +2224,9 @@ 'PolybaseSettingsRejectType', 'PrestoAuthenticationType', 'RecurrenceFrequency', + 'RequestStatus', 'ResourceIdentityType', + 'ResourceStatus', 'RestServiceAuthenticationType', 'RunQueryFilterOperand', 'RunQueryFilterOperator', diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_artifacts_client_enums.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_artifacts_client_enums.py index 165090d2e2e8..dec405c1391b 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_artifacts_client_enums.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_artifacts_client_enums.py @@ -442,6 +442,15 @@ class NodeSizeFamily(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): NONE = "None" MEMORY_OPTIMIZED = "MemoryOptimized" +class NotebookParameterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Notebook parameter type. + """ + + STRING = "string" + INT = "int" + FLOAT = "float" + BOOL = "bool" + class NotebookReferenceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Synapse notebook reference type. """ @@ -549,6 +558,14 @@ class RecurrenceFrequency(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): MONTH = "Month" YEAR = "Year" +class RequestStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates possible request statuses. + """ + + RUNNING = "Running" + COMPLETED = "Completed" + FAILED = "Failed" + class ResourceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The type of managed identity for the workspace """ @@ -556,6 +573,14 @@ class ResourceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): NONE = "None" SYSTEM_ASSIGNED = "SystemAssigned" +class ResourceStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates possible Status of the resource. + """ + + CREATING = "Creating" + CREATED = "Created" + FAILED = "Failed" + class RestServiceAuthenticationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of authentication used to connect to the REST service. """ diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models.py index 052f6754eec5..19876321adf0 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models.py @@ -20666,6 +20666,9 @@ class FtpReadSettings(StoreReadSettings): :vartype file_list_path: any :ivar use_binary_transfer: Specify whether to use binary transfer mode for FTP stores. :vartype use_binary_transfer: bool + :ivar disable_chunking: If true, disable parallel reading within each file. Default is false. + Type: boolean (or Expression with resultType boolean). + :vartype disable_chunking: any """ _validation = { @@ -20684,6 +20687,7 @@ class FtpReadSettings(StoreReadSettings): 'delete_files_after_completion': {'key': 'deleteFilesAfterCompletion', 'type': 'object'}, 'file_list_path': {'key': 'fileListPath', 'type': 'object'}, 'use_binary_transfer': {'key': 'useBinaryTransfer', 'type': 'bool'}, + 'disable_chunking': {'key': 'disableChunking', 'type': 'object'}, } def __init__( @@ -20720,6 +20724,9 @@ def __init__( :paramtype file_list_path: any :keyword use_binary_transfer: Specify whether to use binary transfer mode for FTP stores. :paramtype use_binary_transfer: bool + :keyword disable_chunking: If true, disable parallel reading within each file. Default is + false. Type: boolean (or Expression with resultType boolean). + :paramtype disable_chunking: any """ super(FtpReadSettings, self).__init__(**kwargs) self.type = 'FtpReadSettings' # type: str @@ -20731,6 +20738,7 @@ def __init__( self.delete_files_after_completion = kwargs.get('delete_files_after_completion', None) self.file_list_path = kwargs.get('file_list_path', None) self.use_binary_transfer = kwargs.get('use_binary_transfer', None) + self.disable_chunking = kwargs.get('disable_chunking', None) class FtpServerLinkedService(LinkedService): @@ -21128,15 +21136,18 @@ class GoogleAdWordsLinkedService(LinkedService): :vartype parameters: dict[str, ~azure.synapse.artifacts.models.ParameterSpecification] :ivar annotations: List of tags that can be used for describing the linked service. :vartype annotations: list[any] - :ivar client_customer_id: Required. The Client customer ID of the AdWords account that you want - to fetch report data for. + :ivar connection_properties: Properties used to connect to GoogleAds. It is mutually exclusive + with any other properties in the linked service. Type: object. + :vartype connection_properties: any + :ivar client_customer_id: The Client customer ID of the AdWords account that you want to fetch + report data for. :vartype client_customer_id: any - :ivar developer_token: Required. The developer token associated with the manager account that - you use to grant access to the AdWords API. + :ivar developer_token: The developer token associated with the manager account that you use to + grant access to the AdWords API. :vartype developer_token: ~azure.synapse.artifacts.models.SecretBase - :ivar authentication_type: Required. The OAuth 2.0 authentication mechanism used for - authentication. ServiceAuthentication can only be used on self-hosted IR. Possible values - include: "ServiceAuthentication", "UserAuthentication". + :ivar authentication_type: The OAuth 2.0 authentication mechanism used for authentication. + ServiceAuthentication can only be used on self-hosted IR. Possible values include: + "ServiceAuthentication", "UserAuthentication". :vartype authentication_type: str or ~azure.synapse.artifacts.models.GoogleAdWordsAuthenticationType :ivar refresh_token: The refresh token obtained from Google for authorizing access to AdWords @@ -21169,9 +21180,6 @@ class GoogleAdWordsLinkedService(LinkedService): _validation = { 'type': {'required': True}, - 'client_customer_id': {'required': True}, - 'developer_token': {'required': True}, - 'authentication_type': {'required': True}, } _attribute_map = { @@ -21181,6 +21189,7 @@ class GoogleAdWordsLinkedService(LinkedService): 'description': {'key': 'description', 'type': 'str'}, 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'connection_properties': {'key': 'typeProperties.connectionProperties', 'type': 'object'}, 'client_customer_id': {'key': 'typeProperties.clientCustomerID', 'type': 'object'}, 'developer_token': {'key': 'typeProperties.developerToken', 'type': 'SecretBase'}, 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, @@ -21210,15 +21219,18 @@ def __init__( :paramtype parameters: dict[str, ~azure.synapse.artifacts.models.ParameterSpecification] :keyword annotations: List of tags that can be used for describing the linked service. :paramtype annotations: list[any] - :keyword client_customer_id: Required. The Client customer ID of the AdWords account that you - want to fetch report data for. + :keyword connection_properties: Properties used to connect to GoogleAds. It is mutually + exclusive with any other properties in the linked service. Type: object. + :paramtype connection_properties: any + :keyword client_customer_id: The Client customer ID of the AdWords account that you want to + fetch report data for. :paramtype client_customer_id: any - :keyword developer_token: Required. The developer token associated with the manager account - that you use to grant access to the AdWords API. + :keyword developer_token: The developer token associated with the manager account that you use + to grant access to the AdWords API. :paramtype developer_token: ~azure.synapse.artifacts.models.SecretBase - :keyword authentication_type: Required. The OAuth 2.0 authentication mechanism used for - authentication. ServiceAuthentication can only be used on self-hosted IR. Possible values - include: "ServiceAuthentication", "UserAuthentication". + :keyword authentication_type: The OAuth 2.0 authentication mechanism used for authentication. + ServiceAuthentication can only be used on self-hosted IR. Possible values include: + "ServiceAuthentication", "UserAuthentication". :paramtype authentication_type: str or ~azure.synapse.artifacts.models.GoogleAdWordsAuthenticationType :keyword refresh_token: The refresh token obtained from Google for authorizing access to @@ -21250,9 +21262,10 @@ def __init__( """ super(GoogleAdWordsLinkedService, self).__init__(**kwargs) self.type = 'GoogleAdWords' # type: str - self.client_customer_id = kwargs['client_customer_id'] - self.developer_token = kwargs['developer_token'] - self.authentication_type = kwargs['authentication_type'] + self.connection_properties = kwargs.get('connection_properties', None) + self.client_customer_id = kwargs.get('client_customer_id', None) + self.developer_token = kwargs.get('developer_token', None) + self.authentication_type = kwargs.get('authentication_type', None) self.refresh_token = kwargs.get('refresh_token', None) self.client_id = kwargs.get('client_id', None) self.client_secret = kwargs.get('client_secret', None) @@ -29180,6 +29193,139 @@ def __init__( self.query = kwargs.get('query', None) +class MetastoreRegisterObject(msrest.serialization.Model): + """MetastoreRegisterObject. + + All required parameters must be populated in order to send to Azure. + + :ivar input_folder: Required. The input folder containing CDM files. + :vartype input_folder: str + """ + + _validation = { + 'input_folder': {'required': True}, + } + + _attribute_map = { + 'input_folder': {'key': 'inputFolder', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword input_folder: Required. The input folder containing CDM files. + :paramtype input_folder: str + """ + super(MetastoreRegisterObject, self).__init__(**kwargs) + self.input_folder = kwargs['input_folder'] + + +class MetastoreRegistrationResponse(msrest.serialization.Model): + """MetastoreRegistrationResponse. + + :ivar status: Enumerates possible request statuses. Possible values include: "Running", + "Completed", "Failed". + :vartype status: str or ~azure.synapse.artifacts.models.RequestStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Enumerates possible request statuses. Possible values include: "Running", + "Completed", "Failed". + :paramtype status: str or ~azure.synapse.artifacts.models.RequestStatus + """ + super(MetastoreRegistrationResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class MetastoreRequestSuccessResponse(msrest.serialization.Model): + """MetastoreRequestSuccessResponse. + + :ivar status: Enumerates possible Status of the resource. Possible values include: "Creating", + "Created", "Failed". + :vartype status: str or ~azure.synapse.artifacts.models.ResourceStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Enumerates possible Status of the resource. Possible values include: + "Creating", "Created", "Failed". + :paramtype status: str or ~azure.synapse.artifacts.models.ResourceStatus + """ + super(MetastoreRequestSuccessResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class MetastoreUpdateObject(msrest.serialization.Model): + """MetastoreUpdateObject. + + All required parameters must be populated in order to send to Azure. + + :ivar input_folder: Required. The input folder containing CDM files. + :vartype input_folder: str + """ + + _validation = { + 'input_folder': {'required': True}, + } + + _attribute_map = { + 'input_folder': {'key': 'inputFolder', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword input_folder: Required. The input folder containing CDM files. + :paramtype input_folder: str + """ + super(MetastoreUpdateObject, self).__init__(**kwargs) + self.input_folder = kwargs['input_folder'] + + +class MetastoreUpdationResponse(msrest.serialization.Model): + """MetastoreUpdationResponse. + + :ivar status: Enumerates possible request statuses. Possible values include: "Running", + "Completed", "Failed". + :vartype status: str or ~azure.synapse.artifacts.models.RequestStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Enumerates possible request statuses. Possible values include: "Running", + "Completed", "Failed". + :paramtype status: str or ~azure.synapse.artifacts.models.RequestStatus + """ + super(MetastoreUpdationResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + class MicrosoftAccessLinkedService(LinkedService): """Microsoft Access linked service. @@ -31334,6 +31480,36 @@ def __init__( self.language_info = kwargs.get('language_info', None) +class NotebookParameter(msrest.serialization.Model): + """Notebook parameter. + + :ivar value: Notebook parameter value. Type: string (or Expression with resultType string). + :vartype value: any + :ivar type: Notebook parameter type. Possible values include: "string", "int", "float", "bool". + :vartype type: str or ~azure.synapse.artifacts.models.NotebookParameterType + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Notebook parameter value. Type: string (or Expression with resultType string). + :paramtype value: any + :keyword type: Notebook parameter type. Possible values include: "string", "int", "float", + "bool". + :paramtype type: str or ~azure.synapse.artifacts.models.NotebookParameterType + """ + super(NotebookParameter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) + + class NotebookResource(msrest.serialization.Model): """Notebook resource type. @@ -41274,6 +41450,9 @@ class SftpReadSettings(StoreReadSettings): :ivar modified_datetime_end: The end of file's modified datetime. Type: string (or Expression with resultType string). :vartype modified_datetime_end: any + :ivar disable_chunking: If true, disable parallel reading within each file. Default is false. + Type: boolean (or Expression with resultType boolean). + :vartype disable_chunking: any """ _validation = { @@ -41293,6 +41472,7 @@ class SftpReadSettings(StoreReadSettings): 'delete_files_after_completion': {'key': 'deleteFilesAfterCompletion', 'type': 'object'}, 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + 'disable_chunking': {'key': 'disableChunking', 'type': 'object'}, } def __init__( @@ -41333,6 +41513,9 @@ def __init__( :keyword modified_datetime_end: The end of file's modified datetime. Type: string (or Expression with resultType string). :paramtype modified_datetime_end: any + :keyword disable_chunking: If true, disable parallel reading within each file. Default is + false. Type: boolean (or Expression with resultType boolean). + :paramtype disable_chunking: any """ super(SftpReadSettings, self).__init__(**kwargs) self.type = 'SftpReadSettings' # type: str @@ -41345,6 +41528,7 @@ def __init__( self.delete_files_after_completion = kwargs.get('delete_files_after_completion', None) self.modified_datetime_start = kwargs.get('modified_datetime_start', None) self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + self.disable_chunking = kwargs.get('disable_chunking', None) class SftpServerLinkedService(LinkedService): @@ -46920,7 +47104,7 @@ class SynapseNotebookActivity(ExecutionActivity): :ivar notebook: Required. Synapse notebook reference. :vartype notebook: ~azure.synapse.artifacts.models.SynapseNotebookReference :ivar parameters: Notebook parameters. - :vartype parameters: dict[str, any] + :vartype parameters: dict[str, ~azure.synapse.artifacts.models.NotebookParameter] """ _validation = { @@ -46939,7 +47123,7 @@ class SynapseNotebookActivity(ExecutionActivity): 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, 'notebook': {'key': 'typeProperties.notebook', 'type': 'SynapseNotebookReference'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '{NotebookParameter}'}, } def __init__( @@ -46965,7 +47149,7 @@ def __init__( :keyword notebook: Required. Synapse notebook reference. :paramtype notebook: ~azure.synapse.artifacts.models.SynapseNotebookReference :keyword parameters: Notebook parameters. - :paramtype parameters: dict[str, any] + :paramtype parameters: dict[str, ~azure.synapse.artifacts.models.NotebookParameter] """ super(SynapseNotebookActivity, self).__init__(**kwargs) self.type = 'SynapseNotebook' # type: str diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models_py3.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models_py3.py index de12c32bba94..a2d5f2ee5565 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models_py3.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models_py3.py @@ -22850,6 +22850,9 @@ class FtpReadSettings(StoreReadSettings): :vartype file_list_path: any :ivar use_binary_transfer: Specify whether to use binary transfer mode for FTP stores. :vartype use_binary_transfer: bool + :ivar disable_chunking: If true, disable parallel reading within each file. Default is false. + Type: boolean (or Expression with resultType boolean). + :vartype disable_chunking: any """ _validation = { @@ -22868,6 +22871,7 @@ class FtpReadSettings(StoreReadSettings): 'delete_files_after_completion': {'key': 'deleteFilesAfterCompletion', 'type': 'object'}, 'file_list_path': {'key': 'fileListPath', 'type': 'object'}, 'use_binary_transfer': {'key': 'useBinaryTransfer', 'type': 'bool'}, + 'disable_chunking': {'key': 'disableChunking', 'type': 'object'}, } def __init__( @@ -22883,6 +22887,7 @@ def __init__( delete_files_after_completion: Optional[Any] = None, file_list_path: Optional[Any] = None, use_binary_transfer: Optional[bool] = None, + disable_chunking: Optional[Any] = None, **kwargs ): """ @@ -22915,6 +22920,9 @@ def __init__( :paramtype file_list_path: any :keyword use_binary_transfer: Specify whether to use binary transfer mode for FTP stores. :paramtype use_binary_transfer: bool + :keyword disable_chunking: If true, disable parallel reading within each file. Default is + false. Type: boolean (or Expression with resultType boolean). + :paramtype disable_chunking: any """ super(FtpReadSettings, self).__init__(additional_properties=additional_properties, max_concurrent_connections=max_concurrent_connections, **kwargs) self.type = 'FtpReadSettings' # type: str @@ -22926,6 +22934,7 @@ def __init__( self.delete_files_after_completion = delete_files_after_completion self.file_list_path = file_list_path self.use_binary_transfer = use_binary_transfer + self.disable_chunking = disable_chunking class FtpServerLinkedService(LinkedService): @@ -23364,15 +23373,18 @@ class GoogleAdWordsLinkedService(LinkedService): :vartype parameters: dict[str, ~azure.synapse.artifacts.models.ParameterSpecification] :ivar annotations: List of tags that can be used for describing the linked service. :vartype annotations: list[any] - :ivar client_customer_id: Required. The Client customer ID of the AdWords account that you want - to fetch report data for. + :ivar connection_properties: Properties used to connect to GoogleAds. It is mutually exclusive + with any other properties in the linked service. Type: object. + :vartype connection_properties: any + :ivar client_customer_id: The Client customer ID of the AdWords account that you want to fetch + report data for. :vartype client_customer_id: any - :ivar developer_token: Required. The developer token associated with the manager account that - you use to grant access to the AdWords API. + :ivar developer_token: The developer token associated with the manager account that you use to + grant access to the AdWords API. :vartype developer_token: ~azure.synapse.artifacts.models.SecretBase - :ivar authentication_type: Required. The OAuth 2.0 authentication mechanism used for - authentication. ServiceAuthentication can only be used on self-hosted IR. Possible values - include: "ServiceAuthentication", "UserAuthentication". + :ivar authentication_type: The OAuth 2.0 authentication mechanism used for authentication. + ServiceAuthentication can only be used on self-hosted IR. Possible values include: + "ServiceAuthentication", "UserAuthentication". :vartype authentication_type: str or ~azure.synapse.artifacts.models.GoogleAdWordsAuthenticationType :ivar refresh_token: The refresh token obtained from Google for authorizing access to AdWords @@ -23405,9 +23417,6 @@ class GoogleAdWordsLinkedService(LinkedService): _validation = { 'type': {'required': True}, - 'client_customer_id': {'required': True}, - 'developer_token': {'required': True}, - 'authentication_type': {'required': True}, } _attribute_map = { @@ -23417,6 +23426,7 @@ class GoogleAdWordsLinkedService(LinkedService): 'description': {'key': 'description', 'type': 'str'}, 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'connection_properties': {'key': 'typeProperties.connectionProperties', 'type': 'object'}, 'client_customer_id': {'key': 'typeProperties.clientCustomerID', 'type': 'object'}, 'developer_token': {'key': 'typeProperties.developerToken', 'type': 'SecretBase'}, 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, @@ -23433,14 +23443,15 @@ class GoogleAdWordsLinkedService(LinkedService): def __init__( self, *, - client_customer_id: Any, - developer_token: "SecretBase", - authentication_type: Union[str, "GoogleAdWordsAuthenticationType"], additional_properties: Optional[Dict[str, Any]] = None, connect_via: Optional["IntegrationRuntimeReference"] = None, description: Optional[str] = None, parameters: Optional[Dict[str, "ParameterSpecification"]] = None, annotations: Optional[List[Any]] = None, + connection_properties: Optional[Any] = None, + client_customer_id: Optional[Any] = None, + developer_token: Optional["SecretBase"] = None, + authentication_type: Optional[Union[str, "GoogleAdWordsAuthenticationType"]] = None, refresh_token: Optional["SecretBase"] = None, client_id: Optional[Any] = None, client_secret: Optional["SecretBase"] = None, @@ -23463,15 +23474,18 @@ def __init__( :paramtype parameters: dict[str, ~azure.synapse.artifacts.models.ParameterSpecification] :keyword annotations: List of tags that can be used for describing the linked service. :paramtype annotations: list[any] - :keyword client_customer_id: Required. The Client customer ID of the AdWords account that you - want to fetch report data for. + :keyword connection_properties: Properties used to connect to GoogleAds. It is mutually + exclusive with any other properties in the linked service. Type: object. + :paramtype connection_properties: any + :keyword client_customer_id: The Client customer ID of the AdWords account that you want to + fetch report data for. :paramtype client_customer_id: any - :keyword developer_token: Required. The developer token associated with the manager account - that you use to grant access to the AdWords API. + :keyword developer_token: The developer token associated with the manager account that you use + to grant access to the AdWords API. :paramtype developer_token: ~azure.synapse.artifacts.models.SecretBase - :keyword authentication_type: Required. The OAuth 2.0 authentication mechanism used for - authentication. ServiceAuthentication can only be used on self-hosted IR. Possible values - include: "ServiceAuthentication", "UserAuthentication". + :keyword authentication_type: The OAuth 2.0 authentication mechanism used for authentication. + ServiceAuthentication can only be used on self-hosted IR. Possible values include: + "ServiceAuthentication", "UserAuthentication". :paramtype authentication_type: str or ~azure.synapse.artifacts.models.GoogleAdWordsAuthenticationType :keyword refresh_token: The refresh token obtained from Google for authorizing access to @@ -23503,6 +23517,7 @@ def __init__( """ super(GoogleAdWordsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) self.type = 'GoogleAdWords' # type: str + self.connection_properties = connection_properties self.client_customer_id = client_customer_id self.developer_token = developer_token self.authentication_type = authentication_type @@ -32277,6 +32292,149 @@ def __init__( self.query = query +class MetastoreRegisterObject(msrest.serialization.Model): + """MetastoreRegisterObject. + + All required parameters must be populated in order to send to Azure. + + :ivar input_folder: Required. The input folder containing CDM files. + :vartype input_folder: str + """ + + _validation = { + 'input_folder': {'required': True}, + } + + _attribute_map = { + 'input_folder': {'key': 'inputFolder', 'type': 'str'}, + } + + def __init__( + self, + *, + input_folder: str, + **kwargs + ): + """ + :keyword input_folder: Required. The input folder containing CDM files. + :paramtype input_folder: str + """ + super(MetastoreRegisterObject, self).__init__(**kwargs) + self.input_folder = input_folder + + +class MetastoreRegistrationResponse(msrest.serialization.Model): + """MetastoreRegistrationResponse. + + :ivar status: Enumerates possible request statuses. Possible values include: "Running", + "Completed", "Failed". + :vartype status: str or ~azure.synapse.artifacts.models.RequestStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "RequestStatus"]] = None, + **kwargs + ): + """ + :keyword status: Enumerates possible request statuses. Possible values include: "Running", + "Completed", "Failed". + :paramtype status: str or ~azure.synapse.artifacts.models.RequestStatus + """ + super(MetastoreRegistrationResponse, self).__init__(**kwargs) + self.status = status + + +class MetastoreRequestSuccessResponse(msrest.serialization.Model): + """MetastoreRequestSuccessResponse. + + :ivar status: Enumerates possible Status of the resource. Possible values include: "Creating", + "Created", "Failed". + :vartype status: str or ~azure.synapse.artifacts.models.ResourceStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "ResourceStatus"]] = None, + **kwargs + ): + """ + :keyword status: Enumerates possible Status of the resource. Possible values include: + "Creating", "Created", "Failed". + :paramtype status: str or ~azure.synapse.artifacts.models.ResourceStatus + """ + super(MetastoreRequestSuccessResponse, self).__init__(**kwargs) + self.status = status + + +class MetastoreUpdateObject(msrest.serialization.Model): + """MetastoreUpdateObject. + + All required parameters must be populated in order to send to Azure. + + :ivar input_folder: Required. The input folder containing CDM files. + :vartype input_folder: str + """ + + _validation = { + 'input_folder': {'required': True}, + } + + _attribute_map = { + 'input_folder': {'key': 'inputFolder', 'type': 'str'}, + } + + def __init__( + self, + *, + input_folder: str, + **kwargs + ): + """ + :keyword input_folder: Required. The input folder containing CDM files. + :paramtype input_folder: str + """ + super(MetastoreUpdateObject, self).__init__(**kwargs) + self.input_folder = input_folder + + +class MetastoreUpdationResponse(msrest.serialization.Model): + """MetastoreUpdationResponse. + + :ivar status: Enumerates possible request statuses. Possible values include: "Running", + "Completed", "Failed". + :vartype status: str or ~azure.synapse.artifacts.models.RequestStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "RequestStatus"]] = None, + **kwargs + ): + """ + :keyword status: Enumerates possible request statuses. Possible values include: "Running", + "Completed", "Failed". + :paramtype status: str or ~azure.synapse.artifacts.models.RequestStatus + """ + super(MetastoreUpdationResponse, self).__init__(**kwargs) + self.status = status + + class MicrosoftAccessLinkedService(LinkedService): """Microsoft Access linked service. @@ -34666,6 +34824,39 @@ def __init__( self.language_info = language_info +class NotebookParameter(msrest.serialization.Model): + """Notebook parameter. + + :ivar value: Notebook parameter value. Type: string (or Expression with resultType string). + :vartype value: any + :ivar type: Notebook parameter type. Possible values include: "string", "int", "float", "bool". + :vartype type: str or ~azure.synapse.artifacts.models.NotebookParameterType + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[Any] = None, + type: Optional[Union[str, "NotebookParameterType"]] = None, + **kwargs + ): + """ + :keyword value: Notebook parameter value. Type: string (or Expression with resultType string). + :paramtype value: any + :keyword type: Notebook parameter type. Possible values include: "string", "int", "float", + "bool". + :paramtype type: str or ~azure.synapse.artifacts.models.NotebookParameterType + """ + super(NotebookParameter, self).__init__(**kwargs) + self.value = value + self.type = type + + class NotebookResource(msrest.serialization.Model): """Notebook resource type. @@ -45653,6 +45844,9 @@ class SftpReadSettings(StoreReadSettings): :ivar modified_datetime_end: The end of file's modified datetime. Type: string (or Expression with resultType string). :vartype modified_datetime_end: any + :ivar disable_chunking: If true, disable parallel reading within each file. Default is false. + Type: boolean (or Expression with resultType boolean). + :vartype disable_chunking: any """ _validation = { @@ -45672,6 +45866,7 @@ class SftpReadSettings(StoreReadSettings): 'delete_files_after_completion': {'key': 'deleteFilesAfterCompletion', 'type': 'object'}, 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + 'disable_chunking': {'key': 'disableChunking', 'type': 'object'}, } def __init__( @@ -45688,6 +45883,7 @@ def __init__( delete_files_after_completion: Optional[Any] = None, modified_datetime_start: Optional[Any] = None, modified_datetime_end: Optional[Any] = None, + disable_chunking: Optional[Any] = None, **kwargs ): """ @@ -45724,6 +45920,9 @@ def __init__( :keyword modified_datetime_end: The end of file's modified datetime. Type: string (or Expression with resultType string). :paramtype modified_datetime_end: any + :keyword disable_chunking: If true, disable parallel reading within each file. Default is + false. Type: boolean (or Expression with resultType boolean). + :paramtype disable_chunking: any """ super(SftpReadSettings, self).__init__(additional_properties=additional_properties, max_concurrent_connections=max_concurrent_connections, **kwargs) self.type = 'SftpReadSettings' # type: str @@ -45736,6 +45935,7 @@ def __init__( self.delete_files_after_completion = delete_files_after_completion self.modified_datetime_start = modified_datetime_start self.modified_datetime_end = modified_datetime_end + self.disable_chunking = disable_chunking class SftpServerLinkedService(LinkedService): @@ -51917,7 +52117,7 @@ class SynapseNotebookActivity(ExecutionActivity): :ivar notebook: Required. Synapse notebook reference. :vartype notebook: ~azure.synapse.artifacts.models.SynapseNotebookReference :ivar parameters: Notebook parameters. - :vartype parameters: dict[str, any] + :vartype parameters: dict[str, ~azure.synapse.artifacts.models.NotebookParameter] """ _validation = { @@ -51936,7 +52136,7 @@ class SynapseNotebookActivity(ExecutionActivity): 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, 'notebook': {'key': 'typeProperties.notebook', 'type': 'SynapseNotebookReference'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '{NotebookParameter}'}, } def __init__( @@ -51950,7 +52150,7 @@ def __init__( user_properties: Optional[List["UserProperty"]] = None, linked_service_name: Optional["LinkedServiceReference"] = None, policy: Optional["ActivityPolicy"] = None, - parameters: Optional[Dict[str, Any]] = None, + parameters: Optional[Dict[str, "NotebookParameter"]] = None, **kwargs ): """ @@ -51972,7 +52172,7 @@ def __init__( :keyword notebook: Required. Synapse notebook reference. :paramtype notebook: ~azure.synapse.artifacts.models.SynapseNotebookReference :keyword parameters: Notebook parameters. - :paramtype parameters: dict[str, any] + :paramtype parameters: dict[str, ~azure.synapse.artifacts.models.NotebookParameter] """ super(SynapseNotebookActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) self.type = 'SynapseNotebook' # type: str diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/__init__.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/__init__.py index 7b2bd054134a..2589ba343fe0 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/__init__.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/__init__.py @@ -8,6 +8,7 @@ from ._kql_scripts_operations import KqlScriptsOperations from ._kql_script_operations import KqlScriptOperations +from ._metastore_operations import MetastoreOperations from ._spark_configuration_operations import SparkConfigurationOperations from ._big_data_pools_operations import BigDataPoolsOperations from ._data_flow_operations import DataFlowOperations @@ -31,6 +32,7 @@ __all__ = [ 'KqlScriptsOperations', 'KqlScriptOperations', + 'MetastoreOperations', 'SparkConfigurationOperations', 'BigDataPoolsOperations', 'DataFlowOperations', diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_big_data_pools_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_big_data_pools_operations.py index ba11744953a1..1489ace84c08 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_big_data_pools_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_big_data_pools_operations.py @@ -26,6 +26,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_list_request( diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_data_flow_debug_session_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_data_flow_debug_session_operations.py index d558d3b09bf0..b0d04d3984d6 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_data_flow_debug_session_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_data_flow_debug_session_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_create_data_flow_debug_session_request_initial( @@ -215,12 +216,12 @@ def _create_data_flow_debug_session_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(request, 'CreateDataFlowDebugSessionRequest') + _json = self._serialize.body(request, 'CreateDataFlowDebugSessionRequest') request = build_create_data_flow_debug_session_request_initial( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._create_data_flow_debug_session_initial.metadata['url'], ) request = _convert_request(request) @@ -437,12 +438,12 @@ def add_data_flow( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(request, 'DataFlowDebugPackage') + _json = self._serialize.body(request, 'DataFlowDebugPackage') request = build_add_data_flow_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.add_data_flow.metadata['url'], ) request = _convert_request(request) @@ -497,12 +498,12 @@ def delete_data_flow_debug_session( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(request, 'DeleteDataFlowDebugSessionRequest') + _json = self._serialize.body(request, 'DeleteDataFlowDebugSessionRequest') request = build_delete_data_flow_debug_session_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.delete_data_flow_debug_session.metadata['url'], ) request = _convert_request(request) @@ -540,12 +541,12 @@ def _execute_command_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(request, 'DataFlowDebugCommandRequest') + _json = self._serialize.body(request, 'DataFlowDebugCommandRequest') request = build_execute_command_request_initial( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._execute_command_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_data_flow_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_data_flow_operations.py index eabd92777731..d2b6989fe14f 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_data_flow_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_data_flow_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_create_or_update_data_flow_request_initial( @@ -242,13 +243,13 @@ def _create_or_update_data_flow_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _data_flow = _models.DataFlowResource(properties=properties) - json = self._serialize.body(_data_flow, 'DataFlowResource') + _json = self._serialize.body(_data_flow, 'DataFlowResource') request = build_create_or_update_data_flow_request_initial( data_flow_name=data_flow_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_data_flow_initial.metadata['url'], ) @@ -544,13 +545,13 @@ def _rename_data_flow_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_data_flow_request_initial( data_flow_name=data_flow_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_data_flow_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_dataset_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_dataset_operations.py index 6047e008d887..5ba287f2add0 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_dataset_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_dataset_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_datasets_by_workspace_request( @@ -322,13 +323,13 @@ def _create_or_update_dataset_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _dataset = _models.DatasetResource(properties=properties) - json = self._serialize.body(_dataset, 'DatasetResource') + _json = self._serialize.body(_dataset, 'DatasetResource') request = build_create_or_update_dataset_request_initial( dataset_name=dataset_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_dataset_initial.metadata['url'], ) @@ -626,13 +627,13 @@ def _rename_dataset_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_dataset_request_initial( dataset_name=dataset_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_dataset_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_integration_runtimes_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_integration_runtimes_operations.py index 9bdf8df2f6f2..2423533e3988 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_integration_runtimes_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_integration_runtimes_operations.py @@ -26,6 +26,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_list_request( diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_kql_script_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_kql_script_operations.py index 6b5df2e0b5d8..61115a18a714 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_kql_script_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_kql_script_operations.py @@ -28,6 +28,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_create_or_update_request_initial( @@ -206,13 +207,13 @@ def _create_or_update_initial( api_version = kwargs.pop('api_version', "2021-11-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(kql_script, 'KqlScriptResource') + _json = self._serialize.body(kql_script, 'KqlScriptResource') request = build_create_or_update_request_initial( kql_script_name=kql_script_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._create_or_update_initial.metadata['url'], ) request = _convert_request(request) @@ -497,13 +498,13 @@ def _rename_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _rename_request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_rename_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_rename_request, 'ArtifactRenameRequest') request = build_rename_request_initial( kql_script_name=kql_script_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_kql_scripts_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_kql_scripts_operations.py index 777b36827ccd..3cda6b7b3dda 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_kql_scripts_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_kql_scripts_operations.py @@ -27,6 +27,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_all_request( diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_library_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_library_operations.py index 88a97dbb6954..e14a923bc510 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_library_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_library_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_list_request( @@ -882,14 +883,14 @@ def append( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/octet-stream") # type: Optional[str] - content = content + _content = content request = build_append_request( library_name=library_name, comp=comp, api_version=api_version, content_type=content_type, - content=content, + content=_content, blob_condition_append_position=blob_condition_append_position, template_url=self.append.metadata['url'], ) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_linked_service_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_linked_service_operations.py index 689ba5406883..305e836e946b 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_linked_service_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_linked_service_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_linked_services_by_workspace_request( @@ -323,13 +324,13 @@ def _create_or_update_linked_service_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _linked_service = _models.LinkedServiceResource(properties=properties) - json = self._serialize.body(_linked_service, 'LinkedServiceResource') + _json = self._serialize.body(_linked_service, 'LinkedServiceResource') request = build_create_or_update_linked_service_request_initial( linked_service_name=linked_service_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_linked_service_initial.metadata['url'], ) @@ -628,13 +629,13 @@ def _rename_linked_service_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_linked_service_request_initial( linked_service_name=linked_service_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_linked_service_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_metastore_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_metastore_operations.py new file mode 100644 index 000000000000..936f0c346691 --- /dev/null +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_metastore_operations.py @@ -0,0 +1,431 @@ +# 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. +# -------------------------------------------------------------------------- +import functools +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 HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_register_request( + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/metastore/create-database-operations/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_database_operations_request( + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/metastore/create-database-operations/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request( + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/metastore/update-database-operations/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/metastore/databases/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class MetastoreOperations(object): + """MetastoreOperations 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.synapse.artifacts.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 + + @distributed_trace + def register( + self, + id, # type: str + input_folder, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MetastoreRegistrationResponse" + """Register files in Syms. + + :param id: The name of the database to be created. The name can contain only alphanumeric + characters and should not exceed 24 characters. + :type id: str + :param input_folder: The input folder containing CDM files. + :type input_folder: str + :keyword api_version: Api Version. The default value is "2021-07-01-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MetastoreRegistrationResponse, or the result of cls(response) + :rtype: ~azure.synapse.artifacts.models.MetastoreRegistrationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MetastoreRegistrationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _register_body = _models.MetastoreRegisterObject(input_folder=input_folder) + _json = self._serialize.body(_register_body, 'MetastoreRegisterObject') + + request = build_register_request( + id=id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.register.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('MetastoreRegistrationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + register.metadata = {'url': '/metastore/create-database-operations/{id}'} # type: ignore + + + @distributed_trace + def get_database_operations( + self, + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MetastoreRequestSuccessResponse" + """Gets status of the database. + + :param id: + :type id: str + :keyword api_version: Api Version. The default value is "2021-07-01-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MetastoreRequestSuccessResponse, or the result of cls(response) + :rtype: ~azure.synapse.artifacts.models.MetastoreRequestSuccessResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MetastoreRequestSuccessResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + + + request = build_get_database_operations_request( + id=id, + api_version=api_version, + template_url=self.get_database_operations.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + 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.ErrorContract, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('MetastoreRequestSuccessResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_database_operations.metadata = {'url': '/metastore/create-database-operations/{id}'} # type: ignore + + + @distributed_trace + def update( + self, + id, # type: str + input_folder, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MetastoreUpdationResponse" + """Update files in Syms. + + :param id: The name of the database to be updated. + :type id: str + :param input_folder: The input folder containing CDM files. + :type input_folder: str + :keyword api_version: Api Version. The default value is "2021-07-01-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MetastoreUpdationResponse, or the result of cls(response) + :rtype: ~azure.synapse.artifacts.models.MetastoreUpdationResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MetastoreUpdationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-07-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _update_body = _models.MetastoreUpdateObject(input_folder=input_folder) + _json = self._serialize.body(_update_body, 'MetastoreUpdateObject') + + request = build_update_request( + id=id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('MetastoreUpdationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': '/metastore/update-database-operations/{id}'} # type: ignore + + + @distributed_trace + def delete( + self, + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove files in Syms. + + :param id: + :type id: str + :keyword api_version: Api Version. The default value is "2021-07-01-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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 = kwargs.pop('api_version', "2021-07-01-preview") # type: str + + + request = build_delete_request( + id=id, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, pipeline_response) + raise HttpResponseError(response=response, model=error) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/metastore/databases/{id}'} # type: ignore + diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_notebook_operation_result_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_notebook_operation_result_operations.py index e8c83873d1d5..d6730d1fae79 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_notebook_operation_result_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_notebook_operation_result_operations.py @@ -26,6 +26,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_request( diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_notebook_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_notebook_operations.py index c2ac5d4f3922..03441f0daa01 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_notebook_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_notebook_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_notebooks_by_workspace_request( @@ -430,13 +431,13 @@ def _create_or_update_notebook_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(notebook, 'NotebookResource') + _json = self._serialize.body(notebook, 'NotebookResource') request = build_create_or_update_notebook_request_initial( notebook_name=notebook_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_notebook_initial.metadata['url'], ) @@ -734,13 +735,13 @@ def _rename_notebook_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_notebook_request_initial( notebook_name=notebook_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_notebook_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_operations.py index 035110ea796b..6e8d7666529e 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_pipelines_by_workspace_request( @@ -367,13 +368,13 @@ def _create_or_update_pipeline_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(pipeline, 'PipelineResource') + _json = self._serialize.body(pipeline, 'PipelineResource') request = build_create_or_update_pipeline_request_initial( pipeline_name=pipeline_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_pipeline_initial.metadata['url'], ) @@ -671,13 +672,13 @@ def _rename_pipeline_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_pipeline_request_initial( pipeline_name=pipeline_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_pipeline_initial.metadata['url'], ) request = _convert_request(request) @@ -817,15 +818,15 @@ def create_pipeline_run( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if parameters is not None: - json = self._serialize.body(parameters, '{object}') + _json = self._serialize.body(parameters, '{object}') else: - json = None + _json = None request = build_create_pipeline_run_request( pipeline_name=pipeline_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, reference_pipeline_run_id=reference_pipeline_run_id, is_recovery=is_recovery, start_activity_name=start_activity_name, diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_run_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_run_operations.py index 8fac7a961d39..1e769a38dfcc 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_run_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_pipeline_run_operations.py @@ -26,6 +26,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_query_pipeline_runs_by_workspace_request( @@ -215,12 +216,12 @@ def query_pipeline_runs_by_workspace( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(filter_parameters, 'RunFilterParameters') + _json = self._serialize.body(filter_parameters, 'RunFilterParameters') request = build_query_pipeline_runs_by_workspace_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.query_pipeline_runs_by_workspace.metadata['url'], ) request = _convert_request(request) @@ -338,14 +339,14 @@ def query_activity_runs( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(filter_parameters, 'RunFilterParameters') + _json = self._serialize.body(filter_parameters, 'RunFilterParameters') request = build_query_activity_runs_request( pipeline_name=pipeline_name, run_id=run_id, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.query_activity_runs.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_configuration_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_configuration_operations.py index 9561edb3a63e..1916d680ff15 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_configuration_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_configuration_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_spark_configurations_by_workspace_request( @@ -324,13 +325,13 @@ def _create_or_update_spark_configuration_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _spark_configuration = _models.SparkConfigurationResource(properties=properties) - json = self._serialize.body(_spark_configuration, 'SparkConfigurationResource') + _json = self._serialize.body(_spark_configuration, 'SparkConfigurationResource') request = build_create_or_update_spark_configuration_request_initial( spark_configuration_name=spark_configuration_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_spark_configuration_initial.metadata['url'], ) @@ -630,13 +631,13 @@ def _rename_spark_configuration_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_spark_configuration_request_initial( spark_configuration_name=spark_configuration_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_spark_configuration_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py index 7a85ee41b769..1c2099831793 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_spark_job_definitions_by_workspace_request( @@ -387,13 +388,13 @@ def _create_or_update_spark_job_definition_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _spark_job_definition = _models.SparkJobDefinitionResource(properties=properties) - json = self._serialize.body(_spark_job_definition, 'SparkJobDefinitionResource') + _json = self._serialize.body(_spark_job_definition, 'SparkJobDefinitionResource') request = build_create_or_update_spark_job_definition_request_initial( spark_job_definition_name=spark_job_definition_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_spark_job_definition_initial.metadata['url'], ) @@ -811,13 +812,13 @@ def _rename_spark_job_definition_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_spark_job_definition_request_initial( spark_job_definition_name=spark_job_definition_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_spark_job_definition_initial.metadata['url'], ) request = _convert_request(request) @@ -928,12 +929,12 @@ def _debug_spark_job_definition_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _spark_job_definition_azure_resource = _models.SparkJobDefinitionResource(properties=properties) - json = self._serialize.body(_spark_job_definition_azure_resource, 'SparkJobDefinitionResource') + _json = self._serialize.body(_spark_job_definition_azure_resource, 'SparkJobDefinitionResource') request = build_debug_spark_job_definition_request_initial( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._debug_spark_job_definition_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_sql_pools_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_sql_pools_operations.py index 9c16f74ada6a..aa54ac91c93e 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_sql_pools_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_sql_pools_operations.py @@ -26,6 +26,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_list_request( diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_sql_script_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_sql_script_operations.py index 1a5923b9055e..123ca02d68d0 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_sql_script_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_sql_script_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_sql_scripts_by_workspace_request( @@ -322,13 +323,13 @@ def _create_or_update_sql_script_initial( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(sql_script, 'SqlScriptResource') + _json = self._serialize.body(sql_script, 'SqlScriptResource') request = build_create_or_update_sql_script_request_initial( sql_script_name=sql_script_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_sql_script_initial.metadata['url'], ) @@ -626,13 +627,13 @@ def _rename_sql_script_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ArtifactRenameRequest(new_name=new_name) - json = self._serialize.body(_request, 'ArtifactRenameRequest') + _json = self._serialize.body(_request, 'ArtifactRenameRequest') request = build_rename_sql_script_request_initial( sql_script_name=sql_script_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self._rename_sql_script_initial.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_trigger_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_trigger_operations.py index 4d6436fbf195..acc3d6222edb 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_trigger_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_trigger_operations.py @@ -29,6 +29,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_triggers_by_workspace_request( @@ -451,13 +452,13 @@ def _create_or_update_trigger_initial( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _trigger = _models.TriggerResource(properties=properties) - json = self._serialize.body(_trigger, 'TriggerResource') + _json = self._serialize.body(_trigger, 'TriggerResource') request = build_create_or_update_trigger_request_initial( trigger_name=trigger_name, api_version=api_version, content_type=content_type, - json=json, + json=_json, if_match=if_match, template_url=self._create_or_update_trigger_initial.metadata['url'], ) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_trigger_run_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_trigger_run_operations.py index db44fea898a9..b05b35cc131e 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_trigger_run_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_trigger_run_operations.py @@ -26,6 +26,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_rerun_trigger_instance_request( @@ -292,12 +293,12 @@ def query_trigger_runs_by_workspace( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(filter_parameters, 'RunFilterParameters') + _json = self._serialize.body(filter_parameters, 'RunFilterParameters') request = build_query_trigger_runs_by_workspace_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, template_url=self.query_trigger_runs_by_workspace.metadata['url'], ) request = _convert_request(request) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_workspace_git_repo_management_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_workspace_git_repo_management_operations.py index 97cf0f704860..4d70d9c8b2ad 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_workspace_git_repo_management_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_workspace_git_repo_management_operations.py @@ -26,6 +26,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_git_hub_access_token_request( @@ -115,12 +116,12 @@ def get_git_hub_access_token( api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(git_hub_access_token_request, 'GitHubAccessTokenRequest') + _json = self._serialize.body(git_hub_access_token_request, 'GitHubAccessTokenRequest') request = build_get_git_hub_access_token_request( api_version=api_version, content_type=content_type, - json=json, + json=_json, client_request_id=client_request_id, template_url=self.get_git_hub_access_token.metadata['url'], ) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_workspace_operations.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_workspace_operations.py index 459a74189870..3c08973bc76c 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_workspace_operations.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_workspace_operations.py @@ -26,6 +26,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_request( From 6388994fa7cc5aa24b1ee7094da61b5aedec37dc Mon Sep 17 00:00:00 2001 From: Xiang Yan Date: Tue, 4 Jan 2022 13:52:40 -0800 Subject: [PATCH 2/3] SHA 949388b9dfddc435859fda2850c5bb5019aa217b --- .../azure/synapse/artifacts/models/_models.py | 24 +++++++++++++++++ .../synapse/artifacts/models/_models_py3.py | 26 +++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models.py index 19876321adf0..64eaef285f4c 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models.py @@ -3536,6 +3536,16 @@ class AzureBlobFSLinkedService(LinkedService): values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). :vartype azure_cloud_type: any + :ivar service_principal_credential_type: The service principal credential type to use in + Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' + for certificate. Type: string (or Expression with resultType string). + :vartype service_principal_credential_type: any + :ivar service_principal_credential: The credential of the service principal object in Azure + Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', + servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If + servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only + be AzureKeyVaultSecretReference. + :vartype service_principal_credential: ~azure.synapse.artifacts.models.SecretBase :ivar encrypted_credential: The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). @@ -3560,6 +3570,8 @@ class AzureBlobFSLinkedService(LinkedService): 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, 'azure_cloud_type': {'key': 'typeProperties.azureCloudType', 'type': 'object'}, + 'service_principal_credential_type': {'key': 'typeProperties.servicePrincipalCredentialType', 'type': 'object'}, + 'service_principal_credential': {'key': 'typeProperties.servicePrincipalCredential', 'type': 'SecretBase'}, 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, } @@ -3598,6 +3610,16 @@ def __init__( Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). :paramtype azure_cloud_type: any + :keyword service_principal_credential_type: The service principal credential type to use in + Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' + for certificate. Type: string (or Expression with resultType string). + :paramtype service_principal_credential_type: any + :keyword service_principal_credential: The credential of the service principal object in Azure + Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', + servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If + servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only + be AzureKeyVaultSecretReference. + :paramtype service_principal_credential: ~azure.synapse.artifacts.models.SecretBase :keyword encrypted_credential: The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). @@ -3611,6 +3633,8 @@ def __init__( self.service_principal_key = kwargs.get('service_principal_key', None) self.tenant = kwargs.get('tenant', None) self.azure_cloud_type = kwargs.get('azure_cloud_type', None) + self.service_principal_credential_type = kwargs.get('service_principal_credential_type', None) + self.service_principal_credential = kwargs.get('service_principal_credential', None) self.encrypted_credential = kwargs.get('encrypted_credential', None) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models_py3.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models_py3.py index a2d5f2ee5565..60374b589165 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models_py3.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_models_py3.py @@ -3901,6 +3901,16 @@ class AzureBlobFSLinkedService(LinkedService): values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). :vartype azure_cloud_type: any + :ivar service_principal_credential_type: The service principal credential type to use in + Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' + for certificate. Type: string (or Expression with resultType string). + :vartype service_principal_credential_type: any + :ivar service_principal_credential: The credential of the service principal object in Azure + Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', + servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If + servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only + be AzureKeyVaultSecretReference. + :vartype service_principal_credential: ~azure.synapse.artifacts.models.SecretBase :ivar encrypted_credential: The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). @@ -3925,6 +3935,8 @@ class AzureBlobFSLinkedService(LinkedService): 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, 'azure_cloud_type': {'key': 'typeProperties.azureCloudType', 'type': 'object'}, + 'service_principal_credential_type': {'key': 'typeProperties.servicePrincipalCredentialType', 'type': 'object'}, + 'service_principal_credential': {'key': 'typeProperties.servicePrincipalCredential', 'type': 'SecretBase'}, 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, } @@ -3942,6 +3954,8 @@ def __init__( service_principal_key: Optional["SecretBase"] = None, tenant: Optional[Any] = None, azure_cloud_type: Optional[Any] = None, + service_principal_credential_type: Optional[Any] = None, + service_principal_credential: Optional["SecretBase"] = None, encrypted_credential: Optional[Any] = None, **kwargs ): @@ -3976,6 +3990,16 @@ def __init__( Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). :paramtype azure_cloud_type: any + :keyword service_principal_credential_type: The service principal credential type to use in + Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' + for certificate. Type: string (or Expression with resultType string). + :paramtype service_principal_credential_type: any + :keyword service_principal_credential: The credential of the service principal object in Azure + Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', + servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If + servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only + be AzureKeyVaultSecretReference. + :paramtype service_principal_credential: ~azure.synapse.artifacts.models.SecretBase :keyword encrypted_credential: The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). @@ -3989,6 +4013,8 @@ def __init__( self.service_principal_key = service_principal_key self.tenant = tenant self.azure_cloud_type = azure_cloud_type + self.service_principal_credential_type = service_principal_credential_type + self.service_principal_credential = service_principal_credential self.encrypted_credential = encrypted_credential From d4255b2ce477ef0116bb291298ac3f3cc8ab645a Mon Sep 17 00:00:00 2001 From: Xiang Yan Date: Thu, 6 Jan 2022 17:15:35 -0800 Subject: [PATCH 3/3] update changelog --- sdk/synapse/azure-synapse-artifacts/CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/synapse/azure-synapse-artifacts/CHANGELOG.md b/sdk/synapse/azure-synapse-artifacts/CHANGELOG.md index 5e5dfc198e2c..2c94d4195781 100644 --- a/sdk/synapse/azure-synapse-artifacts/CHANGELOG.md +++ b/sdk/synapse/azure-synapse-artifacts/CHANGELOG.md @@ -1,12 +1,10 @@ # Release History -## 0.11.0 (Unreleased) +## 0.11.0 (2022-01-11) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Added `MetastoreOperations` ### Other Changes