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)

Source:
KeyVaultClientExtensions.cs

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
String

The key identifier

cancellationToken
CancellationToken

Optional cancellation token

Returns

A KeyBundle of the key and its attributes

Applies to

GetKeyAsync(IKeyVaultClient, String, String, CancellationToken)

Source:
KeyVaultClientExtensions.cs

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
String

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

keyName
String

The key name

cancellationToken
CancellationToken

Optional cancellation token

Returns

A KeyBundle of the key and its attributes

Applies to

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

Source:
KeyVaultClientExtensions.cs

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
String

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

keyName
String

The name of the key to get.

keyVersion
String

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

cancellationToken
CancellationToken

The cancellation token.

Returns

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