PostgresBuilderExtensions
Class static net10.0
Provides extension methods for adding PostgreSQL resources to an
Hosting.IDistributedApplicationBuilder. namespace Aspire.Hosting;
public static class PostgresBuilderExtensions{ // ...} 14 members
Methods14
Section titled MethodsAddDatabase(IResourceBuilder<PostgresServerResource>, string, string?)extensionIResourceBuilder<PostgresDatabaseResource> Adds a PostgreSQL database to the application model.
AddPostgres(IDistributedApplicationBuilder, string, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, int?)extensionIResourceBuilder<PostgresServerResource> Adds a PostgreSQL resource to the application model. A container is used for local development.
WithCreationScript(IResourceBuilder<PostgresDatabaseResource>, string)extensionIResourceBuilder<PostgresDatabaseResource> Defines the SQL script used to create the database.
WithDataBindMount(IResourceBuilder<PostgresServerResource>, string, bool)extensionIResourceBuilder<PostgresServerResource> Adds a bind mount for the data folder to a PostgreSQL container resource.
WithDataVolume(IResourceBuilder<PostgresServerResource>, string?, bool)extensionIResourceBuilder<PostgresServerResource> Adds a named volume for the data folder to a PostgreSQL container resource.
WithHostPort(IResourceBuilder<PgAdminContainerResource>, int?)extensionIResourceBuilder<PgAdminContainerResource> Configures the host port that the PGAdmin resource is exposed on instead of using randomly assigned port.
WithHostPort(IResourceBuilder<PgWebContainerResource>, int?)extensionIResourceBuilder<PgWebContainerResource> Configures the host port that the pgweb resource is exposed on instead of using randomly assigned port.
WithHostPort(IResourceBuilder<PostgresServerResource>, int?)extensionIResourceBuilder<PostgresServerResource> Configures the host port that the PostgreSQL resource is exposed on instead of using randomly assigned port.
WithInitBindMount(IResourceBuilder<PostgresServerResource>, string, bool)extensionobsoleteIResourceBuilder<PostgresServerResource> Adds a bind mount for the init folder to a PostgreSQL container resource.
WithInitFiles(IResourceBuilder<PostgresServerResource>, string)extensionIResourceBuilder<PostgresServerResource> Copies init files to a PostgreSQL container resource.
WithPassword(IResourceBuilder<PostgresServerResource>, IResourceBuilder<ParameterResource>)extensionIResourceBuilder<PostgresServerResource> Configures the password that the PostgreSQL resource is used.
WithPgAdmin(IResourceBuilder<T>, Action<IResourceBuilder<PgAdminContainerResource>>, string?)extensionIResourceBuilder<T> Adds a pgAdmin 4 administration and development platform for PostgreSQL to the application model.
WithPgWeb(IResourceBuilder<PostgresServerResource>, Action<IResourceBuilder<PgWebContainerResource>>, string?)extensionIResourceBuilder<PostgresServerResource> Adds an administration and development platform for PostgreSQL to the application model using pgweb. This version of the package defaults to the tag of the container image.
WithUserName(IResourceBuilder<PostgresServerResource>, IResourceBuilder<ParameterResource>)extensionIResourceBuilder<PostgresServerResource> Configures the user name that the PostgreSQL resource is used.