KeyVaultClientExtensions.GetKeyAsync Method

Definition

Overloads

GetKeyAsync(IKeyVaultClient, String, CancellationToken)

Retrieves the public portion of a key plus its attributes

GetKeyAsync(IKeyVaultClient, String, String, CancellationToken)

Retrieves the public portion of a key plus its attributes

GetKeyAsync(IKeyVaultClient, String, String, String, CancellationToken)

Gets the public part of a stored key.

GetKeyAsync(IKeyVaultClient, String, CancellationToken)

Retrieves the public portion of a key plus its attributes

public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle> GetKeyAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string keyIdentifier, System.Threading.CancellationToken cancellationToken = default);
static member GetKeyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle>
<Extension()>
Public Function GetKeyAsync (operations As IKeyVaultClient, keyIdentifier As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyBundle)

Parameters

operations
IKeyVaultClient
keyIdentifier
System.String

The key identifier

cancellationToken
System.Threading.CancellationToken

Optional cancellation token

Returns

System.Threading.Tasks.Task<KeyBundle>

A KeyBundle of the key and its attributes

Applies to

GetKeyAsync(IKeyVaultClient, String, String, CancellationToken)

Retrieves the public portion of a key plus its attributes

public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle> GetKeyAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string vaultBaseUrl, string keyName, System.Threading.CancellationToken cancellationToken = default);
static member GetKeyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle>
<Extension()>
Public Function GetKeyAsync (operations As IKeyVaultClient, vaultBaseUrl As String, keyName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyBundle)

Parameters

operations
IKeyVaultClient
vaultBaseUrl
System.String

The vault name, e.g. https://myvault.vault.azure.net

keyName
System.String

The key name

cancellationToken
System.Threading.CancellationToken

Optional cancellation token

Returns

System.Threading.Tasks.Task<KeyBundle>

A KeyBundle of the key and its attributes

Applies to

GetKeyAsync(IKeyVaultClient, String, String, String, CancellationToken)

Gets the public part of a stored key.

public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle> GetKeyAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string vaultBaseUrl, string keyName, string keyVersion, System.Threading.CancellationToken cancellationToken = default);
static member GetKeyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle>
<Extension()>
Public Function GetKeyAsync (operations As IKeyVaultClient, vaultBaseUrl As String, keyName As String, keyVersion As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyBundle)

Parameters

operations
IKeyVaultClient

The operations group for this extension method.

vaultBaseUrl
System.String

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

keyName
System.String

The name of the key to get.

keyVersion
System.String

Adding the version parameter retrieves a specific version of a key.

cancellationToken
System.Threading.CancellationToken

The cancellation token.

Returns

System.Threading.Tasks.Task<KeyBundle>

Remarks

The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. This operation requires the keys/get permission.

Applies to