IResource.withTrait

Method
📦 Aspire.Hosting v17.0.0
interface IResource {
// ... omitted for brevity
withTrait(
name: string,
value: string): IResource;
}

Signature

methodwithTraitbuilder
Adds immutable, non-sensitive metadata to a resource. Repeated names add multiple values.
withTrait(
name: string,
value: string): IResource
namestringThe case-sensitive trait name.
valuestringThe trait value. Do not include secrets.
IResource

Defined on

This method is defined on the following type: