Skip to content
DocsTry Aspire
DocsTry

addPostgres

Method
📦 Aspire.Hosting.PostgreSQL v13.4.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addPostgres(
name: string,
userName?: ParameterResource,
password?: ParameterResource,
port?: number): PostgresServerResource;
}

Signature

methodaddPostgresbuilder
Adds a PostgreSQL resource to the application model. A container is used for local development.
addPostgres(
name: string,
userName?: ParameterResource,
password?: ParameterResource,
port?: number): PostgresServerResource
namestring
userNameParameterResourceoptional
passwordParameterResourceoptional
portnumberoptional
PostgresServerResource

Applies to

This method applies to the following types: