From a94c36395bdeb70634c419b03b0d6ba3b1238390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?McCoy=20Pati=C3=B1o?= <39780829+mccoyp@users.noreply.github.com> Date: Wed, 16 Jun 2021 17:34:03 -0700 Subject: [PATCH] KeyVaultBackupOperation -> KeyVaultBackupResult (#19284) --- .../azure/keyvault/administration/__init__.py | 4 ++-- .../azure/keyvault/administration/_backup_client.py | 12 ++++++------ .../azure/keyvault/administration/_models.py | 4 ++-- .../keyvault/administration/aio/_backup_client.py | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py index 335ec8bddfdb..f0560dc935de 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py @@ -7,7 +7,7 @@ from ._enums import KeyVaultRoleScope, KeyVaultDataAction from ._internal.client_base import ApiVersion from ._models import ( - KeyVaultBackupOperation, + KeyVaultBackupResult, KeyVaultPermission, KeyVaultRoleAssignment, KeyVaultRoleAssignmentProperties, @@ -17,7 +17,7 @@ __all__ = [ "ApiVersion", - "KeyVaultBackupOperation", + "KeyVaultBackupResult", "KeyVaultAccessControlClient", "KeyVaultBackupClient", "KeyVaultDataAction", diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py index f9db72d1cce4..479841c30d49 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py @@ -10,7 +10,7 @@ from six import raise_from from six.moves.urllib_parse import urlparse -from ._models import KeyVaultBackupOperation +from ._models import KeyVaultBackupResult from ._internal import KeyVaultClientBase, parse_folder_url from ._internal.polling import KeyVaultBackupClientPolling, KeyVaultBackupClientPollingMethod @@ -36,7 +36,7 @@ class KeyVaultBackupClient(KeyVaultClientBase): # pylint:disable=protected-access def begin_backup(self, blob_storage_url, sas_token, **kwargs): - # type: (str, str, **Any) -> LROPoller[KeyVaultBackupOperation] + # type: (str, str, **Any) -> LROPoller[KeyVaultBackupResult] """Begin a full backup of the Key Vault. :param str blob_storage_url: URL of the blob storage container in which the backup will be stored, for example @@ -44,8 +44,8 @@ def begin_backup(self, blob_storage_url, sas_token, **kwargs): :param str sas_token: a Shared Access Signature (SAS) token authorizing access to the blob storage resource :keyword str continuation_token: a continuation token to restart polling from a saved state :returns: An :class:`~azure.core.polling.LROPoller` instance. Call `result()` on this object to wait for the - operation to complete and get a :class:`KeyVaultBackupOperation`. - :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.administration.KeyVaultBackupOperation] + operation to complete and get a :class:`KeyVaultBackupResult`. + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.administration.KeyVaultBackupResult] Example: .. literalinclude:: ../tests/test_examples_administration.py @@ -83,7 +83,7 @@ def begin_backup(self, blob_storage_url, sas_token, **kwargs): return self._client.begin_full_backup( vault_base_url=self._vault_url, azure_storage_blob_container_uri=sas_parameter, - cls=KeyVaultBackupOperation._from_generated, + cls=KeyVaultBackupResult._from_generated, continuation_token=status_response, polling=KeyVaultBackupClientPollingMethod( lro_algorithms=[KeyVaultBackupClientPolling()], timeout=polling_interval, **kwargs @@ -98,7 +98,7 @@ def begin_restore(self, folder_url, sas_token, **kwargs): This method restores either a complete Key Vault backup or when ``key_name`` has a value, a single key. :param str folder_url: URL of the blob holding the backup. This would be the `folder_url` of a - :class:`KeyVaultBackupOperation` returned by :func:`begin_backup`, for example + :class:`KeyVaultBackupResult` returned by :func:`begin_backup`, for example https://.blob.core.windows.net/backup/mhsm-account-2020090117323313 :param str sas_token: a Shared Access Signature (SAS) token authorizing access to the blob storage resource :keyword str continuation_token: a continuation token to restart polling from a saved state diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py index f4cb4e20cde4..63ad7be766d1 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py @@ -142,8 +142,8 @@ def _from_generated(cls, definition): ) -class KeyVaultBackupOperation(object): - """A Key Vault full backup operation +class KeyVaultBackupResult(object): + """A Key Vault full backup operation result :ivar str folder_url: URL of the Azure Blob Storage container containing the backup """ diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_backup_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_backup_client.py index 60a0ed91dd16..12c0465c1599 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_backup_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_backup_client.py @@ -11,7 +11,7 @@ from .._internal import AsyncKeyVaultClientBase, parse_folder_url from .._internal.async_polling import KeyVaultAsyncBackupClientPollingMethod from .._internal.polling import KeyVaultBackupClientPolling -from .._models import KeyVaultBackupOperation +from .._models import KeyVaultBackupResult if TYPE_CHECKING: # pylint:disable=unused-import @@ -30,15 +30,15 @@ class KeyVaultBackupClient(AsyncKeyVaultClientBase): # pylint:disable=protected-access async def begin_backup( self, blob_storage_url: str, sas_token: str, **kwargs: "Any" - ) -> "AsyncLROPoller[KeyVaultBackupOperation]": + ) -> "AsyncLROPoller[KeyVaultBackupResult]": """Begin a full backup of the Key Vault. :param str blob_storage_url: URL of the blob storage container in which the backup will be stored, for example https://.blob.core.windows.net/backup :param str sas_token: a Shared Access Signature (SAS) token authorizing access to the blob storage resource :keyword str continuation_token: a continuation token to restart polling from a saved state - :returns: An AsyncLROPoller. Call `result()` on this object to get a :class:`KeyVaultBackupOperation`. - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.administration.KeyVaultBackupOperation] + :returns: An AsyncLROPoller. Call `result()` on this object to get a :class:`KeyVaultBackupResult`. + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.administration.KeyVaultBackupResult] Example: .. literalinclude:: ../tests/test_examples_administration_async.py @@ -73,7 +73,7 @@ async def begin_backup( return await self._client.begin_full_backup( vault_base_url=self._vault_url, azure_storage_blob_container_uri=sas_parameter, - cls=KeyVaultBackupOperation._from_generated, + cls=KeyVaultBackupResult._from_generated, continuation_token=status_response, polling=KeyVaultAsyncBackupClientPollingMethod( lro_algorithms=[KeyVaultBackupClientPolling()], timeout=polling_interval, **kwargs @@ -87,7 +87,7 @@ async def begin_restore(self, folder_url: str, sas_token: str, **kwargs: "Any") This method restores either a complete Key Vault backup or when ``key_name`` has a value, a single key. :param str folder_url: URL for the blob storage resource, including the path to the blob holding the - backup. This would be the `folder_url` of a :class:`KeyVaultBackupOperation` returned by + backup. This would be the `folder_url` of a :class:`KeyVaultBackupResult` returned by :func:`begin_backup`, for example https://.blob.core.windows.net/backup/mhsm-account-2020090117323313 :param str sas_token: a Shared Access Signature (SAS) token authorizing access to the blob storage resource