Skip to content
Docs Try Aspire

PostgresDatabaseResource Properties

Class Properties 5 members
A resource that represents a PostgreSQL database. This is a child resource of a PostgresServerResource.
ConnectionStringExpression Section titled ConnectionStringExpression ReferenceExpression
Gets the connection string expression for the Postgres database.
public ReferenceExpression ConnectionStringExpression { get; }
DatabaseName Section titled DatabaseName string
Gets the database name.
public string DatabaseName { get; }
JdbcConnectionString Section titled JdbcConnectionString ReferenceExpression
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; }
UriExpression Section titled UriExpression ReferenceExpression
Gets the connection URI expression for the PostgreSQL database.
public ReferenceExpression UriExpression { get; }
Format: postgresql://{user}:{password}@{host}:{port}/{database}.