addPostgres
Method
interface IDistributedApplicationBuilder { // ... omitted for brevity addPostgres( name: string, userName?: ParameterResource, password?: ParameterResource, port?: number): PostgresServerResource;}Signature
method
addPostgres builderAdds a PostgreSQL resource to the application model. A container is used for local development.
addPostgres( name: string, userName?: ParameterResource, password?: ParameterResource, port?: number): PostgresServerResourceParameters
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.userName ParameterResource optionalThe parameter used to provide the user name for the PostgreSQL resource. If `null` a default value will be used.passwordParameterResource optionalThe parameter used to provide the administrator password for the PostgreSQL resource. If `null` a random password will be generated.portnumberoptionalThe host port used when launching the container. If null a random port will be assigned.Returns
PostgresServerResource Applies to
This method applies to the following types: