Condividi tramite


KeyClient.StartRecoverDeletedKey(String, CancellationToken) Method

Definition

Recovers the deleted key to its latest version.

public virtual Azure.Security.KeyVault.Keys.RecoverDeletedKeyOperation StartRecoverDeletedKey (string name, System.Threading.CancellationToken cancellationToken = default);
abstract member StartRecoverDeletedKey : string * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.RecoverDeletedKeyOperation
override this.StartRecoverDeletedKey : string * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.RecoverDeletedKeyOperation
Public Overridable Function StartRecoverDeletedKey (name As String, Optional cancellationToken As CancellationToken = Nothing) As RecoverDeletedKeyOperation

Parameters

name
String

The name of the key.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A RecoverDeletedKeyOperation to wait on this long-running operation.

Exceptions

name is an empty string.

name is null.

The server returned an error. See Message for details returned from the server.

Remarks

The Recover Deleted Key operation is applicable for deleted keys in soft-delete enabled vaults. It recovers the deleted key back to its latest version under /keys. An attempt to recover an non-deleted key will return an error. Consider this the inverse of the delete operation on soft-delete enabled vaults. This operation requires the keys/recover permission.

Applies to