Skip to content
DocsTry Aspire
DocsTry

PostgresDatabaseResource Properties

ClassProperties5 members
A resource that represents a PostgreSQL database. This is a child resource of a PostgresServerResource.
ConnectionStringExpressionSection titled ConnectionStringExpressionReferenceExpression
Gets the connection string expression for the Postgres database.
public ReferenceExpression ConnectionStringExpression { get; }
DatabaseNameSection titled DatabaseNamestring
Gets the database name.
public string DatabaseName { get; }
JdbcConnectionStringSection titled JdbcConnectionStringReferenceExpression
Gets the JDBC connection string for the PostgreSQL database.
public ReferenceExpression JdbcConnectionString { get; }

Format: jdbc:postgresql://{host}:{port}/{database}.

User and password credentials are not included in the JDBC connection string. Use the IResourceWithConnectionString.GetConnectionProperties method to access the Username and Password properties.

Gets the parent PostgresSQL container resource.
public PostgresServerResource Parent { get; }
UriExpressionSection titled UriExpressionReferenceExpression
Gets the connection URI expression for the PostgreSQL database.
public ReferenceExpression UriExpression { get; }
Format: postgresql://{user}:{password}@{host}:{port}/{database}.