Skip to content
DocsTry Aspire
DocsTry

PostgresServerResource Properties

ClassProperties10 members
A resource that represents a PostgreSQL container.
ConnectionStringExpressionSection titled ConnectionStringExpressionReferenceExpression
Gets the connection string expression for the PostgreSQL server.
public ReferenceExpression ConnectionStringExpression { get; }
DatabasesSection titled DatabasesIReadOnlyDictionary<string, string>
A dictionary where the key is the resource name and the value is the database name.
public IReadOnlyDictionary<string, string> Databases { get; }
HostSection titled HostEndpointReferenceExpression
Gets the host endpoint reference for this service.
public EndpointReferenceExpression Host { get; }
JdbcConnectionStringSection titled JdbcConnectionStringReferenceExpression
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.

PasswordParameterSection titled PasswordParameterParameterResource
Gets or sets the parameter that contains the PostgreSQL server password.
public ParameterResource PasswordParameter { get; set; }
PortSection titled PortEndpointReferenceExpression
Gets the endpoint reference expression that identifies the port for this endpoint.
public EndpointReferenceExpression Port { get; }
PrimaryEndpointSection titled PrimaryEndpointEndpointReference
Gets the primary endpoint for the PostgreSQL server.
public EndpointReference PrimaryEndpoint { get; }
UriExpressionSection titled UriExpressionReferenceExpression
Gets the connection URI expression for the PostgreSQL server.
public ReferenceExpression UriExpression { get; }
Format: postgresql://{user}:{password}@{host}:{port}.
UserNameParameterSection titled UserNameParameternullableParameterResource?
Gets or sets the parameter that contains the PostgreSQL server user name.
public ParameterResource? UserNameParameter { get; set; }
UserNameReferenceSection titled UserNameReferenceReferenceExpression
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".