Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

UserSecretsManager.TrySetSecret

Method
📦 Aspire.Hosting v17.0.0
type UserSecretsManager interface {
// ... omitted for brevity
TrySetSecret(
name string,
value string,
) (bool, error)
}

Signature

methodTrySetSecret
Attempts to set a user secret value synchronously.
TrySetSecret(
name string,
value string,
) (bool, error)
namestringThe name of the secret.
valuestringThe value of the secret.
(bool, error)

True if the secret was set successfully; otherwise, false.

Returns (bool, error).

Defined on

This method is defined on the following type: