IKeyVaultClient.GetSecretWithHttpMessagesAsync(String, String, String, Dictionary<String,List<String>>, CancellationToken) Method

Definition

Get a specified secret from a given key vault.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.SecretBundle>> GetSecretWithHttpMessagesAsync (string vaultBaseUrl, string secretName, string secretVersion, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = null);
abstract member GetSecretWithHttpMessagesAsync : string * string * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.SecretBundle>>

Parameters

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.

customHeaders
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>>

The headers that will be added to request.

cancellationToken
System.Threading.CancellationToken

The cancellation token.

Returns

System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<SecretBundle>>

Remarks

The GET operation is applicable to any secret stored in Azure Key Vault.

Applies to