KeyVaultClientExtensions.RestoreKeyAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Restores a backed up key to a vault.
public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle> RestoreKeyAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string vaultBaseUrl, byte[] keyBundleBackup, System.Threading.CancellationToken cancellationToken = default);
static member RestoreKeyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle>
<Extension()>
Public Function RestoreKeyAsync (operations As IKeyVaultClient, vaultBaseUrl As String, keyBundleBackup As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyBundle)
Parameters
- operations
- IKeyVaultClient
The operations group for this extension method.
- vaultBaseUrl
- String
The vault name, for example https://myvault.vault.azure.net.
- keyBundleBackup
- Byte[]
The backup blob associated with a key bundle.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Remarks
Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier, attributes and access control policies. The RESTORE operation may be used to import a previously backed up key. Individual versions of a key cannot be restored. The key is restored in its entirety with the same key name as it had when it was backed up. If the key name is not available in the target Key Vault, the RESTORE operation will be rejected. While the key name is retained during restore, the final key identifier will change if the key is restored to a different vault. Restore will restore all versions and preserve version identifiers. The RESTORE operation is subject to security constraints: The target Key Vault must be owned by the same Microsoft Azure Subscription as the source Key Vault The user must have RESTORE permission in the target Key Vault. This operation requires the keys/restore permission.