Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ResourceWithConnectionString.WithConnectionProperty

Method
📦 Aspire.Hosting v17.0.0
type ResourceWithConnectionString interface {
// ... omitted for brevity
WithConnectionProperty(
name string,
value any,
) ResourceWithConnectionString
}

Signature

methodWithConnectionPropertybuilder
Adds a connection property annotation to the resource being built.
WithConnectionProperty(
name string,
value any,
) ResourceWithConnectionString
namestringThe name of the connection property to add.
valueanyThe value to assign to the connection property, specified as a string or reference expression.
ResourceWithConnectionString

The same resource builder instance with the specified connection property annotation applied.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: