From cec80b1a9a9136bb7c9496ed74355e3bb006afa4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 29 Sep 2021 03:15:13 +0000 Subject: [PATCH] CodeGen from PR 16207 in Azure/azure-rest-api-specs Merge b1a793fd9dd9b427efd4297ff926c7a0cc9c3a53 into 0e16aa6485eb310fa2561949f1722ae8f80889d6 --- sdk/datashare/azure-mgmt-datashare/_meta.json | 11 +- .../_data_share_management_client.py | 24 +++ .../azure/mgmt/datashare/_metadata.json | 11 +- .../azure/mgmt/datashare/_version.py | 2 +- .../aio/_data_share_management_client.py | 23 +++ .../mgmt/datashare/aio/operations/__init__.py | 2 + .../aio/operations/_accounts_operations.py | 24 +-- .../_consumer_invitations_operations.py | 6 +- .../_consumer_source_data_sets_operations.py | 2 +- .../_data_set_mappings_operations.py | 8 +- .../aio/operations/_data_sets_operations.py | 14 +- .../_email_registrations_operations.py | 161 +++++++++++++++++ .../aio/operations/_invitations_operations.py | 8 +- .../datashare/aio/operations/_operations.py | 2 +- ...provider_share_subscriptions_operations.py | 16 +- .../_share_subscriptions_operations.py | 36 ++-- .../aio/operations/_shares_operations.py | 18 +- .../_synchronization_settings_operations.py | 14 +- .../aio/operations/_triggers_operations.py | 20 +-- .../azure/mgmt/datashare/models/__init__.py | 5 + .../_data_share_management_client_enums.py | 10 +- .../azure/mgmt/datashare/models/_models.py | 45 +++++ .../mgmt/datashare/models/_models_py3.py | 47 +++++ .../mgmt/datashare/operations/__init__.py | 2 + .../operations/_accounts_operations.py | 8 +- .../operations/_data_sets_operations.py | 4 +- .../_email_registrations_operations.py | 167 ++++++++++++++++++ ...provider_share_subscriptions_operations.py | 4 +- .../_share_subscriptions_operations.py | 12 +- .../operations/_shares_operations.py | 4 +- .../_synchronization_settings_operations.py | 4 +- .../operations/_triggers_operations.py | 8 +- 32 files changed, 602 insertions(+), 120 deletions(-) create mode 100644 sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_email_registrations_operations.py create mode 100644 sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_email_registrations_operations.py diff --git a/sdk/datashare/azure-mgmt-datashare/_meta.json b/sdk/datashare/azure-mgmt-datashare/_meta.json index 77e7bad2531f..fdeadcc5e592 100644 --- a/sdk/datashare/azure-mgmt-datashare/_meta.json +++ b/sdk/datashare/azure-mgmt-datashare/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.0.6369", - "use": "@autorest/python@5.6.2", - "commit": "36084f10aacb98d77af2f67c9d57fca2bbe68e97", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "678d5a1994e1c1f888abd26b26f9cefc4b706ec3", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/datashare/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.2 --version=3.0.6369", + "autorest_command": "autorest specification/datashare/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/datashare/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py index de175d951bb4..c7f752052aab 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py @@ -16,12 +16,14 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import DataShareManagementClientConfiguration from .operations import AccountsOperations from .operations import ConsumerInvitationsOperations from .operations import DataSetsOperations from .operations import DataSetMappingsOperations +from .operations import EmailRegistrationsOperations from .operations import InvitationsOperations from .operations import Operations from .operations import SharesOperations @@ -44,6 +46,8 @@ class DataShareManagementClient(object): :vartype data_sets: azure.mgmt.datashare.operations.DataSetsOperations :ivar data_set_mappings: DataSetMappingsOperations operations :vartype data_set_mappings: azure.mgmt.datashare.operations.DataSetMappingsOperations + :ivar email_registrations: EmailRegistrationsOperations operations + :vartype email_registrations: azure.mgmt.datashare.operations.EmailRegistrationsOperations :ivar invitations: InvitationsOperations operations :vartype invitations: azure.mgmt.datashare.operations.InvitationsOperations :ivar operations: Operations operations @@ -94,6 +98,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.data_set_mappings = DataSetMappingsOperations( self._client, self._config, self._serialize, self._deserialize) + self.email_registrations = EmailRegistrationsOperations( + self._client, self._config, self._serialize, self._deserialize) self.invitations = InvitationsOperations( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( @@ -111,6 +117,24 @@ def __init__( self.triggers = TriggersOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_metadata.json b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_metadata.json index 0e83432b54a1..b4995efa7a11 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_metadata.json +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataShareManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataShareManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataShareManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataShareManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -102,6 +102,7 @@ "consumer_invitations": "ConsumerInvitationsOperations", "data_sets": "DataSetsOperations", "data_set_mappings": "DataSetMappingsOperations", + "email_registrations": "EmailRegistrationsOperations", "invitations": "InvitationsOperations", "operations": "Operations", "shares": "SharesOperations", @@ -110,11 +111,5 @@ "consumer_source_data_sets": "ConsumerSourceDataSetsOperations", "synchronization_settings": "SynchronizationSettingsOperations", "triggers": "TriggersOperations" - }, - "operation_mixins": { - "sync_imports": "None", - "async_imports": "None", - "operations": { - } } } \ No newline at end of file diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_version.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_version.py index c47f66669f1b..e5754a47ce68 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_version.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_data_share_management_client.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_data_share_management_client.py index cbd2637978aa..f50c636dc745 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_data_share_management_client.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_data_share_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -20,6 +21,7 @@ from .operations import ConsumerInvitationsOperations from .operations import DataSetsOperations from .operations import DataSetMappingsOperations +from .operations import EmailRegistrationsOperations from .operations import InvitationsOperations from .operations import Operations from .operations import SharesOperations @@ -42,6 +44,8 @@ class DataShareManagementClient(object): :vartype data_sets: azure.mgmt.datashare.aio.operations.DataSetsOperations :ivar data_set_mappings: DataSetMappingsOperations operations :vartype data_set_mappings: azure.mgmt.datashare.aio.operations.DataSetMappingsOperations + :ivar email_registrations: EmailRegistrationsOperations operations + :vartype email_registrations: azure.mgmt.datashare.aio.operations.EmailRegistrationsOperations :ivar invitations: InvitationsOperations operations :vartype invitations: azure.mgmt.datashare.aio.operations.InvitationsOperations :ivar operations: Operations operations @@ -91,6 +95,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.data_set_mappings = DataSetMappingsOperations( self._client, self._config, self._serialize, self._deserialize) + self.email_registrations = EmailRegistrationsOperations( + self._client, self._config, self._serialize, self._deserialize) self.invitations = InvitationsOperations( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( @@ -108,6 +114,23 @@ def __init__( self.triggers = TriggersOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/__init__.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/__init__.py index 7cd147304b97..e6f97231afda 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/__init__.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/__init__.py @@ -10,6 +10,7 @@ from ._consumer_invitations_operations import ConsumerInvitationsOperations from ._data_sets_operations import DataSetsOperations from ._data_set_mappings_operations import DataSetMappingsOperations +from ._email_registrations_operations import EmailRegistrationsOperations from ._invitations_operations import InvitationsOperations from ._operations import Operations from ._shares_operations import SharesOperations @@ -24,6 +25,7 @@ 'ConsumerInvitationsOperations', 'DataSetsOperations', 'DataSetMappingsOperations', + 'EmailRegistrationsOperations', 'InvitationsOperations', 'Operations', 'SharesOperations', diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_accounts_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_accounts_operations.py index 7418fac88112..465482561c23 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_accounts_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_accounts_operations.py @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_subscription( self, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccountList"]: """List Accounts in a subscription. @@ -121,7 +121,7 @@ async def get( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> "_models.Account": """Get an account under a resource group. @@ -183,7 +183,7 @@ async def _create_initial( resource_group_name: str, account_name: str, account: "_models.Account", - **kwargs + **kwargs: Any ) -> "_models.Account": cls = kwargs.pop('cls', None) # type: ClsType["_models.Account"] error_map = { @@ -241,7 +241,7 @@ async def begin_create( resource_group_name: str, account_name: str, account: "_models.Account", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Account"]: """Create an account in the given resource group. @@ -255,8 +255,8 @@ async def begin_create( :type account: ~azure.mgmt.datashare.models.Account :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Account or the result of cls(response) @@ -313,7 +313,7 @@ async def _delete_initial( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResponse"]] error_map = { @@ -363,7 +363,7 @@ async def begin_delete( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResponse"]: """Delete an account. @@ -375,8 +375,8 @@ async def begin_delete( :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OperationResponse or the result of cls(response) @@ -433,7 +433,7 @@ async def update( resource_group_name: str, account_name: str, account_update_parameters: "_models.AccountUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Account": """Patch a given account. @@ -501,7 +501,7 @@ def list_by_resource_group( self, resource_group_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccountList"]: """List Accounts in a resource group. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_invitations_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_invitations_operations.py index 57397990deae..a53ec14bfe19 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_invitations_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_invitations_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_invitations( self, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ConsumerInvitationList"]: """List the invitations. @@ -115,7 +115,7 @@ async def get( self, location: str, invitation_id: str, - **kwargs + **kwargs: Any ) -> "_models.ConsumerInvitation": """Gets the invitation identified by invitationId. @@ -175,7 +175,7 @@ async def reject_invitation( self, location: str, invitation: "_models.ConsumerInvitation", - **kwargs + **kwargs: Any ) -> "_models.ConsumerInvitation": """Rejects the invitation identified by invitationId. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_source_data_sets_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_source_data_sets_operations.py index 649e098dee9a..a5cce865c4fa 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_source_data_sets_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_source_data_sets_operations.py @@ -47,7 +47,7 @@ def list_by_share_subscription( account_name: str, share_subscription_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ConsumerSourceDataSetList"]: """Get source dataSets of a shareSubscription. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_set_mappings_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_set_mappings_operations.py index da14e60e016b..74a2ae26a278 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_set_mappings_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_set_mappings_operations.py @@ -47,7 +47,7 @@ async def get( account_name: str, share_subscription_name: str, data_set_mapping_name: str, - **kwargs + **kwargs: Any ) -> "_models.DataSetMapping": """Get DataSetMapping in a shareSubscription. @@ -117,7 +117,7 @@ async def create( share_subscription_name: str, data_set_mapping_name: str, data_set_mapping: "_models.DataSetMapping", - **kwargs + **kwargs: Any ) -> "_models.DataSetMapping": """Maps a source data set in the source share to a sink data set in the share subscription. Enables copying the data set from source to destination. @@ -199,7 +199,7 @@ async def delete( account_name: str, share_subscription_name: str, data_set_mapping_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete DataSetMapping in a shareSubscription. @@ -267,7 +267,7 @@ def list_by_share_subscription( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DataSetMappingList"]: """List DataSetMappings in a share subscription. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_sets_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_sets_operations.py index 5081c2602ee2..c6427d991390 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_sets_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_sets_operations.py @@ -49,7 +49,7 @@ async def get( account_name: str, share_name: str, data_set_name: str, - **kwargs + **kwargs: Any ) -> "_models.DataSet": """Get DataSet in a share. @@ -119,7 +119,7 @@ async def create( share_name: str, data_set_name: str, data_set: "_models.DataSet", - **kwargs + **kwargs: Any ) -> "_models.DataSet": """Adds a new data set to an existing share. @@ -199,7 +199,7 @@ async def _delete_initial( account_name: str, share_name: str, data_set_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -248,7 +248,7 @@ async def begin_delete( account_name: str, share_name: str, data_set_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete DataSet in a share. @@ -264,8 +264,8 @@ async def begin_delete( :type data_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -326,7 +326,7 @@ def list_by_share( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DataSetList"]: """List DataSets in a share. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_email_registrations_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_email_registrations_operations.py new file mode 100644 index 000000000000..6fd0d1e27595 --- /dev/null +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_email_registrations_operations.py @@ -0,0 +1,161 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EmailRegistrationsOperations: + """EmailRegistrationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datashare.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def activate_email( + self, + location: str, + email_registration: "_models.EmailRegistration", + **kwargs: Any + ) -> "_models.EmailRegistration": + """Activates the tenant and email combination using email code received. + + Activate the email registration for the current tenant. + + :param location: Location of the activation. + :type location: str + :param email_registration: The payload for tenant domain activation. + :type email_registration: ~azure.mgmt.datashare.models.EmailRegistration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EmailRegistration, or the result of cls(response) + :rtype: ~azure.mgmt.datashare.models.EmailRegistration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EmailRegistration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.activate_email.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(email_registration, 'EmailRegistration') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DataShareError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EmailRegistration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + activate_email.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/activateEmail'} # type: ignore + + async def register_email( + self, + location: str, + **kwargs: Any + ) -> "_models.EmailRegistration": + """Registers the tenant and email combination for verification. + + Register an email for the current tenant. + + :param location: Location of the registration. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EmailRegistration, or the result of cls(response) + :rtype: ~azure.mgmt.datashare.models.EmailRegistration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EmailRegistration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-09-01" + accept = "application/json" + + # Construct URL + url = self.register_email.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DataShareError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EmailRegistration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + register_email.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/registerEmail'} # type: ignore diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_invitations_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_invitations_operations.py index 9fcf74312894..7cd5c6edfaae 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_invitations_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_invitations_operations.py @@ -47,7 +47,7 @@ async def get( account_name: str, share_name: str, invitation_name: str, - **kwargs + **kwargs: Any ) -> "_models.Invitation": """Get Invitation in a share. @@ -117,7 +117,7 @@ async def create( share_name: str, invitation_name: str, invitation: "_models.Invitation", - **kwargs + **kwargs: Any ) -> "_models.Invitation": """Sends a new invitation to a recipient to access a share. @@ -197,7 +197,7 @@ async def delete( account_name: str, share_name: str, invitation_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete Invitation in a share. @@ -265,7 +265,7 @@ def list_by_share( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.InvitationList"]: """List all Invitations in a share. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_operations.py index ba71b9027376..7c35e71d6bbd 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """Lists the available operations. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_provider_share_subscriptions_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_provider_share_subscriptions_operations.py index 6f4bfa458b77..ccefb65c0364 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_provider_share_subscriptions_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_provider_share_subscriptions_operations.py @@ -50,7 +50,7 @@ async def adjust( share_name: str, provider_share_subscription_id: str, provider_share_subscription: "_models.ProviderShareSubscription", - **kwargs + **kwargs: Any ) -> "_models.ProviderShareSubscription": """Adjust the expiration date of a share subscription in a provider share. @@ -127,7 +127,7 @@ async def reinstate( share_name: str, provider_share_subscription_id: str, provider_share_subscription: "_models.ProviderShareSubscription", - **kwargs + **kwargs: Any ) -> "_models.ProviderShareSubscription": """Reinstate share subscription in a provider share. @@ -203,7 +203,7 @@ async def _revoke_initial( account_name: str, share_name: str, provider_share_subscription_id: str, - **kwargs + **kwargs: Any ) -> "_models.ProviderShareSubscription": cls = kwargs.pop('cls', None) # type: ClsType["_models.ProviderShareSubscription"] error_map = { @@ -259,7 +259,7 @@ async def begin_revoke( account_name: str, share_name: str, provider_share_subscription_id: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ProviderShareSubscription"]: """Revoke share subscription in a provider share. @@ -275,8 +275,8 @@ async def begin_revoke( :type provider_share_subscription_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ProviderShareSubscription or the result of cls(response) @@ -338,7 +338,7 @@ async def get_by_share( account_name: str, share_name: str, provider_share_subscription_id: str, - **kwargs + **kwargs: Any ) -> "_models.ProviderShareSubscription": """Get share subscription in a provider share. @@ -407,7 +407,7 @@ def list_by_share( account_name: str, share_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProviderShareSubscriptionList"]: """List of available share subscriptions to a provider share. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_share_subscriptions_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_share_subscriptions_operations.py index 77d5d06098c2..869eec4a0748 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_share_subscriptions_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_share_subscriptions_operations.py @@ -49,7 +49,7 @@ async def _cancel_synchronization_initial( account_name: str, share_subscription_name: str, share_subscription_synchronization: "_models.ShareSubscriptionSynchronization", - **kwargs + **kwargs: Any ) -> "_models.ShareSubscriptionSynchronization": cls = kwargs.pop('cls', None) # type: ClsType["_models.ShareSubscriptionSynchronization"] error_map = { @@ -109,7 +109,7 @@ async def begin_cancel_synchronization( account_name: str, share_subscription_name: str, share_subscription_synchronization: "_models.ShareSubscriptionSynchronization", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ShareSubscriptionSynchronization"]: """Request cancellation of a data share snapshot. @@ -125,8 +125,8 @@ async def begin_cancel_synchronization( :type share_subscription_synchronization: ~azure.mgmt.datashare.models.ShareSubscriptionSynchronization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ShareSubscriptionSynchronization or the result of cls(response) @@ -187,7 +187,7 @@ def list_source_share_synchronization_settings( account_name: str, share_subscription_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SourceShareSynchronizationSettingList"]: """Get source share synchronization settings for a shareSubscription. @@ -276,7 +276,7 @@ def list_synchronization_details( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SynchronizationDetailsList"]: """List data set level details for a share subscription synchronization. @@ -382,7 +382,7 @@ def list_synchronizations( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ShareSubscriptionSynchronizationList"]: """List Synchronizations in a share subscription. @@ -476,7 +476,7 @@ async def _synchronize_initial( account_name: str, share_subscription_name: str, synchronize: "_models.Synchronize", - **kwargs + **kwargs: Any ) -> "_models.ShareSubscriptionSynchronization": cls = kwargs.pop('cls', None) # type: ClsType["_models.ShareSubscriptionSynchronization"] error_map = { @@ -536,7 +536,7 @@ async def begin_synchronize( account_name: str, share_subscription_name: str, synchronize: "_models.Synchronize", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ShareSubscriptionSynchronization"]: """Initiate an asynchronous data share job. @@ -552,8 +552,8 @@ async def begin_synchronize( :type synchronize: ~azure.mgmt.datashare.models.Synchronize :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ShareSubscriptionSynchronization or the result of cls(response) @@ -613,7 +613,7 @@ async def get( resource_group_name: str, account_name: str, share_subscription_name: str, - **kwargs + **kwargs: Any ) -> "_models.ShareSubscription": """Get shareSubscription in an account. @@ -679,7 +679,7 @@ async def create( account_name: str, share_subscription_name: str, share_subscription: "_models.ShareSubscription", - **kwargs + **kwargs: Any ) -> "_models.ShareSubscription": """Create shareSubscription in an account. @@ -755,7 +755,7 @@ async def _delete_initial( resource_group_name: str, account_name: str, share_subscription_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResponse"]] error_map = { @@ -807,7 +807,7 @@ async def begin_delete( resource_group_name: str, account_name: str, share_subscription_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResponse"]: """Delete shareSubscription in an account. @@ -821,8 +821,8 @@ async def begin_delete( :type share_subscription_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OperationResponse or the result of cls(response) @@ -883,7 +883,7 @@ def list_by_account( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ShareSubscriptionList"]: """List of available share subscriptions under an account. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_shares_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_shares_operations.py index 7cb09c5f00ec..7b2754eb4cd1 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_shares_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_shares_operations.py @@ -52,7 +52,7 @@ def list_synchronization_details( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SynchronizationDetailsList"]: """List data set level details for a share synchronization. @@ -158,7 +158,7 @@ def list_synchronizations( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ShareSynchronizationList"]: """List Synchronizations in a share. @@ -251,7 +251,7 @@ async def get( resource_group_name: str, account_name: str, share_name: str, - **kwargs + **kwargs: Any ) -> "_models.Share": """Get a specified share. @@ -317,7 +317,7 @@ async def create( account_name: str, share_name: str, share: "_models.Share", - **kwargs + **kwargs: Any ) -> "_models.Share": """Create a share in the given account. @@ -393,7 +393,7 @@ async def _delete_initial( resource_group_name: str, account_name: str, share_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResponse"]] error_map = { @@ -445,7 +445,7 @@ async def begin_delete( resource_group_name: str, account_name: str, share_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResponse"]: """Deletes a share. @@ -459,8 +459,8 @@ async def begin_delete( :type share_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OperationResponse or the result of cls(response) @@ -521,7 +521,7 @@ def list_by_account( skip_token: Optional[str] = None, filter: Optional[str] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ShareList"]: """List of available shares under an account. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_synchronization_settings_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_synchronization_settings_operations.py index 15b4f4038d9f..b7f5574e3003 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_synchronization_settings_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_synchronization_settings_operations.py @@ -49,7 +49,7 @@ async def get( account_name: str, share_name: str, synchronization_setting_name: str, - **kwargs + **kwargs: Any ) -> "_models.SynchronizationSetting": """Get synchronizationSetting in a share. @@ -119,7 +119,7 @@ async def create( share_name: str, synchronization_setting_name: str, synchronization_setting: "_models.SynchronizationSetting", - **kwargs + **kwargs: Any ) -> "_models.SynchronizationSetting": """Adds a new synchronization setting to an existing share. @@ -199,7 +199,7 @@ async def _delete_initial( account_name: str, share_name: str, synchronization_setting_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResponse"]] error_map = { @@ -253,7 +253,7 @@ async def begin_delete( account_name: str, share_name: str, synchronization_setting_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResponse"]: """Delete synchronizationSetting in a share. @@ -269,8 +269,8 @@ async def begin_delete( :type synchronization_setting_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OperationResponse or the result of cls(response) @@ -332,7 +332,7 @@ def list_by_share( account_name: str, share_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SynchronizationSettingList"]: """List synchronizationSettings in a share. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_triggers_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_triggers_operations.py index 47dd836b245f..da45cd6092aa 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_triggers_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_triggers_operations.py @@ -49,7 +49,7 @@ async def get( account_name: str, share_subscription_name: str, trigger_name: str, - **kwargs + **kwargs: Any ) -> "_models.Trigger": """Get Trigger in a shareSubscription. @@ -119,7 +119,7 @@ async def _create_initial( share_subscription_name: str, trigger_name: str, trigger: "_models.Trigger", - **kwargs + **kwargs: Any ) -> "_models.Trigger": cls = kwargs.pop('cls', None) # type: ClsType["_models.Trigger"] error_map = { @@ -181,7 +181,7 @@ async def begin_create( share_subscription_name: str, trigger_name: str, trigger: "_models.Trigger", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Trigger"]: """This method creates a trigger for a share subscription. @@ -200,8 +200,8 @@ async def begin_create( :type trigger: ~azure.mgmt.datashare.models.Trigger :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Trigger or the result of cls(response) @@ -264,7 +264,7 @@ async def _delete_initial( account_name: str, share_subscription_name: str, trigger_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResponse"]] error_map = { @@ -318,7 +318,7 @@ async def begin_delete( account_name: str, share_subscription_name: str, trigger_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResponse"]: """Delete Trigger in a shareSubscription. @@ -334,8 +334,8 @@ async def begin_delete( :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OperationResponse or the result of cls(response) @@ -397,7 +397,7 @@ def list_by_share_subscription( account_name: str, share_subscription_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TriggerList"]: """List Triggers in a share subscription. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py index 49f874f969e9..d115e167ea4b 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py @@ -36,6 +36,7 @@ from ._models_py3 import DataShareErrorInfo from ._models_py3 import DefaultDto from ._models_py3 import DimensionProperties + from ._models_py3 import EmailRegistration from ._models_py3 import Identity from ._models_py3 import Invitation from ._models_py3 import InvitationList @@ -110,6 +111,7 @@ from ._models import DataShareErrorInfo # type: ignore from ._models import DefaultDto # type: ignore from ._models import DimensionProperties # type: ignore + from ._models import EmailRegistration # type: ignore from ._models import Identity # type: ignore from ._models import Invitation # type: ignore from ._models import InvitationList # type: ignore @@ -166,6 +168,7 @@ OutputType, ProvisioningState, RecurrenceInterval, + RegistrationStatus, ShareKind, ShareSubscriptionStatus, SourceShareSynchronizationSettingKind, @@ -207,6 +210,7 @@ 'DataShareErrorInfo', 'DefaultDto', 'DimensionProperties', + 'EmailRegistration', 'Identity', 'Invitation', 'InvitationList', @@ -261,6 +265,7 @@ 'OutputType', 'ProvisioningState', 'RecurrenceInterval', + 'RegistrationStatus', 'ShareKind', 'ShareSubscriptionStatus', 'SourceShareSynchronizationSettingKind', diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py index 346f1862f57a..9fbe4947f9f6 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py @@ -120,7 +120,7 @@ class OutputType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PARQUET = "Parquet" class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Provisioning state of the data set mapping. + """Provisioning state of the Account """ SUCCEEDED = "Succeeded" @@ -136,6 +136,14 @@ class RecurrenceInterval(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): HOUR = "Hour" DAY = "Day" +class RegistrationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Registration status + """ + + ACTIVATION_PENDING = "ActivationPending" + ACTIVATED = "Activated" + ACTIVATION_ATTEMPTS_EXHAUSTED = "ActivationAttemptsExhausted" + class ShareKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Share kind. """ diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py index 8b4218cc1123..73bb8b6d9697 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py @@ -1818,6 +1818,51 @@ def __init__( self.name = kwargs.get('name', None) +class EmailRegistration(msrest.serialization.Model): + """Dto for tenant domain registration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param activation_code: Activation code for the registration. + :type activation_code: str + :ivar activation_expiration_date: Date of the activation expiration. + :vartype activation_expiration_date: ~datetime.datetime + :ivar email: The email to register. + :vartype email: str + :ivar registration_status: Registration status. Possible values include: "ActivationPending", + "Activated", "ActivationAttemptsExhausted". + :vartype registration_status: str or ~azure.mgmt.datashare.models.RegistrationStatus + :ivar tenant_id: The tenant to register. + :vartype tenant_id: str + """ + + _validation = { + 'activation_expiration_date': {'readonly': True}, + 'email': {'readonly': True}, + 'registration_status': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'activation_code': {'key': 'activationCode', 'type': 'str'}, + 'activation_expiration_date': {'key': 'activationExpirationDate', 'type': 'iso-8601'}, + 'email': {'key': 'email', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EmailRegistration, self).__init__(**kwargs) + self.activation_code = kwargs.get('activation_code', None) + self.activation_expiration_date = None + self.email = None + self.registration_status = None + self.tenant_id = None + + class Identity(msrest.serialization.Model): """Identity of resource. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py index f2f5217a4718..35784758fb68 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py @@ -1946,6 +1946,53 @@ def __init__( self.name = name +class EmailRegistration(msrest.serialization.Model): + """Dto for tenant domain registration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param activation_code: Activation code for the registration. + :type activation_code: str + :ivar activation_expiration_date: Date of the activation expiration. + :vartype activation_expiration_date: ~datetime.datetime + :ivar email: The email to register. + :vartype email: str + :ivar registration_status: Registration status. Possible values include: "ActivationPending", + "Activated", "ActivationAttemptsExhausted". + :vartype registration_status: str or ~azure.mgmt.datashare.models.RegistrationStatus + :ivar tenant_id: The tenant to register. + :vartype tenant_id: str + """ + + _validation = { + 'activation_expiration_date': {'readonly': True}, + 'email': {'readonly': True}, + 'registration_status': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'activation_code': {'key': 'activationCode', 'type': 'str'}, + 'activation_expiration_date': {'key': 'activationExpirationDate', 'type': 'iso-8601'}, + 'email': {'key': 'email', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + activation_code: Optional[str] = None, + **kwargs + ): + super(EmailRegistration, self).__init__(**kwargs) + self.activation_code = activation_code + self.activation_expiration_date = None + self.email = None + self.registration_status = None + self.tenant_id = None + + class Identity(msrest.serialization.Model): """Identity of resource. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/__init__.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/__init__.py index 7cd147304b97..e6f97231afda 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/__init__.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/__init__.py @@ -10,6 +10,7 @@ from ._consumer_invitations_operations import ConsumerInvitationsOperations from ._data_sets_operations import DataSetsOperations from ._data_set_mappings_operations import DataSetMappingsOperations +from ._email_registrations_operations import EmailRegistrationsOperations from ._invitations_operations import InvitationsOperations from ._operations import Operations from ._shares_operations import SharesOperations @@ -24,6 +25,7 @@ 'ConsumerInvitationsOperations', 'DataSetsOperations', 'DataSetMappingsOperations', + 'EmailRegistrationsOperations', 'InvitationsOperations', 'Operations', 'SharesOperations', diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py index 3f997aae5bf9..1addb66559c0 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py @@ -263,8 +263,8 @@ def begin_create( :type account: ~azure.mgmt.datashare.models.Account :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Account or the result of cls(response) @@ -385,8 +385,8 @@ def begin_delete( :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either OperationResponse or the result of cls(response) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py index 8f2abfead10c..5e81f92e93a2 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py @@ -272,8 +272,8 @@ def begin_delete( :type data_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_email_registrations_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_email_registrations_operations.py new file mode 100644 index 000000000000..af166f7dce2c --- /dev/null +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_email_registrations_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class EmailRegistrationsOperations(object): + """EmailRegistrationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datashare.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def activate_email( + self, + location, # type: str + email_registration, # type: "_models.EmailRegistration" + **kwargs # type: Any + ): + # type: (...) -> "_models.EmailRegistration" + """Activates the tenant and email combination using email code received. + + Activate the email registration for the current tenant. + + :param location: Location of the activation. + :type location: str + :param email_registration: The payload for tenant domain activation. + :type email_registration: ~azure.mgmt.datashare.models.EmailRegistration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EmailRegistration, or the result of cls(response) + :rtype: ~azure.mgmt.datashare.models.EmailRegistration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EmailRegistration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.activate_email.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(email_registration, 'EmailRegistration') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DataShareError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EmailRegistration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + activate_email.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/activateEmail'} # type: ignore + + def register_email( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EmailRegistration" + """Registers the tenant and email combination for verification. + + Register an email for the current tenant. + + :param location: Location of the registration. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EmailRegistration, or the result of cls(response) + :rtype: ~azure.mgmt.datashare.models.EmailRegistration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EmailRegistration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-09-01" + accept = "application/json" + + # Construct URL + url = self.register_email.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DataShareError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EmailRegistration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + register_email.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/registerEmail'} # type: ignore diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py index 615fb43fea3f..26c6e90c050c 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py @@ -283,8 +283,8 @@ def begin_revoke( :type provider_share_subscription_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ProviderShareSubscription or the result of cls(response) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py index b6326ae3422c..485db038c397 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py @@ -131,8 +131,8 @@ def begin_cancel_synchronization( :type share_subscription_synchronization: ~azure.mgmt.datashare.models.ShareSubscriptionSynchronization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ShareSubscriptionSynchronization or the result of cls(response) @@ -563,8 +563,8 @@ def begin_synchronize( :type synchronize: ~azure.mgmt.datashare.models.Synchronize :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ShareSubscriptionSynchronization or the result of cls(response) @@ -836,8 +836,8 @@ def begin_delete( :type share_subscription_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either OperationResponse or the result of cls(response) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py index 36e44618e1c9..aeb233484915 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py @@ -469,8 +469,8 @@ def begin_delete( :type share_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either OperationResponse or the result of cls(response) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py index b945483b060c..443d58490d12 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py @@ -277,8 +277,8 @@ def begin_delete( :type synchronization_setting_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either OperationResponse or the result of cls(response) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py index 0acfccffd94f..b1f8805c72aa 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py @@ -207,8 +207,8 @@ def begin_create( :type trigger: ~azure.mgmt.datashare.models.Trigger :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Trigger or the result of cls(response) @@ -343,8 +343,8 @@ def begin_delete( :type trigger_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either OperationResponse or the result of cls(response)