From 08c630af3525abc6ee6485f7f86f5749ae5c2c5d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 4 Oct 2021 23:00:23 +0000 Subject: [PATCH] CodeGen from PR 16041 in Azure/azure-rest-api-specs Merge 990b015911b4d9b0479d40b4d7b496af40a9cfc3 into fcc24e69962d609b66f40d4f266d9a6a2202ea22 --- sdk/storage/azure-mgmt-storagesync/_meta.json | 11 +- .../azure/mgmt/storagesync/_metadata.json | 20 +- .../storagesync/_microsoft_storage_sync.py | 22 +- .../azure/mgmt/storagesync/_version.py | 2 +- .../aio/_microsoft_storage_sync.py | 21 +- .../storagesync/aio/operations/__init__.py | 2 + .../operations/_cloud_endpoints_operations.py | 96 ++-- .../_microsoft_storage_sync_operations.py | 83 ++++ .../_operation_status_operations.py | 4 +- .../storagesync/aio/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 32 +- .../_private_link_resources_operations.py | 4 +- .../_registered_servers_operations.py | 44 +- .../_server_endpoints_operations.py | 56 +-- .../_storage_sync_services_operations.py | 48 +- .../aio/operations/_sync_groups_operations.py | 16 +- .../aio/operations/_workflows_operations.py | 12 +- .../azure/mgmt/storagesync/models/__init__.py | 18 + .../models/_microsoft_storage_sync_enums.py | 25 +- .../azure/mgmt/storagesync/models/_models.py | 390 ++++++++++++---- .../mgmt/storagesync/models/_models_py3.py | 416 ++++++++++++++---- .../mgmt/storagesync/operations/__init__.py | 2 + .../operations/_cloud_endpoints_operations.py | 62 +-- .../_microsoft_storage_sync_operations.py | 88 ++++ .../_operation_status_operations.py | 2 +- ...private_endpoint_connections_operations.py | 20 +- .../_private_link_resources_operations.py | 2 +- .../_registered_servers_operations.py | 28 +- .../_server_endpoints_operations.py | 36 +- .../_storage_sync_services_operations.py | 28 +- .../operations/_sync_groups_operations.py | 8 +- .../operations/_workflows_operations.py | 6 +- 32 files changed, 1187 insertions(+), 419 deletions(-) create mode 100644 sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_microsoft_storage_sync_operations.py create mode 100644 sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_microsoft_storage_sync_operations.py diff --git a/sdk/storage/azure-mgmt-storagesync/_meta.json b/sdk/storage/azure-mgmt-storagesync/_meta.json index 118b09547900..6e224438e7bd 100644 --- a/sdk/storage/azure-mgmt-storagesync/_meta.json +++ b/sdk/storage/azure-mgmt-storagesync/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.0.6369", - "use": "@autorest/python@5.6.2", - "commit": "18ed65c7581a1142c0015451e4d61ef0a3797268", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "96fbe584e334a744ee95fa56bc98d3d4cdfb6cfd", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/storagesync/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/storagesync/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/storagesync/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_metadata.json b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_metadata.json index 36d5a7c7db39..82173518af0f 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_metadata.json +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_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\": [\"MicrosoftStorageSyncConfiguration\"]}}, \"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\": [\"MicrosoftStorageSyncConfiguration\"]}}, \"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\": [\"MicrosoftStorageSyncConfiguration\"], \"._operations_mixin\": [\"MicrosoftStorageSyncOperationsMixin\"]}}, \"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\": [\"MicrosoftStorageSyncConfiguration\"], \"._operations_mixin\": [\"MicrosoftStorageSyncOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -110,9 +110,21 @@ "operation_status": "OperationStatusOperations" }, "operation_mixins": { - "sync_imports": "None", - "async_imports": "None", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", "operations": { + "location_operation_status" : { + "sync": { + "signature": "def location_operation_status(\n self,\n location_name, # type: str\n operation_id, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Get Operation status.\n\n:param location_name: The desired region to obtain information from.\n:type location_name: str\n:param operation_id: operation Id.\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationOperationStatus, or the result of cls(response)\n:rtype: ~azure.mgmt.storagesync.models.LocationOperationStatus\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def location_operation_status(\n self,\n location_name: str,\n operation_id: str,\n **kwargs: Any\n) -\u003e \"_models.LocationOperationStatus\":\n", + "doc": "\"\"\"Get Operation status.\n\n:param location_name: The desired region to obtain information from.\n:type location_name: str\n:param operation_id: operation Id.\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationOperationStatus, or the result of cls(response)\n:rtype: ~azure.mgmt.storagesync.models.LocationOperationStatus\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "location_name, operation_id" + } } } } \ No newline at end of file diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_microsoft_storage_sync.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_microsoft_storage_sync.py index ac8ce46c988a..2fc82bc22a66 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_microsoft_storage_sync.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_microsoft_storage_sync.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MicrosoftStorageSyncConfiguration from .operations import Operations @@ -28,10 +29,11 @@ from .operations import RegisteredServersOperations from .operations import WorkflowsOperations from .operations import OperationStatusOperations +from .operations import MicrosoftStorageSyncOperationsMixin from . import models -class MicrosoftStorageSync(object): +class MicrosoftStorageSync(MicrosoftStorageSyncOperationsMixin): """Microsoft Storage Sync Service API. :ivar operations: Operations operations @@ -101,6 +103,24 @@ def __init__( self.operation_status = OperationStatusOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_version.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_version.py index c47f66669f1b..e5754a47ce68 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_version.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_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/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_microsoft_storage_sync.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_microsoft_storage_sync.py index a1ccac388fd9..3655504f48c3 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_microsoft_storage_sync.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_microsoft_storage_sync.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 @@ -26,10 +27,11 @@ from .operations import RegisteredServersOperations from .operations import WorkflowsOperations from .operations import OperationStatusOperations +from .operations import MicrosoftStorageSyncOperationsMixin from .. import models -class MicrosoftStorageSync(object): +class MicrosoftStorageSync(MicrosoftStorageSyncOperationsMixin): """Microsoft Storage Sync Service API. :ivar operations: Operations operations @@ -98,6 +100,23 @@ def __init__( self.operation_status = OperationStatusOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/__init__.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/__init__.py index 85ce9379c268..6498106a813e 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/__init__.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/__init__.py @@ -16,6 +16,7 @@ from ._registered_servers_operations import RegisteredServersOperations from ._workflows_operations import WorkflowsOperations from ._operation_status_operations import OperationStatusOperations +from ._microsoft_storage_sync_operations import MicrosoftStorageSyncOperationsMixin __all__ = [ 'Operations', @@ -28,4 +29,5 @@ 'RegisteredServersOperations', 'WorkflowsOperations', 'OperationStatusOperations', + 'MicrosoftStorageSyncOperationsMixin', ] diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_cloud_endpoints_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_cloud_endpoints_operations.py index 29bbd5b3f0b7..280f8e441d1c 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_cloud_endpoints_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_cloud_endpoints_operations.py @@ -50,7 +50,7 @@ async def _create_initial( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.CloudEndpointCreateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.CloudEndpoint"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CloudEndpoint"]] error_map = { @@ -65,7 +65,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -120,7 +120,7 @@ async def begin_create( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.CloudEndpointCreateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.CloudEndpoint"]: """Create a new CloudEndpoint. @@ -136,8 +136,8 @@ async def begin_create( :type parameters: ~azure.mgmt.storagesync.models.CloudEndpointCreateParameters :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 CloudEndpoint or the result of cls(response) @@ -178,7 +178,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -204,7 +204,7 @@ async def get( storage_sync_service_name: str, sync_group_name: str, cloud_endpoint_name: str, - **kwargs + **kwargs: Any ) -> "_models.CloudEndpoint": """Get a given CloudEndpoint. @@ -233,7 +233,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -274,7 +274,7 @@ async def _delete_initial( storage_sync_service_name: str, sync_group_name: str, cloud_endpoint_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -288,7 +288,7 @@ async def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -335,7 +335,7 @@ async def begin_delete( storage_sync_service_name: str, sync_group_name: str, cloud_endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a given CloudEndpoint. @@ -349,8 +349,8 @@ async def begin_delete( :type cloud_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: 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) @@ -383,7 +383,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -408,7 +408,7 @@ def list_by_sync_group( resource_group_name: str, storage_sync_service_name: str, sync_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CloudEndpointArray"]: """Get a CloudEndpoint List. @@ -441,7 +441,7 @@ def prepare_request(next_link=None): url = self.list_by_sync_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } @@ -489,7 +489,7 @@ async def _pre_backup_initial( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.BackupRequest", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -504,7 +504,7 @@ async def _pre_backup_initial( url = self._pre_backup_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -555,7 +555,7 @@ async def begin_pre_backup( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.BackupRequest", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Pre Backup a given CloudEndpoint. @@ -571,8 +571,8 @@ async def begin_pre_backup( :type parameters: ~azure.mgmt.storagesync.models.BackupRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -606,7 +606,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -633,7 +633,7 @@ async def _post_backup_initial( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.BackupRequest", - **kwargs + **kwargs: Any ) -> Optional["_models.PostBackupResponse"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PostBackupResponse"]] error_map = { @@ -648,7 +648,7 @@ async def _post_backup_initial( url = self._post_backup_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -702,7 +702,7 @@ async def begin_post_backup( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.BackupRequest", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PostBackupResponse"]: """Post Backup a given CloudEndpoint. @@ -718,8 +718,8 @@ async def begin_post_backup( :type parameters: ~azure.mgmt.storagesync.models.BackupRequest :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 PostBackupResponse or the result of cls(response) @@ -761,7 +761,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -788,7 +788,7 @@ async def _pre_restore_initial( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.PreRestoreRequest", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -803,7 +803,7 @@ async def _pre_restore_initial( url = self._pre_restore_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -849,7 +849,7 @@ async def begin_pre_restore( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.PreRestoreRequest", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Pre Restore a given CloudEndpoint. @@ -865,8 +865,8 @@ async def begin_pre_restore( :type parameters: ~azure.mgmt.storagesync.models.PreRestoreRequest :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) @@ -900,7 +900,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -926,7 +926,7 @@ async def restoreheartbeat( storage_sync_service_name: str, sync_group_name: str, cloud_endpoint_name: str, - **kwargs + **kwargs: Any ) -> None: """Restore Heartbeat a given CloudEndpoint. @@ -955,7 +955,7 @@ async def restoreheartbeat( url = self.restoreheartbeat.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -995,7 +995,7 @@ async def _post_restore_initial( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.PostRestoreRequest", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1010,7 +1010,7 @@ async def _post_restore_initial( url = self._post_restore_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -1056,7 +1056,7 @@ async def begin_post_restore( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.PostRestoreRequest", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Post Restore a given CloudEndpoint. @@ -1072,8 +1072,8 @@ async def begin_post_restore( :type parameters: ~azure.mgmt.storagesync.models.PostRestoreRequest :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) @@ -1107,7 +1107,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -1134,7 +1134,7 @@ async def _trigger_change_detection_initial( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.TriggerChangeDetectionParameters", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1149,7 +1149,7 @@ async def _trigger_change_detection_initial( url = self._trigger_change_detection_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -1195,7 +1195,7 @@ async def begin_trigger_change_detection( sync_group_name: str, cloud_endpoint_name: str, parameters: "_models.TriggerChangeDetectionParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Triggers detection of changes performed on Azure File share connected to the specified Azure File Sync Cloud Endpoint. @@ -1212,8 +1212,8 @@ async def begin_trigger_change_detection( :type parameters: ~azure.mgmt.storagesync.models.TriggerChangeDetectionParameters :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) @@ -1247,7 +1247,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_microsoft_storage_sync_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_microsoft_storage_sync_operations.py new file mode 100644 index 000000000000..4e6176f09b85 --- /dev/null +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_microsoft_storage_sync_operations.py @@ -0,0 +1,83 @@ +# 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 MicrosoftStorageSyncOperationsMixin: + + async def location_operation_status( + self, + location_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.LocationOperationStatus": + """Get Operation status. + + :param location_name: The desired region to obtain information from. + :type location_name: str + :param operation_id: operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocationOperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.storagesync.models.LocationOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationOperationStatus"] + 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.location_operation_status.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.StorageSyncError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-correlation-request-id']=self._deserialize('str', response.headers.get('x-ms-correlation-request-id')) + deserialized = self._deserialize('LocationOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + location_operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/operations/{operationId}'} # type: ignore diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operation_status_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operation_status_operations.py index 766180d609eb..bc1652b6e19a 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operation_status_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operation_status_operations.py @@ -46,7 +46,7 @@ async def get( location_name: str, workflow_id: str, operation_id: str, - **kwargs + **kwargs: Any ) -> "_models.OperationStatus": """Get Operation status. @@ -75,7 +75,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'locationName': self._serialize.url("location_name", location_name, 'str'), 'workflowId': self._serialize.url("workflow_id", workflow_id, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operations.py index 05219f72b2bb..e9ec1e6888da 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationEntityListResult"]: """Lists all of the available Storage Sync Rest API operations. diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_private_endpoint_connections_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_private_endpoint_connections_operations.py index fb7a4db315dc..e278f053f05c 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_private_endpoint_connections_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, storage_sync_service_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Gets the specified private endpoint connection associated with the storage sync service. @@ -76,7 +76,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -114,7 +114,7 @@ async def _create_initial( storage_sync_service_name: str, private_endpoint_connection_name: str, properties: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { @@ -128,7 +128,7 @@ async def _create_initial( # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -180,7 +180,7 @@ async def begin_create( storage_sync_service_name: str, private_endpoint_connection_name: str, properties: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Update the state of specified private endpoint connection associated with the storage sync service. @@ -197,8 +197,8 @@ async def begin_create( :type properties: ~azure.mgmt.storagesync.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) @@ -233,7 +233,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -258,7 +258,7 @@ async def _delete_initial( resource_group_name: str, storage_sync_service_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -271,7 +271,7 @@ async def _delete_initial( # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -313,7 +313,7 @@ async def begin_delete( resource_group_name: str, storage_sync_service_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the specified private endpoint connection associated with the storage sync service. @@ -327,8 +327,8 @@ async def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -359,7 +359,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -383,7 +383,7 @@ def list_by_storage_sync_service( self, resource_group_name: str, storage_sync_service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: """Get a PrivateEndpointConnection List. @@ -414,7 +414,7 @@ def prepare_request(next_link=None): url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_private_link_resources_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_private_link_resources_operations.py index fa7418f3bcdb..0c78c0db7793 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_private_link_resources_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_private_link_resources_operations.py @@ -44,7 +44,7 @@ async def list_by_storage_sync_service( self, resource_group_name: str, storage_sync_service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResourceListResult": """Gets the private link resources that need to be created for a storage sync service. @@ -69,7 +69,7 @@ async def list_by_storage_sync_service( # Construct URL url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_registered_servers_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_registered_servers_operations.py index 22e0ef2f0868..f6b832f3dd18 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_registered_servers_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_registered_servers_operations.py @@ -47,7 +47,7 @@ def list_by_storage_sync_service( self, resource_group_name: str, storage_sync_service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RegisteredServerArray"]: """Get a given registered server list. @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, storage_sync_service_name: str, server_id: str, - **kwargs + **kwargs: Any ) -> "_models.RegisteredServer": """Get a given registered server. @@ -150,7 +150,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -190,7 +190,7 @@ async def _create_initial( storage_sync_service_name: str, server_id: str, parameters: "_models.RegisteredServerCreateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.RegisteredServer"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RegisteredServer"]] error_map = { @@ -205,7 +205,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -257,7 +257,7 @@ async def begin_create( storage_sync_service_name: str, server_id: str, parameters: "_models.RegisteredServerCreateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.RegisteredServer"]: """Add a new registered server. @@ -271,8 +271,8 @@ async def begin_create( :type parameters: ~azure.mgmt.storagesync.models.RegisteredServerCreateParameters :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 RegisteredServer or the result of cls(response) @@ -312,7 +312,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -336,7 +336,7 @@ async def _delete_initial( resource_group_name: str, storage_sync_service_name: str, server_id: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -350,7 +350,7 @@ async def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -393,7 +393,7 @@ async def begin_delete( resource_group_name: str, storage_sync_service_name: str, server_id: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete the given registered server. @@ -405,8 +405,8 @@ async def begin_delete( :type server_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -438,7 +438,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -463,7 +463,7 @@ async def _trigger_rollover_initial( storage_sync_service_name: str, server_id: str, parameters: "_models.TriggerRolloverRequest", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -478,7 +478,7 @@ async def _trigger_rollover_initial( url = self._trigger_rollover_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -526,7 +526,7 @@ async def begin_trigger_rollover( storage_sync_service_name: str, server_id: str, parameters: "_models.TriggerRolloverRequest", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Triggers Server certificate rollover. @@ -540,8 +540,8 @@ async def begin_trigger_rollover( :type parameters: ~azure.mgmt.storagesync.models.TriggerRolloverRequest :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) @@ -574,7 +574,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_server_endpoints_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_server_endpoints_operations.py index cd0a36ab3a29..6d93a05c77f0 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_server_endpoints_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_server_endpoints_operations.py @@ -50,7 +50,7 @@ async def _create_initial( sync_group_name: str, server_endpoint_name: str, parameters: "_models.ServerEndpointCreateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.ServerEndpoint"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerEndpoint"]] error_map = { @@ -65,7 +65,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -119,7 +119,7 @@ async def begin_create( sync_group_name: str, server_endpoint_name: str, parameters: "_models.ServerEndpointCreateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ServerEndpoint"]: """Create a new ServerEndpoint. @@ -135,8 +135,8 @@ async def begin_create( :type parameters: ~azure.mgmt.storagesync.models.ServerEndpointCreateParameters :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 ServerEndpoint or the result of cls(response) @@ -177,7 +177,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -204,7 +204,7 @@ async def _update_initial( sync_group_name: str, server_endpoint_name: str, parameters: Optional["_models.ServerEndpointUpdateParameters"] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.ServerEndpoint"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerEndpoint"]] error_map = { @@ -219,7 +219,7 @@ async def _update_initial( url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -276,7 +276,7 @@ async def begin_update( sync_group_name: str, server_endpoint_name: str, parameters: Optional["_models.ServerEndpointUpdateParameters"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ServerEndpoint"]: """Patch a given ServerEndpoint. @@ -292,8 +292,8 @@ async def begin_update( :type parameters: ~azure.mgmt.storagesync.models.ServerEndpointUpdateParameters :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 ServerEndpoint or the result of cls(response) @@ -334,7 +334,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -360,7 +360,7 @@ async def get( storage_sync_service_name: str, sync_group_name: str, server_endpoint_name: str, - **kwargs + **kwargs: Any ) -> "_models.ServerEndpoint": """Get a ServerEndpoint. @@ -389,7 +389,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -430,7 +430,7 @@ async def _delete_initial( storage_sync_service_name: str, sync_group_name: str, server_endpoint_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -444,7 +444,7 @@ async def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -489,7 +489,7 @@ async def begin_delete( storage_sync_service_name: str, sync_group_name: str, server_endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a given ServerEndpoint. @@ -503,8 +503,8 @@ async def begin_delete( :type server_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: 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) @@ -537,7 +537,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -562,7 +562,7 @@ def list_by_sync_group( resource_group_name: str, storage_sync_service_name: str, sync_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ServerEndpointArray"]: """Get a ServerEndpoint list. @@ -595,7 +595,7 @@ def prepare_request(next_link=None): url = self.list_by_sync_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } @@ -643,7 +643,7 @@ async def _recall_action_initial( sync_group_name: str, server_endpoint_name: str, parameters: "_models.RecallActionParameters", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -658,7 +658,7 @@ async def _recall_action_initial( url = self._recall_action_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -708,7 +708,7 @@ async def begin_recall_action( sync_group_name: str, server_endpoint_name: str, parameters: "_models.RecallActionParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Recall a server endpoint. @@ -724,8 +724,8 @@ async def begin_recall_action( :type parameters: ~azure.mgmt.storagesync.models.RecallActionParameters :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) @@ -759,7 +759,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_storage_sync_services_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_storage_sync_services_operations.py index 2dbaf232cd01..fe30ad328206 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_storage_sync_services_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_storage_sync_services_operations.py @@ -47,7 +47,7 @@ async def check_name_availability( self, location_name: str, parameters: "_models.CheckNameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResult": """Check the give namespace name availability. @@ -110,7 +110,7 @@ async def _create_initial( resource_group_name: str, storage_sync_service_name: str, parameters: "_models.StorageSyncServiceCreateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.StorageSyncService"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.StorageSyncService"]] error_map = { @@ -125,7 +125,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -174,7 +174,7 @@ async def begin_create( resource_group_name: str, storage_sync_service_name: str, parameters: "_models.StorageSyncServiceCreateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.StorageSyncService"]: """Create a new StorageSyncService. @@ -186,8 +186,8 @@ async def begin_create( :type parameters: ~azure.mgmt.storagesync.models.StorageSyncServiceCreateParameters :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 StorageSyncService or the result of cls(response) @@ -222,7 +222,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } @@ -244,7 +244,7 @@ async def get( self, resource_group_name: str, storage_sync_service_name: str, - **kwargs + **kwargs: Any ) -> "_models.StorageSyncService": """Get a given StorageSyncService. @@ -269,7 +269,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -307,7 +307,7 @@ async def _update_initial( resource_group_name: str, storage_sync_service_name: str, parameters: Optional["_models.StorageSyncServiceUpdateParameters"] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.StorageSyncService"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.StorageSyncService"]] error_map = { @@ -322,7 +322,7 @@ async def _update_initial( url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -376,7 +376,7 @@ async def begin_update( resource_group_name: str, storage_sync_service_name: str, parameters: Optional["_models.StorageSyncServiceUpdateParameters"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.StorageSyncService"]: """Patch a given StorageSyncService. @@ -388,8 +388,8 @@ async def begin_update( :type parameters: ~azure.mgmt.storagesync.models.StorageSyncServiceUpdateParameters :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 StorageSyncService or the result of cls(response) @@ -428,7 +428,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } @@ -450,7 +450,7 @@ async def _delete_initial( self, resource_group_name: str, storage_sync_service_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -464,7 +464,7 @@ async def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -507,7 +507,7 @@ async def begin_delete( self, resource_group_name: str, storage_sync_service_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a given StorageSyncService. @@ -517,8 +517,8 @@ async def begin_delete( :type storage_sync_service_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) @@ -549,7 +549,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } @@ -570,7 +570,7 @@ def get_long_running_output(pipeline_response): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.StorageSyncServiceArray"]: """Get a StorageSyncService list by Resource group name. @@ -599,7 +599,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -640,7 +640,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.StorageSyncServiceArray"]: """Get a StorageSyncService list by subscription. diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_sync_groups_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_sync_groups_operations.py index 34246f413920..437222f4ef19 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_sync_groups_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_sync_groups_operations.py @@ -45,7 +45,7 @@ def list_by_storage_sync_service( self, resource_group_name: str, storage_sync_service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SyncGroupArray"]: """Get a SyncGroup List. @@ -76,7 +76,7 @@ def prepare_request(next_link=None): url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -122,7 +122,7 @@ async def create( storage_sync_service_name: str, sync_group_name: str, parameters: "_models.SyncGroupCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.SyncGroup": """Create a new SyncGroup. @@ -152,7 +152,7 @@ async def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } @@ -195,7 +195,7 @@ async def get( resource_group_name: str, storage_sync_service_name: str, sync_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.SyncGroup": """Get a given SyncGroup. @@ -222,7 +222,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } @@ -261,7 +261,7 @@ async def delete( resource_group_name: str, storage_sync_service_name: str, sync_group_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete a given SyncGroup. @@ -288,7 +288,7 @@ async def delete( url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_workflows_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_workflows_operations.py index 556af5ef9f30..9f37ac4830f9 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_workflows_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_workflows_operations.py @@ -45,7 +45,7 @@ def list_by_storage_sync_service( self, resource_group_name: str, storage_sync_service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkflowArray"]: """Get a Workflow List. @@ -76,7 +76,7 @@ def prepare_request(next_link=None): url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -121,7 +121,7 @@ async def get( resource_group_name: str, storage_sync_service_name: str, workflow_id: str, - **kwargs + **kwargs: Any ) -> "_models.Workflow": """Get Workflows resource. @@ -148,7 +148,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'workflowId': self._serialize.url("workflow_id", workflow_id, 'str'), } @@ -187,7 +187,7 @@ async def abort( resource_group_name: str, storage_sync_service_name: str, workflow_id: str, - **kwargs + **kwargs: Any ) -> None: """Abort the given workflow. @@ -214,7 +214,7 @@ async def abort( url = self.abort.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'workflowId': self._serialize.url("workflow_id", workflow_id, 'str'), } diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py index 78d2687ac751..e66b169de7dc 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py @@ -12,13 +12,17 @@ from ._models_py3 import CheckNameAvailabilityResult from ._models_py3 import CloudEndpoint from ._models_py3 import CloudEndpointArray + from ._models_py3 import CloudEndpointChangeEnumerationActivity + from ._models_py3 import CloudEndpointChangeEnumerationStatus from ._models_py3 import CloudEndpointCreateParameters + from ._models_py3 import CloudEndpointLastChangeEnumerationStatus from ._models_py3 import CloudTieringCachePerformance from ._models_py3 import CloudTieringDatePolicyStatus from ._models_py3 import CloudTieringFilesNotTiering from ._models_py3 import CloudTieringSpaceSavings from ._models_py3 import CloudTieringVolumeFreeSpacePolicyStatus from ._models_py3 import FilesNotTieringError + from ._models_py3 import LocationOperationStatus from ._models_py3 import OperationDisplayInfo from ._models_py3 import OperationDisplayResource from ._models_py3 import OperationEntity @@ -80,13 +84,17 @@ from ._models import CheckNameAvailabilityResult # type: ignore from ._models import CloudEndpoint # type: ignore from ._models import CloudEndpointArray # type: ignore + from ._models import CloudEndpointChangeEnumerationActivity # type: ignore + from ._models import CloudEndpointChangeEnumerationStatus # type: ignore from ._models import CloudEndpointCreateParameters # type: ignore + from ._models import CloudEndpointLastChangeEnumerationStatus # type: ignore from ._models import CloudTieringCachePerformance # type: ignore from ._models import CloudTieringDatePolicyStatus # type: ignore from ._models import CloudTieringFilesNotTiering # type: ignore from ._models import CloudTieringSpaceSavings # type: ignore from ._models import CloudTieringVolumeFreeSpacePolicyStatus # type: ignore from ._models import FilesNotTieringError # type: ignore + from ._models import LocationOperationStatus # type: ignore from ._models import OperationDisplayInfo # type: ignore from ._models import OperationDisplayResource # type: ignore from ._models import OperationEntity # type: ignore @@ -145,9 +153,12 @@ from ._microsoft_storage_sync_enums import ( ChangeDetectionMode, + CloudEndpointChangeEnumerationActivityState, + CloudEndpointChangeEnumerationTotalCountsState, FeatureStatus, IncomingTrafficPolicy, InitialDownloadPolicy, + InitialUploadPolicy, LocalCacheMode, NameAvailabilityReason, OperationDirection, @@ -169,13 +180,17 @@ 'CheckNameAvailabilityResult', 'CloudEndpoint', 'CloudEndpointArray', + 'CloudEndpointChangeEnumerationActivity', + 'CloudEndpointChangeEnumerationStatus', 'CloudEndpointCreateParameters', + 'CloudEndpointLastChangeEnumerationStatus', 'CloudTieringCachePerformance', 'CloudTieringDatePolicyStatus', 'CloudTieringFilesNotTiering', 'CloudTieringSpaceSavings', 'CloudTieringVolumeFreeSpacePolicyStatus', 'FilesNotTieringError', + 'LocationOperationStatus', 'OperationDisplayInfo', 'OperationDisplayResource', 'OperationEntity', @@ -232,9 +247,12 @@ 'Workflow', 'WorkflowArray', 'ChangeDetectionMode', + 'CloudEndpointChangeEnumerationActivityState', + 'CloudEndpointChangeEnumerationTotalCountsState', 'FeatureStatus', 'IncomingTrafficPolicy', 'InitialDownloadPolicy', + 'InitialUploadPolicy', 'LocalCacheMode', 'NameAvailabilityReason', 'OperationDirection', diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_microsoft_storage_sync_enums.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_microsoft_storage_sync_enums.py index 3a002f71150f..5a53598b37c8 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_microsoft_storage_sync_enums.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_microsoft_storage_sync_enums.py @@ -33,6 +33,20 @@ class ChangeDetectionMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT = "Default" RECURSIVE = "Recursive" +class CloudEndpointChangeEnumerationActivityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """State of change enumeration activity + """ + + INITIAL_ENUMERATION_IN_PROGRESS = "InitialEnumerationInProgress" + ENUMERATION_IN_PROGRESS = "EnumerationInProgress" + +class CloudEndpointChangeEnumerationTotalCountsState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """State of the total counts of change enumeration activity + """ + + CALCULATING = "Calculating" + FINAL = "Final" + class FeatureStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of the Feature Status """ @@ -55,9 +69,16 @@ class InitialDownloadPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) NAMESPACE_THEN_MODIFIED_FILES = "NamespaceThenModifiedFiles" AVOID_TIERED_FILES = "AvoidTieredFiles" +class InitialUploadPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Policy for how the initial upload sync session is performed. + """ + + SERVER_AUTHORITATIVE = "ServerAuthoritative" + MERGE = "Merge" + class LocalCacheMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre- - populate before local access. + """Policy for enabling follow-the-sun business models: link local cache to cloud behavior to + pre-populate before local access. """ DOWNLOAD_NEW_AND_MODIFIED_FILES = "DownloadNewAndModifiedFiles" diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models.py index 0dbfd9dba1aa..aaea137844ce 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models.py @@ -38,9 +38,8 @@ class CheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The name to check for availability. :type name: str - :ivar type: Required. The resource type. Must be set to - Microsoft.StorageSync/storageSyncServices. Default value: - "Microsoft.StorageSync/storageSyncServices". + :ivar type: The resource type. Must be set to Microsoft.StorageSync/storageSyncServices. Has + constant value: "Microsoft.StorageSync/storageSyncServices". :vartype type: str """ @@ -205,6 +204,9 @@ class CloudEndpoint(ProxyResource): :type last_workflow_id: str :param last_operation_name: Resource Last Operation Name. :type last_operation_name: str + :ivar change_enumeration_status: Cloud endpoint change enumeration status. + :vartype change_enumeration_status: + ~azure.mgmt.storagesync.models.CloudEndpointChangeEnumerationStatus """ _validation = { @@ -212,6 +214,7 @@ class CloudEndpoint(ProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'backup_enabled': {'readonly': True}, + 'change_enumeration_status': {'readonly': True}, } _attribute_map = { @@ -227,6 +230,7 @@ class CloudEndpoint(ProxyResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, + 'change_enumeration_status': {'key': 'properties.changeEnumerationStatus', 'type': 'CloudEndpointChangeEnumerationStatus'}, } def __init__( @@ -243,6 +247,7 @@ def __init__( self.provisioning_state = kwargs.get('provisioning_state', None) self.last_workflow_id = kwargs.get('last_workflow_id', None) self.last_operation_name = kwargs.get('last_operation_name', None) + self.change_enumeration_status = None class CloudEndpointArray(msrest.serialization.Model): @@ -264,6 +269,133 @@ def __init__( self.value = kwargs.get('value', None) +class CloudEndpointChangeEnumerationActivity(msrest.serialization.Model): + """Cloud endpoint change enumeration activity object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar last_updated_timestamp: Last updated timestamp. + :vartype last_updated_timestamp: ~datetime.datetime + :ivar operation_state: Change enumeration operation state. Possible values include: + "InitialEnumerationInProgress", "EnumerationInProgress". + :vartype operation_state: str or + ~azure.mgmt.storagesync.models.CloudEndpointChangeEnumerationActivityState + :ivar status_code: When non-zero, indicates an issue that is delaying change enumeration. + :vartype status_code: int + :ivar started_timestamp: Timestamp when change enumeration started. + :vartype started_timestamp: ~datetime.datetime + :ivar processed_files_count: Count of files processed. + :vartype processed_files_count: long + :ivar processed_directories_count: Count of directories processed. + :vartype processed_directories_count: long + :ivar total_files_count: Total count of files enumerated. + :vartype total_files_count: long + :ivar total_directories_count: Total count of directories enumerated. + :vartype total_directories_count: long + :ivar total_size_bytes: Total enumerated size in bytes. + :vartype total_size_bytes: long + :ivar progress_percent: Progress percentage for change enumeration run, excluding processing of + deletes. + :vartype progress_percent: int + :ivar minutes_remaining: Estimate of time remaining for the enumeration run. + :vartype minutes_remaining: int + :ivar total_counts_state: Change enumeration total counts state. Possible values include: + "Calculating", "Final". + :vartype total_counts_state: str or + ~azure.mgmt.storagesync.models.CloudEndpointChangeEnumerationTotalCountsState + :ivar deletes_progress_percent: Progress percentage for processing deletes. This is done + separately from the rest of the enumeration run. + :vartype deletes_progress_percent: int + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'operation_state': {'readonly': True}, + 'status_code': {'readonly': True}, + 'started_timestamp': {'readonly': True}, + 'processed_files_count': {'readonly': True, 'minimum': 0}, + 'processed_directories_count': {'readonly': True, 'minimum': 0}, + 'total_files_count': {'readonly': True, 'minimum': 0}, + 'total_directories_count': {'readonly': True, 'minimum': 0}, + 'total_size_bytes': {'readonly': True, 'minimum': 0}, + 'progress_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + 'minutes_remaining': {'readonly': True, 'minimum': 0}, + 'total_counts_state': {'readonly': True}, + 'deletes_progress_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'operation_state': {'key': 'operationState', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'started_timestamp': {'key': 'startedTimestamp', 'type': 'iso-8601'}, + 'processed_files_count': {'key': 'processedFilesCount', 'type': 'long'}, + 'processed_directories_count': {'key': 'processedDirectoriesCount', 'type': 'long'}, + 'total_files_count': {'key': 'totalFilesCount', 'type': 'long'}, + 'total_directories_count': {'key': 'totalDirectoriesCount', 'type': 'long'}, + 'total_size_bytes': {'key': 'totalSizeBytes', 'type': 'long'}, + 'progress_percent': {'key': 'progressPercent', 'type': 'int'}, + 'minutes_remaining': {'key': 'minutesRemaining', 'type': 'int'}, + 'total_counts_state': {'key': 'totalCountsState', 'type': 'str'}, + 'deletes_progress_percent': {'key': 'deletesProgressPercent', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudEndpointChangeEnumerationActivity, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.operation_state = None + self.status_code = None + self.started_timestamp = None + self.processed_files_count = None + self.processed_directories_count = None + self.total_files_count = None + self.total_directories_count = None + self.total_size_bytes = None + self.progress_percent = None + self.minutes_remaining = None + self.total_counts_state = None + self.deletes_progress_percent = None + + +class CloudEndpointChangeEnumerationStatus(msrest.serialization.Model): + """Cloud endpoint change enumeration status object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar last_updated_timestamp: Last updated timestamp. + :vartype last_updated_timestamp: ~datetime.datetime + :ivar last_enumeration_status: Status of last completed change enumeration. + :vartype last_enumeration_status: + ~azure.mgmt.storagesync.models.CloudEndpointLastChangeEnumerationStatus + :ivar activity: Change enumeration activity. + :vartype activity: ~azure.mgmt.storagesync.models.CloudEndpointChangeEnumerationActivity + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'last_enumeration_status': {'readonly': True}, + 'activity': {'readonly': True}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'last_enumeration_status': {'key': 'lastEnumerationStatus', 'type': 'CloudEndpointLastChangeEnumerationStatus'}, + 'activity': {'key': 'activity', 'type': 'CloudEndpointChangeEnumerationActivity'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudEndpointChangeEnumerationStatus, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.last_enumeration_status = None + self.activity = None + + class CloudEndpointCreateParameters(ProxyResource): """The parameters used when creating a cloud endpoint. @@ -314,6 +446,56 @@ def __init__( self.friendly_name = kwargs.get('friendly_name', None) +class CloudEndpointLastChangeEnumerationStatus(msrest.serialization.Model): + """Cloud endpoint change enumeration status object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar started_timestamp: Timestamp when change enumeration started. + :vartype started_timestamp: ~datetime.datetime + :ivar completed_timestamp: Timestamp when change enumeration completed. + :vartype completed_timestamp: ~datetime.datetime + :ivar namespace_files_count: Count of files in the namespace. + :vartype namespace_files_count: long + :ivar namespace_directories_count: Count of directories in the namespace. + :vartype namespace_directories_count: long + :ivar namespace_size_bytes: Namespace size in bytes. + :vartype namespace_size_bytes: long + :ivar next_run_timestamp: Timestamp of when change enumeration is expected to run again. + :vartype next_run_timestamp: ~datetime.datetime + """ + + _validation = { + 'started_timestamp': {'readonly': True}, + 'completed_timestamp': {'readonly': True}, + 'namespace_files_count': {'readonly': True, 'minimum': 0}, + 'namespace_directories_count': {'readonly': True, 'minimum': 0}, + 'namespace_size_bytes': {'readonly': True, 'minimum': 0}, + 'next_run_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'started_timestamp': {'key': 'startedTimestamp', 'type': 'iso-8601'}, + 'completed_timestamp': {'key': 'completedTimestamp', 'type': 'iso-8601'}, + 'namespace_files_count': {'key': 'namespaceFilesCount', 'type': 'long'}, + 'namespace_directories_count': {'key': 'namespaceDirectoriesCount', 'type': 'long'}, + 'namespace_size_bytes': {'key': 'namespaceSizeBytes', 'type': 'long'}, + 'next_run_timestamp': {'key': 'nextRunTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudEndpointLastChangeEnumerationStatus, self).__init__(**kwargs) + self.started_timestamp = None + self.completed_timestamp = None + self.namespace_files_count = None + self.namespace_directories_count = None + self.namespace_size_bytes = None + self.next_run_timestamp = None + + class CloudTieringCachePerformance(msrest.serialization.Model): """Server endpoint cloud tiering status object. @@ -536,6 +718,61 @@ def __init__( self.file_count = None +class LocationOperationStatus(msrest.serialization.Model): + """Operation status object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Operation resource Id. + :vartype id: str + :ivar name: Operation Id. + :vartype name: str + :ivar status: Operation status. + :vartype status: str + :ivar start_time: Start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: End time of the operation. + :vartype end_time: ~datetime.datetime + :ivar error: Error details. + :vartype error: ~azure.mgmt.storagesync.models.StorageSyncApiError + :ivar percent_complete: Percent complete. + :vartype percent_complete: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'StorageSyncApiError'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(LocationOperationStatus, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + self.percent_complete = None + + class OperationDisplayInfo(msrest.serialization.Model): """The operation supported by storage sync. @@ -1171,12 +1408,12 @@ class RegisteredServer(ProxyResource): :vartype agent_version_expiration_date: ~datetime.datetime :param server_os_version: Registered Server OS Version. :type server_os_version: str - :ivar server_management_error_code: Registered Server Management Error Code. - :vartype server_management_error_code: int - :ivar last_heart_beat: Registered Server last heart beat. - :vartype last_heart_beat: ~datetime.datetime - :ivar provisioning_state: Registered Server Provisioning State. - :vartype provisioning_state: str + :param server_management_error_code: Registered Server Management Error Code. + :type server_management_error_code: int + :param last_heart_beat: Registered Server last heart beat. + :type last_heart_beat: str + :param provisioning_state: Registered Server Provisioning State. + :type provisioning_state: str :param server_role: Registered Server serverRole. :type server_role: str :param cluster_id: Registered Server clusterId. @@ -1185,26 +1422,26 @@ class RegisteredServer(ProxyResource): :type cluster_name: str :param server_id: Registered Server serverId. :type server_id: str - :ivar storage_sync_service_uid: Registered Server storageSyncServiceUid. - :vartype storage_sync_service_uid: str - :ivar last_workflow_id: Registered Server lastWorkflowId. - :vartype last_workflow_id: str - :ivar last_operation_name: Resource Last Operation Name. - :vartype last_operation_name: str - :ivar discovery_endpoint_uri: Resource discoveryEndpointUri. - :vartype discovery_endpoint_uri: str - :ivar resource_location: Resource Location. - :vartype resource_location: str - :ivar service_location: Service Location. - :vartype service_location: str + :param storage_sync_service_uid: Registered Server storageSyncServiceUid. + :type storage_sync_service_uid: str + :param last_workflow_id: Registered Server lastWorkflowId. + :type last_workflow_id: str + :param last_operation_name: Resource Last Operation Name. + :type last_operation_name: str + :param discovery_endpoint_uri: Resource discoveryEndpointUri. + :type discovery_endpoint_uri: str + :param resource_location: Resource Location. + :type resource_location: str + :param service_location: Service Location. + :type service_location: str :param friendly_name: Friendly Name. :type friendly_name: str - :ivar management_endpoint_uri: Management Endpoint Uri. - :vartype management_endpoint_uri: str - :ivar monitoring_endpoint_uri: Telemetry Endpoint Uri. - :vartype monitoring_endpoint_uri: str - :ivar monitoring_configuration: Monitoring Configuration. - :vartype monitoring_configuration: str + :param management_endpoint_uri: Management Endpoint Uri. + :type management_endpoint_uri: str + :param monitoring_endpoint_uri: Telemetry Endpoint Uri. + :type monitoring_endpoint_uri: str + :param monitoring_configuration: Monitoring Configuration. + :type monitoring_configuration: str :ivar server_name: Server name. :vartype server_name: str """ @@ -1215,18 +1452,6 @@ class RegisteredServer(ProxyResource): 'type': {'readonly': True}, 'agent_version_status': {'readonly': True}, 'agent_version_expiration_date': {'readonly': True}, - 'server_management_error_code': {'readonly': True}, - 'last_heart_beat': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'storage_sync_service_uid': {'readonly': True}, - 'last_workflow_id': {'readonly': True}, - 'last_operation_name': {'readonly': True}, - 'discovery_endpoint_uri': {'readonly': True}, - 'resource_location': {'readonly': True}, - 'service_location': {'readonly': True}, - 'management_endpoint_uri': {'readonly': True}, - 'monitoring_endpoint_uri': {'readonly': True}, - 'monitoring_configuration': {'readonly': True}, 'server_name': {'readonly': True}, } @@ -1240,7 +1465,7 @@ class RegisteredServer(ProxyResource): 'agent_version_expiration_date': {'key': 'properties.agentVersionExpirationDate', 'type': 'iso-8601'}, 'server_os_version': {'key': 'properties.serverOSVersion', 'type': 'str'}, 'server_management_error_code': {'key': 'properties.serverManagementErrorCode', 'type': 'int'}, - 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'iso-8601'}, + 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, @@ -1269,23 +1494,23 @@ def __init__( self.agent_version_status = None self.agent_version_expiration_date = None self.server_os_version = kwargs.get('server_os_version', None) - self.server_management_error_code = None - self.last_heart_beat = None - self.provisioning_state = None + self.server_management_error_code = kwargs.get('server_management_error_code', None) + self.last_heart_beat = kwargs.get('last_heart_beat', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.server_role = kwargs.get('server_role', None) self.cluster_id = kwargs.get('cluster_id', None) self.cluster_name = kwargs.get('cluster_name', None) self.server_id = kwargs.get('server_id', None) - self.storage_sync_service_uid = None - self.last_workflow_id = None - self.last_operation_name = None - self.discovery_endpoint_uri = None - self.resource_location = None - self.service_location = None + self.storage_sync_service_uid = kwargs.get('storage_sync_service_uid', None) + self.last_workflow_id = kwargs.get('last_workflow_id', None) + self.last_operation_name = kwargs.get('last_operation_name', None) + self.discovery_endpoint_uri = kwargs.get('discovery_endpoint_uri', None) + self.resource_location = kwargs.get('resource_location', None) + self.service_location = kwargs.get('service_location', None) self.friendly_name = kwargs.get('friendly_name', None) - self.management_endpoint_uri = None - self.monitoring_endpoint_uri = None - self.monitoring_configuration = None + self.management_endpoint_uri = kwargs.get('management_endpoint_uri', None) + self.monitoring_endpoint_uri = kwargs.get('monitoring_endpoint_uri', None) + self.monitoring_configuration = kwargs.get('monitoring_configuration', None) self.server_name = None @@ -1479,6 +1704,9 @@ class ServerEndpoint(ProxyResource): to cloud behavior to pre-populate before local access. Possible values include: "DownloadNewAndModifiedFiles", "UpdateLocallyCachedFiles". :type local_cache_mode: str or ~azure.mgmt.storagesync.models.LocalCacheMode + :param initial_upload_policy: Policy for how the initial upload sync session is performed. + Possible values include: "ServerAuthoritative", "Merge". + :type initial_upload_policy: str or ~azure.mgmt.storagesync.models.InitialUploadPolicy :ivar server_name: Server name. :vartype server_name: str """ @@ -1522,6 +1750,7 @@ class ServerEndpoint(ProxyResource): 'recall_status': {'key': 'properties.recallStatus', 'type': 'ServerEndpointRecallStatus'}, 'initial_download_policy': {'key': 'properties.initialDownloadPolicy', 'type': 'str'}, 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, + 'initial_upload_policy': {'key': 'properties.initialUploadPolicy', 'type': 'str'}, 'server_name': {'key': 'properties.serverName', 'type': 'str'}, } @@ -1548,6 +1777,7 @@ def __init__( self.recall_status = None self.initial_download_policy = kwargs.get('initial_download_policy', None) self.local_cache_mode = kwargs.get('local_cache_mode', None) + self.initial_upload_policy = kwargs.get('initial_upload_policy', None) self.server_name = None @@ -1577,6 +1807,8 @@ class ServerEndpointBackgroundDataDownloadActivity(msrest.serialization.Model): :ivar timestamp: Timestamp when properties were updated. :vartype timestamp: ~datetime.datetime + :ivar started_timestamp: Timestamp when the operation started. + :vartype started_timestamp: ~datetime.datetime :ivar percent_progress: Progress percentage. :vartype percent_progress: int :ivar downloaded_bytes: Running count of bytes downloaded. @@ -1585,12 +1817,14 @@ class ServerEndpointBackgroundDataDownloadActivity(msrest.serialization.Model): _validation = { 'timestamp': {'readonly': True}, + 'started_timestamp': {'readonly': True}, 'percent_progress': {'readonly': True, 'maximum': 100, 'minimum': 0}, 'downloaded_bytes': {'readonly': True, 'minimum': 0}, } _attribute_map = { 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'started_timestamp': {'key': 'startedTimestamp', 'type': 'iso-8601'}, 'percent_progress': {'key': 'percentProgress', 'type': 'int'}, 'downloaded_bytes': {'key': 'downloadedBytes', 'type': 'long'}, } @@ -1601,6 +1835,7 @@ def __init__( ): super(ServerEndpointBackgroundDataDownloadActivity, self).__init__(**kwargs) self.timestamp = None + self.started_timestamp = None self.percent_progress = None self.downloaded_bytes = None @@ -1715,6 +1950,9 @@ class ServerEndpointCreateParameters(ProxyResource): to cloud behavior to pre-populate before local access. Possible values include: "DownloadNewAndModifiedFiles", "UpdateLocallyCachedFiles". :type local_cache_mode: str or ~azure.mgmt.storagesync.models.LocalCacheMode + :param initial_upload_policy: Policy for how the initial upload sync session is performed. + Possible values include: "ServerAuthoritative", "Merge". + :type initial_upload_policy: str or ~azure.mgmt.storagesync.models.InitialUploadPolicy """ _validation = { @@ -1739,6 +1977,7 @@ class ServerEndpointCreateParameters(ProxyResource): 'offline_data_transfer_share_name': {'key': 'properties.offlineDataTransferShareName', 'type': 'str'}, 'initial_download_policy': {'key': 'properties.initialDownloadPolicy', 'type': 'str'}, 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, + 'initial_upload_policy': {'key': 'properties.initialUploadPolicy', 'type': 'str'}, } def __init__( @@ -1748,7 +1987,7 @@ def __init__( super(ServerEndpointCreateParameters, self).__init__(**kwargs) self.server_local_path = kwargs.get('server_local_path', None) self.cloud_tiering = kwargs.get('cloud_tiering', None) - self.volume_free_space_percent = kwargs.get('volume_free_space_percent', None) + self.volume_free_space_percent = kwargs.get('volume_free_space_percent', 20) self.tier_files_older_than_days = kwargs.get('tier_files_older_than_days', None) self.friendly_name = kwargs.get('friendly_name', None) self.server_resource_id = kwargs.get('server_resource_id', None) @@ -1756,6 +1995,7 @@ def __init__( self.offline_data_transfer_share_name = kwargs.get('offline_data_transfer_share_name', None) self.initial_download_policy = kwargs.get('initial_download_policy', None) self.local_cache_mode = kwargs.get('local_cache_mode', None) + self.initial_upload_policy = kwargs.get('initial_upload_policy', None) class ServerEndpointFilesNotSyncingError(msrest.serialization.Model): @@ -1878,6 +2118,8 @@ class ServerEndpointSyncActivityStatus(msrest.serialization.Model): :ivar sync_mode: Sync mode. Possible values include: "Regular", "NamespaceDownload", "InitialUpload", "SnapshotUpload", "InitialFullDownload". :vartype sync_mode: str or ~azure.mgmt.storagesync.models.ServerEndpointSyncMode + :ivar session_minutes_remaining: Session minutes remaining (if available). + :vartype session_minutes_remaining: int """ _validation = { @@ -1888,6 +2130,7 @@ class ServerEndpointSyncActivityStatus(msrest.serialization.Model): 'applied_bytes': {'readonly': True, 'minimum': 0}, 'total_bytes': {'readonly': True, 'minimum': 0}, 'sync_mode': {'readonly': True}, + 'session_minutes_remaining': {'readonly': True, 'minimum': 0}, } _attribute_map = { @@ -1898,6 +2141,7 @@ class ServerEndpointSyncActivityStatus(msrest.serialization.Model): 'applied_bytes': {'key': 'appliedBytes', 'type': 'long'}, 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, 'sync_mode': {'key': 'syncMode', 'type': 'str'}, + 'session_minutes_remaining': {'key': 'sessionMinutesRemaining', 'type': 'int'}, } def __init__( @@ -1912,6 +2156,7 @@ def __init__( self.applied_bytes = None self.total_bytes = None self.sync_mode = None + self.session_minutes_remaining = None class ServerEndpointSyncSessionStatus(msrest.serialization.Model): @@ -2466,7 +2711,7 @@ class SubscriptionState(msrest.serialization.Model): :ivar istransitioning: Is Transitioning. :vartype istransitioning: bool :param properties: Subscription state properties. - :type properties: object + :type properties: any """ _validation = { @@ -2566,7 +2811,7 @@ class SyncGroupCreateParameters(ProxyResource): "Microsoft.Storage/storageAccounts". :vartype type: str :param properties: The parameters used to create the sync group. - :type properties: object + :type properties: any """ _validation = { @@ -2652,17 +2897,17 @@ class Workflow(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar last_step_name: last step name. - :vartype last_step_name: str - :ivar status: workflow status. Possible values include: "active", "expired", "succeeded", + :param last_step_name: last step name. + :type last_step_name: str + :param status: workflow status. Possible values include: "active", "expired", "succeeded", "aborted", "failed". - :vartype status: str or ~azure.mgmt.storagesync.models.WorkflowStatus - :ivar operation: operation direction. Possible values include: "do", "undo", "cancel". - :vartype operation: str or ~azure.mgmt.storagesync.models.OperationDirection - :ivar steps: workflow steps. - :vartype steps: str - :ivar last_operation_id: workflow last operation identifier. - :vartype last_operation_id: str + :type status: str or ~azure.mgmt.storagesync.models.WorkflowStatus + :param operation: operation direction. Possible values include: "do", "undo", "cancel". + :type operation: str or ~azure.mgmt.storagesync.models.OperationDirection + :param steps: workflow steps. + :type steps: str + :param last_operation_id: workflow last operation identifier. + :type last_operation_id: str :ivar command_name: workflow command name. :vartype command_name: str :ivar created_timestamp: workflow created timestamp. @@ -2675,11 +2920,6 @@ class Workflow(ProxyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'last_step_name': {'readonly': True}, - 'status': {'readonly': True}, - 'operation': {'readonly': True}, - 'steps': {'readonly': True}, - 'last_operation_id': {'readonly': True}, 'command_name': {'readonly': True}, 'created_timestamp': {'readonly': True}, 'last_status_timestamp': {'readonly': True}, @@ -2704,11 +2944,11 @@ def __init__( **kwargs ): super(Workflow, self).__init__(**kwargs) - self.last_step_name = None - self.status = None - self.operation = None - self.steps = None - self.last_operation_id = None + self.last_step_name = kwargs.get('last_step_name', None) + self.status = kwargs.get('status', None) + self.operation = kwargs.get('operation', None) + self.steps = kwargs.get('steps', None) + self.last_operation_id = kwargs.get('last_operation_id', None) self.command_name = None self.created_timestamp = None self.last_status_timestamp = None diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models_py3.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models_py3.py index 37514c302f29..96df3bee32c7 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models_py3.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models_py3.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -44,9 +44,8 @@ class CheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The name to check for availability. :type name: str - :ivar type: Required. The resource type. Must be set to - Microsoft.StorageSync/storageSyncServices. Default value: - "Microsoft.StorageSync/storageSyncServices". + :ivar type: The resource type. Must be set to Microsoft.StorageSync/storageSyncServices. Has + constant value: "Microsoft.StorageSync/storageSyncServices". :vartype type: str """ @@ -213,6 +212,9 @@ class CloudEndpoint(ProxyResource): :type last_workflow_id: str :param last_operation_name: Resource Last Operation Name. :type last_operation_name: str + :ivar change_enumeration_status: Cloud endpoint change enumeration status. + :vartype change_enumeration_status: + ~azure.mgmt.storagesync.models.CloudEndpointChangeEnumerationStatus """ _validation = { @@ -220,6 +222,7 @@ class CloudEndpoint(ProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'backup_enabled': {'readonly': True}, + 'change_enumeration_status': {'readonly': True}, } _attribute_map = { @@ -235,6 +238,7 @@ class CloudEndpoint(ProxyResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, + 'change_enumeration_status': {'key': 'properties.changeEnumerationStatus', 'type': 'CloudEndpointChangeEnumerationStatus'}, } def __init__( @@ -260,6 +264,7 @@ def __init__( self.provisioning_state = provisioning_state self.last_workflow_id = last_workflow_id self.last_operation_name = last_operation_name + self.change_enumeration_status = None class CloudEndpointArray(msrest.serialization.Model): @@ -283,6 +288,133 @@ def __init__( self.value = value +class CloudEndpointChangeEnumerationActivity(msrest.serialization.Model): + """Cloud endpoint change enumeration activity object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar last_updated_timestamp: Last updated timestamp. + :vartype last_updated_timestamp: ~datetime.datetime + :ivar operation_state: Change enumeration operation state. Possible values include: + "InitialEnumerationInProgress", "EnumerationInProgress". + :vartype operation_state: str or + ~azure.mgmt.storagesync.models.CloudEndpointChangeEnumerationActivityState + :ivar status_code: When non-zero, indicates an issue that is delaying change enumeration. + :vartype status_code: int + :ivar started_timestamp: Timestamp when change enumeration started. + :vartype started_timestamp: ~datetime.datetime + :ivar processed_files_count: Count of files processed. + :vartype processed_files_count: long + :ivar processed_directories_count: Count of directories processed. + :vartype processed_directories_count: long + :ivar total_files_count: Total count of files enumerated. + :vartype total_files_count: long + :ivar total_directories_count: Total count of directories enumerated. + :vartype total_directories_count: long + :ivar total_size_bytes: Total enumerated size in bytes. + :vartype total_size_bytes: long + :ivar progress_percent: Progress percentage for change enumeration run, excluding processing of + deletes. + :vartype progress_percent: int + :ivar minutes_remaining: Estimate of time remaining for the enumeration run. + :vartype minutes_remaining: int + :ivar total_counts_state: Change enumeration total counts state. Possible values include: + "Calculating", "Final". + :vartype total_counts_state: str or + ~azure.mgmt.storagesync.models.CloudEndpointChangeEnumerationTotalCountsState + :ivar deletes_progress_percent: Progress percentage for processing deletes. This is done + separately from the rest of the enumeration run. + :vartype deletes_progress_percent: int + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'operation_state': {'readonly': True}, + 'status_code': {'readonly': True}, + 'started_timestamp': {'readonly': True}, + 'processed_files_count': {'readonly': True, 'minimum': 0}, + 'processed_directories_count': {'readonly': True, 'minimum': 0}, + 'total_files_count': {'readonly': True, 'minimum': 0}, + 'total_directories_count': {'readonly': True, 'minimum': 0}, + 'total_size_bytes': {'readonly': True, 'minimum': 0}, + 'progress_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + 'minutes_remaining': {'readonly': True, 'minimum': 0}, + 'total_counts_state': {'readonly': True}, + 'deletes_progress_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'operation_state': {'key': 'operationState', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'started_timestamp': {'key': 'startedTimestamp', 'type': 'iso-8601'}, + 'processed_files_count': {'key': 'processedFilesCount', 'type': 'long'}, + 'processed_directories_count': {'key': 'processedDirectoriesCount', 'type': 'long'}, + 'total_files_count': {'key': 'totalFilesCount', 'type': 'long'}, + 'total_directories_count': {'key': 'totalDirectoriesCount', 'type': 'long'}, + 'total_size_bytes': {'key': 'totalSizeBytes', 'type': 'long'}, + 'progress_percent': {'key': 'progressPercent', 'type': 'int'}, + 'minutes_remaining': {'key': 'minutesRemaining', 'type': 'int'}, + 'total_counts_state': {'key': 'totalCountsState', 'type': 'str'}, + 'deletes_progress_percent': {'key': 'deletesProgressPercent', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudEndpointChangeEnumerationActivity, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.operation_state = None + self.status_code = None + self.started_timestamp = None + self.processed_files_count = None + self.processed_directories_count = None + self.total_files_count = None + self.total_directories_count = None + self.total_size_bytes = None + self.progress_percent = None + self.minutes_remaining = None + self.total_counts_state = None + self.deletes_progress_percent = None + + +class CloudEndpointChangeEnumerationStatus(msrest.serialization.Model): + """Cloud endpoint change enumeration status object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar last_updated_timestamp: Last updated timestamp. + :vartype last_updated_timestamp: ~datetime.datetime + :ivar last_enumeration_status: Status of last completed change enumeration. + :vartype last_enumeration_status: + ~azure.mgmt.storagesync.models.CloudEndpointLastChangeEnumerationStatus + :ivar activity: Change enumeration activity. + :vartype activity: ~azure.mgmt.storagesync.models.CloudEndpointChangeEnumerationActivity + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'last_enumeration_status': {'readonly': True}, + 'activity': {'readonly': True}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'last_enumeration_status': {'key': 'lastEnumerationStatus', 'type': 'CloudEndpointLastChangeEnumerationStatus'}, + 'activity': {'key': 'activity', 'type': 'CloudEndpointChangeEnumerationActivity'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudEndpointChangeEnumerationStatus, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.last_enumeration_status = None + self.activity = None + + class CloudEndpointCreateParameters(ProxyResource): """The parameters used when creating a cloud endpoint. @@ -338,6 +470,56 @@ def __init__( self.friendly_name = friendly_name +class CloudEndpointLastChangeEnumerationStatus(msrest.serialization.Model): + """Cloud endpoint change enumeration status object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar started_timestamp: Timestamp when change enumeration started. + :vartype started_timestamp: ~datetime.datetime + :ivar completed_timestamp: Timestamp when change enumeration completed. + :vartype completed_timestamp: ~datetime.datetime + :ivar namespace_files_count: Count of files in the namespace. + :vartype namespace_files_count: long + :ivar namespace_directories_count: Count of directories in the namespace. + :vartype namespace_directories_count: long + :ivar namespace_size_bytes: Namespace size in bytes. + :vartype namespace_size_bytes: long + :ivar next_run_timestamp: Timestamp of when change enumeration is expected to run again. + :vartype next_run_timestamp: ~datetime.datetime + """ + + _validation = { + 'started_timestamp': {'readonly': True}, + 'completed_timestamp': {'readonly': True}, + 'namespace_files_count': {'readonly': True, 'minimum': 0}, + 'namespace_directories_count': {'readonly': True, 'minimum': 0}, + 'namespace_size_bytes': {'readonly': True, 'minimum': 0}, + 'next_run_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'started_timestamp': {'key': 'startedTimestamp', 'type': 'iso-8601'}, + 'completed_timestamp': {'key': 'completedTimestamp', 'type': 'iso-8601'}, + 'namespace_files_count': {'key': 'namespaceFilesCount', 'type': 'long'}, + 'namespace_directories_count': {'key': 'namespaceDirectoriesCount', 'type': 'long'}, + 'namespace_size_bytes': {'key': 'namespaceSizeBytes', 'type': 'long'}, + 'next_run_timestamp': {'key': 'nextRunTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudEndpointLastChangeEnumerationStatus, self).__init__(**kwargs) + self.started_timestamp = None + self.completed_timestamp = None + self.namespace_files_count = None + self.namespace_directories_count = None + self.namespace_size_bytes = None + self.next_run_timestamp = None + + class CloudTieringCachePerformance(msrest.serialization.Model): """Server endpoint cloud tiering status object. @@ -560,6 +742,61 @@ def __init__( self.file_count = None +class LocationOperationStatus(msrest.serialization.Model): + """Operation status object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Operation resource Id. + :vartype id: str + :ivar name: Operation Id. + :vartype name: str + :ivar status: Operation status. + :vartype status: str + :ivar start_time: Start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: End time of the operation. + :vartype end_time: ~datetime.datetime + :ivar error: Error details. + :vartype error: ~azure.mgmt.storagesync.models.StorageSyncApiError + :ivar percent_complete: Percent complete. + :vartype percent_complete: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + 'percent_complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'StorageSyncApiError'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(LocationOperationStatus, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None + self.percent_complete = None + + class OperationDisplayInfo(msrest.serialization.Model): """The operation supported by storage sync. @@ -1264,12 +1501,12 @@ class RegisteredServer(ProxyResource): :vartype agent_version_expiration_date: ~datetime.datetime :param server_os_version: Registered Server OS Version. :type server_os_version: str - :ivar server_management_error_code: Registered Server Management Error Code. - :vartype server_management_error_code: int - :ivar last_heart_beat: Registered Server last heart beat. - :vartype last_heart_beat: ~datetime.datetime - :ivar provisioning_state: Registered Server Provisioning State. - :vartype provisioning_state: str + :param server_management_error_code: Registered Server Management Error Code. + :type server_management_error_code: int + :param last_heart_beat: Registered Server last heart beat. + :type last_heart_beat: str + :param provisioning_state: Registered Server Provisioning State. + :type provisioning_state: str :param server_role: Registered Server serverRole. :type server_role: str :param cluster_id: Registered Server clusterId. @@ -1278,26 +1515,26 @@ class RegisteredServer(ProxyResource): :type cluster_name: str :param server_id: Registered Server serverId. :type server_id: str - :ivar storage_sync_service_uid: Registered Server storageSyncServiceUid. - :vartype storage_sync_service_uid: str - :ivar last_workflow_id: Registered Server lastWorkflowId. - :vartype last_workflow_id: str - :ivar last_operation_name: Resource Last Operation Name. - :vartype last_operation_name: str - :ivar discovery_endpoint_uri: Resource discoveryEndpointUri. - :vartype discovery_endpoint_uri: str - :ivar resource_location: Resource Location. - :vartype resource_location: str - :ivar service_location: Service Location. - :vartype service_location: str + :param storage_sync_service_uid: Registered Server storageSyncServiceUid. + :type storage_sync_service_uid: str + :param last_workflow_id: Registered Server lastWorkflowId. + :type last_workflow_id: str + :param last_operation_name: Resource Last Operation Name. + :type last_operation_name: str + :param discovery_endpoint_uri: Resource discoveryEndpointUri. + :type discovery_endpoint_uri: str + :param resource_location: Resource Location. + :type resource_location: str + :param service_location: Service Location. + :type service_location: str :param friendly_name: Friendly Name. :type friendly_name: str - :ivar management_endpoint_uri: Management Endpoint Uri. - :vartype management_endpoint_uri: str - :ivar monitoring_endpoint_uri: Telemetry Endpoint Uri. - :vartype monitoring_endpoint_uri: str - :ivar monitoring_configuration: Monitoring Configuration. - :vartype monitoring_configuration: str + :param management_endpoint_uri: Management Endpoint Uri. + :type management_endpoint_uri: str + :param monitoring_endpoint_uri: Telemetry Endpoint Uri. + :type monitoring_endpoint_uri: str + :param monitoring_configuration: Monitoring Configuration. + :type monitoring_configuration: str :ivar server_name: Server name. :vartype server_name: str """ @@ -1308,18 +1545,6 @@ class RegisteredServer(ProxyResource): 'type': {'readonly': True}, 'agent_version_status': {'readonly': True}, 'agent_version_expiration_date': {'readonly': True}, - 'server_management_error_code': {'readonly': True}, - 'last_heart_beat': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'storage_sync_service_uid': {'readonly': True}, - 'last_workflow_id': {'readonly': True}, - 'last_operation_name': {'readonly': True}, - 'discovery_endpoint_uri': {'readonly': True}, - 'resource_location': {'readonly': True}, - 'service_location': {'readonly': True}, - 'management_endpoint_uri': {'readonly': True}, - 'monitoring_endpoint_uri': {'readonly': True}, - 'monitoring_configuration': {'readonly': True}, 'server_name': {'readonly': True}, } @@ -1333,7 +1558,7 @@ class RegisteredServer(ProxyResource): 'agent_version_expiration_date': {'key': 'properties.agentVersionExpirationDate', 'type': 'iso-8601'}, 'server_os_version': {'key': 'properties.serverOSVersion', 'type': 'str'}, 'server_management_error_code': {'key': 'properties.serverManagementErrorCode', 'type': 'int'}, - 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'iso-8601'}, + 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, @@ -1358,11 +1583,23 @@ def __init__( server_certificate: Optional[str] = None, agent_version: Optional[str] = None, server_os_version: Optional[str] = None, + server_management_error_code: Optional[int] = None, + last_heart_beat: Optional[str] = None, + provisioning_state: Optional[str] = None, server_role: Optional[str] = None, cluster_id: Optional[str] = None, cluster_name: Optional[str] = None, server_id: Optional[str] = None, + storage_sync_service_uid: Optional[str] = None, + last_workflow_id: Optional[str] = None, + last_operation_name: Optional[str] = None, + discovery_endpoint_uri: Optional[str] = None, + resource_location: Optional[str] = None, + service_location: Optional[str] = None, friendly_name: Optional[str] = None, + management_endpoint_uri: Optional[str] = None, + monitoring_endpoint_uri: Optional[str] = None, + monitoring_configuration: Optional[str] = None, **kwargs ): super(RegisteredServer, self).__init__(**kwargs) @@ -1371,23 +1608,23 @@ def __init__( self.agent_version_status = None self.agent_version_expiration_date = None self.server_os_version = server_os_version - self.server_management_error_code = None - self.last_heart_beat = None - self.provisioning_state = None + self.server_management_error_code = server_management_error_code + self.last_heart_beat = last_heart_beat + self.provisioning_state = provisioning_state self.server_role = server_role self.cluster_id = cluster_id self.cluster_name = cluster_name self.server_id = server_id - self.storage_sync_service_uid = None - self.last_workflow_id = None - self.last_operation_name = None - self.discovery_endpoint_uri = None - self.resource_location = None - self.service_location = None + self.storage_sync_service_uid = storage_sync_service_uid + self.last_workflow_id = last_workflow_id + self.last_operation_name = last_operation_name + self.discovery_endpoint_uri = discovery_endpoint_uri + self.resource_location = resource_location + self.service_location = service_location self.friendly_name = friendly_name - self.management_endpoint_uri = None - self.monitoring_endpoint_uri = None - self.monitoring_configuration = None + self.management_endpoint_uri = management_endpoint_uri + self.monitoring_endpoint_uri = monitoring_endpoint_uri + self.monitoring_configuration = monitoring_configuration self.server_name = None @@ -1599,6 +1836,9 @@ class ServerEndpoint(ProxyResource): to cloud behavior to pre-populate before local access. Possible values include: "DownloadNewAndModifiedFiles", "UpdateLocallyCachedFiles". :type local_cache_mode: str or ~azure.mgmt.storagesync.models.LocalCacheMode + :param initial_upload_policy: Policy for how the initial upload sync session is performed. + Possible values include: "ServerAuthoritative", "Merge". + :type initial_upload_policy: str or ~azure.mgmt.storagesync.models.InitialUploadPolicy :ivar server_name: Server name. :vartype server_name: str """ @@ -1642,6 +1882,7 @@ class ServerEndpoint(ProxyResource): 'recall_status': {'key': 'properties.recallStatus', 'type': 'ServerEndpointRecallStatus'}, 'initial_download_policy': {'key': 'properties.initialDownloadPolicy', 'type': 'str'}, 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, + 'initial_upload_policy': {'key': 'properties.initialUploadPolicy', 'type': 'str'}, 'server_name': {'key': 'properties.serverName', 'type': 'str'}, } @@ -1658,6 +1899,7 @@ def __init__( offline_data_transfer_share_name: Optional[str] = None, initial_download_policy: Optional[Union[str, "InitialDownloadPolicy"]] = None, local_cache_mode: Optional[Union[str, "LocalCacheMode"]] = None, + initial_upload_policy: Optional[Union[str, "InitialUploadPolicy"]] = None, **kwargs ): super(ServerEndpoint, self).__init__(**kwargs) @@ -1679,6 +1921,7 @@ def __init__( self.recall_status = None self.initial_download_policy = initial_download_policy self.local_cache_mode = local_cache_mode + self.initial_upload_policy = initial_upload_policy self.server_name = None @@ -1710,6 +1953,8 @@ class ServerEndpointBackgroundDataDownloadActivity(msrest.serialization.Model): :ivar timestamp: Timestamp when properties were updated. :vartype timestamp: ~datetime.datetime + :ivar started_timestamp: Timestamp when the operation started. + :vartype started_timestamp: ~datetime.datetime :ivar percent_progress: Progress percentage. :vartype percent_progress: int :ivar downloaded_bytes: Running count of bytes downloaded. @@ -1718,12 +1963,14 @@ class ServerEndpointBackgroundDataDownloadActivity(msrest.serialization.Model): _validation = { 'timestamp': {'readonly': True}, + 'started_timestamp': {'readonly': True}, 'percent_progress': {'readonly': True, 'maximum': 100, 'minimum': 0}, 'downloaded_bytes': {'readonly': True, 'minimum': 0}, } _attribute_map = { 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'started_timestamp': {'key': 'startedTimestamp', 'type': 'iso-8601'}, 'percent_progress': {'key': 'percentProgress', 'type': 'int'}, 'downloaded_bytes': {'key': 'downloadedBytes', 'type': 'long'}, } @@ -1734,6 +1981,7 @@ def __init__( ): super(ServerEndpointBackgroundDataDownloadActivity, self).__init__(**kwargs) self.timestamp = None + self.started_timestamp = None self.percent_progress = None self.downloaded_bytes = None @@ -1848,6 +2096,9 @@ class ServerEndpointCreateParameters(ProxyResource): to cloud behavior to pre-populate before local access. Possible values include: "DownloadNewAndModifiedFiles", "UpdateLocallyCachedFiles". :type local_cache_mode: str or ~azure.mgmt.storagesync.models.LocalCacheMode + :param initial_upload_policy: Policy for how the initial upload sync session is performed. + Possible values include: "ServerAuthoritative", "Merge". + :type initial_upload_policy: str or ~azure.mgmt.storagesync.models.InitialUploadPolicy """ _validation = { @@ -1872,6 +2123,7 @@ class ServerEndpointCreateParameters(ProxyResource): 'offline_data_transfer_share_name': {'key': 'properties.offlineDataTransferShareName', 'type': 'str'}, 'initial_download_policy': {'key': 'properties.initialDownloadPolicy', 'type': 'str'}, 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, + 'initial_upload_policy': {'key': 'properties.initialUploadPolicy', 'type': 'str'}, } def __init__( @@ -1879,7 +2131,7 @@ def __init__( *, server_local_path: Optional[str] = None, cloud_tiering: Optional[Union[str, "FeatureStatus"]] = None, - volume_free_space_percent: Optional[int] = None, + volume_free_space_percent: Optional[int] = 20, tier_files_older_than_days: Optional[int] = None, friendly_name: Optional[str] = None, server_resource_id: Optional[str] = None, @@ -1887,6 +2139,7 @@ def __init__( offline_data_transfer_share_name: Optional[str] = None, initial_download_policy: Optional[Union[str, "InitialDownloadPolicy"]] = None, local_cache_mode: Optional[Union[str, "LocalCacheMode"]] = None, + initial_upload_policy: Optional[Union[str, "InitialUploadPolicy"]] = None, **kwargs ): super(ServerEndpointCreateParameters, self).__init__(**kwargs) @@ -1900,6 +2153,7 @@ def __init__( self.offline_data_transfer_share_name = offline_data_transfer_share_name self.initial_download_policy = initial_download_policy self.local_cache_mode = local_cache_mode + self.initial_upload_policy = initial_upload_policy class ServerEndpointFilesNotSyncingError(msrest.serialization.Model): @@ -2022,6 +2276,8 @@ class ServerEndpointSyncActivityStatus(msrest.serialization.Model): :ivar sync_mode: Sync mode. Possible values include: "Regular", "NamespaceDownload", "InitialUpload", "SnapshotUpload", "InitialFullDownload". :vartype sync_mode: str or ~azure.mgmt.storagesync.models.ServerEndpointSyncMode + :ivar session_minutes_remaining: Session minutes remaining (if available). + :vartype session_minutes_remaining: int """ _validation = { @@ -2032,6 +2288,7 @@ class ServerEndpointSyncActivityStatus(msrest.serialization.Model): 'applied_bytes': {'readonly': True, 'minimum': 0}, 'total_bytes': {'readonly': True, 'minimum': 0}, 'sync_mode': {'readonly': True}, + 'session_minutes_remaining': {'readonly': True, 'minimum': 0}, } _attribute_map = { @@ -2042,6 +2299,7 @@ class ServerEndpointSyncActivityStatus(msrest.serialization.Model): 'applied_bytes': {'key': 'appliedBytes', 'type': 'long'}, 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, 'sync_mode': {'key': 'syncMode', 'type': 'str'}, + 'session_minutes_remaining': {'key': 'sessionMinutesRemaining', 'type': 'int'}, } def __init__( @@ -2056,6 +2314,7 @@ def __init__( self.applied_bytes = None self.total_bytes = None self.sync_mode = None + self.session_minutes_remaining = None class ServerEndpointSyncSessionStatus(msrest.serialization.Model): @@ -2656,7 +2915,7 @@ class SubscriptionState(msrest.serialization.Model): :ivar istransitioning: Is Transitioning. :vartype istransitioning: bool :param properties: Subscription state properties. - :type properties: object + :type properties: any """ _validation = { @@ -2673,7 +2932,7 @@ def __init__( self, *, state: Optional[Union[str, "Reason"]] = None, - properties: Optional[object] = None, + properties: Optional[Any] = None, **kwargs ): super(SubscriptionState, self).__init__(**kwargs) @@ -2761,7 +3020,7 @@ class SyncGroupCreateParameters(ProxyResource): "Microsoft.Storage/storageAccounts". :vartype type: str :param properties: The parameters used to create the sync group. - :type properties: object + :type properties: any """ _validation = { @@ -2780,7 +3039,7 @@ class SyncGroupCreateParameters(ProxyResource): def __init__( self, *, - properties: Optional[object] = None, + properties: Optional[Any] = None, **kwargs ): super(SyncGroupCreateParameters, self).__init__(**kwargs) @@ -2855,17 +3114,17 @@ class Workflow(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar last_step_name: last step name. - :vartype last_step_name: str - :ivar status: workflow status. Possible values include: "active", "expired", "succeeded", + :param last_step_name: last step name. + :type last_step_name: str + :param status: workflow status. Possible values include: "active", "expired", "succeeded", "aborted", "failed". - :vartype status: str or ~azure.mgmt.storagesync.models.WorkflowStatus - :ivar operation: operation direction. Possible values include: "do", "undo", "cancel". - :vartype operation: str or ~azure.mgmt.storagesync.models.OperationDirection - :ivar steps: workflow steps. - :vartype steps: str - :ivar last_operation_id: workflow last operation identifier. - :vartype last_operation_id: str + :type status: str or ~azure.mgmt.storagesync.models.WorkflowStatus + :param operation: operation direction. Possible values include: "do", "undo", "cancel". + :type operation: str or ~azure.mgmt.storagesync.models.OperationDirection + :param steps: workflow steps. + :type steps: str + :param last_operation_id: workflow last operation identifier. + :type last_operation_id: str :ivar command_name: workflow command name. :vartype command_name: str :ivar created_timestamp: workflow created timestamp. @@ -2878,11 +3137,6 @@ class Workflow(ProxyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'last_step_name': {'readonly': True}, - 'status': {'readonly': True}, - 'operation': {'readonly': True}, - 'steps': {'readonly': True}, - 'last_operation_id': {'readonly': True}, 'command_name': {'readonly': True}, 'created_timestamp': {'readonly': True}, 'last_status_timestamp': {'readonly': True}, @@ -2904,14 +3158,20 @@ class Workflow(ProxyResource): def __init__( self, + *, + last_step_name: Optional[str] = None, + status: Optional[Union[str, "WorkflowStatus"]] = None, + operation: Optional[Union[str, "OperationDirection"]] = None, + steps: Optional[str] = None, + last_operation_id: Optional[str] = None, **kwargs ): super(Workflow, self).__init__(**kwargs) - self.last_step_name = None - self.status = None - self.operation = None - self.steps = None - self.last_operation_id = None + self.last_step_name = last_step_name + self.status = status + self.operation = operation + self.steps = steps + self.last_operation_id = last_operation_id self.command_name = None self.created_timestamp = None self.last_status_timestamp = None diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/__init__.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/__init__.py index 85ce9379c268..6498106a813e 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/__init__.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/__init__.py @@ -16,6 +16,7 @@ from ._registered_servers_operations import RegisteredServersOperations from ._workflows_operations import WorkflowsOperations from ._operation_status_operations import OperationStatusOperations +from ._microsoft_storage_sync_operations import MicrosoftStorageSyncOperationsMixin __all__ = [ 'Operations', @@ -28,4 +29,5 @@ 'RegisteredServersOperations', 'WorkflowsOperations', 'OperationStatusOperations', + 'MicrosoftStorageSyncOperationsMixin', ] diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_cloud_endpoints_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_cloud_endpoints_operations.py index 73ad716cfc57..2f8df4f670d0 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_cloud_endpoints_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_cloud_endpoints_operations.py @@ -70,7 +70,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -142,8 +142,8 @@ def begin_create( :type parameters: ~azure.mgmt.storagesync.models.CloudEndpointCreateParameters :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 CloudEndpoint or the result of cls(response) @@ -184,7 +184,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -240,7 +240,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -296,7 +296,7 @@ def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -358,8 +358,8 @@ def begin_delete( :type cloud_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: 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) @@ -392,7 +392,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -451,7 +451,7 @@ def prepare_request(next_link=None): url = self.list_by_sync_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } @@ -515,7 +515,7 @@ def _pre_backup_initial( url = self._pre_backup_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -583,8 +583,8 @@ def begin_pre_backup( :type parameters: ~azure.mgmt.storagesync.models.BackupRequest :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) @@ -618,7 +618,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -661,7 +661,7 @@ def _post_backup_initial( url = self._post_backup_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -732,8 +732,8 @@ def begin_post_backup( :type parameters: ~azure.mgmt.storagesync.models.BackupRequest :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 PostBackupResponse or the result of cls(response) @@ -775,7 +775,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -818,7 +818,7 @@ def _pre_restore_initial( url = self._pre_restore_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -881,8 +881,8 @@ def begin_pre_restore( :type parameters: ~azure.mgmt.storagesync.models.PreRestoreRequest :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) @@ -916,7 +916,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -972,7 +972,7 @@ def restoreheartbeat( url = self.restoreheartbeat.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -1028,7 +1028,7 @@ def _post_restore_initial( url = self._post_restore_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -1091,8 +1091,8 @@ def begin_post_restore( :type parameters: ~azure.mgmt.storagesync.models.PostRestoreRequest :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) @@ -1126,7 +1126,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -1169,7 +1169,7 @@ def _trigger_change_detection_initial( url = self._trigger_change_detection_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), @@ -1233,8 +1233,8 @@ def begin_trigger_change_detection( :type parameters: ~azure.mgmt.storagesync.models.TriggerChangeDetectionParameters :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) @@ -1268,7 +1268,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'cloudEndpointName': self._serialize.url("cloud_endpoint_name", cloud_endpoint_name, 'str'), diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_microsoft_storage_sync_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_microsoft_storage_sync_operations.py new file mode 100644 index 000000000000..f82f23b5ca72 --- /dev/null +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_microsoft_storage_sync_operations.py @@ -0,0 +1,88 @@ +# 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 MicrosoftStorageSyncOperationsMixin(object): + + def location_operation_status( + self, + location_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.LocationOperationStatus" + """Get Operation status. + + :param location_name: The desired region to obtain information from. + :type location_name: str + :param operation_id: operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocationOperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.storagesync.models.LocationOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationOperationStatus"] + 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.location_operation_status.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.StorageSyncError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-correlation-request-id']=self._deserialize('str', response.headers.get('x-ms-correlation-request-id')) + deserialized = self._deserialize('LocationOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + location_operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/operations/{operationId}'} # type: ignore diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operation_status_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operation_status_operations.py index 9570efb48cc9..dbf6bad71d1e 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operation_status_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operation_status_operations.py @@ -80,7 +80,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'locationName': self._serialize.url("location_name", location_name, 'str'), 'workflowId': self._serialize.url("workflow_id", workflow_id, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_endpoint_connections_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_endpoint_connections_operations.py index 8c5c63c59860..d84d5e1c7398 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_endpoint_connections_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_endpoint_connections_operations.py @@ -81,7 +81,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -134,7 +134,7 @@ def _create_initial( # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -204,8 +204,8 @@ def begin_create( :type properties: ~azure.mgmt.storagesync.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) @@ -240,7 +240,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -279,7 +279,7 @@ def _delete_initial( # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -336,8 +336,8 @@ def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -368,7 +368,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -424,7 +424,7 @@ def prepare_request(next_link=None): url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_link_resources_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_link_resources_operations.py index 28a2bdf10300..55e011719166 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_link_resources_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_link_resources_operations.py @@ -74,7 +74,7 @@ def list_by_storage_sync_service( # Construct URL url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_registered_servers_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_registered_servers_operations.py index 8d6904097453..6d0dfa669d2a 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_registered_servers_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_registered_servers_operations.py @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -156,7 +156,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -212,7 +212,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -279,8 +279,8 @@ def begin_create( :type parameters: ~azure.mgmt.storagesync.models.RegisteredServerCreateParameters :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 RegisteredServer or the result of cls(response) @@ -320,7 +320,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -359,7 +359,7 @@ def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -415,8 +415,8 @@ def begin_delete( :type server_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -448,7 +448,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -489,7 +489,7 @@ def _trigger_rollover_initial( url = self._trigger_rollover_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } @@ -552,8 +552,8 @@ def begin_trigger_rollover( :type parameters: ~azure.mgmt.storagesync.models.TriggerRolloverRequest :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) @@ -586,7 +586,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'serverId': self._serialize.url("server_id", server_id, 'str'), } diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_server_endpoints_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_server_endpoints_operations.py index 32cd79267ddb..2e500691b657 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_server_endpoints_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_server_endpoints_operations.py @@ -70,7 +70,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -141,8 +141,8 @@ def begin_create( :type parameters: ~azure.mgmt.storagesync.models.ServerEndpointCreateParameters :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 ServerEndpoint or the result of cls(response) @@ -183,7 +183,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -226,7 +226,7 @@ def _update_initial( url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -300,8 +300,8 @@ def begin_update( :type parameters: ~azure.mgmt.storagesync.models.ServerEndpointUpdateParameters :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 ServerEndpoint or the result of cls(response) @@ -342,7 +342,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -398,7 +398,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -454,7 +454,7 @@ def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -514,8 +514,8 @@ def begin_delete( :type server_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: 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) @@ -548,7 +548,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -607,7 +607,7 @@ def prepare_request(next_link=None): url = self.list_by_sync_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } @@ -671,7 +671,7 @@ def _recall_action_initial( url = self._recall_action_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), @@ -738,8 +738,8 @@ def begin_recall_action( :type parameters: ~azure.mgmt.storagesync.models.RecallActionParameters :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) @@ -773,7 +773,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), 'serverEndpointName': self._serialize.url("server_endpoint_name", server_endpoint_name, 'str'), diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_storage_sync_services_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_storage_sync_services_operations.py index fad2c652c330..8f4f1b57cd82 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_storage_sync_services_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_storage_sync_services_operations.py @@ -131,7 +131,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -193,8 +193,8 @@ def begin_create( :type parameters: ~azure.mgmt.storagesync.models.StorageSyncServiceCreateParameters :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 StorageSyncService or the result of cls(response) @@ -229,7 +229,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } @@ -277,7 +277,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -331,7 +331,7 @@ def _update_initial( url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -398,8 +398,8 @@ def begin_update( :type parameters: ~azure.mgmt.storagesync.models.StorageSyncServiceUpdateParameters :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 StorageSyncService or the result of cls(response) @@ -438,7 +438,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } @@ -475,7 +475,7 @@ def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -529,8 +529,8 @@ def begin_delete( :type storage_sync_service_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) @@ -561,7 +561,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } @@ -612,7 +612,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_sync_groups_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_sync_groups_operations.py index 2747ab44058a..fe6bf01268a0 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_sync_groups_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_sync_groups_operations.py @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -158,7 +158,7 @@ def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } @@ -229,7 +229,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } @@ -296,7 +296,7 @@ def delete( url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'syncGroupName': self._serialize.url("sync_group_name", sync_group_name, 'str'), } diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_workflows_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_workflows_operations.py index 0a90d5cbecc6..0f4f7ceabd6d 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_workflows_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_workflows_operations.py @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list_by_storage_sync_service.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -154,7 +154,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'workflowId': self._serialize.url("workflow_id", workflow_id, 'str'), } @@ -221,7 +221,7 @@ def abort( url = self.abort.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), 'workflowId': self._serialize.url("workflow_id", workflow_id, 'str'), }