Skip to content
DocsTry Aspire
DocsTry

getOrSetSecret

Method
📦 Aspire.Hosting v13.4.0
interface IUserSecretsManager {
// ... omitted for brevity
getOrSetSecret(
resourceBuilder: IResource,
name: string,
value: string): void;
}

Signature

methodgetOrSetSecret
Gets a secret value if it exists in configuration, or sets it to the provided value if it does not.
getOrSetSecret(
resourceBuilder: IResource,
name: string,
value: string): void
resourceBuilderIResource
namestring
valuestring

Applies to

This method applies to the following types: