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.StringThe URL for the vault containing the secrets.
secretName
Type: System.StringThe name the secret in the given vault.
value
Type: System.StringThe value of the secret.
tags
Type: System.Collections.Generic.Dictionary<String, String>Type of the secret value such as a password.
contentType
Type: System.StringThe application-specific metadata in the form of key-value pairs.
secretAttributes
Type: Microsoft.Azure.KeyVault.SecretAttributesThe attributes for the secret. For more information on possible attributes, see SecretAttributes.
cancellationToken
Type: System.Threading.CancellationTokenOptional cancellation token.
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