IResourceWithConnectionString

Interface
📦 Aspire.Hosting v17.0.0
interface IResourceWithConnectionString {
getConnectionProperty(key: string): ReferenceExpression;
onConnectionStringAvailable(callback: (arg: ConnectionStringAvailableEvent) => Promise<void>): IResourceWithConnectionString;
withConnectionProperty(
name: string,
value: string | ReferenceExpression): IResourceWithConnectionString;
}

Methods

Retrieves the value of a specified connection property from the resource's connection properties.
getConnectionProperty(key: string): ReferenceExpression
keystringThe key of the connection property to retrieve. Cannot be null.
ReferenceExpression
Subscribes to the ConnectionStringAvailable event.
onConnectionStringAvailable(callback: (arg: ConnectionStringAvailableEvent) => Promise<void>): IResourceWithConnectionString
callback(arg: ConnectionStringAvailableEvent) => Promise<void>The callback to invoke when the event fires.
IResourceWithConnectionString
Adds a connection property annotation to the resource being built.
withConnectionProperty(
name: string,
value: string | ReferenceExpression): IResourceWithConnectionString
namestringThe name of the connection property to add.
valuestring | ReferenceExpressionThe value to assign to the connection property, specified as a string or reference expression.
IResourceWithConnectionString