KeyVaultClientExtensions.GetSecretAsync Method

Definition

Overloads

GetSecretAsync(IKeyVaultClient, String, String, String, CancellationToken)

Get a specified secret from a given key vault.

GetSecretAsync(IKeyVaultClient, String, String, CancellationToken)

Gets a secret.

GetSecretAsync(IKeyVaultClient, String, CancellationToken)

Gets a secret.

GetSecretAsync(IKeyVaultClient, String, String, String, CancellationToken)

Source:
KeyVaultClientExtensions.cs

Get a specified secret from a given key vault.

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

Parameters

operations
IKeyVaultClient

The operations group for this extension method.

vaultBaseUrl
String

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

secretName
String

The name of the secret.

secretVersion
String

The version of the secret.

cancellationToken
CancellationToken

The cancellation token.

Returns

Remarks

The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires the secrets/get permission.

Applies to

GetSecretAsync(IKeyVaultClient, String, String, CancellationToken)

Source:
KeyVaultClientExtensions.cs

Gets a secret.

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

Parameters

operations
IKeyVaultClient
vaultBaseUrl
String

The URL for the vault containing the secrets.

secretName
String

The name the secret in the given vault.

cancellationToken
CancellationToken

Optional cancellation token

Returns

A response message containing the secret

Applies to

GetSecretAsync(IKeyVaultClient, String, CancellationToken)

Source:
KeyVaultClientExtensions.cs

Gets a secret.

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

Parameters

operations
IKeyVaultClient
secretIdentifier
String

The URL for the secret.

cancellationToken
CancellationToken

Optional cancellation token

Returns

A response message containing the secret

Applies to