Share via


PostgresBuilderExtensions Class

Definition

Provides extension methods for adding PostgreSQL resources to an IDistributedApplicationBuilder.

public static class PostgresBuilderExtensions
type PostgresBuilderExtensions = class
Public Module PostgresBuilderExtensions
Inheritance
PostgresBuilderExtensions

Methods

AddDatabase(IResourceBuilder<PostgresServerResource>, String, String)

Adds a PostgreSQL database to the application model.

AddPostgres(IDistributedApplicationBuilder, String, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, Nullable<Int32>)

Adds a PostgreSQL resource to the application model. A container is used for local development. This version the package defaults to the 16.2 tag of the postgres container image

WithDataBindMount(IResourceBuilder<PostgresServerResource>, String, Boolean)

Adds a bind mount for the data folder to a PostgreSQL container resource.

WithDataVolume(IResourceBuilder<PostgresServerResource>, String, Boolean)

Adds a named volume for the data folder to a PostgreSQL container resource.

WithHostPort(IResourceBuilder<PgAdminContainerResource>, Nullable<Int32>)

Configures the host port that the PGAdmin resource is exposed on instead of using randomly assigned port.

WithInitBindMount(IResourceBuilder<PostgresServerResource>, String, Boolean)

Adds a bind mount for the init folder to a PostgreSQL container resource.

WithPgAdmin<T>(IResourceBuilder<T>, Action<IResourceBuilder<PgAdminContainerResource>>, String)

Adds a pgAdmin 4 administration and development platform for PostgreSQL to the application model. This version the package defaults to the 8.3 tag of the dpage/pgadmin4 container image

Applies to