diff --git a/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md b/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md index ef61adaf58cf..78715d2820e6 100644 --- a/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md @@ -1,8 +1,9 @@ # Release History -## 4.0.1 (Unreleased) +## 4.1.0b1 (Unreleased) ### Features Added +- Key Vault API version 7.3-preview is the default version ### Breaking Changes diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_enums.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_enums.py index 1109ef610c32..8999a64ed9ec 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_enums.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_enums.py @@ -40,6 +40,10 @@ class KeyVaultDataAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): WRITE_ROLE_ASSIGNMENT = "Microsoft.KeyVault/managedHsm/roleAssignments/write/action" #: Get role definition. READ_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action" + #: Create or update role definition. + WRITE_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/write/action" + #: Delete role definition. + DELETE_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action" #: Encrypt using an HSM key. ENCRYPT_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/encrypt/action" #: Decrypt using an HSM key. @@ -58,12 +62,16 @@ class KeyVaultDataAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): DELETE_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/delete" #: Export an HSM key. EXPORT_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/export/action" + #: Release an HSM key using Secure Key Release. + RELEASE_KEY = "Microsoft.KeyVault/managedHsm/keys/release/action" #: Import an HSM key. IMPORT_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/import/action" #: Purge a deleted HSM key. PURGE_DELETED_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" #: Download an HSM security domain. DOWNLOAD_HSM_SECURITY_DOMAIN = "Microsoft.KeyVault/managedHsm/securitydomain/download/action" + #: Check status of HSM security domain download. + DOWNLOAD_HSM_SECURITY_DOMAIN_STATUS = "Microsoft.KeyVault/managedHsm/securitydomain/download/read" #: Upload an HSM security domain. UPLOAD_HSM_SECURITY_DOMAIN = "Microsoft.KeyVault/managedHsm/securitydomain/upload/action" #: Check the status of the HSM security domain exchange file. @@ -78,3 +86,5 @@ class KeyVaultDataAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): READ_HSM_BACKUP_STATUS = "Microsoft.KeyVault/managedHsm/backup/status/action" #: Read an HSM restore status. READ_HSM_RESTORE_STATUS = "Microsoft.KeyVault/managedHsm/restore/status/action" + #: Generate random numbers. + RANDOM_NUMBERS_GENERATE = "Microsoft.KeyVault/managedHsm/rng/action" diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_key_vault_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_key_vault_client.py index b4ede71da5f9..b74092cd11ca 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_key_vault_client.py @@ -64,7 +64,7 @@ def __init__( profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): - if api_version == '7.2': + if api_version == '7.2' or api_version == '7.3-preview': base_url = '{vaultBaseUrl}' else: raise ValueError("API version {} is not available".format(api_version)) @@ -84,10 +84,14 @@ def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: * 7.2: :mod:`v7_2.models` + * 7.3-preview: :mod:`v7_3_preview.models` """ if api_version == '7.2': from .v7_2 import models return models + elif api_version == '7.3-preview': + from .v7_3_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -95,10 +99,13 @@ def role_assignments(self): """Instance depends on the API version: * 7.2: :class:`RoleAssignmentsOperations` + * 7.3-preview: :class:`RoleAssignmentsOperations` """ api_version = self._get_api_version('role_assignments') if api_version == '7.2': from .v7_2.operations import RoleAssignmentsOperations as OperationClass + elif api_version == '7.3-preview': + from .v7_3_preview.operations import RoleAssignmentsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'role_assignments'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -108,10 +115,13 @@ def role_definitions(self): """Instance depends on the API version: * 7.2: :class:`RoleDefinitionsOperations` + * 7.3-preview: :class:`RoleDefinitionsOperations` """ api_version = self._get_api_version('role_definitions') if api_version == '7.2': from .v7_2.operations import RoleDefinitionsOperations as OperationClass + elif api_version == '7.3-preview': + from .v7_3_preview.operations import RoleDefinitionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'role_definitions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_operations_mixin.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_operations_mixin.py index 48be8d601c1a..d60fc76800ee 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_operations_mixin.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_operations_mixin.py @@ -52,6 +52,8 @@ def begin_full_backup( api_version = self._get_api_version('begin_full_backup') if api_version == '7.2': from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_full_backup'".format(api_version)) mixin_instance = OperationClass() @@ -89,6 +91,8 @@ def begin_full_restore_operation( api_version = self._get_api_version('begin_full_restore_operation') if api_version == '7.2': from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_full_restore_operation'".format(api_version)) mixin_instance = OperationClass() @@ -129,6 +133,8 @@ def begin_selective_key_restore_operation( api_version = self._get_api_version('begin_selective_key_restore_operation') if api_version == '7.2': from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_selective_key_restore_operation'".format(api_version)) mixin_instance = OperationClass() @@ -159,6 +165,8 @@ def full_backup_status( api_version = self._get_api_version('full_backup_status') if api_version == '7.2': from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'full_backup_status'".format(api_version)) mixin_instance = OperationClass() @@ -189,6 +197,8 @@ def restore_status( api_version = self._get_api_version('restore_status') if api_version == '7.2': from .v7_2.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from .v7_3_preview.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'restore_status'".format(api_version)) mixin_instance = OperationClass() diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_key_vault_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_key_vault_client.py index 29f11dfba995..5ca84b758c59 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_key_vault_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_key_vault_client.py @@ -59,7 +59,7 @@ def __init__( profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: - if api_version == '7.2': + if api_version == '7.2' or api_version == '7.3-preview': base_url = '{vaultBaseUrl}' else: raise ValueError("API version {} is not available".format(api_version)) @@ -79,10 +79,14 @@ def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: * 7.2: :mod:`v7_2.models` + * 7.3-preview: :mod:`v7_3_preview.models` """ if api_version == '7.2': from ..v7_2 import models return models + elif api_version == '7.3-preview': + from ..v7_3_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -90,10 +94,13 @@ def role_assignments(self): """Instance depends on the API version: * 7.2: :class:`RoleAssignmentsOperations` + * 7.3-preview: :class:`RoleAssignmentsOperations` """ api_version = self._get_api_version('role_assignments') if api_version == '7.2': from ..v7_2.aio.operations import RoleAssignmentsOperations as OperationClass + elif api_version == '7.3-preview': + from ..v7_3_preview.aio.operations import RoleAssignmentsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'role_assignments'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -103,10 +110,13 @@ def role_definitions(self): """Instance depends on the API version: * 7.2: :class:`RoleDefinitionsOperations` + * 7.3-preview: :class:`RoleDefinitionsOperations` """ api_version = self._get_api_version('role_definitions') if api_version == '7.2': from ..v7_2.aio.operations import RoleDefinitionsOperations as OperationClass + elif api_version == '7.3-preview': + from ..v7_3_preview.aio.operations import RoleDefinitionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'role_definitions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_operations_mixin.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_operations_mixin.py index 4ce9e8ff4eb2..3b9a3edc0fa8 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_operations_mixin.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_operations_mixin.py @@ -25,7 +25,7 @@ async def begin_full_backup( self, vault_base_url: str, azure_storage_blob_container_uri: Optional["_models.SASTokenParameter"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.FullBackupOperation"]: """Creates a full backup using a user-provided SAS token to an Azure blob storage container. @@ -48,6 +48,8 @@ async def begin_full_backup( api_version = self._get_api_version('begin_full_backup') if api_version == '7.2': from ..v7_2.aio.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from ..v7_3_preview.aio.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_full_backup'".format(api_version)) mixin_instance = OperationClass() @@ -62,7 +64,7 @@ async def begin_full_restore_operation( self, vault_base_url: str, restore_blob_details: Optional["_models.RestoreOperationParameters"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.RestoreOperation"]: """Restores all key materials using the SAS token pointing to a previously stored Azure Blob storage backup folder. @@ -85,6 +87,8 @@ async def begin_full_restore_operation( api_version = self._get_api_version('begin_full_restore_operation') if api_version == '7.2': from ..v7_2.aio.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from ..v7_3_preview.aio.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_full_restore_operation'".format(api_version)) mixin_instance = OperationClass() @@ -100,7 +104,7 @@ async def begin_selective_key_restore_operation( vault_base_url: str, key_name: str, restore_blob_details: Optional["_models.SelectiveKeyRestoreOperationParameters"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_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. @@ -125,6 +129,8 @@ async def begin_selective_key_restore_operation( api_version = self._get_api_version('begin_selective_key_restore_operation') if api_version == '7.2': from ..v7_2.aio.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from ..v7_3_preview.aio.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_selective_key_restore_operation'".format(api_version)) mixin_instance = OperationClass() @@ -139,7 +145,7 @@ async def full_backup_status( self, vault_base_url: str, job_id: str, - **kwargs + **kwargs: Any ) -> "_models.FullBackupOperation": """Returns the status of full backup operation. @@ -155,6 +161,8 @@ async def full_backup_status( api_version = self._get_api_version('full_backup_status') if api_version == '7.2': from ..v7_2.aio.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from ..v7_3_preview.aio.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'full_backup_status'".format(api_version)) mixin_instance = OperationClass() @@ -169,7 +177,7 @@ async def restore_status( self, vault_base_url: str, job_id: str, - **kwargs + **kwargs: Any ) -> "_models.RestoreOperation": """Returns the status of restore operation. @@ -185,6 +193,8 @@ async def restore_status( api_version = self._get_api_version('restore_status') if api_version == '7.2': from ..v7_2.aio.operations import KeyVaultClientOperationsMixin as OperationClass + elif api_version == '7.3-preview': + from ..v7_3_preview.aio.operations import KeyVaultClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'restore_status'".format(api_version)) mixin_instance = OperationClass() diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/_metadata.json b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/_metadata.json index 08fd3968e967..07aceda88813 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/_metadata.json +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/_metadata.json @@ -76,7 +76,7 @@ }, "async": { "coroutine": true, - "signature": "async def _full_backup_initial(\n self,\n vault_base_url: str,\n azure_storage_blob_container_uri: Optional[\"_models.SASTokenParameter\"] = None,\n **kwargs\n) -\u003e \"_models.FullBackupOperation\":\n", + "signature": "async def _full_backup_initial(\n self,\n vault_base_url: str,\n azure_storage_blob_container_uri: Optional[\"_models.SASTokenParameter\"] = None,\n **kwargs: Any\n) -\u003e \"_models.FullBackupOperation\":\n", "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "vault_base_url, azure_storage_blob_container_uri" @@ -88,7 +88,7 @@ }, "async": { "coroutine": true, - "signature": "async def begin_full_backup(\n self,\n vault_base_url: str,\n azure_storage_blob_container_uri: Optional[\"_models.SASTokenParameter\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"_models.FullBackupOperation\"]:\n", + "signature": "async def begin_full_backup(\n self,\n vault_base_url: str,\n azure_storage_blob_container_uri: Optional[\"_models.SASTokenParameter\"] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.FullBackupOperation\"]:\n", "doc": "\"\"\"Creates a full backup using a user-provided SAS token to an Azure blob storage container.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_2.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either FullBackupOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.FullBackupOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "vault_base_url, azure_storage_blob_container_uri" @@ -100,7 +100,7 @@ }, "async": { "coroutine": true, - "signature": "async def full_backup_status(\n self,\n vault_base_url: str,\n job_id: str,\n **kwargs\n) -\u003e \"_models.FullBackupOperation\":\n", + "signature": "async def full_backup_status(\n self,\n vault_base_url: str,\n job_id: str,\n **kwargs: Any\n) -\u003e \"_models.FullBackupOperation\":\n", "doc": "\"\"\"Returns the status of full backup operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The id returned as part of the backup request.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "vault_base_url, job_id" @@ -112,7 +112,7 @@ }, "async": { "coroutine": true, - "signature": "async def _full_restore_operation_initial(\n self,\n vault_base_url: str,\n restore_blob_details: Optional[\"_models.RestoreOperationParameters\"] = None,\n **kwargs\n) -\u003e \"_models.RestoreOperation\":\n", + "signature": "async def _full_restore_operation_initial(\n self,\n vault_base_url: str,\n restore_blob_details: Optional[\"_models.RestoreOperationParameters\"] = None,\n **kwargs: Any\n) -\u003e \"_models.RestoreOperation\":\n", "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "vault_base_url, restore_blob_details" @@ -124,7 +124,7 @@ }, "async": { "coroutine": true, - "signature": "async def begin_full_restore_operation(\n self,\n vault_base_url: str,\n restore_blob_details: Optional[\"_models.RestoreOperationParameters\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"_models.RestoreOperation\"]:\n", + "signature": "async def begin_full_restore_operation(\n self,\n vault_base_url: str,\n restore_blob_details: Optional[\"_models.RestoreOperationParameters\"] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.RestoreOperation\"]:\n", "doc": "\"\"\"Restores all key materials using the SAS token pointing to a previously stored Azure Blob\nstorage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either RestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.RestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "vault_base_url, restore_blob_details" @@ -136,7 +136,7 @@ }, "async": { "coroutine": true, - "signature": "async def restore_status(\n self,\n vault_base_url: str,\n job_id: str,\n **kwargs\n) -\u003e \"_models.RestoreOperation\":\n", + "signature": "async def restore_status(\n self,\n vault_base_url: str,\n job_id: str,\n **kwargs: Any\n) -\u003e \"_models.RestoreOperation\":\n", "doc": "\"\"\"Returns the status of restore operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The Job Id returned part of the restore operation.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "vault_base_url, job_id" @@ -148,7 +148,7 @@ }, "async": { "coroutine": true, - "signature": "async def _selective_key_restore_operation_initial(\n self,\n vault_base_url: str,\n key_name: str,\n restore_blob_details: Optional[\"_models.SelectiveKeyRestoreOperationParameters\"] = None,\n **kwargs\n) -\u003e \"_models.SelectiveKeyRestoreOperation\":\n", + "signature": "async def _selective_key_restore_operation_initial(\n self,\n vault_base_url: str,\n key_name: str,\n restore_blob_details: Optional[\"_models.SelectiveKeyRestoreOperationParameters\"] = None,\n **kwargs: Any\n) -\u003e \"_models.SelectiveKeyRestoreOperation\":\n", "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SelectiveKeyRestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "vault_base_url, key_name, restore_blob_details" @@ -160,7 +160,7 @@ }, "async": { "coroutine": true, - "signature": "async def begin_selective_key_restore_operation(\n self,\n vault_base_url: str,\n key_name: str,\n restore_blob_details: Optional[\"_models.SelectiveKeyRestoreOperationParameters\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"_models.SelectiveKeyRestoreOperation\"]:\n", + "signature": "async def begin_selective_key_restore_operation(\n self,\n vault_base_url: str,\n key_name: str,\n restore_blob_details: Optional[\"_models.SelectiveKeyRestoreOperationParameters\"] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.SelectiveKeyRestoreOperation\"]:\n", "doc": "\"\"\"Restores all key versions of a given key using user supplied SAS token pointing to a previously\nstored Azure Blob storage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either SelectiveKeyRestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_2.models.SelectiveKeyRestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "vault_base_url, key_name, restore_blob_details" diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_key_vault_client_operations.py index 4e863f1486cb..3f90aa268135 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_key_vault_client_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_key_vault_client_operations.py @@ -25,7 +25,7 @@ async def _full_backup_initial( self, vault_base_url: str, azure_storage_blob_container_uri: Optional["_models.SASTokenParameter"] = None, - **kwargs + **kwargs: Any ) -> "_models.FullBackupOperation": cls = kwargs.pop('cls', None) # type: ClsType["_models.FullBackupOperation"] error_map = { @@ -82,7 +82,7 @@ async def begin_full_backup( self, vault_base_url: str, azure_storage_blob_container_uri: Optional["_models.SASTokenParameter"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.FullBackupOperation"]: """Creates a full backup using a user-provided SAS token to an Azure blob storage container. @@ -153,7 +153,7 @@ async def full_backup_status( self, vault_base_url: str, job_id: str, - **kwargs + **kwargs: Any ) -> "_models.FullBackupOperation": """Returns the status of full backup operation. @@ -211,7 +211,7 @@ async def _full_restore_operation_initial( self, vault_base_url: str, restore_blob_details: Optional["_models.RestoreOperationParameters"] = None, - **kwargs + **kwargs: Any ) -> "_models.RestoreOperation": cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreOperation"] error_map = { @@ -268,7 +268,7 @@ async def begin_full_restore_operation( self, vault_base_url: str, restore_blob_details: Optional["_models.RestoreOperationParameters"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.RestoreOperation"]: """Restores all key materials using the SAS token pointing to a previously stored Azure Blob storage backup folder. @@ -339,7 +339,7 @@ async def restore_status( self, vault_base_url: str, job_id: str, - **kwargs + **kwargs: Any ) -> "_models.RestoreOperation": """Returns the status of restore operation. @@ -398,7 +398,7 @@ async def _selective_key_restore_operation_initial( vault_base_url: str, key_name: str, restore_blob_details: Optional["_models.SelectiveKeyRestoreOperationParameters"] = None, - **kwargs + **kwargs: Any ) -> "_models.SelectiveKeyRestoreOperation": cls = kwargs.pop('cls', None) # type: ClsType["_models.SelectiveKeyRestoreOperation"] error_map = { @@ -457,7 +457,7 @@ async def begin_selective_key_restore_operation( vault_base_url: str, key_name: str, restore_blob_details: Optional["_models.SelectiveKeyRestoreOperationParameters"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_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. diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_role_assignments_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_role_assignments_operations.py index 12c14e9974fc..3e05d51f55df 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_role_assignments_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_role_assignments_operations.py @@ -45,7 +45,7 @@ async def delete( vault_base_url: str, scope: str, role_assignment_name: str, - **kwargs + **kwargs: Any ) -> "_models.RoleAssignment": """Deletes a role assignment. @@ -108,7 +108,7 @@ async def create( scope: str, role_assignment_name: str, parameters: "_models.RoleAssignmentCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.RoleAssignment": """Creates a role assignment. @@ -178,7 +178,7 @@ async def get( vault_base_url: str, scope: str, role_assignment_name: str, - **kwargs + **kwargs: Any ) -> "_models.RoleAssignment": """Get the specified role assignment. @@ -240,7 +240,7 @@ def list_for_scope( vault_base_url: str, scope: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RoleAssignmentListResult"]: """Gets role assignments for a scope. diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_role_definitions_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_role_definitions_operations.py index 2aafe4044627..5f61e358ceac 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_role_definitions_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/aio/operations/_role_definitions_operations.py @@ -45,7 +45,7 @@ async def delete( vault_base_url: str, scope: str, role_definition_name: str, - **kwargs + **kwargs: Any ) -> "_models.RoleDefinition": """Deletes a custom role definition. @@ -108,7 +108,7 @@ async def create_or_update( scope: str, role_definition_name: str, parameters: "_models.RoleDefinitionCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.RoleDefinition": """Creates or updates a custom role definition. @@ -179,7 +179,7 @@ async def get( vault_base_url: str, scope: str, role_definition_name: str, - **kwargs + **kwargs: Any ) -> "_models.RoleDefinition": """Get the specified role definition. @@ -241,7 +241,7 @@ def list( vault_base_url: str, scope: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RoleDefinitionListResult"]: """Get all role definitions that are applicable at scope and above. diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/models/_key_vault_client_enums.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/models/_key_vault_client_enums.py index e114121d7fed..d0d8b38e6858 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/models/_key_vault_client_enums.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_2/models/_key_vault_client_enums.py @@ -50,6 +50,10 @@ class DataAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): WRITE_ROLE_ASSIGNMENT = "Microsoft.KeyVault/managedHsm/roleAssignments/write/action" #: Get role definition. READ_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action" + #: Create or update role definition. + WRITE_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/write/action" + #: Delete role definition. + DELETE_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action" #: Encrypt using an HSM key. ENCRYPT_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/encrypt/action" #: Decrypt using an HSM key. diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/__init__.py new file mode 100644 index 000000000000..a6c1f9b7a792 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/__init__.py @@ -0,0 +1,16 @@ +# 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 ._key_vault_client import KeyVaultClient +__all__ = ['KeyVaultClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_configuration.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_configuration.py new file mode 100644 index 000000000000..ed775f6e59b4 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_configuration.py @@ -0,0 +1,52 @@ +# 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 + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + +VERSION = "unknown" + +class KeyVaultClientConfiguration(Configuration): + """Configuration for KeyVaultClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + """ + + def __init__( + self, + **kwargs # type: Any + ): + # type: (...) -> None + super(KeyVaultClientConfiguration, self).__init__(**kwargs) + + self.api_version = "7.3-preview" + kwargs.setdefault('sdk_moniker', 'keyvault/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_key_vault_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_key_vault_client.py new file mode 100644 index 000000000000..85f53e798198 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_key_vault_client.py @@ -0,0 +1,82 @@ +# 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 + +from azure.core import PipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import KeyVaultClientConfiguration +from .operations import KeyVaultClientOperationsMixin +from .operations import RoleDefinitionsOperations +from .operations import RoleAssignmentsOperations +from . import models + + +class KeyVaultClient(KeyVaultClientOperationsMixin): + """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. + + :ivar role_definitions: RoleDefinitionsOperations operations + :vartype role_definitions: azure.keyvault.v7_3_preview.operations.RoleDefinitionsOperations + :ivar role_assignments: RoleAssignmentsOperations operations + :vartype role_assignments: azure.keyvault.v7_3_preview.operations.RoleAssignmentsOperations + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + **kwargs # type: Any + ): + # type: (...) -> None + base_url = '{vaultBaseUrl}' + self._config = KeyVaultClientConfiguration(**kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.role_definitions = RoleDefinitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.role_assignments = RoleAssignmentsOperations( + 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 + """ + http_request.url = self._client.format_url(http_request.url) + 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() + + def __enter__(self): + # type: () -> KeyVaultClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_metadata.json b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_metadata.json new file mode 100644 index 000000000000..780a0270db6e --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/_metadata.json @@ -0,0 +1,170 @@ +{ + "chosen_version": "7.3-preview", + "total_api_version_list": ["7.3-preview"], + "client": { + "name": "KeyVaultClient", + "filename": "_key_vault_client", + "description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", + "base_url": null, + "custom_base_url": "\u0027{vaultBaseUrl}\u0027", + "azure_arm": false, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"KeyVaultClientConfiguration\"], \"._operations_mixin\": [\"KeyVaultClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"KeyVaultClientConfiguration\"], \"._operations_mixin\": [\"KeyVaultClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + }, + "async": { + }, + "constant": { + }, + "call": "", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": false, + "credential_scopes": null, + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}}" + }, + "operation_groups": { + "role_definitions": "RoleDefinitionsOperations", + "role_assignments": "RoleAssignmentsOperations" + }, + "operation_mixins": { + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.core.polling.base_polling\": [\"LROBasePolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.core.polling.async_base_polling\": [\"AsyncLROBasePolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "_full_backup_initial" : { + "sync": { + "signature": "def _full_backup_initial(\n self,\n vault_base_url, # type: str\n azure_storage_blob_container_uri=None, # type: Optional[\"_models.SASTokenParameter\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_3_preview.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _full_backup_initial(\n self,\n vault_base_url: str,\n azure_storage_blob_container_uri: Optional[\"_models.SASTokenParameter\"] = None,\n **kwargs: Any\n) -\u003e \"_models.FullBackupOperation\":\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_3_preview.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, azure_storage_blob_container_uri" + }, + "begin_full_backup" : { + "sync": { + "signature": "def begin_full_backup(\n self,\n vault_base_url, # type: str\n azure_storage_blob_container_uri=None, # type: Optional[\"_models.SASTokenParameter\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Creates a full backup using a user-provided SAS token to an Azure blob storage container.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_3_preview.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either FullBackupOperation or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3_preview.models.FullBackupOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_full_backup(\n self,\n vault_base_url: str,\n azure_storage_blob_container_uri: Optional[\"_models.SASTokenParameter\"] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.FullBackupOperation\"]:\n", + "doc": "\"\"\"Creates a full backup using a user-provided SAS token to an Azure blob storage container.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param azure_storage_blob_container_uri: Azure blob shared access signature token pointing to a\n valid Azure blob container where full backup needs to be stored. This token needs to be valid\n for at least next 24 hours from the time of making this call.\n:type azure_storage_blob_container_uri: ~azure.keyvault.v7_3_preview.models.SASTokenParameter\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either FullBackupOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_3_preview.models.FullBackupOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "vault_base_url, azure_storage_blob_container_uri" + }, + "full_backup_status" : { + "sync": { + "signature": "def full_backup_status(\n self,\n vault_base_url, # type: str\n job_id, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns the status of full backup operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The id returned as part of the backup request.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def full_backup_status(\n self,\n vault_base_url: str,\n job_id: str,\n **kwargs: Any\n) -\u003e \"_models.FullBackupOperation\":\n", + "doc": "\"\"\"Returns the status of full backup operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The id returned as part of the backup request.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: FullBackupOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.FullBackupOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, job_id" + }, + "_full_restore_operation_initial" : { + "sync": { + "signature": "def _full_restore_operation_initial(\n self,\n vault_base_url, # type: str\n restore_blob_details=None, # type: Optional[\"_models.RestoreOperationParameters\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_3_preview.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _full_restore_operation_initial(\n self,\n vault_base_url: str,\n restore_blob_details: Optional[\"_models.RestoreOperationParameters\"] = None,\n **kwargs: Any\n) -\u003e \"_models.RestoreOperation\":\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_3_preview.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, restore_blob_details" + }, + "begin_full_restore_operation" : { + "sync": { + "signature": "def begin_full_restore_operation(\n self,\n vault_base_url, # type: str\n restore_blob_details=None, # type: Optional[\"_models.RestoreOperationParameters\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Restores all key materials using the SAS token pointing to a previously stored Azure Blob\nstorage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_3_preview.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either RestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3_preview.models.RestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_full_restore_operation(\n self,\n vault_base_url: str,\n restore_blob_details: Optional[\"_models.RestoreOperationParameters\"] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.RestoreOperation\"]:\n", + "doc": "\"\"\"Restores all key materials using the SAS token pointing to a previously stored Azure Blob\nstorage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_3_preview.models.RestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either RestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_3_preview.models.RestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "vault_base_url, restore_blob_details" + }, + "restore_status" : { + "sync": { + "signature": "def restore_status(\n self,\n vault_base_url, # type: str\n job_id, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns the status of restore operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The Job Id returned part of the restore operation.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def restore_status(\n self,\n vault_base_url: str,\n job_id: str,\n **kwargs: Any\n) -\u003e \"_models.RestoreOperation\":\n", + "doc": "\"\"\"Returns the status of restore operation.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param job_id: The Job Id returned part of the restore operation.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.RestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, job_id" + }, + "_selective_key_restore_operation_initial" : { + "sync": { + "signature": "def _selective_key_restore_operation_initial(\n self,\n vault_base_url, # type: str\n key_name, # type: str\n restore_blob_details=None, # type: Optional[\"_models.SelectiveKeyRestoreOperationParameters\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SelectiveKeyRestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _selective_key_restore_operation_initial(\n self,\n vault_base_url: str,\n key_name: str,\n restore_blob_details: Optional[\"_models.SelectiveKeyRestoreOperationParameters\"] = None,\n **kwargs: Any\n) -\u003e \"_models.SelectiveKeyRestoreOperation\":\n", + "doc": "\"\"\"\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SelectiveKeyRestoreOperation, or the result of cls(response)\n:rtype: ~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "vault_base_url, key_name, restore_blob_details" + }, + "begin_selective_key_restore_operation" : { + "sync": { + "signature": "def begin_selective_key_restore_operation(\n self,\n vault_base_url, # type: str\n key_name, # type: str\n restore_blob_details=None, # type: Optional[\"_models.SelectiveKeyRestoreOperationParameters\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Restores all key versions of a given key using user supplied SAS token pointing to a previously\nstored Azure Blob storage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either SelectiveKeyRestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_selective_key_restore_operation(\n self,\n vault_base_url: str,\n key_name: str,\n restore_blob_details: Optional[\"_models.SelectiveKeyRestoreOperationParameters\"] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.SelectiveKeyRestoreOperation\"]:\n", + "doc": "\"\"\"Restores all key versions of a given key using user supplied SAS token pointing to a previously\nstored Azure Blob storage backup folder.\n\n:param vault_base_url: The vault name, for example https://myvault.vault.azure.net.\n:type vault_base_url: str\n:param key_name: The name of the key to be restored from the user supplied backup.\n:type key_name: str\n:param restore_blob_details: The Azure blob SAS token pointing to a folder where the previous\n successful full backup was stored.\n:type restore_blob_details: ~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperationParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either SelectiveKeyRestoreOperation or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperation]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "vault_base_url, key_name, restore_blob_details" + } + } + } +} \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/__init__.py new file mode 100644 index 000000000000..0d937de5d8f5 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# 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 ._key_vault_client import KeyVaultClient +__all__ = ['KeyVaultClient'] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/_configuration.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/_configuration.py new file mode 100644 index 000000000000..80efd3399940 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/_configuration.py @@ -0,0 +1,46 @@ +# 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 + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +VERSION = "unknown" + +class KeyVaultClientConfiguration(Configuration): + """Configuration for KeyVaultClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + """ + + def __init__( + self, + **kwargs: Any + ) -> None: + super(KeyVaultClientConfiguration, self).__init__(**kwargs) + + self.api_version = "7.3-preview" + kwargs.setdefault('sdk_moniker', 'keyvault/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/_key_vault_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/_key_vault_client.py new file mode 100644 index 000000000000..fa0aa9992a38 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/_key_vault_client.py @@ -0,0 +1,72 @@ +# 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 + +from azure.core import AsyncPipelineClient +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from msrest import Deserializer, Serializer + +from ._configuration import KeyVaultClientConfiguration +from .operations import KeyVaultClientOperationsMixin +from .operations import RoleDefinitionsOperations +from .operations import RoleAssignmentsOperations +from .. import models + + +class KeyVaultClient(KeyVaultClientOperationsMixin): + """The key vault client performs cryptographic key operations and vault operations against the Key Vault service. + + :ivar role_definitions: RoleDefinitionsOperations operations + :vartype role_definitions: azure.keyvault.v7_3_preview.aio.operations.RoleDefinitionsOperations + :ivar role_assignments: RoleAssignmentsOperations operations + :vartype role_assignments: azure.keyvault.v7_3_preview.aio.operations.RoleAssignmentsOperations + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + **kwargs: Any + ) -> None: + base_url = '{vaultBaseUrl}' + self._config = KeyVaultClientConfiguration(**kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.role_definitions = RoleDefinitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.role_assignments = RoleAssignmentsOperations( + 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 + """ + http_request.url = self._client.format_url(http_request.url) + 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() + + async def __aenter__(self) -> "KeyVaultClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/__init__.py new file mode 100644 index 000000000000..fbdd39654293 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/__init__.py @@ -0,0 +1,17 @@ +# 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 ._key_vault_client_operations import KeyVaultClientOperationsMixin +from ._role_definitions_operations import RoleDefinitionsOperations +from ._role_assignments_operations import RoleAssignmentsOperations + +__all__ = [ + 'KeyVaultClientOperationsMixin', + 'RoleDefinitionsOperations', + 'RoleAssignmentsOperations', +] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_key_vault_client_operations.py new file mode 100644 index 000000000000..3821284ce7dd --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_key_vault_client_operations.py @@ -0,0 +1,529 @@ +# 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, Union +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.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.polling.async_base_polling import AsyncLROBasePolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class KeyVaultClientOperationsMixin: + + async def _full_backup_initial( + self, + vault_base_url: str, + azure_storage_blob_container_uri: Optional["_models.SASTokenParameter"] = None, + **kwargs: Any + ) -> "_models.FullBackupOperation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FullBackupOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._full_backup_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if azure_storage_blob_container_uri is not None: + body_content = self._serialize.body(azure_storage_blob_container_uri, 'SASTokenParameter') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _full_backup_initial.metadata = {'url': '/backup'} # type: ignore + + async def begin_full_backup( + self, + vault_base_url: str, + azure_storage_blob_container_uri: Optional["_models.SASTokenParameter"] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.FullBackupOperation"]: + """Creates a full backup using a user-provided SAS token to an Azure blob storage container. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :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. + :type azure_storage_blob_container_uri: ~azure.keyvault.v7_3_preview.models.SASTokenParameter + :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 AsyncLROBasePolling. + 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 FullBackupOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_3_preview.models.FullBackupOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FullBackupOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._full_backup_initial( + vault_base_url=vault_base_url, + azure_storage_blob_container_uri=azure_storage_blob_container_uri, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_full_backup.metadata = {'url': '/backup'} # type: ignore + + async def full_backup_status( + self, + 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. + :type vault_base_url: str + :param job_id: The id returned as part of the backup request. + :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) + :rtype: ~azure.keyvault.v7_3_preview.models.FullBackupOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FullBackupOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.full_backup_status.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'jobId': self._serialize.url("job_id", job_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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + full_backup_status.metadata = {'url': '/backup/{jobId}/pending'} # type: ignore + + async def _full_restore_operation_initial( + self, + vault_base_url: str, + restore_blob_details: Optional["_models.RestoreOperationParameters"] = None, + **kwargs: Any + ) -> "_models.RestoreOperation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._full_restore_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if restore_blob_details is not None: + body_content = self._serialize.body(restore_blob_details, 'RestoreOperationParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _full_restore_operation_initial.metadata = {'url': '/restore'} # type: ignore + + async def begin_full_restore_operation( + self, + vault_base_url: str, + restore_blob_details: Optional["_models.RestoreOperationParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller["_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. + :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. + :type restore_blob_details: ~azure.keyvault.v7_3_preview.models.RestoreOperationParameters + :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 AsyncLROBasePolling. + 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 RestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_3_preview.models.RestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._full_restore_operation_initial( + vault_base_url=vault_base_url, + restore_blob_details=restore_blob_details, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_full_restore_operation.metadata = {'url': '/restore'} # type: ignore + + async def restore_status( + self, + 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. + :type vault_base_url: str + :param job_id: The Job Id returned part of the restore operation. + :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) + :rtype: ~azure.keyvault.v7_3_preview.models.RestoreOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.restore_status.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'jobId': self._serialize.url("job_id", job_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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + restore_status.metadata = {'url': '/restore/{jobId}/pending'} # type: ignore + + async def _selective_key_restore_operation_initial( + self, + vault_base_url: str, + key_name: str, + restore_blob_details: Optional["_models.SelectiveKeyRestoreOperationParameters"] = None, + **kwargs: Any + ) -> "_models.SelectiveKeyRestoreOperation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SelectiveKeyRestoreOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._selective_key_restore_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if restore_blob_details is not None: + body_content = self._serialize.body(restore_blob_details, 'SelectiveKeyRestoreOperationParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('SelectiveKeyRestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _selective_key_restore_operation_initial.metadata = {'url': '/keys/{keyName}/restore'} # type: ignore + + async def begin_selective_key_restore_operation( + self, + vault_base_url: str, + key_name: str, + restore_blob_details: Optional["_models.SelectiveKeyRestoreOperationParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller["_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. + :type vault_base_url: str + :param key_name: The name of the key to be restored from the user supplied backup. + :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. + :type restore_blob_details: ~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperationParameters + :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 AsyncLROBasePolling. + 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 SelectiveKeyRestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SelectiveKeyRestoreOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._selective_key_restore_operation_initial( + vault_base_url=vault_base_url, + key_name=key_name, + restore_blob_details=restore_blob_details, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('SelectiveKeyRestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + } + + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_selective_key_restore_operation.metadata = {'url': '/keys/{keyName}/restore'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_role_assignments_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_role_assignments_operations.py new file mode 100644 index 000000000000..5a04de4aa433 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_role_assignments_operations.py @@ -0,0 +1,322 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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 ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RoleAssignmentsOperations: + """RoleAssignmentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.keyvault.v7_3_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def delete( + self, + vault_base_url: str, + scope: str, + role_assignment_name: str, + **kwargs: Any + ) -> "_models.RoleAssignment": + """Deletes a role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment to delete. + :type scope: str + :param role_assignment_name: The name of the role assignment to delete. + :type role_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, '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.delete(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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + async def create( + self, + vault_base_url: str, + scope: str, + role_assignment_name: str, + parameters: "_models.RoleAssignmentCreateParameters", + **kwargs: Any + ) -> "_models.RoleAssignment": + """Creates a role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment to create. + :type scope: str + :param role_assignment_name: The name of the role assignment to create. It can be any valid + GUID. + :type role_assignment_name: str + :param parameters: Parameters for the role assignment. + :type parameters: ~azure.keyvault.v7_3_preview.models.RoleAssignmentCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RoleAssignmentCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + async def get( + self, + vault_base_url: str, + scope: str, + role_assignment_name: str, + **kwargs: Any + ) -> "_models.RoleAssignment": + """Get the specified role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment. + :type scope: str + :param role_assignment_name: The name of the role assignment to get. + :type role_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, '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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + def list_for_scope( + self, + vault_base_url: str, + scope: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.RoleAssignmentListResult"]: + """Gets role assignments for a scope. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignments. + :type scope: str + :param filter: The filter to apply on the operation. Use $filter=atScope() to return all role + assignments at or above the scope. Use $filter=principalId eq {id} to return all role + assignments at, above or below the scope for the specified principal. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RoleAssignmentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_3_preview.models.RoleAssignmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_for_scope.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RoleAssignmentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_for_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_role_definitions_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_role_definitions_operations.py new file mode 100644 index 000000000000..3ea67168b9b2 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/aio/operations/_role_definitions_operations.py @@ -0,0 +1,322 @@ +# 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, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +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 ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RoleDefinitionsOperations: + """RoleDefinitionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.keyvault.v7_3_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def delete( + self, + vault_base_url: str, + scope: str, + role_definition_name: str, + **kwargs: Any + ) -> "_models.RoleDefinition": + """Deletes a custom role definition. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition to delete. Managed HSM only supports '/'. + :type scope: str + :param role_definition_name: The name (GUID) of the role definition to delete. + :type role_definition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleDefinition, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionName': self._serialize.url("role_definition_name", role_definition_name, '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.delete(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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'} # type: ignore + + async def create_or_update( + self, + vault_base_url: str, + scope: str, + role_definition_name: str, + parameters: "_models.RoleDefinitionCreateParameters", + **kwargs: Any + ) -> "_models.RoleDefinition": + """Creates or updates a custom role definition. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition to create or update. Managed HSM only supports + '/'. + :type scope: str + :param role_definition_name: The name of the role definition to create or update. It can be any + valid GUID. + :type role_definition_name: str + :param parameters: Parameters for the role definition. + :type parameters: ~azure.keyvault.v7_3_preview.models.RoleDefinitionCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleDefinition, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionName': self._serialize.url("role_definition_name", role_definition_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RoleDefinitionCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'} # type: ignore + + async def get( + self, + vault_base_url: str, + scope: str, + role_definition_name: str, + **kwargs: Any + ) -> "_models.RoleDefinition": + """Get the specified role definition. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition to get. Managed HSM only supports '/'. + :type scope: str + :param role_definition_name: The name of the role definition to get. + :type role_definition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleDefinition, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionName': self._serialize.url("role_definition_name", role_definition_name, '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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'} # type: ignore + + def list( + self, + vault_base_url: str, + scope: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.RoleDefinitionListResult"]: + """Get all role definitions that are applicable at scope and above. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition. + :type scope: str + :param filter: The filter to apply on the operation. Use atScopeAndBelow filter to search below + the given scope as well. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RoleDefinitionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.v7_3_preview.models.RoleDefinitionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleDefinitionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RoleDefinitionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/__init__.py new file mode 100644 index 000000000000..47bde45ad659 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/__init__.py @@ -0,0 +1,87 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Attributes + from ._models_py3 import Error + from ._models_py3 import FullBackupOperation + from ._models_py3 import KeyVaultError + from ._models_py3 import Permission + from ._models_py3 import RestoreOperation + from ._models_py3 import RestoreOperationParameters + from ._models_py3 import RoleAssignment + from ._models_py3 import RoleAssignmentCreateParameters + from ._models_py3 import RoleAssignmentFilter + from ._models_py3 import RoleAssignmentListResult + from ._models_py3 import RoleAssignmentProperties + from ._models_py3 import RoleAssignmentPropertiesWithScope + from ._models_py3 import RoleDefinition + from ._models_py3 import RoleDefinitionCreateParameters + from ._models_py3 import RoleDefinitionFilter + from ._models_py3 import RoleDefinitionListResult + from ._models_py3 import RoleDefinitionProperties + from ._models_py3 import SASTokenParameter + from ._models_py3 import SelectiveKeyRestoreOperation + from ._models_py3 import SelectiveKeyRestoreOperationParameters +except (SyntaxError, ImportError): + from ._models import Attributes # type: ignore + from ._models import Error # type: ignore + from ._models import FullBackupOperation # type: ignore + from ._models import KeyVaultError # type: ignore + from ._models import Permission # type: ignore + from ._models import RestoreOperation # type: ignore + from ._models import RestoreOperationParameters # type: ignore + from ._models import RoleAssignment # type: ignore + from ._models import RoleAssignmentCreateParameters # type: ignore + from ._models import RoleAssignmentFilter # type: ignore + from ._models import RoleAssignmentListResult # type: ignore + from ._models import RoleAssignmentProperties # type: ignore + from ._models import RoleAssignmentPropertiesWithScope # type: ignore + from ._models import RoleDefinition # type: ignore + from ._models import RoleDefinitionCreateParameters # type: ignore + from ._models import RoleDefinitionFilter # type: ignore + from ._models import RoleDefinitionListResult # type: ignore + from ._models import RoleDefinitionProperties # type: ignore + from ._models import SASTokenParameter # type: ignore + from ._models import SelectiveKeyRestoreOperation # type: ignore + from ._models import SelectiveKeyRestoreOperationParameters # type: ignore + +from ._key_vault_client_enums import ( + DataAction, + RoleDefinitionType, + RoleScope, + RoleType, +) + +__all__ = [ + 'Attributes', + 'Error', + 'FullBackupOperation', + 'KeyVaultError', + 'Permission', + 'RestoreOperation', + 'RestoreOperationParameters', + 'RoleAssignment', + 'RoleAssignmentCreateParameters', + 'RoleAssignmentFilter', + 'RoleAssignmentListResult', + 'RoleAssignmentProperties', + 'RoleAssignmentPropertiesWithScope', + 'RoleDefinition', + 'RoleDefinitionCreateParameters', + 'RoleDefinitionFilter', + 'RoleDefinitionListResult', + 'RoleDefinitionProperties', + 'SASTokenParameter', + 'SelectiveKeyRestoreOperation', + 'SelectiveKeyRestoreOperationParameters', + 'DataAction', + 'RoleDefinitionType', + 'RoleScope', + 'RoleType', +] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_key_vault_client_enums.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_key_vault_client_enums.py new file mode 100644 index 000000000000..624485460a85 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_key_vault_client_enums.py @@ -0,0 +1,124 @@ +# 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 enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class DataAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Supported permissions for data actions. + """ + + #: Read HSM key metadata. + READ_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/read/action" + #: Update an HSM key. + WRITE_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/write/action" + #: Read deleted HSM key. + READ_DELETED_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action" + #: Recover deleted HSM key. + RECOVER_DELETED_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action" + #: Backup HSM keys. + BACKUP_HSM_KEYS = "Microsoft.KeyVault/managedHsm/keys/backup/action" + #: Restore HSM keys. + RESTORE_HSM_KEYS = "Microsoft.KeyVault/managedHsm/keys/restore/action" + #: Delete role assignment. + DELETE_ROLE_ASSIGNMENT = "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action" + #: Get role assignment. + GET_ROLE_ASSIGNMENT = "Microsoft.KeyVault/managedHsm/roleAssignments/read/action" + #: Create or update role assignment. + WRITE_ROLE_ASSIGNMENT = "Microsoft.KeyVault/managedHsm/roleAssignments/write/action" + #: Get role definition. + READ_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action" + #: Create or update role definition. + WRITE_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/write/action" + #: Delete role definition. + DELETE_ROLE_DEFINITION = "Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action" + #: Encrypt using an HSM key. + ENCRYPT_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/encrypt/action" + #: Decrypt using an HSM key. + DECRYPT_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/decrypt/action" + #: Wrap using an HSM key. + WRAP_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/wrap/action" + #: Unwrap using an HSM key. + UNWRAP_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/unwrap/action" + #: Sign using an HSM key. + SIGN_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/sign/action" + #: Verify using an HSM key. + VERIFY_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/verify/action" + #: Create an HSM key. + CREATE_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/create" + #: Delete an HSM key. + DELETE_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/delete" + #: Export an HSM key. + EXPORT_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/export/action" + #: Release an HSM key using Secure Key Release. + RELEASE_KEY = "Microsoft.KeyVault/managedHsm/keys/release/action" + #: Import an HSM key. + IMPORT_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/import/action" + #: Purge a deleted HSM key. + PURGE_DELETED_HSM_KEY = "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + #: Download an HSM security domain. + DOWNLOAD_HSM_SECURITY_DOMAIN = "Microsoft.KeyVault/managedHsm/securitydomain/download/action" + #: Check status of HSM security domain download. + DOWNLOAD_HSM_SECURITY_DOMAIN_STATUS = "Microsoft.KeyVault/managedHsm/securitydomain/download/read" + #: Upload an HSM security domain. + UPLOAD_HSM_SECURITY_DOMAIN = "Microsoft.KeyVault/managedHsm/securitydomain/upload/action" + #: Check the status of the HSM security domain exchange file. + READ_HSM_SECURITY_DOMAIN_STATUS = "Microsoft.KeyVault/managedHsm/securitydomain/upload/read" + #: Download an HSM security domain transfer key. + READ_HSM_SECURITY_DOMAIN_TRANSFER_KEY = "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read" + #: Start an HSM backup. + START_HSM_BACKUP = "Microsoft.KeyVault/managedHsm/backup/start/action" + #: Start an HSM restore. + START_HSM_RESTORE = "Microsoft.KeyVault/managedHsm/restore/start/action" + #: Read an HSM backup status. + READ_HSM_BACKUP_STATUS = "Microsoft.KeyVault/managedHsm/backup/status/action" + #: Read an HSM restore status. + READ_HSM_RESTORE_STATUS = "Microsoft.KeyVault/managedHsm/restore/status/action" + #: Generate random numbers. + RANDOM_NUMBERS_GENERATE = "Microsoft.KeyVault/managedHsm/rng/action" + +class RoleDefinitionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The role definition type. + """ + + MICROSOFT_AUTHORIZATION_ROLE_DEFINITIONS = "Microsoft.Authorization/roleDefinitions" + +class RoleScope(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The role scope. + """ + + #: Global scope. + GLOBAL_ENUM = "/" + #: Keys scope. + KEYS = "/keys" + +class RoleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The role type. + """ + + #: Built in role. + BUILT_IN_ROLE = "AKVBuiltInRole" + #: Custom role. + CUSTOM_ROLE = "CustomRole" diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_models.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_models.py new file mode 100644 index 000000000000..1f603fab01c3 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_models.py @@ -0,0 +1,681 @@ +# 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 azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class Attributes(msrest.serialization.Model): + """The object attributes managed by the KeyVault service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether the object is enabled. + :type enabled: bool + :param not_before: Not before date in UTC. + :type not_before: ~datetime.datetime + :param expires: Expiry date in UTC. + :type expires: ~datetime.datetime + :ivar created: Creation time in UTC. + :vartype created: ~datetime.datetime + :ivar updated: Last updated time in UTC. + :vartype updated: ~datetime.datetime + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'unix-time'}, + 'expires': {'key': 'exp', 'type': 'unix-time'}, + 'created': {'key': 'created', 'type': 'unix-time'}, + 'updated': {'key': 'updated', 'type': 'unix-time'}, + } + + def __init__( + self, + **kwargs + ): + super(Attributes, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.not_before = kwargs.get('not_before', None) + self.expires = kwargs.get('expires', None) + self.created = None + self.updated = None + + +class Error(msrest.serialization.Model): + """The key vault server error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar inner_error: The key vault server error. + :vartype inner_error: ~azure.keyvault.v7_3_preview.models.Error + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'inner_error': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'inner_error': {'key': 'innererror', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = None + self.message = None + self.inner_error = None + + +class FullBackupOperation(msrest.serialization.Model): + """Full backup operation. + + :param status: Status of the backup operation. + :type status: str + :param status_details: The status details of backup operation. + :type status_details: str + :param error: Error encountered, if any, during the full backup operation. + :type error: ~azure.keyvault.v7_3_preview.models.Error + :param start_time: The start time of the backup operation in UTC. + :type start_time: ~datetime.datetime + :param end_time: The end time of the backup operation in UTC. + :type end_time: ~datetime.datetime + :param job_id: Identifier for the full backup operation. + :type job_id: str + :param azure_storage_blob_container_uri: The Azure blob storage container Uri which contains + the full backup. + :type azure_storage_blob_container_uri: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'azure_storage_blob_container_uri': {'key': 'azureStorageBlobContainerUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FullBackupOperation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.error = kwargs.get('error', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.job_id = kwargs.get('job_id', None) + self.azure_storage_blob_container_uri = kwargs.get('azure_storage_blob_container_uri', None) + + +class KeyVaultError(msrest.serialization.Model): + """The key vault error exception. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: The key vault server error. + :vartype error: ~azure.keyvault.v7_3_preview.models.Error + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultError, self).__init__(**kwargs) + self.error = None + + +class Permission(msrest.serialization.Model): + """Role definition permissions. + + :param actions: Action permissions that are granted. + :type actions: list[str] + :param not_actions: Action permissions that are excluded but not denied. They may be granted by + other role definitions assigned to a principal. + :type not_actions: list[str] + :param data_actions: Data action permissions that are granted. + :type data_actions: list[str or ~azure.keyvault.v7_3_preview.models.DataAction] + :param not_data_actions: Data action permissions that are excluded but not denied. They may be + granted by other role definitions assigned to a principal. + :type not_data_actions: list[str or ~azure.keyvault.v7_3_preview.models.DataAction] + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[str]'}, + 'not_actions': {'key': 'notActions', 'type': '[str]'}, + 'data_actions': {'key': 'dataActions', 'type': '[str]'}, + 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(Permission, self).__init__(**kwargs) + self.actions = kwargs.get('actions', None) + self.not_actions = kwargs.get('not_actions', None) + self.data_actions = kwargs.get('data_actions', None) + self.not_data_actions = kwargs.get('not_data_actions', None) + + +class RestoreOperation(msrest.serialization.Model): + """Restore operation. + + :param status: Status of the restore operation. + :type status: str + :param status_details: The status details of restore operation. + :type status_details: str + :param error: Error encountered, if any, during the restore operation. + :type error: ~azure.keyvault.v7_3_preview.models.Error + :param job_id: Identifier for the restore operation. + :type job_id: str + :param start_time: The start time of the restore operation. + :type start_time: ~datetime.datetime + :param end_time: The end time of the restore operation. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreOperation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.error = kwargs.get('error', None) + self.job_id = kwargs.get('job_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class RestoreOperationParameters(msrest.serialization.Model): + """RestoreOperationParameters. + + All required parameters must be populated in order to send to Azure. + + :param sas_token_parameters: Required. + :type sas_token_parameters: ~azure.keyvault.v7_3_preview.models.SASTokenParameter + :param folder_to_restore: Required. The Folder name of the blob where the previous successful + full backup was stored. + :type folder_to_restore: str + """ + + _validation = { + 'sas_token_parameters': {'required': True}, + 'folder_to_restore': {'required': True}, + } + + _attribute_map = { + 'sas_token_parameters': {'key': 'sasTokenParameters', 'type': 'SASTokenParameter'}, + 'folder_to_restore': {'key': 'folderToRestore', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreOperationParameters, self).__init__(**kwargs) + self.sas_token_parameters = kwargs['sas_token_parameters'] + self.folder_to_restore = kwargs['folder_to_restore'] + + +class RoleAssignment(msrest.serialization.Model): + """Role Assignments. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The role assignment ID. + :vartype id: str + :ivar name: The role assignment name. + :vartype name: str + :ivar type: The role assignment type. + :vartype type: str + :param properties: Role assignment properties. + :type properties: ~azure.keyvault.v7_3_preview.models.RoleAssignmentPropertiesWithScope + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'RoleAssignmentPropertiesWithScope'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignment, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class RoleAssignmentCreateParameters(msrest.serialization.Model): + """Role assignment create parameters. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Role assignment properties. + :type properties: ~azure.keyvault.v7_3_preview.models.RoleAssignmentProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RoleAssignmentProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentCreateParameters, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class RoleAssignmentFilter(msrest.serialization.Model): + """Role Assignments filter. + + :param principal_id: Returns role assignment of the specific principal. + :type principal_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentFilter, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + + +class RoleAssignmentListResult(msrest.serialization.Model): + """Role assignment list operation result. + + :param value: Role assignment list. + :type value: list[~azure.keyvault.v7_3_preview.models.RoleAssignment] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoleAssignment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RoleAssignmentProperties(msrest.serialization.Model): + """Role assignment properties. + + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. The role definition ID used in the role assignment. + :type role_definition_id: str + :param principal_id: Required. The principal ID assigned to the role. This maps to the ID + inside the Active Directory. It can point to a user, service principal, or security group. + :type principal_id: str + """ + + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentProperties, self).__init__(**kwargs) + self.role_definition_id = kwargs['role_definition_id'] + self.principal_id = kwargs['principal_id'] + + +class RoleAssignmentPropertiesWithScope(msrest.serialization.Model): + """Role assignment properties with scope. + + :param scope: The role scope. Possible values include: "/", "/keys". + :type scope: str or ~azure.keyvault.v7_3_preview.models.RoleScope + :param role_definition_id: The role definition ID. + :type role_definition_id: str + :param principal_id: The principal ID. + :type principal_id: str + """ + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleAssignmentPropertiesWithScope, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + self.principal_id = kwargs.get('principal_id', None) + + +class RoleDefinition(msrest.serialization.Model): + """Role definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The role definition ID. + :vartype id: str + :ivar name: The role definition name. + :vartype name: str + :ivar type: The role definition type. Possible values include: + "Microsoft.Authorization/roleDefinitions". + :vartype type: str or ~azure.keyvault.v7_3_preview.models.RoleDefinitionType + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. Possible values include: "AKVBuiltInRole", "CustomRole". + :type role_type: str or ~azure.keyvault.v7_3_preview.models.RoleType + :param permissions: Role definition permissions. + :type permissions: list[~azure.keyvault.v7_3_preview.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[str or ~azure.keyvault.v7_3_preview.models.RoleScope] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'role_name': {'key': 'properties.roleName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'role_type': {'key': 'properties.type', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleDefinition, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.role_name = kwargs.get('role_name', None) + self.description = kwargs.get('description', None) + self.role_type = kwargs.get('role_type', None) + self.permissions = kwargs.get('permissions', None) + self.assignable_scopes = kwargs.get('assignable_scopes', None) + + +class RoleDefinitionCreateParameters(msrest.serialization.Model): + """Role definition create parameters. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Role definition properties. + :type properties: ~azure.keyvault.v7_3_preview.models.RoleDefinitionProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RoleDefinitionProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleDefinitionCreateParameters, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class RoleDefinitionFilter(msrest.serialization.Model): + """Role Definitions filter. + + :param role_name: Returns role definition with the specific name. + :type role_name: str + """ + + _attribute_map = { + 'role_name': {'key': 'roleName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleDefinitionFilter, self).__init__(**kwargs) + self.role_name = kwargs.get('role_name', None) + + +class RoleDefinitionListResult(msrest.serialization.Model): + """Role definition list operation result. + + :param value: Role definition list. + :type value: list[~azure.keyvault.v7_3_preview.models.RoleDefinition] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoleDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleDefinitionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RoleDefinitionProperties(msrest.serialization.Model): + """Role definition properties. + + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. Possible values include: "AKVBuiltInRole", "CustomRole". + :type role_type: str or ~azure.keyvault.v7_3_preview.models.RoleType + :param permissions: Role definition permissions. + :type permissions: list[~azure.keyvault.v7_3_preview.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[str or ~azure.keyvault.v7_3_preview.models.RoleScope] + """ + + _attribute_map = { + 'role_name': {'key': 'roleName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'role_type': {'key': 'type', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'assignableScopes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RoleDefinitionProperties, self).__init__(**kwargs) + self.role_name = kwargs.get('role_name', None) + self.description = kwargs.get('description', None) + self.role_type = kwargs.get('role_type', None) + self.permissions = kwargs.get('permissions', None) + self.assignable_scopes = kwargs.get('assignable_scopes', None) + + +class SASTokenParameter(msrest.serialization.Model): + """SASTokenParameter. + + All required parameters must be populated in order to send to Azure. + + :param storage_resource_uri: Required. Azure Blob storage container Uri. + :type storage_resource_uri: str + :param token: Required. The SAS token pointing to an Azure Blob storage container. + :type token: str + """ + + _validation = { + 'storage_resource_uri': {'required': True}, + 'token': {'required': True}, + } + + _attribute_map = { + 'storage_resource_uri': {'key': 'storageResourceUri', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SASTokenParameter, self).__init__(**kwargs) + self.storage_resource_uri = kwargs['storage_resource_uri'] + self.token = kwargs['token'] + + +class SelectiveKeyRestoreOperation(msrest.serialization.Model): + """Selective Key Restore operation. + + :param status: Status of the restore operation. + :type status: str + :param status_details: The status details of restore operation. + :type status_details: str + :param error: Error encountered, if any, during the selective key restore operation. + :type error: ~azure.keyvault.v7_3_preview.models.Error + :param job_id: Identifier for the selective key restore operation. + :type job_id: str + :param start_time: The start time of the restore operation. + :type start_time: ~datetime.datetime + :param end_time: The end time of the restore operation. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + } + + def __init__( + self, + **kwargs + ): + super(SelectiveKeyRestoreOperation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.error = kwargs.get('error', None) + self.job_id = kwargs.get('job_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class SelectiveKeyRestoreOperationParameters(msrest.serialization.Model): + """SelectiveKeyRestoreOperationParameters. + + All required parameters must be populated in order to send to Azure. + + :param sas_token_parameters: Required. + :type sas_token_parameters: ~azure.keyvault.v7_3_preview.models.SASTokenParameter + :param folder: Required. The Folder name of the blob where the previous successful full backup + was stored. + :type folder: str + """ + + _validation = { + 'sas_token_parameters': {'required': True}, + 'folder': {'required': True}, + } + + _attribute_map = { + 'sas_token_parameters': {'key': 'sasTokenParameters', 'type': 'SASTokenParameter'}, + 'folder': {'key': 'folder', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SelectiveKeyRestoreOperationParameters, self).__init__(**kwargs) + self.sas_token_parameters = kwargs['sas_token_parameters'] + self.folder = kwargs['folder'] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_models_py3.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_models_py3.py new file mode 100644 index 000000000000..f7c3da2f1a1d --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/models/_models_py3.py @@ -0,0 +1,761 @@ +# 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. +# -------------------------------------------------------------------------- + +import datetime +from typing import List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._key_vault_client_enums import * + + +class Attributes(msrest.serialization.Model): + """The object attributes managed by the KeyVault service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether the object is enabled. + :type enabled: bool + :param not_before: Not before date in UTC. + :type not_before: ~datetime.datetime + :param expires: Expiry date in UTC. + :type expires: ~datetime.datetime + :ivar created: Creation time in UTC. + :vartype created: ~datetime.datetime + :ivar updated: Last updated time in UTC. + :vartype updated: ~datetime.datetime + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'unix-time'}, + 'expires': {'key': 'exp', 'type': 'unix-time'}, + 'created': {'key': 'created', 'type': 'unix-time'}, + 'updated': {'key': 'updated', 'type': 'unix-time'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + not_before: Optional[datetime.datetime] = None, + expires: Optional[datetime.datetime] = None, + **kwargs + ): + super(Attributes, self).__init__(**kwargs) + self.enabled = enabled + self.not_before = not_before + self.expires = expires + self.created = None + self.updated = None + + +class Error(msrest.serialization.Model): + """The key vault server error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar inner_error: The key vault server error. + :vartype inner_error: ~azure.keyvault.v7_3_preview.models.Error + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'inner_error': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'inner_error': {'key': 'innererror', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = None + self.message = None + self.inner_error = None + + +class FullBackupOperation(msrest.serialization.Model): + """Full backup operation. + + :param status: Status of the backup operation. + :type status: str + :param status_details: The status details of backup operation. + :type status_details: str + :param error: Error encountered, if any, during the full backup operation. + :type error: ~azure.keyvault.v7_3_preview.models.Error + :param start_time: The start time of the backup operation in UTC. + :type start_time: ~datetime.datetime + :param end_time: The end time of the backup operation in UTC. + :type end_time: ~datetime.datetime + :param job_id: Identifier for the full backup operation. + :type job_id: str + :param azure_storage_blob_container_uri: The Azure blob storage container Uri which contains + the full backup. + :type azure_storage_blob_container_uri: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'azure_storage_blob_container_uri': {'key': 'azureStorageBlobContainerUri', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + status_details: Optional[str] = None, + error: Optional["Error"] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + job_id: Optional[str] = None, + azure_storage_blob_container_uri: Optional[str] = None, + **kwargs + ): + super(FullBackupOperation, self).__init__(**kwargs) + self.status = status + self.status_details = status_details + self.error = error + self.start_time = start_time + self.end_time = end_time + self.job_id = job_id + self.azure_storage_blob_container_uri = azure_storage_blob_container_uri + + +class KeyVaultError(msrest.serialization.Model): + """The key vault error exception. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: The key vault server error. + :vartype error: ~azure.keyvault.v7_3_preview.models.Error + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultError, self).__init__(**kwargs) + self.error = None + + +class Permission(msrest.serialization.Model): + """Role definition permissions. + + :param actions: Action permissions that are granted. + :type actions: list[str] + :param not_actions: Action permissions that are excluded but not denied. They may be granted by + other role definitions assigned to a principal. + :type not_actions: list[str] + :param data_actions: Data action permissions that are granted. + :type data_actions: list[str or ~azure.keyvault.v7_3_preview.models.DataAction] + :param not_data_actions: Data action permissions that are excluded but not denied. They may be + granted by other role definitions assigned to a principal. + :type not_data_actions: list[str or ~azure.keyvault.v7_3_preview.models.DataAction] + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[str]'}, + 'not_actions': {'key': 'notActions', 'type': '[str]'}, + 'data_actions': {'key': 'dataActions', 'type': '[str]'}, + 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + } + + def __init__( + self, + *, + actions: Optional[List[str]] = None, + not_actions: Optional[List[str]] = None, + data_actions: Optional[List[Union[str, "DataAction"]]] = None, + not_data_actions: Optional[List[Union[str, "DataAction"]]] = None, + **kwargs + ): + super(Permission, self).__init__(**kwargs) + self.actions = actions + self.not_actions = not_actions + self.data_actions = data_actions + self.not_data_actions = not_data_actions + + +class RestoreOperation(msrest.serialization.Model): + """Restore operation. + + :param status: Status of the restore operation. + :type status: str + :param status_details: The status details of restore operation. + :type status_details: str + :param error: Error encountered, if any, during the restore operation. + :type error: ~azure.keyvault.v7_3_preview.models.Error + :param job_id: Identifier for the restore operation. + :type job_id: str + :param start_time: The start time of the restore operation. + :type start_time: ~datetime.datetime + :param end_time: The end time of the restore operation. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + status_details: Optional[str] = None, + error: Optional["Error"] = None, + job_id: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(RestoreOperation, self).__init__(**kwargs) + self.status = status + self.status_details = status_details + self.error = error + self.job_id = job_id + self.start_time = start_time + self.end_time = end_time + + +class RestoreOperationParameters(msrest.serialization.Model): + """RestoreOperationParameters. + + All required parameters must be populated in order to send to Azure. + + :param sas_token_parameters: Required. + :type sas_token_parameters: ~azure.keyvault.v7_3_preview.models.SASTokenParameter + :param folder_to_restore: Required. The Folder name of the blob where the previous successful + full backup was stored. + :type folder_to_restore: str + """ + + _validation = { + 'sas_token_parameters': {'required': True}, + 'folder_to_restore': {'required': True}, + } + + _attribute_map = { + 'sas_token_parameters': {'key': 'sasTokenParameters', 'type': 'SASTokenParameter'}, + 'folder_to_restore': {'key': 'folderToRestore', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_token_parameters: "SASTokenParameter", + folder_to_restore: str, + **kwargs + ): + super(RestoreOperationParameters, self).__init__(**kwargs) + self.sas_token_parameters = sas_token_parameters + self.folder_to_restore = folder_to_restore + + +class RoleAssignment(msrest.serialization.Model): + """Role Assignments. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The role assignment ID. + :vartype id: str + :ivar name: The role assignment name. + :vartype name: str + :ivar type: The role assignment type. + :vartype type: str + :param properties: Role assignment properties. + :type properties: ~azure.keyvault.v7_3_preview.models.RoleAssignmentPropertiesWithScope + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'RoleAssignmentPropertiesWithScope'}, + } + + def __init__( + self, + *, + properties: Optional["RoleAssignmentPropertiesWithScope"] = None, + **kwargs + ): + super(RoleAssignment, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class RoleAssignmentCreateParameters(msrest.serialization.Model): + """Role assignment create parameters. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Role assignment properties. + :type properties: ~azure.keyvault.v7_3_preview.models.RoleAssignmentProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RoleAssignmentProperties'}, + } + + def __init__( + self, + *, + properties: "RoleAssignmentProperties", + **kwargs + ): + super(RoleAssignmentCreateParameters, self).__init__(**kwargs) + self.properties = properties + + +class RoleAssignmentFilter(msrest.serialization.Model): + """Role Assignments filter. + + :param principal_id: Returns role assignment of the specific principal. + :type principal_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + *, + principal_id: Optional[str] = None, + **kwargs + ): + super(RoleAssignmentFilter, self).__init__(**kwargs) + self.principal_id = principal_id + + +class RoleAssignmentListResult(msrest.serialization.Model): + """Role assignment list operation result. + + :param value: Role assignment list. + :type value: list[~azure.keyvault.v7_3_preview.models.RoleAssignment] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoleAssignment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RoleAssignment"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RoleAssignmentListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RoleAssignmentProperties(msrest.serialization.Model): + """Role assignment properties. + + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. The role definition ID used in the role assignment. + :type role_definition_id: str + :param principal_id: Required. The principal ID assigned to the role. This maps to the ID + inside the Active Directory. It can point to a user, service principal, or security group. + :type principal_id: str + """ + + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + *, + role_definition_id: str, + principal_id: str, + **kwargs + ): + super(RoleAssignmentProperties, self).__init__(**kwargs) + self.role_definition_id = role_definition_id + self.principal_id = principal_id + + +class RoleAssignmentPropertiesWithScope(msrest.serialization.Model): + """Role assignment properties with scope. + + :param scope: The role scope. Possible values include: "/", "/keys". + :type scope: str or ~azure.keyvault.v7_3_preview.models.RoleScope + :param role_definition_id: The role definition ID. + :type role_definition_id: str + :param principal_id: The principal ID. + :type principal_id: str + """ + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__( + self, + *, + scope: Optional[Union[str, "RoleScope"]] = None, + role_definition_id: Optional[str] = None, + principal_id: Optional[str] = None, + **kwargs + ): + super(RoleAssignmentPropertiesWithScope, self).__init__(**kwargs) + self.scope = scope + self.role_definition_id = role_definition_id + self.principal_id = principal_id + + +class RoleDefinition(msrest.serialization.Model): + """Role definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The role definition ID. + :vartype id: str + :ivar name: The role definition name. + :vartype name: str + :ivar type: The role definition type. Possible values include: + "Microsoft.Authorization/roleDefinitions". + :vartype type: str or ~azure.keyvault.v7_3_preview.models.RoleDefinitionType + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. Possible values include: "AKVBuiltInRole", "CustomRole". + :type role_type: str or ~azure.keyvault.v7_3_preview.models.RoleType + :param permissions: Role definition permissions. + :type permissions: list[~azure.keyvault.v7_3_preview.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[str or ~azure.keyvault.v7_3_preview.models.RoleScope] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'role_name': {'key': 'properties.roleName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'role_type': {'key': 'properties.type', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, + } + + def __init__( + self, + *, + role_name: Optional[str] = None, + description: Optional[str] = None, + role_type: Optional[Union[str, "RoleType"]] = None, + permissions: Optional[List["Permission"]] = None, + assignable_scopes: Optional[List[Union[str, "RoleScope"]]] = None, + **kwargs + ): + super(RoleDefinition, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.role_name = role_name + self.description = description + self.role_type = role_type + self.permissions = permissions + self.assignable_scopes = assignable_scopes + + +class RoleDefinitionCreateParameters(msrest.serialization.Model): + """Role definition create parameters. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Role definition properties. + :type properties: ~azure.keyvault.v7_3_preview.models.RoleDefinitionProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RoleDefinitionProperties'}, + } + + def __init__( + self, + *, + properties: "RoleDefinitionProperties", + **kwargs + ): + super(RoleDefinitionCreateParameters, self).__init__(**kwargs) + self.properties = properties + + +class RoleDefinitionFilter(msrest.serialization.Model): + """Role Definitions filter. + + :param role_name: Returns role definition with the specific name. + :type role_name: str + """ + + _attribute_map = { + 'role_name': {'key': 'roleName', 'type': 'str'}, + } + + def __init__( + self, + *, + role_name: Optional[str] = None, + **kwargs + ): + super(RoleDefinitionFilter, self).__init__(**kwargs) + self.role_name = role_name + + +class RoleDefinitionListResult(msrest.serialization.Model): + """Role definition list operation result. + + :param value: Role definition list. + :type value: list[~azure.keyvault.v7_3_preview.models.RoleDefinition] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoleDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RoleDefinition"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RoleDefinitionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RoleDefinitionProperties(msrest.serialization.Model): + """Role definition properties. + + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. Possible values include: "AKVBuiltInRole", "CustomRole". + :type role_type: str or ~azure.keyvault.v7_3_preview.models.RoleType + :param permissions: Role definition permissions. + :type permissions: list[~azure.keyvault.v7_3_preview.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[str or ~azure.keyvault.v7_3_preview.models.RoleScope] + """ + + _attribute_map = { + 'role_name': {'key': 'roleName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'role_type': {'key': 'type', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'assignableScopes', 'type': '[str]'}, + } + + def __init__( + self, + *, + role_name: Optional[str] = None, + description: Optional[str] = None, + role_type: Optional[Union[str, "RoleType"]] = None, + permissions: Optional[List["Permission"]] = None, + assignable_scopes: Optional[List[Union[str, "RoleScope"]]] = None, + **kwargs + ): + super(RoleDefinitionProperties, self).__init__(**kwargs) + self.role_name = role_name + self.description = description + self.role_type = role_type + self.permissions = permissions + self.assignable_scopes = assignable_scopes + + +class SASTokenParameter(msrest.serialization.Model): + """SASTokenParameter. + + All required parameters must be populated in order to send to Azure. + + :param storage_resource_uri: Required. Azure Blob storage container Uri. + :type storage_resource_uri: str + :param token: Required. The SAS token pointing to an Azure Blob storage container. + :type token: str + """ + + _validation = { + 'storage_resource_uri': {'required': True}, + 'token': {'required': True}, + } + + _attribute_map = { + 'storage_resource_uri': {'key': 'storageResourceUri', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_resource_uri: str, + token: str, + **kwargs + ): + super(SASTokenParameter, self).__init__(**kwargs) + self.storage_resource_uri = storage_resource_uri + self.token = token + + +class SelectiveKeyRestoreOperation(msrest.serialization.Model): + """Selective Key Restore operation. + + :param status: Status of the restore operation. + :type status: str + :param status_details: The status details of restore operation. + :type status_details: str + :param error: Error encountered, if any, during the selective key restore operation. + :type error: ~azure.keyvault.v7_3_preview.models.Error + :param job_id: Identifier for the selective key restore operation. + :type job_id: str + :param start_time: The start time of the restore operation. + :type start_time: ~datetime.datetime + :param end_time: The end time of the restore operation. + :type end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'unix-time'}, + 'end_time': {'key': 'endTime', 'type': 'unix-time'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + status_details: Optional[str] = None, + error: Optional["Error"] = None, + job_id: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(SelectiveKeyRestoreOperation, self).__init__(**kwargs) + self.status = status + self.status_details = status_details + self.error = error + self.job_id = job_id + self.start_time = start_time + self.end_time = end_time + + +class SelectiveKeyRestoreOperationParameters(msrest.serialization.Model): + """SelectiveKeyRestoreOperationParameters. + + All required parameters must be populated in order to send to Azure. + + :param sas_token_parameters: Required. + :type sas_token_parameters: ~azure.keyvault.v7_3_preview.models.SASTokenParameter + :param folder: Required. The Folder name of the blob where the previous successful full backup + was stored. + :type folder: str + """ + + _validation = { + 'sas_token_parameters': {'required': True}, + 'folder': {'required': True}, + } + + _attribute_map = { + 'sas_token_parameters': {'key': 'sasTokenParameters', 'type': 'SASTokenParameter'}, + 'folder': {'key': 'folder', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_token_parameters: "SASTokenParameter", + folder: str, + **kwargs + ): + super(SelectiveKeyRestoreOperationParameters, self).__init__(**kwargs) + self.sas_token_parameters = sas_token_parameters + self.folder = folder diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/__init__.py new file mode 100644 index 000000000000..fbdd39654293 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/__init__.py @@ -0,0 +1,17 @@ +# 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 ._key_vault_client_operations import KeyVaultClientOperationsMixin +from ._role_definitions_operations import RoleDefinitionsOperations +from ._role_assignments_operations import RoleAssignmentsOperations + +__all__ = [ + 'KeyVaultClientOperationsMixin', + 'RoleDefinitionsOperations', + 'RoleAssignmentsOperations', +] diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_key_vault_client_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_key_vault_client_operations.py new file mode 100644 index 000000000000..e1ad6c1821e7 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_key_vault_client_operations.py @@ -0,0 +1,541 @@ +# 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.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.polling.base_polling import LROBasePolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class KeyVaultClientOperationsMixin(object): + + def _full_backup_initial( + self, + vault_base_url, # type: str + azure_storage_blob_container_uri=None, # type: Optional["_models.SASTokenParameter"] + **kwargs # type: Any + ): + # type: (...) -> "_models.FullBackupOperation" + cls = kwargs.pop('cls', None) # type: ClsType["_models.FullBackupOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._full_backup_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if azure_storage_blob_container_uri is not None: + body_content = self._serialize.body(azure_storage_blob_container_uri, 'SASTokenParameter') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _full_backup_initial.metadata = {'url': '/backup'} # type: ignore + + 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"] + """Creates a full backup using a user-provided SAS token to an Azure blob storage container. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :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. + :type azure_storage_blob_container_uri: ~azure.keyvault.v7_3_preview.models.SASTokenParameter + :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 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 FullBackupOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3_preview.models.FullBackupOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FullBackupOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._full_backup_initial( + vault_base_url=vault_base_url, + azure_storage_blob_container_uri=azure_storage_blob_container_uri, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + + if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_full_backup.metadata = {'url': '/backup'} # type: ignore + + def full_backup_status( + self, + vault_base_url, # type: str + job_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.FullBackupOperation" + """Returns the status of full backup operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The id returned as part of the backup request. + :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) + :rtype: ~azure.keyvault.v7_3_preview.models.FullBackupOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FullBackupOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.full_backup_status.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'jobId': self._serialize.url("job_id", job_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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('FullBackupOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + full_backup_status.metadata = {'url': '/backup/{jobId}/pending'} # type: ignore + + def _full_restore_operation_initial( + self, + vault_base_url, # type: str + restore_blob_details=None, # type: Optional["_models.RestoreOperationParameters"] + **kwargs # type: Any + ): + # type: (...) -> "_models.RestoreOperation" + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._full_restore_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if restore_blob_details is not None: + body_content = self._serialize.body(restore_blob_details, 'RestoreOperationParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _full_restore_operation_initial.metadata = {'url': '/restore'} # type: ignore + + 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"] + """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. + :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. + :type restore_blob_details: ~azure.keyvault.v7_3_preview.models.RestoreOperationParameters + :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 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 RestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3_preview.models.RestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._full_restore_operation_initial( + vault_base_url=vault_base_url, + restore_blob_details=restore_blob_details, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + } + + if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_full_restore_operation.metadata = {'url': '/restore'} # type: ignore + + def restore_status( + self, + vault_base_url, # type: str + job_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RestoreOperation" + """Returns the status of restore operation. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param job_id: The Job Id returned part of the restore operation. + :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) + :rtype: ~azure.keyvault.v7_3_preview.models.RestoreOperation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.restore_status.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'jobId': self._serialize.url("job_id", job_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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + restore_status.metadata = {'url': '/restore/{jobId}/pending'} # type: ignore + + def _selective_key_restore_operation_initial( + self, + vault_base_url, # type: str + key_name, # type: str + restore_blob_details=None, # type: Optional["_models.SelectiveKeyRestoreOperationParameters"] + **kwargs # type: Any + ): + # type: (...) -> "_models.SelectiveKeyRestoreOperation" + cls = kwargs.pop('cls', None) # type: ClsType["_models.SelectiveKeyRestoreOperation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._selective_key_restore_operation_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if restore_blob_details is not None: + body_content = self._serialize.body(restore_blob_details, 'SelectiveKeyRestoreOperationParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('SelectiveKeyRestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _selective_key_restore_operation_initial.metadata = {'url': '/keys/{keyName}/restore'} # type: ignore + + 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"] + """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. + :type vault_base_url: str + :param key_name: The name of the key to be restored from the user supplied backup. + :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. + :type restore_blob_details: ~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperationParameters + :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 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 SelectiveKeyRestoreOperation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.keyvault.v7_3_preview.models.SelectiveKeyRestoreOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SelectiveKeyRestoreOperation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._selective_key_restore_operation_initial( + vault_base_url=vault_base_url, + key_name=key_name, + restore_blob_details=restore_blob_details, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('SelectiveKeyRestoreOperation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized + + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'keyName': self._serialize.url("key_name", key_name, 'str'), + } + + if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_selective_key_restore_operation.metadata = {'url': '/keys/{keyName}/restore'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_role_assignments_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_role_assignments_operations.py new file mode 100644 index 000000000000..c112f5913272 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_role_assignments_operations.py @@ -0,0 +1,330 @@ +# 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.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RoleAssignmentsOperations(object): + """RoleAssignmentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.keyvault.v7_3_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def delete( + self, + vault_base_url, # type: str + scope, # type: str + role_assignment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RoleAssignment" + """Deletes a role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment to delete. + :type scope: str + :param role_assignment_name: The name of the role assignment to delete. + :type role_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, '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.delete(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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + def create( + self, + vault_base_url, # type: str + scope, # type: str + role_assignment_name, # type: str + parameters, # type: "_models.RoleAssignmentCreateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.RoleAssignment" + """Creates a role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment to create. + :type scope: str + :param role_assignment_name: The name of the role assignment to create. It can be any valid + GUID. + :type role_assignment_name: str + :param parameters: Parameters for the role assignment. + :type parameters: ~azure.keyvault.v7_3_preview.models.RoleAssignmentCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RoleAssignmentCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + def get( + self, + vault_base_url, # type: str + scope, # type: str + role_assignment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RoleAssignment" + """Get the specified role assignment. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignment. + :type scope: str + :param role_assignment_name: The name of the role assignment to get. + :type role_assignment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleAssignment, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleAssignment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleAssignmentName': self._serialize.url("role_assignment_name", role_assignment_name, '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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleAssignment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} # type: ignore + + def list_for_scope( + self, + vault_base_url, # type: str + scope, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RoleAssignmentListResult"] + """Gets role assignments for a scope. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role assignments. + :type scope: str + :param filter: The filter to apply on the operation. Use $filter=atScope() to return all role + assignments at or above the scope. Use $filter=principalId eq {id} to return all role + assignments at, above or below the scope for the specified principal. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RoleAssignmentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_3_preview.models.RoleAssignmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_for_scope.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RoleAssignmentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_for_scope.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_role_definitions_operations.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_role_definitions_operations.py new file mode 100644 index 000000000000..ae921b00e0ac --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/operations/_role_definitions_operations.py @@ -0,0 +1,330 @@ +# 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.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RoleDefinitionsOperations(object): + """RoleDefinitionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.keyvault.v7_3_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def delete( + self, + vault_base_url, # type: str + scope, # type: str + role_definition_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RoleDefinition" + """Deletes a custom role definition. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition to delete. Managed HSM only supports '/'. + :type scope: str + :param role_definition_name: The name (GUID) of the role definition to delete. + :type role_definition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleDefinition, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionName': self._serialize.url("role_definition_name", role_definition_name, '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.delete(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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'} # type: ignore + + def create_or_update( + self, + vault_base_url, # type: str + scope, # type: str + role_definition_name, # type: str + parameters, # type: "_models.RoleDefinitionCreateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.RoleDefinition" + """Creates or updates a custom role definition. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition to create or update. Managed HSM only supports + '/'. + :type scope: str + :param role_definition_name: The name of the role definition to create or update. It can be any + valid GUID. + :type role_definition_name: str + :param parameters: Parameters for the role definition. + :type parameters: ~azure.keyvault.v7_3_preview.models.RoleDefinitionCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleDefinition, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionName': self._serialize.url("role_definition_name", role_definition_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RoleDefinitionCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'} # type: ignore + + def get( + self, + vault_base_url, # type: str + scope, # type: str + role_definition_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RoleDefinition" + """Get the specified role definition. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition to get. Managed HSM only supports '/'. + :type scope: str + :param role_definition_name: The name of the role definition to get. + :type role_definition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoleDefinition, or the result of cls(response) + :rtype: ~azure.keyvault.v7_3_preview.models.RoleDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'roleDefinitionName': self._serialize.url("role_definition_name", role_definition_name, '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.KeyVaultError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('RoleDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'} # type: ignore + + def list( + self, + vault_base_url, # type: str + scope, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RoleDefinitionListResult"] + """Get all role definitions that are applicable at scope and above. + + :param vault_base_url: The vault name, for example https://myvault.vault.azure.net. + :type vault_base_url: str + :param scope: The scope of the role definition. + :type scope: str + :param filter: The filter to apply on the operation. Use atScopeAndBelow filter to search below + the given scope as well. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RoleDefinitionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.v7_3_preview.models.RoleDefinitionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleDefinitionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "7.3-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True), + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RoleDefinitionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.KeyVaultError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleDefinitions'} # type: ignore diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/py.typed b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/v7_3_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py index 815ce86516d4..63da85b214c4 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py @@ -13,8 +13,6 @@ try: # pylint:disable=unused-import from typing import Any - from azure.core.configuration import Configuration - from azure.core.pipeline.transport import AsyncHttpTransport from azure.core.credentials_async import AsyncTokenCredential except ImportError: # AsyncTokenCredential is a typing_extensions.Protocol; we don't depend on that package diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py index 8ad35c9f2045..838b89118251 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py @@ -22,10 +22,11 @@ class ApiVersion(str, Enum): """Key Vault API versions supported by this package""" #: this is the default version + V7_3_PREVIEW = "7.3-preview" V7_2 = "7.2" -DEFAULT_VERSION = ApiVersion.V7_2 +DEFAULT_VERSION = ApiVersion.V7_3_PREVIEW class KeyVaultClientBase(object): diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py index 3ef7aba02cab..25a24cab1be5 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "4.0.1" +VERSION = "4.1.0b1" diff --git a/sdk/keyvault/azure-keyvault-administration/setup.py b/sdk/keyvault/azure-keyvault-administration/setup.py index 91c86b78e2f5..15a86bfbbeaf 100644 --- a/sdk/keyvault/azure-keyvault-administration/setup.py +++ b/sdk/keyvault/azure-keyvault-administration/setup.py @@ -59,7 +59,7 @@ author_email="azurekeyvault@microsoft.com", url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/keyvault/azure-keyvault-administration", classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_assignment.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_assignment.yaml index a8f95c0def68..912db76deb0c 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_assignment.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_assignment.yaml @@ -11,9 +11,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: OK @@ -36,7 +36,7 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-server-latency: - '1' status: @@ -52,17 +52,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","name":"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/keys/backup/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Backup","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Encryption","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Release","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Backup User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Encryption User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Release User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Auditor","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/rng/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/export/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Officer","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/securitydomain/download/action","Microsoft.KeyVault/managedHsm/securitydomain/download/read","Microsoft.KeyVault/managedHsm/securitydomain/upload/action","Microsoft.KeyVault/managedHsm/securitydomain/upload/read","Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read","Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/restore/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/restore/status/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"}]}' @@ -70,7 +70,7 @@ interactions: cache-control: - no-cache content-length: - - '6590' + - '6648' content-security-policy: - default-src 'self' content-type: @@ -82,13 +82,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '0' + - '1' status: code: 200 message: OK @@ -107,9 +107,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.3-preview response: body: string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' @@ -131,9 +131,9 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '72' + - '49' status: code: 201 message: Created @@ -147,9 +147,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.3-preview response: body: string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' @@ -169,11 +169,11 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - '0' status: @@ -189,12 +189,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments?api-version=7.3-preview response: body: - string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/b80b0b44-26e7-434b-0f6a-fa2fd1b6413e","name":"b80b0b44-26e7-434b-0f6a-fa2fd1b6413e","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/7bde12dc-c0a5-4b95-ace3-aac71584f420","name":"7bde12dc-c0a5-4b95-ace3-aac71584f420","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/54d6a07b-8833-4af2-84c4-e196414a99db","name":"54d6a07b-8833-4af2-84c4-e196414a99db","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' + string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/fc3829ed-d50f-4828-b7d5-6804b903d926","name":"fc3829ed-d50f-4828-b7d5-6804b903d926","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/c2b0e95f-3286-4a81-92c4-b93b7bba6611","name":"c2b0e95f-3286-4a81-92c4-b93b7bba6611","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/6c1dc4e0-e7d6-0327-1b55-50efea64e56d","name":"6c1dc4e0-e7d6-0327-1b55-50efea64e56d","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' headers: cache-control: - no-cache @@ -211,13 +211,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '0' + - '1' status: code: 200 message: OK @@ -233,9 +233,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.3-preview response: body: string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' @@ -257,9 +257,9 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '50' + - '84' status: code: 200 message: OK @@ -273,12 +273,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments?api-version=7.3-preview response: body: - string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/b80b0b44-26e7-434b-0f6a-fa2fd1b6413e","name":"b80b0b44-26e7-434b-0f6a-fa2fd1b6413e","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/7bde12dc-c0a5-4b95-ace3-aac71584f420","name":"7bde12dc-c0a5-4b95-ace3-aac71584f420","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/54d6a07b-8833-4af2-84c4-e196414a99db","name":"54d6a07b-8833-4af2-84c4-e196414a99db","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' + string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/fc3829ed-d50f-4828-b7d5-6804b903d926","name":"fc3829ed-d50f-4828-b7d5-6804b903d926","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/c2b0e95f-3286-4a81-92c4-b93b7bba6611","name":"c2b0e95f-3286-4a81-92c4-b93b7bba6611","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/6c1dc4e0-e7d6-0327-1b55-50efea64e56d","name":"6c1dc4e0-e7d6-0327-1b55-50efea64e56d","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' headers: cache-control: - no-cache @@ -295,11 +295,11 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - '0' status: diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_definitions.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_definitions.yaml index 3cb7aa46fa22..dc9fe7ebfb05 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_definitions.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control.test_role_definitions.yaml @@ -11,9 +11,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: OK @@ -36,7 +36,7 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-server-latency: - '0' status: @@ -52,17 +52,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","name":"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/keys/backup/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Backup","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Encryption","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Release","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Backup User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Encryption User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Release User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Auditor","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/rng/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/export/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Officer","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/securitydomain/download/action","Microsoft.KeyVault/managedHsm/securitydomain/download/read","Microsoft.KeyVault/managedHsm/securitydomain/upload/action","Microsoft.KeyVault/managedHsm/securitydomain/upload/read","Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read","Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/restore/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/restore/status/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"}]}' @@ -70,7 +70,7 @@ interactions: cache-control: - no-cache content-length: - - '6590' + - '6648' content-security-policy: - default-src 'self' content-type: @@ -82,19 +82,19 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '1' + - '0' status: code: 200 message: OK - request: - body: '{"properties": {"roleName": "role-name626010ec", "permissions": [{"dataActions": - ["Microsoft.KeyVault/managedHsm/keys/read/action"]}], "description": "test"}}' + body: '{"properties": {"roleName": "role-name626010ec", "description": "test", + "permissions": [{"dataActions": ["Microsoft.KeyVault/managedHsm/keys/read/action"]}]}}' headers: Accept: - application/json @@ -107,9 +107,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.3-preview response: body: string: '{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"test","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"role-name626010ec","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}' @@ -131,15 +131,14 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '91' + - '57' status: code: 201 message: Created - request: - body: '{"properties": {"permissions": [{"notDataActions": ["Microsoft.KeyVault/managedHsm/keys/read/action"], - "dataActions": []}]}}' + body: '{"properties": {"permissions": [{"dataActions": [], "notDataActions": ["Microsoft.KeyVault/managedHsm/keys/read/action"]}]}}' headers: Accept: - application/json @@ -152,9 +151,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.3-preview response: body: string: '{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":[],"notActions":[],"notDataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"]}],"roleName":"","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}' @@ -176,9 +175,9 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '48' + - '56' status: code: 201 message: Created @@ -192,17 +191,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","name":"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/keys/backup/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Backup","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Encryption","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Release","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Backup User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Encryption User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Release User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Auditor","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/rng/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/export/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Officer","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/securitydomain/download/action","Microsoft.KeyVault/managedHsm/securitydomain/download/read","Microsoft.KeyVault/managedHsm/securitydomain/upload/action","Microsoft.KeyVault/managedHsm/securitydomain/upload/read","Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read","Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/restore/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/restore/status/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":[],"notActions":[],"notDataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"]}],"roleName":"","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}]}' @@ -210,7 +209,7 @@ interactions: cache-control: - no-cache content-length: - - '7023' + - '7081' content-security-policy: - default-src 'self' content-type: @@ -222,13 +221,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '0' + - '1' status: code: 200 message: OK @@ -242,9 +241,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.3-preview response: body: string: '{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":[],"notActions":[],"notDataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"]}],"roleName":"","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}' @@ -264,11 +263,11 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - '0' status: @@ -286,9 +285,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.3-preview response: body: string: '{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":[],"notActions":[],"notDataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"]}],"roleName":"","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}' @@ -310,9 +309,9 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - - '62' + - '54' status: code: 200 message: OK @@ -326,17 +325,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","name":"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/keys/backup/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Backup","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Encryption","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Release","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Backup User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Encryption User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Release User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Auditor","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/rng/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/export/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Officer","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/securitydomain/download/action","Microsoft.KeyVault/managedHsm/securitydomain/download/read","Microsoft.KeyVault/managedHsm/securitydomain/upload/action","Microsoft.KeyVault/managedHsm/securitydomain/upload/read","Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read","Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/restore/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/restore/status/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"}]}' @@ -344,7 +343,7 @@ interactions: cache-control: - no-cache content-length: - - '6590' + - '6648' content-security-policy: - default-src 'self' content-type: @@ -356,11 +355,11 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210407-3-27236ed1-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - northeurope + - westus x-ms-server-latency: - '0' status: diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_assignment.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_assignment.yaml index 53160ad65d9c..006223d51a36 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_assignment.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_assignment.yaml @@ -7,9 +7,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: OK @@ -23,48 +23,48 @@ interactions: resource="https://managedhsm.azure.net" x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-server-latency: '0' status: code: 401 message: Unauthorized - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","name":"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/keys/backup/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Backup","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Encryption","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Release","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Backup User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Encryption User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Release User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Auditor","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/rng/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/export/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Officer","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/securitydomain/download/action","Microsoft.KeyVault/managedHsm/securitydomain/download/read","Microsoft.KeyVault/managedHsm/securitydomain/upload/action","Microsoft.KeyVault/managedHsm/securitydomain/upload/read","Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read","Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/restore/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/restore/status/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"}]}' headers: cache-control: no-cache - content-length: '6590' + content-length: '6648' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope - x-ms-server-latency: '0' + x-ms-keyvault-region: westus + x-ms-server-latency: '1' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview - request: body: '{"properties": {"roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", "principalId": "service-principal-id"}}' @@ -76,9 +76,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.3-preview response: body: string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' @@ -91,21 +91,21 @@ interactions: x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope - x-ms-server-latency: '66' + x-ms-keyvault-region: westus + x-ms-server-latency: '67' status: code: 201 message: Created - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments/b3ddb676-ee5b-422f-b4cb-4b8db5b56e66?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments/574356ba-648b-4588-830b-bb70b53384b5?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.3-preview response: body: string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' @@ -117,26 +117,26 @@ interactions: strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope + x-ms-keyvault-region: westus x-ms-server-latency: '0' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments/b3ddb676-ee5b-422f-b4cb-4b8db5b56e66?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments/574356ba-648b-4588-830b-bb70b53384b5?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments?api-version=7.3-preview response: body: - string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/b80b0b44-26e7-434b-0f6a-fa2fd1b6413e","name":"b80b0b44-26e7-434b-0f6a-fa2fd1b6413e","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/7bde12dc-c0a5-4b95-ace3-aac71584f420","name":"7bde12dc-c0a5-4b95-ace3-aac71584f420","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/54d6a07b-8833-4af2-84c4-e196414a99db","name":"54d6a07b-8833-4af2-84c4-e196414a99db","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' + string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/fc3829ed-d50f-4828-b7d5-6804b903d926","name":"fc3829ed-d50f-4828-b7d5-6804b903d926","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/c2b0e95f-3286-4a81-92c4-b93b7bba6611","name":"c2b0e95f-3286-4a81-92c4-b93b7bba6611","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/6c1dc4e0-e7d6-0327-1b55-50efea64e56d","name":"6c1dc4e0-e7d6-0327-1b55-50efea64e56d","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' headers: cache-control: no-cache content-length: '1607' @@ -145,23 +145,23 @@ interactions: strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope + x-ms-keyvault-region: westus x-ms-server-latency: '0' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments/some-uuid?api-version=7.3-preview response: body: string: '{"id":"/providers/Microsoft.Authorization/roleAssignments/some-uuid","name":"some-uuid","properties":{"principalId":"service-principal-id","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}' @@ -174,24 +174,24 @@ interactions: x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope - x-ms-server-latency: '57' + x-ms-keyvault-region: westus + x-ms-server-latency: '49' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments/b3ddb676-ee5b-422f-b4cb-4b8db5b56e66?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments/574356ba-648b-4588-830b-bb70b53384b5?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleAssignments?api-version=7.3-preview response: body: - string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/b80b0b44-26e7-434b-0f6a-fa2fd1b6413e","name":"b80b0b44-26e7-434b-0f6a-fa2fd1b6413e","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/7bde12dc-c0a5-4b95-ace3-aac71584f420","name":"7bde12dc-c0a5-4b95-ace3-aac71584f420","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/54d6a07b-8833-4af2-84c4-e196414a99db","name":"54d6a07b-8833-4af2-84c4-e196414a99db","properties":{"principalId":"af925a48-c0cd-4c15-9130-359e357448eb","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' + string: '{"value":[{"id":"/providers/Microsoft.Authorization/roleAssignments/fc3829ed-d50f-4828-b7d5-6804b903d926","name":"fc3829ed-d50f-4828-b7d5-6804b903d926","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/c2b0e95f-3286-4a81-92c4-b93b7bba6611","name":"c2b0e95f-3286-4a81-92c4-b93b7bba6611","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"},{"id":"/providers/Microsoft.Authorization/roleAssignments/6c1dc4e0-e7d6-0327-1b55-50efea64e56d","name":"6c1dc4e0-e7d6-0327-1b55-50efea64e56d","properties":{"principalId":"9ef0e031-7cbd-4aab-9db7-33d56e7c0a4c","roleDefinitionId":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","scope":"/"},"type":"Microsoft.Authorization/roleAssignments"}]}' headers: cache-control: no-cache content-length: '1208' @@ -200,12 +200,12 @@ interactions: strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope + x-ms-keyvault-region: westus x-ms-server-latency: '0' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.3-preview version: 1 diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_definitions.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_definitions.yaml index 25aec681c879..27dc961af317 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_definitions.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_access_control_async.test_role_definitions.yaml @@ -7,9 +7,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: OK @@ -23,51 +23,51 @@ interactions: resource="https://managedhsm.azure.net" x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop - x-ms-server-latency: '0' + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop + x-ms-server-latency: '1' status: code: 401 message: Unauthorized - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","name":"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/keys/backup/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Backup","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Encryption","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Release","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Backup User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Encryption User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Release User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Auditor","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/rng/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/export/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Officer","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/securitydomain/download/action","Microsoft.KeyVault/managedHsm/securitydomain/download/read","Microsoft.KeyVault/managedHsm/securitydomain/upload/action","Microsoft.KeyVault/managedHsm/securitydomain/upload/read","Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read","Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/restore/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/restore/status/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"}]}' headers: cache-control: no-cache - content-length: '6590' + content-length: '6648' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope - x-ms-server-latency: '1' + x-ms-keyvault-region: westus + x-ms-server-latency: '0' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview - request: - body: '{"properties": {"roleName": "role-named15f1369", "permissions": [{"dataActions": - ["Microsoft.KeyVault/managedHsm/keys/read/action"]}], "description": "test"}}' + body: '{"properties": {"roleName": "role-named15f1369", "description": "test", + "permissions": [{"dataActions": ["Microsoft.KeyVault/managedHsm/keys/read/action"]}]}}' headers: Accept: - application/json @@ -76,9 +76,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.3-preview response: body: string: '{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"test","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"role-named15f1369","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}' @@ -91,15 +91,14 @@ interactions: x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope - x-ms-server-latency: '46' + x-ms-keyvault-region: westus + x-ms-server-latency: '35' status: code: 201 message: Created - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions/1b810a9d-3676-42f3-a28a-d0beeba4b213?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions/a44e0299-65df-437e-97eb-fd3e4f5b74e5?api-version=7.3-preview - request: - body: '{"properties": {"permissions": [{"notDataActions": ["Microsoft.KeyVault/managedHsm/keys/read/action"], - "dataActions": []}]}}' + body: '{"properties": {"permissions": [{"dataActions": [], "notDataActions": ["Microsoft.KeyVault/managedHsm/keys/read/action"]}]}}' headers: Accept: - application/json @@ -108,9 +107,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.3-preview response: body: string: '{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":[],"notActions":[],"notDataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"]}],"roleName":"","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}' @@ -123,57 +122,57 @@ interactions: x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope - x-ms-server-latency: '54' + x-ms-keyvault-region: westus + x-ms-server-latency: '60' status: code: 201 message: Created - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions/1b810a9d-3676-42f3-a28a-d0beeba4b213?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions/a44e0299-65df-437e-97eb-fd3e4f5b74e5?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","name":"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/keys/backup/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Backup","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Encryption","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Release","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Backup User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Encryption User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Release User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Auditor","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/rng/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/export/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Officer","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/securitydomain/download/action","Microsoft.KeyVault/managedHsm/securitydomain/download/read","Microsoft.KeyVault/managedHsm/securitydomain/upload/action","Microsoft.KeyVault/managedHsm/securitydomain/upload/read","Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read","Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/restore/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/restore/status/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":[],"notActions":[],"notDataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"]}],"roleName":"","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}]}' headers: cache-control: no-cache - content-length: '7023' + content-length: '7081' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope - x-ms-server-latency: '1' + x-ms-keyvault-region: westus + x-ms-server-latency: '0' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.3-preview response: body: string: '{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":[],"notActions":[],"notDataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"]}],"roleName":"","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}' @@ -185,23 +184,23 @@ interactions: strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope + x-ms-keyvault-region: westus x-ms-server-latency: '0' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions/1b810a9d-3676-42f3-a28a-d0beeba4b213?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions/a44e0299-65df-437e-97eb-fd3e4f5b74e5?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions/definition-name?api-version=7.3-preview response: body: string: '{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/definition-name","name":"definition-name","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":[],"notActions":[],"notDataActions":["Microsoft.KeyVault/managedHsm/keys/read/action"]}],"roleName":"","type":"CustomRole"},"type":"Microsoft.Authorization/roleDefinitions"}' @@ -214,46 +213,46 @@ interactions: x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope - x-ms-server-latency: '49' + x-ms-keyvault-region: westus + x-ms-server-latency: '37' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions/1b810a9d-3676-42f3-a28a-d0beeba4b213?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions/a44e0299-65df-437e-97eb-fd3e4f5b74e5?api-version=7.3-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + uri: https://managedhsm/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview response: body: string: '{"value":[{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","name":"7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/keys/backup/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Backup","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Encryption","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Crypto Service Release","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Backup User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17","name":"33413926-3206-4cdd-b39a-83574fe37a17","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Encryption User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625c","name":"21dbd100-6940-42c2-9190-5d6cb909625c","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/keys/release/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Crypto Service Release User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","name":"2c18b078-7c48-4d3a-af88-5a3a1b3f82b3","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Auditor","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4","name":"4bd23610-cdcf-4971-bdee-bdc562cc28e4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleAssignments/delete/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed - HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed + HSM Policy Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b","name":"21dbd100-6940-42c2-9190-5d6cb909625b","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/keys/read/action","Microsoft.KeyVault/managedHsm/keys/write/action","Microsoft.KeyVault/managedHsm/keys/delete","Microsoft.KeyVault/managedHsm/keys/create","Microsoft.KeyVault/managedHsm/keys/import/action","Microsoft.KeyVault/managedHsm/keys/release/action","Microsoft.KeyVault/managedHsm/keys/backup/action","Microsoft.KeyVault/managedHsm/keys/restore/action","Microsoft.KeyVault/managedHsm/keys/encrypt/action","Microsoft.KeyVault/managedHsm/keys/decrypt/action","Microsoft.KeyVault/managedHsm/keys/wrap/action","Microsoft.KeyVault/managedHsm/keys/unwrap/action","Microsoft.KeyVault/managedHsm/keys/sign/action","Microsoft.KeyVault/managedHsm/keys/verify/action","Microsoft.KeyVault/managedHsm/rng/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto User","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778","name":"515eb02d-2335-4d2d-92f2-b1cbdf9c3778","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action","Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete","Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action","Microsoft.KeyVault/managedHsm/keys/export/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Crypto Officer","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"},{"id":"Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4","name":"a290e904-7015-4bba-90c8-60543313cdb4","properties":{"assignableScopes":["/"],"description":"","permissions":[{"actions":[],"dataActions":["Microsoft.KeyVault/managedHsm/roleAssignments/delete/action","Microsoft.KeyVault/managedHsm/roleAssignments/read/action","Microsoft.KeyVault/managedHsm/roleAssignments/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/read/action","Microsoft.KeyVault/managedHsm/roleDefinitions/write/action","Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action","Microsoft.KeyVault/managedHsm/securitydomain/download/action","Microsoft.KeyVault/managedHsm/securitydomain/download/read","Microsoft.KeyVault/managedHsm/securitydomain/upload/action","Microsoft.KeyVault/managedHsm/securitydomain/upload/read","Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read","Microsoft.KeyVault/managedHsm/backup/start/action","Microsoft.KeyVault/managedHsm/restore/start/action","Microsoft.KeyVault/managedHsm/backup/status/action","Microsoft.KeyVault/managedHsm/restore/status/action"],"notActions":[],"notDataActions":[]}],"roleName":"Managed HSM Administrator","type":"AKVBuiltInRole"},"type":"Microsoft.Authorization/roleDefinitions"}]}' headers: cache-control: no-cache - content-length: '6590' + content-length: '6648' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210407-3-27236ed1-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: northeurope + x-ms-keyvault-region: westus x-ms-server-latency: '1' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.3-preview version: 1 diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client.test_full_backup_and_restore.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client.test_full_backup_and_restore.yaml index b93e5dff6319..fd25305031d2 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client.test_full_backup_and_restore.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client.test_full_backup_and_restore.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: string: '' @@ -38,12 +38,12 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-server-latency: - - '0' + - '1' status: code: 401 message: Unauthorized - request: - body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containerebkvpbdw6vhv6bv", + body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containerwty2n6ncthko2zi", "token": "redacted"}' headers: Accept: @@ -53,19 +53,19 @@ interactions: Connection: - keep-alive Content-Length: - - '235' + - '233' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: - string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1623795979,"endTime":null,"jobId":"19a636ea1cd04e73b872fcd250fed223","azureStorageBlobContainerUri":null}' + string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1629414019,"endTime":null,"jobId":"d5e3cbf6feea463ca2b85b6c9c9a1b1f","azureStorageBlobContainerUri":null}' headers: azure-asyncoperation: - - https://managedhsm/backup/19a636ea1cd04e73b872fcd250fed223/pending + - https://managedhsm/backup/d5e3cbf6feea463ca2b85b6c9c9a1b1f/pending cache-control: - no-cache content-length: @@ -75,7 +75,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 22:26:18 GMT + - Thu, 19 Aug 2021 23:00:18 GMT server: - Kestrel strict-transport-security: @@ -87,9 +87,9 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '3112' + - '1953' status: code: 202 message: '' @@ -103,12 +103,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/backup/19a636ea1cd04e73b872fcd250fed223/pending + uri: https://managedhsm/backup/d5e3cbf6feea463ca2b85b6c9c9a1b1f/pending response: body: - string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerebkvpbdw6vhv6bv/mhsm-mcpatinotesthsm-2021061522261918","endTime":1623795989,"error":null,"jobId":"19a636ea1cd04e73b872fcd250fed223","startTime":1623795979,"status":"Succeeded","statusDetails":null}' + string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerwty2n6ncthko2zi/mhsm-mcpatinotesthsm-2021081923001939","endTime":1629414027,"error":null,"jobId":"d5e3cbf6feea463ca2b85b6c9c9a1b1f","startTime":1629414019,"status":"Succeeded","statusDetails":null}' headers: cache-control: - no-cache @@ -119,7 +119,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 22:26:31 GMT + - Thu, 19 Aug 2021 23:00:30 GMT server: - Kestrel strict-transport-security: @@ -129,19 +129,19 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210520-1-d6634624-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '2436' + - '1822' status: code: 200 message: OK - request: - body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containerebkvpbdw6vhv6bv", - "token": "redacted"}, "folderToRestore": "mhsm-mcpatinotesthsm-2021061522261918"}' + body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containerwty2n6ncthko2zi", + "token": "redacted"}, "folderToRestore": "mhsm-mcpatinotesthsm-2021081923001939"}' headers: Accept: - application/json @@ -150,19 +150,19 @@ interactions: Connection: - keep-alive Content-Length: - - '319' + - '317' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/restore?api-version=7.2 + uri: https://managedhsm/restore?api-version=7.3-preview response: body: - string: '{"endTime":null,"error":null,"jobId":"a66229e63f5b4dc8864e224990a03f39","startTime":1623795994,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"7b31530810a44958ae8ee7b25d97eda2","startTime":1629414033,"status":"InProgress","statusDetails":null}' headers: azure-asyncoperation: - - https://managedhsm/restore/a66229e63f5b4dc8864e224990a03f39/pending + - https://managedhsm/restore/7b31530810a44958ae8ee7b25d97eda2/pending cache-control: - no-cache content-length: @@ -172,7 +172,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 22:26:34 GMT + - Thu, 19 Aug 2021 23:00:33 GMT server: - Kestrel strict-transport-security: @@ -184,9 +184,9 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '2762' + - '2731' status: code: 202 message: '' @@ -200,12 +200,104 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://managedhsm/restore/7b31530810a44958ae8ee7b25d97eda2/pending + response: + body: + string: '{"endTime":null,"error":null,"jobId":"7b31530810a44958ae8ee7b25d97eda2","startTime":1629414033,"status":"InProgress","statusDetails":null}' + headers: + cache-control: + - no-cache + content-length: + - '138' + content-security-policy: + - default-src 'self' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 19 Aug 2021 23:00:45 GMT + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-ms-build-version: + - 1.0.20210712-1-6ae2ae9e-develop + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: + - westus + x-ms-server-latency: + - '1768' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://managedhsm/restore/7b31530810a44958ae8ee7b25d97eda2/pending + response: + body: + string: '{"endTime":null,"error":null,"jobId":"7b31530810a44958ae8ee7b25d97eda2","startTime":1629414033,"status":"InProgress","statusDetails":null}' + headers: + cache-control: + - no-cache + content-length: + - '138' + content-security-policy: + - default-src 'self' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 19 Aug 2021 23:00:53 GMT + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-ms-build-version: + - 1.0.20210712-1-6ae2ae9e-develop + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: + - westus + x-ms-server-latency: + - '2262' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/a66229e63f5b4dc8864e224990a03f39/pending + uri: https://managedhsm/restore/7b31530810a44958ae8ee7b25d97eda2/pending response: body: - string: '{"endTime":null,"error":null,"jobId":"a66229e63f5b4dc8864e224990a03f39","startTime":1623795994,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"7b31530810a44958ae8ee7b25d97eda2","startTime":1629414033,"status":"InProgress","statusDetails":null}' headers: cache-control: - no-cache @@ -216,7 +308,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 22:26:46 GMT + - Thu, 19 Aug 2021 23:00:59 GMT server: - Kestrel strict-transport-security: @@ -226,13 +318,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210520-1-d6634624-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '2334' + - '1862' status: code: 200 message: OK @@ -246,12 +338,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/a66229e63f5b4dc8864e224990a03f39/pending + uri: https://managedhsm/restore/7b31530810a44958ae8ee7b25d97eda2/pending response: body: - string: '{"endTime":1623796011,"error":null,"jobId":"a66229e63f5b4dc8864e224990a03f39","startTime":1623795994,"status":"Succeeded","statusDetails":null}' + string: '{"endTime":1629414066,"error":null,"jobId":"7b31530810a44958ae8ee7b25d97eda2","startTime":1629414033,"status":"Succeeded","statusDetails":null}' headers: cache-control: - no-cache @@ -262,7 +354,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 22:26:54 GMT + - Thu, 19 Aug 2021 23:01:07 GMT server: - Kestrel strict-transport-security: @@ -272,13 +364,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210520-1-d6634624-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '2689' + - '1812' status: code: 200 message: OK diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client.test_selective_key_restore.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client.test_selective_key_restore.yaml index a465fa45dd81..3d83b16eb97f 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client.test_selective_key_restore.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client.test_selective_key_restore.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://managedhsm/keys/selective-restore-test-keya85a1290/create?api-version=7.3-preview response: @@ -38,7 +38,7 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-server-latency: - - '1' + - '0' status: code: 401 message: Unauthorized @@ -56,17 +56,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://managedhsm/keys/selective-restore-test-keya85a1290/create?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1625694978,"enabled":true,"exportable":false,"recoverableDays":90,"recoveryLevel":"Recoverable+Purgeable","updated":1625694978},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-keya85a1290/6eef0b1107700ad5274db9b04f0d40d1","kty":"RSA-HSM","n":"nWaMwiHqGjchzFJhEJ2OBh1rDVDBvX183EBdrmFY4-o9NuD9tyvOuTEHdgPHQW7_147Tw4h2oyxb7yF_OSloBCkQbJjRBSomeDGww6PpL6JohTUY1KQtNQNth9dBJnOTFuFM4ZFvUFiAP3PgxP09zHzuUAyJq-BtrRKzsJcSZui3RySOdZ3hWvFi5bsQjnD9YcTRfvCPoyTMnK9le0vcDGTV0Av1RT3PjQIh7g7ZmChclxw64DmRaZo-PY4qOpJQ_8835yKjMyyVVwyTbaqLepRxKOHts12835V8GZXgrfOGYweON6MKdLH1QXpgOFB8NsZ6CknD-pNeevEG-9dozQ"}}' + string: '{"attributes":{"created":1629414147,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1629414147},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-keya85a1290/6d966201987a4cf43257223feec78805","kty":"RSA-HSM","n":"3cBWeKRC9ANOVLMS_tKOLHpbwP-Q-RjG3p0N8wO3-CD3xdyUV3R6O5vS_IrTp3MmAq0bQod1r8AH-4vj1cU_rgxwwMD6y4aRQo9uRGWVUiAps1VGg7lt8OGsqj9z2gfaVOqJ9_Efxjjj6VMmamLVK7MoKt8IL98sXEeoTtyGH8dsFuZCIfwsUUGwnhqjx4OqtvXBv4YHXF4_Jrvhna5U5PuUxvC15uAfUuxs5C2JmamArBj6bwpsipCB_Ok1jprgBogJKON-b5VVktTfUHikoAFB8mwOBn5Ph7qojY2Ow-8nG7SGOTQd9B5xKWMx2I-I0gGKyyRmfDFKkLCU3Mto3Q"}}' headers: cache-control: - no-cache content-length: - - '733' + - '742' content-security-policy: - default-src 'self' content-type: @@ -82,7 +82,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '712' + - '214' status: code: 200 message: OK @@ -100,9 +100,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: string: '' @@ -130,7 +130,7 @@ interactions: code: 401 message: Unauthorized - request: - body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containerxc4galybzz67xti", + body: '{"storageResourceUri": "https://storname.blob.core.windows.net/container26up2h4osliwqwq", "token": "redacted"}' headers: Accept: @@ -144,15 +144,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: - string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1625694981,"endTime":null,"jobId":"df7cedb741334fb49c06442ee2246abd","azureStorageBlobContainerUri":null}' + string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1629414149,"endTime":null,"jobId":"79458d1abcc94d3881b4a8301ddf721c","azureStorageBlobContainerUri":null}' headers: azure-asyncoperation: - - https://managedhsm/backup/df7cedb741334fb49c06442ee2246abd/pending + - https://managedhsm/backup/79458d1abcc94d3881b4a8301ddf721c/pending cache-control: - no-cache content-length: @@ -162,7 +162,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 21:56:21 GMT + - Thu, 19 Aug 2021 23:02:29 GMT server: - Kestrel strict-transport-security: @@ -176,7 +176,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '2097' + - '1990' status: code: 202 message: '' @@ -190,12 +190,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/backup/df7cedb741334fb49c06442ee2246abd/pending + uri: https://managedhsm/backup/79458d1abcc94d3881b4a8301ddf721c/pending response: body: - string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerxc4galybzz67xti/mhsm-mcpatinotesthsm-2021070721562154","endTime":1625694989,"error":null,"jobId":"df7cedb741334fb49c06442ee2246abd","startTime":1625694981,"status":"Succeeded","statusDetails":null}' + string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/container26up2h4osliwqwq/mhsm-mcpatinotesthsm-2021081923022989","endTime":1629414157,"error":null,"jobId":"79458d1abcc94d3881b4a8301ddf721c","startTime":1629414149,"status":"Succeeded","statusDetails":null}' headers: cache-control: - no-cache @@ -206,7 +206,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 21:56:32 GMT + - Thu, 19 Aug 2021 23:02:41 GMT server: - Kestrel strict-transport-security: @@ -216,19 +216,19 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210605-1-ffd80f31-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - westus x-ms-server-latency: - - '1751' + - '1750' status: code: 200 message: OK - request: - body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containerxc4galybzz67xti", - "token": "redacted"}, "folder": "mhsm-mcpatinotesthsm-2021070721562154"}' + body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/container26up2h4osliwqwq", + "token": "redacted"}, "folder": "mhsm-mcpatinotesthsm-2021081923022989"}' headers: Accept: - application/json @@ -241,15 +241,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/keys/selective-restore-test-keya85a1290/restore?api-version=7.2 + uri: https://managedhsm/keys/selective-restore-test-keya85a1290/restore?api-version=7.3-preview response: body: - string: '{"endTime":null,"error":null,"jobId":"5d4b38736996422e84a9cb0269a1b0ba","startTime":1625694995,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"112f082ed9894458b21266d17a42d4ce","startTime":1629414163,"status":"InProgress","statusDetails":null}' headers: azure-asyncoperation: - - https://managedhsm/restore/5d4b38736996422e84a9cb0269a1b0ba/pending + - https://managedhsm/restore/112f082ed9894458b21266d17a42d4ce/pending cache-control: - no-cache content-length: @@ -259,7 +259,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 21:56:34 GMT + - Thu, 19 Aug 2021 23:02:43 GMT server: - Kestrel strict-transport-security: @@ -273,7 +273,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '1912' + - '1911' status: code: 202 message: '' @@ -287,12 +287,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/5d4b38736996422e84a9cb0269a1b0ba/pending + uri: https://managedhsm/restore/112f082ed9894458b21266d17a42d4ce/pending response: body: - string: '{"endTime":null,"error":null,"jobId":"5d4b38736996422e84a9cb0269a1b0ba","startTime":1625694995,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"112f082ed9894458b21266d17a42d4ce","startTime":1629414163,"status":"InProgress","statusDetails":null}' headers: cache-control: - no-cache @@ -303,7 +303,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 21:56:46 GMT + - Thu, 19 Aug 2021 23:02:55 GMT server: - Kestrel strict-transport-security: @@ -313,13 +313,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210605-1-ffd80f31-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - westus x-ms-server-latency: - - '1685' + - '1706' status: code: 200 message: OK @@ -333,12 +333,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/5d4b38736996422e84a9cb0269a1b0ba/pending + uri: https://managedhsm/restore/112f082ed9894458b21266d17a42d4ce/pending response: body: - string: '{"endTime":1625695010,"error":null,"jobId":"5d4b38736996422e84a9cb0269a1b0ba","startTime":1625694995,"status":"Succeeded","statusDetails":"Number + string: '{"endTime":1629414179,"error":null,"jobId":"112f082ed9894458b21266d17a42d4ce","startTime":1629414163,"status":"Succeeded","statusDetails":"Number of successful key versions restored: 0, Number of key versions could not overwrite: 2"}' headers: @@ -351,7 +351,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 21:56:52 GMT + - Thu, 19 Aug 2021 23:03:01 GMT server: - Kestrel strict-transport-security: @@ -361,13 +361,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210605-1-ffd80f31-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - westus x-ms-server-latency: - - '1678' + - '1785' status: code: 200 message: OK @@ -383,17 +383,56 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://managedhsm/keys/selective-restore-test-keya85a1290?api-version=7.3-preview + response: + body: + string: '{"error":{"code":"Conflict","message":"User triggered Restore operation + is in progress. Retry after the restore operation (Activity ID: 9aec0070-0141-11ec-a114-00224806f988)"}}' + headers: + cache-control: + - no-cache + content-length: + - '176' + content-security-policy: + - default-src 'self' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-ms-server-latency: + - '0' + status: + code: 409 + message: '' +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE uri: https://managedhsm/keys/selective-restore-test-keya85a1290?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1625694978,"enabled":true,"exportable":false,"recoverableDays":90,"recoveryLevel":"Recoverable+Purgeable","updated":1625694978},"deletedDate":1625695014,"key":{"e":"AQAB","key_ops":["wrapKey","encrypt","decrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-keya85a1290/6eef0b1107700ad5274db9b04f0d40d1","kty":"RSA-HSM","n":"nWaMwiHqGjchzFJhEJ2OBh1rDVDBvX183EBdrmFY4-o9NuD9tyvOuTEHdgPHQW7_147Tw4h2oyxb7yF_OSloBCkQbJjRBSomeDGww6PpL6JohTUY1KQtNQNth9dBJnOTFuFM4ZFvUFiAP3PgxP09zHzuUAyJq-BtrRKzsJcSZui3RySOdZ3hWvFi5bsQjnD9YcTRfvCPoyTMnK9le0vcDGTV0Av1RT3PjQIh7g7ZmChclxw64DmRaZo-PY4qOpJQ_8835yKjMyyVVwyTbaqLepRxKOHts12835V8GZXgrfOGYweON6MKdLH1QXpgOFB8NsZ6CknD-pNeevEG-9dozQ"},"recoveryId":"https://managedhsm/deletedkeys/selective-restore-test-keya85a1290","scheduledPurgeDate":1633471014}' + string: '{"attributes":{"created":1629414147,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1629414147},"deletedDate":1629414185,"key":{"e":"AQAB","key_ops":["wrapKey","encrypt","decrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-keya85a1290/6d966201987a4cf43257223feec78805","kty":"RSA-HSM","n":"3cBWeKRC9ANOVLMS_tKOLHpbwP-Q-RjG3p0N8wO3-CD3xdyUV3R6O5vS_IrTp3MmAq0bQod1r8AH-4vj1cU_rgxwwMD6y4aRQo9uRGWVUiAps1VGg7lt8OGsqj9z2gfaVOqJ9_Efxjjj6VMmamLVK7MoKt8IL98sXEeoTtyGH8dsFuZCIfwsUUGwnhqjx4OqtvXBv4YHXF4_Jrvhna5U5PuUxvC15uAfUuxs5C2JmamArBj6bwpsipCB_Ok1jprgBogJKON-b5VVktTfUHikoAFB8mwOBn5Ph7qojY2Ow-8nG7SGOTQd9B5xKWMx2I-I0gGKyyRmfDFKkLCU3Mto3Q"},"recoveryId":"https://managedhsm/deletedkeys/selective-restore-test-keya85a1290","scheduledPurgeDate":1630018985}' headers: cache-control: - no-cache content-length: - - '897' + - '906' content-security-policy: - default-src 'self' content-type: @@ -409,7 +448,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '160' + - '166' status: code: 200 message: OK @@ -423,17 +462,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET uri: https://managedhsm/deletedkeys/selective-restore-test-keya85a1290?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1625694978,"enabled":true,"exportable":false,"recoverableDays":90,"recoveryLevel":"Recoverable+Purgeable","updated":1625694978},"deletedDate":1625695014,"key":{"e":"AQAB","key_ops":["verify","sign","unwrapKey","encrypt","decrypt","wrapKey"],"kid":"https://managedhsm/keys/selective-restore-test-keya85a1290/6eef0b1107700ad5274db9b04f0d40d1","kty":"RSA-HSM","n":"nWaMwiHqGjchzFJhEJ2OBh1rDVDBvX183EBdrmFY4-o9NuD9tyvOuTEHdgPHQW7_147Tw4h2oyxb7yF_OSloBCkQbJjRBSomeDGww6PpL6JohTUY1KQtNQNth9dBJnOTFuFM4ZFvUFiAP3PgxP09zHzuUAyJq-BtrRKzsJcSZui3RySOdZ3hWvFi5bsQjnD9YcTRfvCPoyTMnK9le0vcDGTV0Av1RT3PjQIh7g7ZmChclxw64DmRaZo-PY4qOpJQ_8835yKjMyyVVwyTbaqLepRxKOHts12835V8GZXgrfOGYweON6MKdLH1QXpgOFB8NsZ6CknD-pNeevEG-9dozQ"},"recoveryId":"https://managedhsm/deletedkeys/selective-restore-test-keya85a1290","scheduledPurgeDate":1633471014}' + string: '{"attributes":{"created":1629414147,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1629414147},"deletedDate":1629414185,"key":{"e":"AQAB","key_ops":["verify","sign","unwrapKey","encrypt","decrypt","wrapKey"],"kid":"https://managedhsm/keys/selective-restore-test-keya85a1290/6d966201987a4cf43257223feec78805","kty":"RSA-HSM","n":"3cBWeKRC9ANOVLMS_tKOLHpbwP-Q-RjG3p0N8wO3-CD3xdyUV3R6O5vS_IrTp3MmAq0bQod1r8AH-4vj1cU_rgxwwMD6y4aRQo9uRGWVUiAps1VGg7lt8OGsqj9z2gfaVOqJ9_Efxjjj6VMmamLVK7MoKt8IL98sXEeoTtyGH8dsFuZCIfwsUUGwnhqjx4OqtvXBv4YHXF4_Jrvhna5U5PuUxvC15uAfUuxs5C2JmamArBj6bwpsipCB_Ok1jprgBogJKON-b5VVktTfUHikoAFB8mwOBn5Ph7qojY2Ow-8nG7SGOTQd9B5xKWMx2I-I0gGKyyRmfDFKkLCU3Mto3Q"},"recoveryId":"https://managedhsm/deletedkeys/selective-restore-test-keya85a1290","scheduledPurgeDate":1630018985}' headers: cache-control: - no-cache content-length: - - '897' + - '906' content-security-policy: - default-src 'self' content-type: @@ -445,13 +484,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210605-1-ffd80f31-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - westus x-ms-server-latency: - - '34' + - '32' status: code: 200 message: OK @@ -467,7 +506,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE uri: https://managedhsm/deletedkeys/selective-restore-test-keya85a1290?api-version=7.3-preview response: @@ -493,7 +532,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '107' + - '97' status: code: 204 message: '' diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client_async.test_full_backup_and_restore.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client_async.test_full_backup_and_restore.yaml index 6dcf5ba873e7..4b73f67628c6 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client_async.test_full_backup_and_restore.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client_async.test_full_backup_and_restore.yaml @@ -9,9 +9,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: string: '' @@ -29,159 +29,159 @@ interactions: status: code: 401 message: Unauthorized - url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.3-preview - request: - body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containerwt3qjyb4eluro3w", + body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containernd7ravf72lgrheo", "token": "redacted"}' headers: Accept: - application/json Content-Length: - - '233' + - '235' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: - string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1623796131,"endTime":null,"jobId":"47fa9b06eeca494d901a9768bc4ecb15","azureStorageBlobContainerUri":null}' + string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1629414301,"endTime":null,"jobId":"f9333235639440ffb6e297d8e702eeef","azureStorageBlobContainerUri":null}' headers: - azure-asyncoperation: https://managedhsm/backup/47fa9b06eeca494d901a9768bc4ecb15/pending + azure-asyncoperation: https://managedhsm/backup/f9333235639440ffb6e297d8e702eeef/pending cache-control: no-cache content-length: '174' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 22:28:50 GMT + date: Thu, 19 Aug 2021 23:05:01 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2503' + x-ms-keyvault-region: westus + x-ms-server-latency: '2100' status: code: 202 message: '' - url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.3-preview - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/backup/47fa9b06eeca494d901a9768bc4ecb15/pending + uri: https://managedhsm/backup/f9333235639440ffb6e297d8e702eeef/pending response: body: - string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerwt3qjyb4eluro3w/mhsm-mcpatinotesthsm-2021061522285112","endTime":1623796140,"error":null,"jobId":"47fa9b06eeca494d901a9768bc4ecb15","startTime":1623796131,"status":"Succeeded","statusDetails":null}' + string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containernd7ravf72lgrheo/mhsm-mcpatinotesthsm-2021081923050180","endTime":1629414309,"error":null,"jobId":"f9333235639440ffb6e297d8e702eeef","startTime":1629414301,"status":"Succeeded","statusDetails":null}' headers: cache-control: no-cache content-length: '294' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 22:29:03 GMT + date: Thu, 19 Aug 2021 23:05:13 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210520-1-d6634624-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2158' + x-ms-keyvault-region: westus + x-ms-server-latency: '1839' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/backup/47fa9b06eeca494d901a9768bc4ecb15/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/backup/f9333235639440ffb6e297d8e702eeef/pending - request: - body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containerwt3qjyb4eluro3w", - "token": "redacted"}, "folderToRestore": "mhsm-mcpatinotesthsm-2021061522285112"}' + body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containernd7ravf72lgrheo", + "token": "redacted"}, "folderToRestore": "mhsm-mcpatinotesthsm-2021081923050180"}' headers: Accept: - application/json Content-Length: - - '317' + - '319' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/restore?api-version=7.2 + uri: https://managedhsm/restore?api-version=7.3-preview response: body: - string: '{"endTime":null,"error":null,"jobId":"ddd5713e65594a7da0f01a23de7216b2","startTime":1623796145,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"96b140986aa54c25b853ab69ea06dbb3","startTime":1629414315,"status":"InProgress","statusDetails":null}' headers: - azure-asyncoperation: https://managedhsm/restore/ddd5713e65594a7da0f01a23de7216b2/pending + azure-asyncoperation: https://managedhsm/restore/96b140986aa54c25b853ab69ea06dbb3/pending cache-control: no-cache content-length: '138' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 22:29:05 GMT + date: Thu, 19 Aug 2021 23:05:14 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2440' + x-ms-keyvault-region: westus + x-ms-server-latency: '2039' status: code: 202 message: '' - url: https://mcpatinotesthsm.managedhsm.azure.net/restore?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/restore?api-version=7.3-preview - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/ddd5713e65594a7da0f01a23de7216b2/pending + uri: https://managedhsm/restore/96b140986aa54c25b853ab69ea06dbb3/pending response: body: - string: '{"endTime":null,"error":null,"jobId":"ddd5713e65594a7da0f01a23de7216b2","startTime":1623796145,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"96b140986aa54c25b853ab69ea06dbb3","startTime":1629414315,"status":"InProgress","statusDetails":null}' headers: cache-control: no-cache content-length: '138' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 22:29:17 GMT + date: Thu, 19 Aug 2021 23:05:27 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210520-1-d6634624-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2234' + x-ms-keyvault-region: westus + x-ms-server-latency: '1739' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/restore/ddd5713e65594a7da0f01a23de7216b2/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/restore/96b140986aa54c25b853ab69ea06dbb3/pending - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/ddd5713e65594a7da0f01a23de7216b2/pending + uri: https://managedhsm/restore/96b140986aa54c25b853ab69ea06dbb3/pending response: body: - string: '{"endTime":1623796163,"error":null,"jobId":"ddd5713e65594a7da0f01a23de7216b2","startTime":1623796145,"status":"Succeeded","statusDetails":null}' + string: '{"endTime":1629414331,"error":null,"jobId":"96b140986aa54c25b853ab69ea06dbb3","startTime":1629414315,"status":"Succeeded","statusDetails":null}' headers: cache-control: no-cache content-length: '143' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 22:29:25 GMT + date: Thu, 19 Aug 2021 23:05:35 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210520-1-d6634624-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2448' + x-ms-keyvault-region: westus + x-ms-server-latency: '2744' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/restore/ddd5713e65594a7da0f01a23de7216b2/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/restore/96b140986aa54c25b853ab69ea06dbb3/pending version: 1 diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client_async.test_selective_key_restore.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client_async.test_selective_key_restore.yaml index 4760b400e5bb..2406dc34ade3 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client_async.test_selective_key_restore.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_backup_client_async.test_selective_key_restore.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://managedhsm/keys/selective-restore-test-key20e5150d/create?api-version=7.3-preview response: @@ -25,7 +25,7 @@ interactions: resource="https://managedhsm.azure.net" x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-server-latency: '1' + x-ms-server-latency: '0' status: code: 401 message: Unauthorized @@ -40,15 +40,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://managedhsm/keys/selective-restore-test-key20e5150d/create?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1625695065,"enabled":true,"exportable":false,"recoverableDays":90,"recoveryLevel":"Recoverable+Purgeable","updated":1625695065},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-key20e5150d/7ced054c63e508d43eb741d81a13ac56","kty":"RSA-HSM","n":"wbjS82bccP_ogiOpb--PiWffG686WBZUT7pM95teMoXK-IT4Y-ukDBwSLX0DYmqHpFbqPxw9_sywYxdjkWpwAMS-4__2XhrhAQDFzWG8nxJdcKS7Vw-ro7-qbpR3FXFTGcruhmrVezrPqNSJfeUt9Dcqm3rYg3GlqeuI48kSXSMdnYdqtUR6yR0NlaMWJnKEGKQNK4XvUkfrLRf3XlazSCmiqofWyBAEFm7IWCivEYmW8qhVGmfb_4gl_hQwSppOKRUiQczWUn6u3Y8KMG5t_4s17TLppi6xBtP_cIxLlptiLtGKPTtfhfLoCl_T7Rbsoyh9JzvLOJI-Y6CDyV59lQ"}}' + string: '{"attributes":{"created":1629414444,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1629414444},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-key20e5150d/9f0cd5a79fa74e0b21a01883881edfe4","kty":"RSA-HSM","n":"muVbim-cu1RPqX3Duqx-se1wzedU2qmg2F2jqo-uAIfH8w_O75cl7GfRFltVg7RxxcEeyUKaT1DltMUg_wgm2P8yfrWykZUJOMEHG_Hv1_gI-BqzGexofkBYRbe9fC1lUM-WHd698JrL0-7843FZgRwsl6rIBN8S6N9JpKWKjmEfwMbyIVWT8yrr6qWsR01exP20cchAF0zQnuPDJSjzvMY2s99cMqmVFej5T-XaqmefFjjUJNdFFNttOnbkOdmRPrVEVakNZD21rgkSH_e0emlut1MMVvf6N2uJCrM0ED2LTiJoMHOUjJAoUcdliylluT9EhRQ3I4ulvTsk7uR0Cw"}}' headers: cache-control: no-cache - content-length: '733' + content-length: '742' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains @@ -56,7 +56,7 @@ interactions: x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '264' + x-ms-server-latency: '1008' status: code: 200 message: OK @@ -71,9 +71,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: string: '' @@ -91,9 +91,9 @@ interactions: status: code: 401 message: Unauthorized - url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.3-preview - request: - body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containertess2vef4z6mmq4", + body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containert7s2jzifjb3j73x", "token": "redacted"}' headers: Accept: @@ -103,61 +103,61 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: - string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1625695068,"endTime":null,"jobId":"c0d9df1392704400b95e377bc2de7fa0","azureStorageBlobContainerUri":null}' + string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1629414448,"endTime":null,"jobId":"e6b9f8c524404bedaca8d068ff750f26","azureStorageBlobContainerUri":null}' headers: - azure-asyncoperation: https://managedhsm/backup/c0d9df1392704400b95e377bc2de7fa0/pending + azure-asyncoperation: https://managedhsm/backup/e6b9f8c524404bedaca8d068ff750f26/pending cache-control: no-cache content-length: '174' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 21:57:48 GMT + date: Thu, 19 Aug 2021 23:07:27 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '1937' + x-ms-server-latency: '2054' status: code: 202 message: '' - url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.3-preview - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/backup/c0d9df1392704400b95e377bc2de7fa0/pending + uri: https://managedhsm/backup/e6b9f8c524404bedaca8d068ff750f26/pending response: body: - string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containertess2vef4z6mmq4/mhsm-mcpatinotesthsm-2021070721574869","endTime":1625695077,"error":null,"jobId":"c0d9df1392704400b95e377bc2de7fa0","startTime":1625695068,"status":"Succeeded","statusDetails":null}' + string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containert7s2jzifjb3j73x/mhsm-mcpatinotesthsm-2021081923072811","endTime":1629414456,"error":null,"jobId":"e6b9f8c524404bedaca8d068ff750f26","startTime":1629414448,"status":"Succeeded","statusDetails":null}' headers: cache-control: no-cache content-length: '294' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 21:58:00 GMT + date: Thu, 19 Aug 2021 23:07:39 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210605-1-ffd80f31-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '2242' + x-ms-server-latency: '1850' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/backup/c0d9df1392704400b95e377bc2de7fa0/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/backup/e6b9f8c524404bedaca8d068ff750f26/pending - request: - body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containertess2vef4z6mmq4", - "token": "redacted"}, "folder": "mhsm-mcpatinotesthsm-2021070721574869"}' + body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containert7s2jzifjb3j73x", + "token": "redacted"}, "folder": "mhsm-mcpatinotesthsm-2021081923072811"}' headers: Accept: - application/json @@ -166,68 +166,40 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/keys/selective-restore-test-key20e5150d/restore?api-version=7.2 + uri: https://managedhsm/keys/selective-restore-test-key20e5150d/restore?api-version=7.3-preview response: body: - string: '{"endTime":null,"error":null,"jobId":"ed500d55f77242e181b6ebfdd0d78b68","startTime":1625695083,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"cdd0a70ccda04f609f10067e795471ac","startTime":1629414461,"status":"InProgress","statusDetails":null}' headers: - azure-asyncoperation: https://managedhsm/restore/ed500d55f77242e181b6ebfdd0d78b68/pending + azure-asyncoperation: https://managedhsm/restore/cdd0a70ccda04f609f10067e795471ac/pending cache-control: no-cache content-length: '138' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 21:58:02 GMT + date: Thu, 19 Aug 2021 23:07:41 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '2039' + x-ms-server-latency: '1938' status: code: 202 message: '' - url: https://mcpatinotesthsm.managedhsm.azure.net/keys/selective-restore-test-key20e5150d/restore?api-version=7.2 -- request: - body: null - headers: - User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://managedhsm/restore/ed500d55f77242e181b6ebfdd0d78b68/pending - response: - body: - string: '{"endTime":null,"error":null,"jobId":"ed500d55f77242e181b6ebfdd0d78b68","startTime":1625695083,"status":"InProgress","statusDetails":null}' - headers: - cache-control: no-cache - content-length: '138' - content-security-policy: default-src 'self' - content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 21:58:14 GMT - server: Kestrel - strict-transport-security: max-age=31536000; includeSubDomains - x-content-type-options: nosniff - x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210605-1-ffd80f31-develop - x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: westus - x-ms-server-latency: '1785' - status: - code: 200 - message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/restore/ed500d55f77242e181b6ebfdd0d78b68/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/keys/selective-restore-test-key20e5150d/restore?api-version=7.3-preview - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/ed500d55f77242e181b6ebfdd0d78b68/pending + uri: https://managedhsm/restore/cdd0a70ccda04f609f10067e795471ac/pending response: body: - string: '{"endTime":1625695098,"error":null,"jobId":"ed500d55f77242e181b6ebfdd0d78b68","startTime":1625695083,"status":"Succeeded","statusDetails":"Number + string: '{"endTime":1629414473,"error":null,"jobId":"cdd0a70ccda04f609f10067e795471ac","startTime":1629414461,"status":"Succeeded","statusDetails":"Number of successful key versions restored: 0, Number of key versions could not overwrite: 2"}' headers: @@ -235,32 +207,32 @@ interactions: content-length: '233' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 21:58:21 GMT + date: Thu, 19 Aug 2021 23:07:53 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210605-1-ffd80f31-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '1678' + x-ms-server-latency: '2163' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/restore/ed500d55f77242e181b6ebfdd0d78b68/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/restore/cdd0a70ccda04f609f10067e795471ac/pending - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE uri: https://managedhsm/keys/selective-restore-test-key20e5150d?api-version=7.3-preview response: body: string: '{"error":{"code":"Conflict","message":"User triggered Restore operation - is in progress. Retry after the restore operation (Activity ID: 722927e8-df6e-11eb-abc8-000d3a30fa9f)"}}' + is in progress. Retry after the restore operation (Activity ID: 48fddaf8-0142-11ec-959f-00224806f988)"}}' headers: cache-control: no-cache content-length: '176' @@ -280,15 +252,15 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE uri: https://managedhsm/keys/selective-restore-test-key20e5150d?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1625695065,"enabled":true,"exportable":false,"recoverableDays":90,"recoveryLevel":"Recoverable+Purgeable","updated":1625695065},"deletedDate":1625695105,"key":{"e":"AQAB","key_ops":["wrapKey","encrypt","decrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-key20e5150d/7ced054c63e508d43eb741d81a13ac56","kty":"RSA-HSM","n":"wbjS82bccP_ogiOpb--PiWffG686WBZUT7pM95teMoXK-IT4Y-ukDBwSLX0DYmqHpFbqPxw9_sywYxdjkWpwAMS-4__2XhrhAQDFzWG8nxJdcKS7Vw-ro7-qbpR3FXFTGcruhmrVezrPqNSJfeUt9Dcqm3rYg3GlqeuI48kSXSMdnYdqtUR6yR0NlaMWJnKEGKQNK4XvUkfrLRf3XlazSCmiqofWyBAEFm7IWCivEYmW8qhVGmfb_4gl_hQwSppOKRUiQczWUn6u3Y8KMG5t_4s17TLppi6xBtP_cIxLlptiLtGKPTtfhfLoCl_T7Rbsoyh9JzvLOJI-Y6CDyV59lQ"},"recoveryId":"https://managedhsm/deletedkeys/selective-restore-test-key20e5150d","scheduledPurgeDate":1633471105}' + string: '{"attributes":{"created":1629414444,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1629414444},"deletedDate":1629414477,"key":{"e":"AQAB","key_ops":["wrapKey","encrypt","decrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-key20e5150d/9f0cd5a79fa74e0b21a01883881edfe4","kty":"RSA-HSM","n":"muVbim-cu1RPqX3Duqx-se1wzedU2qmg2F2jqo-uAIfH8w_O75cl7GfRFltVg7RxxcEeyUKaT1DltMUg_wgm2P8yfrWykZUJOMEHG_Hv1_gI-BqzGexofkBYRbe9fC1lUM-WHd698JrL0-7843FZgRwsl6rIBN8S6N9JpKWKjmEfwMbyIVWT8yrr6qWsR01exP20cchAF0zQnuPDJSjzvMY2s99cMqmVFej5T-XaqmefFjjUJNdFFNttOnbkOdmRPrVEVakNZD21rgkSH_e0emlut1MMVvf6N2uJCrM0ED2LTiJoMHOUjJAoUcdliylluT9EhRQ3I4ulvTsk7uR0Cw"},"recoveryId":"https://managedhsm/deletedkeys/selective-restore-test-key20e5150d","scheduledPurgeDate":1630019277}' headers: cache-control: no-cache - content-length: '897' + content-length: '906' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains @@ -296,7 +268,7 @@ interactions: x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '193' + x-ms-server-latency: '192' status: code: 200 message: OK @@ -307,24 +279,24 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET uri: https://managedhsm/deletedkeys/selective-restore-test-key20e5150d?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1625695065,"enabled":true,"exportable":false,"recoverableDays":90,"recoveryLevel":"Recoverable+Purgeable","updated":1625695065},"deletedDate":1625695105,"key":{"e":"AQAB","key_ops":["verify","sign","unwrapKey","encrypt","decrypt","wrapKey"],"kid":"https://managedhsm/keys/selective-restore-test-key20e5150d/7ced054c63e508d43eb741d81a13ac56","kty":"RSA-HSM","n":"wbjS82bccP_ogiOpb--PiWffG686WBZUT7pM95teMoXK-IT4Y-ukDBwSLX0DYmqHpFbqPxw9_sywYxdjkWpwAMS-4__2XhrhAQDFzWG8nxJdcKS7Vw-ro7-qbpR3FXFTGcruhmrVezrPqNSJfeUt9Dcqm3rYg3GlqeuI48kSXSMdnYdqtUR6yR0NlaMWJnKEGKQNK4XvUkfrLRf3XlazSCmiqofWyBAEFm7IWCivEYmW8qhVGmfb_4gl_hQwSppOKRUiQczWUn6u3Y8KMG5t_4s17TLppi6xBtP_cIxLlptiLtGKPTtfhfLoCl_T7Rbsoyh9JzvLOJI-Y6CDyV59lQ"},"recoveryId":"https://managedhsm/deletedkeys/selective-restore-test-key20e5150d","scheduledPurgeDate":1633471105}' + string: '{"attributes":{"created":1629414444,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1629414444},"deletedDate":1629414477,"key":{"e":"AQAB","key_ops":["verify","sign","unwrapKey","encrypt","decrypt","wrapKey"],"kid":"https://managedhsm/keys/selective-restore-test-key20e5150d/9f0cd5a79fa74e0b21a01883881edfe4","kty":"RSA-HSM","n":"muVbim-cu1RPqX3Duqx-se1wzedU2qmg2F2jqo-uAIfH8w_O75cl7GfRFltVg7RxxcEeyUKaT1DltMUg_wgm2P8yfrWykZUJOMEHG_Hv1_gI-BqzGexofkBYRbe9fC1lUM-WHd698JrL0-7843FZgRwsl6rIBN8S6N9JpKWKjmEfwMbyIVWT8yrr6qWsR01exP20cchAF0zQnuPDJSjzvMY2s99cMqmVFej5T-XaqmefFjjUJNdFFNttOnbkOdmRPrVEVakNZD21rgkSH_e0emlut1MMVvf6N2uJCrM0ED2LTiJoMHOUjJAoUcdliylluT9EhRQ3I4ulvTsk7uR0Cw"},"recoveryId":"https://managedhsm/deletedkeys/selective-restore-test-key20e5150d","scheduledPurgeDate":1630019277}' headers: cache-control: no-cache - content-length: '897' + content-length: '906' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210605-1-ffd80f31-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '38' + x-ms-server-latency: '32' status: code: 200 message: OK @@ -335,7 +307,7 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE uri: https://managedhsm/deletedkeys/selective-restore-test-key20e5150d?api-version=7.3-preview response: @@ -351,7 +323,7 @@ interactions: x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '112' + x-ms-server-latency: '143' status: code: 204 message: '' diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration.test_example_backup_and_restore.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration.test_example_backup_and_restore.yaml index 468f1a40c990..e8e778c7fc24 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration.test_example_backup_and_restore.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration.test_example_backup_and_restore.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: string: '' @@ -43,7 +43,8 @@ interactions: code: 401 message: Unauthorized - request: - body: '{"token": "redacted", "storageResourceUri": "https://storname.blob.core.windows.net/containerwex63hmamrkpesm"}' + body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containerpekthqsz4pl7m6m", + "token": "redacted"}' headers: Accept: - application/json @@ -52,19 +53,19 @@ interactions: Connection: - keep-alive Content-Length: - - '235' + - '233' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: - string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1623789423,"endTime":null,"jobId":"bb817c41fcea4e0dafc2bf1fa3e059c0","azureStorageBlobContainerUri":null}' + string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1629414756,"endTime":null,"jobId":"2f4bff5f589643d1b923b338ee02b300","azureStorageBlobContainerUri":null}' headers: azure-asyncoperation: - - https://managedhsm/backup/bb817c41fcea4e0dafc2bf1fa3e059c0/pending + - https://managedhsm/backup/2f4bff5f589643d1b923b338ee02b300/pending cache-control: - no-cache content-length: @@ -74,7 +75,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 20:37:03 GMT + - Thu, 19 Aug 2021 23:12:36 GMT server: - Kestrel strict-transport-security: @@ -86,9 +87,9 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '2542' + - '2323' status: code: 202 message: '' @@ -102,12 +103,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/backup/bb817c41fcea4e0dafc2bf1fa3e059c0/pending + uri: https://managedhsm/backup/2f4bff5f589643d1b923b338ee02b300/pending response: body: - string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerwex63hmamrkpesm/mhsm-mcpatinotesthsm-2021061520370374","endTime":1623789433,"error":null,"jobId":"bb817c41fcea4e0dafc2bf1fa3e059c0","startTime":1623789423,"status":"Succeeded","statusDetails":null}' + string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerpekthqsz4pl7m6m/mhsm-mcpatinotesthsm-2021081923123671","endTime":1629414764,"error":null,"jobId":"2f4bff5f589643d1b923b338ee02b300","startTime":1629414756,"status":"Succeeded","statusDetails":null}' headers: cache-control: - no-cache @@ -118,7 +119,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 20:37:15 GMT + - Thu, 19 Aug 2021 23:12:48 GMT server: - Kestrel strict-transport-security: @@ -128,19 +129,19 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210520-1-d6634624-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '2348' + - '1701' status: code: 200 message: OK - request: - body: '{"sasTokenParameters": {"token": "redacted", "storageResourceUri": "https://storname.blob.core.windows.net/containerwex63hmamrkpesm"}, - "folderToRestore": "mhsm-mcpatinotesthsm-2021061520370374"}' + body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containerpekthqsz4pl7m6m", + "token": "redacted"}, "folderToRestore": "mhsm-mcpatinotesthsm-2021081923123671"}' headers: Accept: - application/json @@ -149,19 +150,19 @@ interactions: Connection: - keep-alive Content-Length: - - '319' + - '317' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/restore?api-version=7.2 + uri: https://managedhsm/restore?api-version=7.3-preview response: body: - string: '{"endTime":null,"error":null,"jobId":"d085c52857d54d90b3c216b8d20355ca","startTime":1623789438,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"b92c0a3ac40449bba50225b08c896ae3","startTime":1629414770,"status":"InProgress","statusDetails":null}' headers: azure-asyncoperation: - - https://managedhsm/restore/d085c52857d54d90b3c216b8d20355ca/pending + - https://managedhsm/restore/b92c0a3ac40449bba50225b08c896ae3/pending cache-control: - no-cache content-length: @@ -171,7 +172,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 20:37:18 GMT + - Thu, 19 Aug 2021 23:12:50 GMT server: - Kestrel strict-transport-security: @@ -183,9 +184,9 @@ interactions: x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '2508' + - '1964' status: code: 202 message: '' @@ -199,58 +200,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/d085c52857d54d90b3c216b8d20355ca/pending + uri: https://managedhsm/restore/b92c0a3ac40449bba50225b08c896ae3/pending response: body: - string: '{"endTime":null,"error":null,"jobId":"d085c52857d54d90b3c216b8d20355ca","startTime":1623789438,"status":"InProgress","statusDetails":null}' - headers: - cache-control: - - no-cache - content-length: - - '138' - content-security-policy: - - default-src 'self' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 15 Jun 2021 20:37:30 GMT - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-frame-options: - - SAMEORIGIN - x-ms-build-version: - - 1.0.20210520-1-d6634624-develop - x-ms-keyvault-network-info: - - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: - - canadacentral - x-ms-server-latency: - - '2349' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://managedhsm/restore/d085c52857d54d90b3c216b8d20355ca/pending - response: - body: - string: '{"endTime":1623789455,"error":null,"jobId":"d085c52857d54d90b3c216b8d20355ca","startTime":1623789438,"status":"Succeeded","statusDetails":null}' + string: '{"endTime":1629414781,"error":null,"jobId":"b92c0a3ac40449bba50225b08c896ae3","startTime":1629414770,"status":"Succeeded","statusDetails":null}' headers: cache-control: - no-cache @@ -261,7 +216,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 15 Jun 2021 20:37:38 GMT + - Thu, 19 Aug 2021 23:13:01 GMT server: - Kestrel strict-transport-security: @@ -271,13 +226,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210520-1-d6634624-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - - canadacentral + - westus x-ms-server-latency: - - '2289' + - '1701' status: code: 200 message: OK diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration.test_example_selective_key_restore.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration.test_example_selective_key_restore.yaml index 36a2c0329de6..ce90ff450dd5 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration.test_example_selective_key_restore.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration.test_example_selective_key_restore.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://managedhsm/keys/selective-restore-test-key45031a2b/create?api-version=7.3-preview response: @@ -38,7 +38,7 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-server-latency: - - '1' + - '0' status: code: 401 message: Unauthorized @@ -56,17 +56,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://managedhsm/keys/selective-restore-test-key45031a2b/create?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1625695228,"enabled":true,"exportable":false,"recoverableDays":90,"recoveryLevel":"Recoverable+Purgeable","updated":1625695228},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-key45031a2b/d47a2215690841668194d0ea957d2aa7","kty":"RSA-HSM","n":"qJ9i5U07EfA5BDdKl-9Js_xHv1okv6gw3lEtH32-YkaUk5_HxH8WAxj3K8i8Gvb1VUNUONMB815NtlDLAl56g6hVOxksqub1QXmNKzCL2kPK23pMo4iz6MCPA1oO2-JJbc5jL1Ja99VQ0wrjm51Ap-5WkDmWg--RtI6shZSPzgPE0p8ar1uKepZKDNxi9EtEODHZGJCtvTUZcAZY92Vet-o8olKbfmHnwdX98Wbn4rI-Sa46CBRBOHZN1GHQw2vxVRWzR8EorJnZn0D9p8mdGJQk5kCgIeyJxn9_KYXeBr5svAr2DzD1AeXJOskunCaMKAYLYTSzG3QDpMNIY4UVUQ"}}' + string: '{"attributes":{"created":1629414807,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1629414807},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-key45031a2b/49678f1d10ba0de60078a3916f08b8bf","kty":"RSA-HSM","n":"mDeF_-APNOAZ1a9BiANg1DXOo3nuhV7XoYg2Mu7ubxBreu1BR7MWydvrRPdvLFn1kFUgkDLZOsDc25JJ7slAJN_mxGQrpfzQb3utm-NjEI4APVVYVK0rsjVZ4fUG1r8DLSp5ZCz4JakMn8DtRaUyGiFjL9KhxtWXIQ7L1_T5Jgj0p7yM1CCNFdChTtBhq66PM7y3PsGZViRmwZ6Xk6NVERc_TlLOLaCvyMrY1AUa3ZsqZwmpEcn6fbfcRy2er_W1VSWWZBEqKZDa-8NxhFSI6K4d-osazNe14zA1V9sYNVPYNqJrK6nHzxcJQ4rBChpsuuEyaLvgV2BcP34zQFZoEQ"}}' headers: cache-control: - no-cache content-length: - - '733' + - '742' content-security-policy: - default-src 'self' content-type: @@ -82,7 +82,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '216' + - '222' status: code: 200 message: OK @@ -100,9 +100,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: string: '' @@ -125,12 +125,12 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-server-latency: - - '0' + - '1' status: code: 401 message: Unauthorized - request: - body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containerokmfum4m5d7wvjs", + body: '{"storageResourceUri": "https://storname.blob.core.windows.net/container3kwejjq3ojbf7tk", "token": "redacted"}' headers: Accept: @@ -140,19 +140,19 @@ interactions: Connection: - keep-alive Content-Length: - - '233' + - '235' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: - string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1625695231,"endTime":null,"jobId":"23cd6741d96a4aeaad0adbeb7ee787be","azureStorageBlobContainerUri":null}' + string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1629414810,"endTime":null,"jobId":"bae1825ef9364dcebc08c2e8fc94040b","azureStorageBlobContainerUri":null}' headers: azure-asyncoperation: - - https://managedhsm/backup/23cd6741d96a4aeaad0adbeb7ee787be/pending + - https://managedhsm/backup/bae1825ef9364dcebc08c2e8fc94040b/pending cache-control: - no-cache content-length: @@ -162,7 +162,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 22:00:31 GMT + - Thu, 19 Aug 2021 23:13:30 GMT server: - Kestrel strict-transport-security: @@ -176,7 +176,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '2031' + - '2070' status: code: 202 message: '' @@ -190,12 +190,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/backup/23cd6741d96a4aeaad0adbeb7ee787be/pending + uri: https://managedhsm/backup/bae1825ef9364dcebc08c2e8fc94040b/pending response: body: - string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerokmfum4m5d7wvjs/mhsm-mcpatinotesthsm-2021070722003107","endTime":1625695238,"error":null,"jobId":"23cd6741d96a4aeaad0adbeb7ee787be","startTime":1625695231,"status":"Succeeded","statusDetails":null}' + string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/container3kwejjq3ojbf7tk/mhsm-mcpatinotesthsm-2021081923133081","endTime":1629414818,"error":null,"jobId":"bae1825ef9364dcebc08c2e8fc94040b","startTime":1629414810,"status":"Succeeded","statusDetails":null}' headers: cache-control: - no-cache @@ -206,7 +206,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 22:00:42 GMT + - Thu, 19 Aug 2021 23:13:42 GMT server: - Kestrel strict-transport-security: @@ -216,19 +216,19 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210605-1-ffd80f31-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - westus x-ms-server-latency: - - '1629' + - '1745' status: code: 200 message: OK - request: - body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containerokmfum4m5d7wvjs", - "token": "redacted"}, "folder": "mhsm-mcpatinotesthsm-2021070722003107"}' + body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/container3kwejjq3ojbf7tk", + "token": "redacted"}, "folder": "mhsm-mcpatinotesthsm-2021081923133081"}' headers: Accept: - application/json @@ -237,19 +237,19 @@ interactions: Connection: - keep-alive Content-Length: - - '308' + - '310' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/keys/selective-restore-test-key45031a2b/restore?api-version=7.2 + uri: https://managedhsm/keys/selective-restore-test-key45031a2b/restore?api-version=7.3-preview response: body: - string: '{"endTime":null,"error":null,"jobId":"c57441368ef44d3a8a2dcfcc0a5c3102","startTime":1625695244,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"098b3bfaf4e942168c78ebd963d3cad2","startTime":1629414824,"status":"InProgress","statusDetails":null}' headers: azure-asyncoperation: - - https://managedhsm/restore/c57441368ef44d3a8a2dcfcc0a5c3102/pending + - https://managedhsm/restore/098b3bfaf4e942168c78ebd963d3cad2/pending cache-control: - no-cache content-length: @@ -259,7 +259,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 22:00:44 GMT + - Thu, 19 Aug 2021 23:13:44 GMT server: - Kestrel strict-transport-security: @@ -273,7 +273,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '1925' + - '2303' status: code: 202 message: '' @@ -287,12 +287,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/c57441368ef44d3a8a2dcfcc0a5c3102/pending + uri: https://managedhsm/restore/098b3bfaf4e942168c78ebd963d3cad2/pending response: body: - string: '{"endTime":null,"error":null,"jobId":"c57441368ef44d3a8a2dcfcc0a5c3102","startTime":1625695244,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"098b3bfaf4e942168c78ebd963d3cad2","startTime":1629414824,"status":"InProgress","statusDetails":null}' headers: cache-control: - no-cache @@ -303,7 +303,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 22:00:56 GMT + - Thu, 19 Aug 2021 23:13:56 GMT server: - Kestrel strict-transport-security: @@ -313,13 +313,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210605-1-ffd80f31-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - westus x-ms-server-latency: - - '1778' + - '1810' status: code: 200 message: OK @@ -333,12 +333,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/c57441368ef44d3a8a2dcfcc0a5c3102/pending + uri: https://managedhsm/restore/098b3bfaf4e942168c78ebd963d3cad2/pending response: body: - string: '{"endTime":1625695260,"error":null,"jobId":"c57441368ef44d3a8a2dcfcc0a5c3102","startTime":1625695244,"status":"Succeeded","statusDetails":"Number + string: '{"endTime":1629414840,"error":null,"jobId":"098b3bfaf4e942168c78ebd963d3cad2","startTime":1629414824,"status":"Succeeded","statusDetails":"Number of successful key versions restored: 0, Number of key versions could not overwrite: 2"}' headers: @@ -351,7 +351,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 07 Jul 2021 22:01:03 GMT + - Thu, 19 Aug 2021 23:14:03 GMT server: - Kestrel strict-transport-security: @@ -361,13 +361,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-build-version: - - 1.0.20210605-1-ffd80f31-develop + - 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: - westus x-ms-server-latency: - - '1954' + - '1914' status: code: 200 message: OK diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration_async.test_example_backup_and_restore.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration_async.test_example_backup_and_restore.yaml index bccbc4df2b98..ff7a01680272 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration_async.test_example_backup_and_restore.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration_async.test_example_backup_and_restore.yaml @@ -9,9 +9,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: string: '' @@ -25,162 +25,163 @@ interactions: resource="https://managedhsm.azure.net" x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-server-latency: '0' + x-ms-server-latency: '1' status: code: 401 message: Unauthorized - url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.3-preview - request: - body: '{"token": "redacted", "storageResourceUri": "https://storname.blob.core.windows.net/containertpuij7qwbd5ryzl"}' + body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containervg2tfdabj4opa4p", + "token": "redacted"}' headers: Accept: - application/json Content-Length: - - '235' + - '233' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: - string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1623789496,"endTime":null,"jobId":"3561286085204770977885ced9a31fb5","azureStorageBlobContainerUri":null}' + string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1629414881,"endTime":null,"jobId":"06cc4cc7355546d3a04946df11ceb76f","azureStorageBlobContainerUri":null}' headers: - azure-asyncoperation: https://managedhsm/backup/3561286085204770977885ced9a31fb5/pending + azure-asyncoperation: https://managedhsm/backup/06cc4cc7355546d3a04946df11ceb76f/pending cache-control: no-cache content-length: '174' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 20:38:16 GMT + date: Thu, 19 Aug 2021 23:14:40 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2590' + x-ms-keyvault-region: westus + x-ms-server-latency: '1851' status: code: 202 message: '' - url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.3-preview - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/backup/3561286085204770977885ced9a31fb5/pending + uri: https://managedhsm/backup/06cc4cc7355546d3a04946df11ceb76f/pending response: body: - string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containertpuij7qwbd5ryzl/mhsm-mcpatinotesthsm-2021061520381674","endTime":1623789505,"error":null,"jobId":"3561286085204770977885ced9a31fb5","startTime":1623789496,"status":"Succeeded","statusDetails":null}' + string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containervg2tfdabj4opa4p/mhsm-mcpatinotesthsm-2021081923144106","endTime":1629414889,"error":null,"jobId":"06cc4cc7355546d3a04946df11ceb76f","startTime":1629414881,"status":"Succeeded","statusDetails":null}' headers: cache-control: no-cache content-length: '294' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 20:38:29 GMT + date: Thu, 19 Aug 2021 23:14:52 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210520-1-d6634624-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2567' + x-ms-keyvault-region: westus + x-ms-server-latency: '1702' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/backup/3561286085204770977885ced9a31fb5/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/backup/06cc4cc7355546d3a04946df11ceb76f/pending - request: - body: '{"folderToRestore": "mhsm-mcpatinotesthsm-2021061520381674", "sasTokenParameters": - {"token": "redacted", "storageResourceUri": "https://storname.blob.core.windows.net/containertpuij7qwbd5ryzl"}}' + body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containervg2tfdabj4opa4p", + "token": "redacted"}, "folderToRestore": "mhsm-mcpatinotesthsm-2021081923144106"}' headers: Accept: - application/json Content-Length: - - '319' + - '317' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/restore?api-version=7.2 + uri: https://managedhsm/restore?api-version=7.3-preview response: body: - string: '{"endTime":null,"error":null,"jobId":"5d26d34875964b1c9d400c25b82a5bf4","startTime":1623789511,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"e008a9bd665c49db9bbc3c195520356b","startTime":1629414894,"status":"InProgress","statusDetails":null}' headers: - azure-asyncoperation: https://managedhsm/restore/5d26d34875964b1c9d400c25b82a5bf4/pending + azure-asyncoperation: https://managedhsm/restore/e008a9bd665c49db9bbc3c195520356b/pending cache-control: no-cache content-length: '138' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 20:38:31 GMT + date: Thu, 19 Aug 2021 23:14:54 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2564' + x-ms-keyvault-region: westus + x-ms-server-latency: '1905' status: code: 202 message: '' - url: https://mcpatinotesthsm.managedhsm.azure.net/restore?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/restore?api-version=7.3-preview - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/5d26d34875964b1c9d400c25b82a5bf4/pending + uri: https://managedhsm/restore/e008a9bd665c49db9bbc3c195520356b/pending response: body: - string: '{"endTime":null,"error":null,"jobId":"5d26d34875964b1c9d400c25b82a5bf4","startTime":1623789511,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"e008a9bd665c49db9bbc3c195520356b","startTime":1629414894,"status":"InProgress","statusDetails":null}' headers: cache-control: no-cache content-length: '138' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 20:38:43 GMT + date: Thu, 19 Aug 2021 23:15:06 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210520-1-d6634624-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '2203' + x-ms-keyvault-region: westus + x-ms-server-latency: '1807' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/restore/5d26d34875964b1c9d400c25b82a5bf4/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/restore/e008a9bd665c49db9bbc3c195520356b/pending - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.0b4 Python/3.5.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/5d26d34875964b1c9d400c25b82a5bf4/pending + uri: https://managedhsm/restore/e008a9bd665c49db9bbc3c195520356b/pending response: body: - string: '{"endTime":1623789528,"error":null,"jobId":"5d26d34875964b1c9d400c25b82a5bf4","startTime":1623789511,"status":"Succeeded","statusDetails":null}' + string: '{"endTime":1629414910,"error":null,"jobId":"e008a9bd665c49db9bbc3c195520356b","startTime":1629414894,"status":"Succeeded","statusDetails":null}' headers: cache-control: no-cache content-length: '143' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Tue, 15 Jun 2021 20:38:53 GMT + date: Thu, 19 Aug 2021 23:15:13 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210520-1-d6634624-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; - x-ms-keyvault-region: canadacentral - x-ms-server-latency: '3838' + x-ms-keyvault-region: westus + x-ms-server-latency: '2262' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/restore/5d26d34875964b1c9d400c25b82a5bf4/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/restore/e008a9bd665c49db9bbc3c195520356b/pending version: 1 diff --git a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration_async.test_example_selective_key_restore.yaml b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration_async.test_example_selective_key_restore.yaml index 5dadace0ecba..96dc6cf2e6c3 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration_async.test_example_selective_key_restore.yaml +++ b/sdk/keyvault/azure-keyvault-administration/tests/recordings/test_examples_administration_async.test_example_selective_key_restore.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://managedhsm/keys/selective-restore-test-keyeb471ca8/create?api-version=7.3-preview response: @@ -25,7 +25,7 @@ interactions: resource="https://managedhsm.azure.net" x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-server-latency: '1' + x-ms-server-latency: '0' status: code: 401 message: Unauthorized @@ -40,15 +40,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://managedhsm/keys/selective-restore-test-keyeb471ca8/create?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1625695300,"enabled":true,"exportable":false,"recoverableDays":90,"recoveryLevel":"Recoverable+Purgeable","updated":1625695300},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-keyeb471ca8/731603c1040b411d29262702acb5ab62","kty":"RSA-HSM","n":"i3xLnsDyZ5UPUjt7cClCkWlC4kWtczpxA_gyqItgyYOj2Fpq-UMWVaYRu1-bs4fQ239Z0Evh42xa5B455ltVR4YEt7_ekTPmefQQteFIP1TZuDbjTyYFkC0cDTVGcSizcCbl6HG7ftVGPkSG9cNyUB1IPZAXeoYsBlrlRSKL4T4N1VWj2_Rckxb1I_iPy-14SDqdxt0eKBszz2Geq8tETue7VxU4VXg_FpoFU0PFEjmd21cpAy70yE2mBYX5n0OAuBKNfeDtZyImEME6Zj2b9qj9tl7VrgxxpxIsa9UcegZkeyW6pn_3e5tcqfFaWld1g01qRRF90UD9Wgx4ekDG4Q"}}' + string: '{"attributes":{"created":1629414938,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1629414938},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsm/keys/selective-restore-test-keyeb471ca8/8729071c719f0ae08489c490c0fb047c","kty":"RSA-HSM","n":"p6q9Arlejw8F-94raadJIqLUfPpMgtF2ptmUcwilMnfdudLWNeIWhb8NMotd896Yg71AUPpfXLOewKJAhuZKO60DM0KvuLxNpBZ5uMdrZoimnRgkpIO8FMuXrHSESYpdKQHH8rUgxHkmxOvqrf4pcYJ4EZcqRXPBrkIpJgb8hN6YlNhztYEisl9plFhdcQiYGHR3OVRMWMUfB6Sg4M1RSBax2NiZS4UjZp5J2vXubFjZDa5Q9anD0zgakf8wFF1zkoZ_A7SYNPYXWPfeTFGWL6aXgYct00a8uQCtxVE2Q_Ys3fGeXKk8B-hYydvteMhHl4eYVWZ7dcu8iQuze8J97Q"}}' headers: cache-control: no-cache - content-length: '733' + content-length: '742' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains @@ -56,7 +56,7 @@ interactions: x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '239' + x-ms-server-latency: '250' status: code: 200 message: OK @@ -71,9 +71,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: string: '' @@ -87,147 +87,147 @@ interactions: resource="https://managedhsm.azure.net" x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-server-latency: '1' + x-ms-server-latency: '0' status: code: 401 message: Unauthorized - url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.3-preview - request: - body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containerf5uqpjnhmuspogs", + body: '{"storageResourceUri": "https://storname.blob.core.windows.net/containerbomsi37zaxvlzit", "token": "redacted"}' headers: Accept: - application/json Content-Length: - - '239' + - '235' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://managedhsm/backup?api-version=7.2 + uri: https://managedhsm/backup?api-version=7.3-preview response: body: - string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1625695302,"endTime":null,"jobId":"88a3e7ede7dd4b119387fe91b464ca50","azureStorageBlobContainerUri":null}' + string: '{"status":"InProgress","statusDetails":null,"error":null,"startTime":1629414940,"endTime":null,"jobId":"70c08efbc25447bfb3bada3d69dd9db5","azureStorageBlobContainerUri":null}' headers: - azure-asyncoperation: https://managedhsm/backup/88a3e7ede7dd4b119387fe91b464ca50/pending + azure-asyncoperation: https://managedhsm/backup/70c08efbc25447bfb3bada3d69dd9db5/pending cache-control: no-cache content-length: '174' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 22:01:42 GMT + date: Thu, 19 Aug 2021 23:15:41 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '1984' + x-ms-server-latency: '3244' status: code: 202 message: '' - url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/backup?api-version=7.3-preview - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/backup/88a3e7ede7dd4b119387fe91b464ca50/pending + uri: https://managedhsm/backup/70c08efbc25447bfb3bada3d69dd9db5/pending response: body: - string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerf5uqpjnhmuspogs/mhsm-mcpatinotesthsm-2021070722014288","endTime":1625695311,"error":null,"jobId":"88a3e7ede7dd4b119387fe91b464ca50","startTime":1625695302,"status":"Succeeded","statusDetails":null}' + string: '{"azureStorageBlobContainerUri":"https://storname.blob.core.windows.net/containerbomsi37zaxvlzit/mhsm-mcpatinotesthsm-2021081923154070","endTime":1629414948,"error":null,"jobId":"70c08efbc25447bfb3bada3d69dd9db5","startTime":1629414940,"status":"Succeeded","statusDetails":null}' headers: cache-control: no-cache content-length: '294' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 22:01:54 GMT + date: Thu, 19 Aug 2021 23:15:53 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210605-1-ffd80f31-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '1730' + x-ms-server-latency: '1635' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/backup/88a3e7ede7dd4b119387fe91b464ca50/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/backup/70c08efbc25447bfb3bada3d69dd9db5/pending - request: - body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containerf5uqpjnhmuspogs", - "token": "redacted"}, "folder": "mhsm-mcpatinotesthsm-2021070722014288"}' + body: '{"sasTokenParameters": {"storageResourceUri": "https://storname.blob.core.windows.net/containerbomsi37zaxvlzit", + "token": "redacted"}, "folder": "mhsm-mcpatinotesthsm-2021081923154070"}' headers: Accept: - application/json Content-Length: - - '314' + - '310' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://managedhsm/keys/selective-restore-test-keyeb471ca8/restore?api-version=7.2 + uri: https://managedhsm/keys/selective-restore-test-keyeb471ca8/restore?api-version=7.3-preview response: body: - string: '{"endTime":null,"error":null,"jobId":"0c76f68233da4b5da214d844695390ee","startTime":1625695316,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"000fa9d4c2cf4c60bf21beedacc57e97","startTime":1629414955,"status":"InProgress","statusDetails":null}' headers: - azure-asyncoperation: https://managedhsm/restore/0c76f68233da4b5da214d844695390ee/pending + azure-asyncoperation: https://managedhsm/restore/000fa9d4c2cf4c60bf21beedacc57e97/pending cache-control: no-cache content-length: '138' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 22:01:55 GMT + date: Thu, 19 Aug 2021 23:15:55 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '1976' + x-ms-server-latency: '2070' status: code: 202 message: '' - url: https://mcpatinotesthsm.managedhsm.azure.net/keys/selective-restore-test-keyeb471ca8/restore?api-version=7.2 + url: https://mcpatinotesthsm.managedhsm.azure.net/keys/selective-restore-test-keyeb471ca8/restore?api-version=7.3-preview - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/0c76f68233da4b5da214d844695390ee/pending + uri: https://managedhsm/restore/000fa9d4c2cf4c60bf21beedacc57e97/pending response: body: - string: '{"endTime":null,"error":null,"jobId":"0c76f68233da4b5da214d844695390ee","startTime":1625695316,"status":"InProgress","statusDetails":null}' + string: '{"endTime":null,"error":null,"jobId":"000fa9d4c2cf4c60bf21beedacc57e97","startTime":1629414955,"status":"InProgress","statusDetails":null}' headers: cache-control: no-cache content-length: '138' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 22:02:08 GMT + date: Thu, 19 Aug 2021 23:16:07 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210605-1-ffd80f31-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '1838' + x-ms-server-latency: '1680' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/restore/0c76f68233da4b5da214d844695390ee/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/restore/000fa9d4c2cf4c60bf21beedacc57e97/pending - request: body: null headers: User-Agent: - - azsdk-python-keyvault-administration/4.0.1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-administration/4.0.1b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://managedhsm/restore/0c76f68233da4b5da214d844695390ee/pending + uri: https://managedhsm/restore/000fa9d4c2cf4c60bf21beedacc57e97/pending response: body: - string: '{"endTime":1625695332,"error":null,"jobId":"0c76f68233da4b5da214d844695390ee","startTime":1625695316,"status":"Succeeded","statusDetails":"Number + string: '{"endTime":1629414971,"error":null,"jobId":"000fa9d4c2cf4c60bf21beedacc57e97","startTime":1629414955,"status":"Succeeded","statusDetails":"Number of successful key versions restored: 0, Number of key versions could not overwrite: 2"}' headers: @@ -235,17 +235,17 @@ interactions: content-length: '233' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 - date: Wed, 07 Jul 2021 22:02:15 GMT + date: Thu, 19 Aug 2021 23:16:14 GMT server: Kestrel strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: SAMEORIGIN - x-ms-build-version: 1.0.20210605-1-ffd80f31-develop + x-ms-build-version: 1.0.20210712-1-6ae2ae9e-develop x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '1606' + x-ms-server-latency: '2707' status: code: 200 message: OK - url: https://mcpatinotesthsm.managedhsm.azure.net/restore/0c76f68233da4b5da214d844695390ee/pending + url: https://mcpatinotesthsm.managedhsm.azure.net/restore/000fa9d4c2cf4c60bf21beedacc57e97/pending version: 1