Skip to content
Docs Try Aspire

PostgresServerResource

Handle TypeScript
📦 Aspire.Hosting.PostgreSQL v13.2.0-preview.1.26159.1
interface PostgresServerResource
extends IComputeResource,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly databases: Dict<string,string>;
entrypoint: string;
readonly host: EndpointReferenceExpression;
readonly jdbcConnectionString: ReferenceExpression;
readonly name: string;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
shellExecution: boolean;
readonly uriExpression: ReferenceExpression;
readonly userNameReference: ReferenceExpression;
addDatabase(
name: string,
databaseName?: string): PostgresDatabaseResource;
withDataBindMount(
source: string,
isReadOnly?: boolean): PostgresServerResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): PostgresServerResource;
withHostPort(port: number): PostgresServerResource;
withInitFiles(source: string): PostgresServerResource;
withPassword(password: ParameterResource): PostgresServerResource;
withPgAdmin(configureContainer?: (obj: PgAdminContainerResource) => void, containerName?: string): PostgresServerResource;
withPgWeb(configureContainer?: (obj: PgWebContainerResource) => void, containerName?: string): PostgresServerResource;
withUserName(userName: ParameterResource): PostgresServerResource;
}

Properties

property connectionStringExpression ReferenceExpression get
Gets the ConnectionStringExpression property
property databases Dict<string,string> get
Gets the Databases property
property entrypoint string get · set
Gets the Entrypoint property
property host EndpointReferenceExpression get
Gets the Host property
property jdbcConnectionString ReferenceExpression get
Gets the JdbcConnectionString property
property name string get
Gets the Name property
property port EndpointReferenceExpression get
Gets the Port property
property primaryEndpoint EndpointReference get
Gets the PrimaryEndpoint property
property shellExecution boolean get · set
Gets the ShellExecution property
property uriExpression ReferenceExpression get
Gets the UriExpression property
property userNameReference ReferenceExpression get
Gets the UserNameReference property

Methods

method addDatabase builder
Adds a PostgreSQL database
addDatabase(
name: string,
databaseName?: string): PostgresDatabaseResource
name string
databaseName string optional
PostgresDatabaseResource
method withDataBindMount builder
Adds a data bind mount for PostgreSQL
withDataBindMount(
source: string,
isReadOnly?: boolean): PostgresServerResource
source string
isReadOnly boolean optional = False
PostgresServerResource
method withDataVolume builder
Adds a data volume for PostgreSQL
withDataVolume(
name?: string,
isReadOnly?: boolean): PostgresServerResource
name string optional
isReadOnly boolean optional = False
PostgresServerResource
method withHostPort builder
Sets the host port for PostgreSQL
withHostPort(port: number): PostgresServerResource
port number
PostgresServerResource
method withInitFiles builder
Copies init files to PostgreSQL
withInitFiles(source: string): PostgresServerResource
source string
PostgresServerResource
method withPassword builder
Configures the PostgreSQL password
withPassword(password: ParameterResource): PostgresServerResource
password ParameterResource
PostgresServerResource
method withPgAdmin builder
Adds pgAdmin 4 management UI
withPgAdmin(configureContainer?: (obj: PgAdminContainerResource) => void, containerName?: string): PostgresServerResource
configureContainer (obj: PgAdminContainerResource) => void optional
containerName string optional
PostgresServerResource
method withPgWeb builder
Adds pgweb management UI
withPgWeb(configureContainer?: (obj: PgWebContainerResource) => void, containerName?: string): PostgresServerResource
configureContainer (obj: PgWebContainerResource) => void optional
containerName string optional
PostgresServerResource
method withUserName builder
Configures the PostgreSQL user name
withUserName(userName: ParameterResource): PostgresServerResource
userName ParameterResource
PostgresServerResource