Skip to content
Docs Try Aspire

PostgresServerResource Properties

Class Properties 10 members
A resource that represents a PostgreSQL container.
ConnectionStringExpression Section titled ConnectionStringExpression ReferenceExpression
Gets the connection string expression for the PostgreSQL server.
public ReferenceExpression ConnectionStringExpression { get; }
Databases Section titled Databases IReadOnlyDictionary<string, string>
A dictionary where the key is the resource name and the value is the database name.
public IReadOnlyDictionary<string, string> Databases { get; }
Host Section titled Host EndpointReferenceExpression
Gets the host endpoint reference for this service.
public EndpointReferenceExpression Host { get; }
JdbcConnectionString Section titled JdbcConnectionString ReferenceExpression
Gets the JDBC connection string for the PostgreSQL server.
public ReferenceExpression JdbcConnectionString { get; }

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

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

PasswordParameter Section titled PasswordParameter ParameterResource
Gets or sets the parameter that contains the PostgreSQL server password.
public ParameterResource PasswordParameter { get; set; }
Port Section titled Port EndpointReferenceExpression
Gets the endpoint reference expression that identifies the port for this endpoint.
public EndpointReferenceExpression Port { get; }
PrimaryEndpoint Section titled PrimaryEndpoint EndpointReference
Gets the primary endpoint for the PostgreSQL server.
public EndpointReference PrimaryEndpoint { get; }
UriExpression Section titled UriExpression ReferenceExpression
Gets the connection URI expression for the PostgreSQL server.
public ReferenceExpression UriExpression { get; }
Format: postgresql://{user}:{password}@{host}:{port}.
UserNameParameter Section titled UserNameParameter nullable ParameterResource?
Gets or sets the parameter that contains the PostgreSQL server user name.
public ParameterResource? UserNameParameter { get; set; }
UserNameReference Section titled UserNameReference ReferenceExpression
Gets a reference to the user name for the PostgreSQL server.
public ReferenceExpression UserNameReference { get; }
Returns the user name parameter if specified, otherwise returns the default user name "postgres".