Skip to content

Commit

Permalink
KeyVaultBackupOperation -> KeyVaultBackupResult (Azure#19284)
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoyp authored Jun 17, 2021
1 parent 16185c2 commit a94c363
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ._enums import KeyVaultRoleScope, KeyVaultDataAction
from ._internal.client_base import ApiVersion
from ._models import (
KeyVaultBackupOperation,
KeyVaultBackupResult,
KeyVaultPermission,
KeyVaultRoleAssignment,
KeyVaultRoleAssignmentProperties,
Expand All @@ -17,7 +17,7 @@

__all__ = [
"ApiVersion",
"KeyVaultBackupOperation",
"KeyVaultBackupResult",
"KeyVaultAccessControlClient",
"KeyVaultBackupClient",
"KeyVaultDataAction",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -36,16 +36,16 @@ 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
https://<account>.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 :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
Expand Down Expand Up @@ -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
Expand All @@ -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://<account>.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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://<account>.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
Expand Down Expand Up @@ -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
Expand All @@ -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://<account>.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
Expand Down

0 comments on commit a94c363

Please sign in to comment.