KeyClient.GetDeletedKeyAsync(String, CancellationToken) Method

Definition

Gets the public part of a deleted key.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Keys.DeletedKey>> GetDeletedKeyAsync (string name, System.Threading.CancellationToken cancellationToken = default);
abstract member GetDeletedKeyAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Keys.DeletedKey>>
override this.GetDeletedKeyAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Keys.DeletedKey>>
Public Overridable Function GetDeletedKeyAsync (name As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DeletedKey))

Parameters

name
String

The name of the key.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Exceptions

name is an empty string.

name is null.

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

Remarks

The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/get permission.

Applies to