Skip to content
Docs Try Aspire

getOrSetSecret

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

Signature

method getOrSetSecret
Gets a secret value if it exists, or sets it to the provided value if it does not
getOrSetSecret(
resourceBuilder: IResource,
name: string,
value: string): void
resourceBuilder IResource
name string
value string

Applies to

This function is an extension method on the following types: