Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Key Vault] Regenerate with latest autorest #26431

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion sdk/keyvault/azure-keyvault-administration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

### Other Changes
- Updated minimum `azure-core` version to 1.24.0
- Updated minimum `msrest` version to 0.7.1
- Dropped `msrest` requirement

## 4.2.0 (2022-09-19)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
patch_sdk()
except ImportError:
pass

from ._version import VERSION

__version__ = VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from typing import TYPE_CHECKING
from typing import Any

from azure.core.configuration import Configuration
from azure.core.pipeline import policies

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

class KeyVaultClientConfiguration(Configuration):
"""Configuration for KeyVaultClient.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@
# regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from msrest import Deserializer, Serializer
from typing import Any, Optional

from azure.core import PipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin

from ._configuration import KeyVaultClientConfiguration
from ._operations_mixin import KeyVaultClientOperationsMixin

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Optional
from ._serialization import Deserializer, Serializer

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,35 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from typing import TYPE_CHECKING
from ._serialization import Serializer, Deserializer
from typing import Any, IO, Optional, Union

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Optional
from azure.core.polling import LROPoller

from azure.core.polling import LROPoller
from . import models as _models


class KeyVaultClientOperationsMixin(object):

def begin_full_backup(
self,
vault_base_url, # type: str
azure_storage_blob_container_uri=None, # type: Optional["_models.SASTokenParameter"]
**kwargs # type: Any
):
# type: (...) -> LROPoller["_models.FullBackupOperation"]
vault_base_url: str,
azure_storage_blob_container_uri: Optional[Union[_models.SASTokenParameter, IO]] = None,
**kwargs: Any
) -> LROPoller[_models.FullBackupOperation]:
"""Creates a full backup using a user-provided SAS token to an Azure blob storage container. This
operation is supported only by the Managed HSM service.

:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.
:param vault_base_url: The vault name, for example https://myvault.vault.azure.net. Required.
:type vault_base_url: str
:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a
valid Azure blob container where full backup needs to be stored. This token needs to be valid
for at least next 24 hours from the time of making this call. Default value is None.
:type azure_storage_blob_container_uri: ~azure.keyvault.v7_3.models.SASTokenParameter
for at least next 24 hours from the time of making this call. Is either a model type or a IO
type. Default value is None.
:type azure_storage_blob_container_uri: ~azure.keyvault.v7_3.models.SASTokenParameter or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: 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: By default, your polling method will be LROBasePolling. Pass in False for
Expand All @@ -47,7 +48,7 @@ def begin_full_backup(
:return: An instance of LROPoller that returns either FullBackupOperation or the result of
cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3.models.FullBackupOperation]
:raises: ~azure.core.exceptions.HttpResponseError
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('begin_full_backup')
if api_version == '7.2':
Expand All @@ -66,19 +67,21 @@ def begin_full_backup(

def begin_full_restore_operation(
self,
vault_base_url, # type: str
restore_blob_details=None, # type: Optional["_models.RestoreOperationParameters"]
**kwargs # type: Any
):
# type: (...) -> LROPoller["_models.RestoreOperation"]
vault_base_url: str,
restore_blob_details: Optional[Union[_models.RestoreOperationParameters, IO]] = None,
**kwargs: Any
) -> LROPoller[_models.RestoreOperation]:
"""Restores all key materials using the SAS token pointing to a previously stored Azure Blob
storage backup folder.

:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.
:param vault_base_url: The vault name, for example https://myvault.vault.azure.net. Required.
:type vault_base_url: str
:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous
successful full backup was stored. Default value is None.
:type restore_blob_details: ~azure.keyvault.v7_3.models.RestoreOperationParameters
successful full backup was stored. Is either a model type or a IO type. Default value is None.
:type restore_blob_details: ~azure.keyvault.v7_3.models.RestoreOperationParameters or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: 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: By default, your polling method will be LROBasePolling. Pass in False for
Expand All @@ -90,7 +93,7 @@ def begin_full_restore_operation(
:return: An instance of LROPoller that returns either RestoreOperation or the result of
cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3.models.RestoreOperation]
:raises: ~azure.core.exceptions.HttpResponseError
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('begin_full_restore_operation')
if api_version == '7.2':
Expand All @@ -109,22 +112,25 @@ def begin_full_restore_operation(

def begin_selective_key_restore_operation(
self,
vault_base_url, # type: str
key_name, # type: str
restore_blob_details=None, # type: Optional["_models.SelectiveKeyRestoreOperationParameters"]
**kwargs # type: Any
):
# type: (...) -> LROPoller["_models.SelectiveKeyRestoreOperation"]
vault_base_url: str,
key_name: str,
restore_blob_details: Optional[Union[_models.SelectiveKeyRestoreOperationParameters, IO]] = None,
**kwargs: Any
) -> LROPoller[_models.SelectiveKeyRestoreOperation]:
"""Restores all key versions of a given key using user supplied SAS token pointing to a previously
stored Azure Blob storage backup folder.

:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.
:param vault_base_url: The vault name, for example https://myvault.vault.azure.net. Required.
:type vault_base_url: str
:param key_name: The name of the key to be restored from the user supplied backup.
:param key_name: The name of the key to be restored from the user supplied backup. Required.
:type key_name: str
:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous
successful full backup was stored. Default value is None.
successful full backup was stored. Is either a model type or a IO type. Default value is None.
:type restore_blob_details: ~azure.keyvault.v7_3.models.SelectiveKeyRestoreOperationParameters
or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: 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: By default, your polling method will be LROBasePolling. Pass in False for
Expand All @@ -136,7 +142,7 @@ def begin_selective_key_restore_operation(
:return: An instance of LROPoller that returns either SelectiveKeyRestoreOperation or the
result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3.models.SelectiveKeyRestoreOperation]
:raises: ~azure.core.exceptions.HttpResponseError
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('begin_selective_key_restore_operation')
if api_version == '7.2':
Expand All @@ -155,21 +161,20 @@ def begin_selective_key_restore_operation(

def full_backup_status(
self,
vault_base_url, # type: str
job_id, # type: str
**kwargs # type: Any
):
# type: (...) -> "_models.FullBackupOperation"
vault_base_url: str,
job_id: str,
**kwargs: Any
) -> _models.FullBackupOperation:
"""Returns the status of full backup operation.

:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.
:param vault_base_url: The vault name, for example https://myvault.vault.azure.net. Required.
:type vault_base_url: str
:param job_id: The id returned as part of the backup request.
:param job_id: The id returned as part of the backup request. Required.
:type job_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: FullBackupOperation, or the result of cls(response)
:return: FullBackupOperation or the result of cls(response)
:rtype: ~azure.keyvault.v7_3.models.FullBackupOperation
:raises: ~azure.core.exceptions.HttpResponseError
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('full_backup_status')
if api_version == '7.2':
Expand All @@ -188,21 +193,20 @@ def full_backup_status(

def restore_status(
self,
vault_base_url, # type: str
job_id, # type: str
**kwargs # type: Any
):
# type: (...) -> "_models.RestoreOperation"
vault_base_url: str,
job_id: str,
**kwargs: Any
) -> _models.RestoreOperation:
"""Returns the status of restore operation.

:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.
:param vault_base_url: The vault name, for example https://myvault.vault.azure.net. Required.
:type vault_base_url: str
:param job_id: The Job Id returned part of the restore operation.
:param job_id: The Job Id returned part of the restore operation. Required.
:type job_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: RestoreOperation, or the result of cls(response)
:return: RestoreOperation or the result of cls(response)
:rtype: ~azure.keyvault.v7_3.models.RestoreOperation
:raises: ~azure.core.exceptions.HttpResponseError
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('restore_status')
if api_version == '7.2':
Expand Down
Loading