KeyVaultClient.SetSecretAsync Method (String, String, String, Dictionary<String, String>, String, SecretAttributes, CancellationToken)

 

Asynchronously sets a secret in the specified vault.

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

Syntax

public Task<Secret> SetSecretAsync(
    string vault,
    string secretName,
    string value,
    Dictionary<string, string> tags = null,
    string contentType = null,
    SecretAttributes secretAttributes = null,
    CancellationToken cancellationToken = null
)
public:
Task<Secret^>^ SetSecretAsync(
    String^ vault,
    String^ secretName,
    String^ value,
    Dictionary<String^, String^>^ tags = null,
    String^ contentType = null,
    SecretAttributes^ secretAttributes = null,
    CancellationToken cancellationToken = null
)
member SetSecretAsync : 
        vault:string *
        secretName:string *
        value:string *
        tags:Dictionary<string, string> = null *
        contentType:string = null *
        secretAttributes:SecretAttributes = null *
        cancellationToken:CancellationToken = null -> Task<Secret>
Public Function SetSecretAsync (
    vault As String,
    secretName As String,
    value As String,
    tags As Dictionary(Of String, String),
    contentType As String,
    secretAttributes As SecretAttributes,
    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.

  • contentType
    Type: System.String

    The application-specific metadata in the form of key-value pairs.

Return Value

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

A response message containing the updated secret.

See Also

KeyVaultClient Class
Microsoft.Azure.KeyVault Namespace

Return to top