IKeyVaultClient.RestoreKeyWithHttpMessagesAsync(String, Byte[], Dictionary<String,List<String>>, CancellationToken) Method

Definition

Restores a backed up key to a vault.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>> RestoreKeyWithHttpMessagesAsync (string vaultBaseUrl, byte[] keyBundleBackup, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = null);
abstract member RestoreKeyWithHttpMessagesAsync : string * byte[] * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>>

Parameters

vaultBaseUrl
String

The vault name, for example https://myvault.vault.azure.net.

keyBundleBackup
Byte[]

The backup blob associated with a key bundle.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Task<Microsoft.Rest.Azure.AzureOperationResponse<KeyBundle>>

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.

Applies to