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)

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 = null);
static member GetSecretAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.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.

GetSecretAsync(IKeyVaultClient, String, String, CancellationToken)

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 = null);
static member GetSecretAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.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

GetSecretAsync(IKeyVaultClient, String, CancellationToken)

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 = null);
static member GetSecretAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.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