KeyVaultClientExtensions.GetSecretAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetSecretAsync(IKeyVaultClient, String, String, CancellationToken) |
Gets a secret. |
GetSecretAsync(IKeyVaultClient, String, String, String, CancellationToken) |
Get a specified secret from a given key vault. |
GetSecretAsync(IKeyVaultClient, String, CancellationToken) |
Gets a secret. |
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
- System.String
The URL for the vault containing the secrets.
- secretName
- System.String
The name the secret in the given vault.
- cancellationToken
- System.Threading.CancellationToken
Optional cancellation token
Returns
- System.Threading.Tasks.Task<SecretBundle>
A response message containing the secret
Applies to
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
- System.String
The vault name, for example https://myvault.vault.azure.net.
- secretName
- System.String
The name of the secret.
- secretVersion
- System.String
The version of the secret.
- cancellationToken
- System.Threading.CancellationToken
The cancellation token.
Returns
- System.Threading.Tasks.Task<SecretBundle>
Remarks
The GET operation is applicable to any secret stored in Azure Key Vault.
Applies to
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
- System.String
The URL for the secret.
- cancellationToken
- System.Threading.CancellationToken
Optional cancellation token
Returns
- System.Threading.Tasks.Task<SecretBundle>
A response message containing the secret