Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithConnectionProperty

Method
📦 Aspire.Hosting v17.0.0
func (ResourceWithConnectionString) 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().

Applies to

This method applies to the following types: