KeyVaultClient.GetSecretAsync Method (String, String, String, CancellationToken)

 

Asynchronously gets a secret.

Namespace:   Microsoft.Azure.KeyVault
Assembly:  Microsoft.Azure.KeyVault (in Microsoft.Azure.KeyVault.dll)

Syntax

public Task<Secret> GetSecretAsync(
    string vault,
    string secretName,
    string secretVersion = null,
    CancellationToken cancellationToken = null
)
public:
Task<Secret^>^ GetSecretAsync(
    String^ vault,
    String^ secretName,
    String^ secretVersion = null,
    CancellationToken cancellationToken = null
)
member GetSecretAsync : 
        vault:string *
        secretName:string *
        secretVersion:string = null *
        cancellationToken:CancellationToken = null -> Task<Secret>
Public Function GetSecretAsync (
    vault As String,
    secretName As String,
    secretVersion As String,
    cancellationToken As CancellationToken
) As Task(Of Secret)

Parameters

  • vault
    Type: System.String

    The URL for the vault containing the secrets.

  • secretName
    Type: System.String

    The name the secret in the given vault.

  • secretVersion
    Type: System.String

    The version of the secret (optional).

Return Value

Type: System.Threading.Tasks.Task<Secret>

A response message containing the secret.

See Also

GetSecretAsync Overload
KeyVaultClient Class
Microsoft.Azure.KeyVault Namespace

Return to top