PostgresBuilderExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
WithCreationScript(IResourceBuilder<PostgresDatabaseResource>, String) |
Defines the SQL script used to create the database. |
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. |
WithHostPort(IResourceBuilder<PgWebContainerResource>, Nullable<Int32>) |
Configures the host port that the pgweb resource is exposed on instead of using randomly assigned port. |
WithHostPort(IResourceBuilder<PostgresServerResource>, Nullable<Int32>) |
Configures the host port that the PostgreSQL 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. |
WithPassword(IResourceBuilder<PostgresServerResource>, IResourceBuilder<ParameterResource>) |
Configures the password that the PostgreSQL resource is used. |
WithPgAdmin<T>(IResourceBuilder<T>, Action<IResourceBuilder<PgAdminContainerResource>>, String) |
Adds a pgAdmin 4 administration and development platform for PostgreSQL to the application model. |
WithPgWeb(IResourceBuilder<PostgresServerResource>, Action<IResourceBuilder<PgWebContainerResource>>, String) |
Adds an administration and development platform for PostgreSQL to the application model using pgweb. This version of the package defaults to the <inheritdoc cref="F:Aspire.Hosting.Postgres.PostgresContainerImageTags.PgWebTag"></inheritdoc> tag of the <inheritdoc cref="F:Aspire.Hosting.Postgres.PostgresContainerImageTags.PgWebImage"></inheritdoc> container image. |
WithUserName(IResourceBuilder<PostgresServerResource>, IResourceBuilder<ParameterResource>) |
Configures the user name that the PostgreSQL resource is used. |