PostgresBuilderExtensions.WithHostPort Method

Definition

Overloads

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<PgAdminContainerResource>, Nullable<Int32>)

Source:
PostgresBuilderExtensions.cs

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

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Postgres.PgAdminContainerResource> WithHostPort (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Postgres.PgAdminContainerResource> builder, int? port);
static member WithHostPort : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Postgres.PgAdminContainerResource> * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Postgres.PgAdminContainerResource>
<Extension()>
Public Function WithHostPort (builder As IResourceBuilder(Of PgAdminContainerResource), port As Nullable(Of Integer)) As IResourceBuilder(Of PgAdminContainerResource)

Parameters

builder
IResourceBuilder<PgAdminContainerResource>

The resource builder for PGAdmin.

port
Nullable<Int32>

The port to bind on the host. If null is used random port will be assigned.

Returns

The resource builder for PGAdmin.

Applies to

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

Source:
PostgresBuilderExtensions.cs

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

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Postgres.PgWebContainerResource> WithHostPort (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Postgres.PgWebContainerResource> builder, int? port);
static member WithHostPort : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Postgres.PgWebContainerResource> * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Postgres.PgWebContainerResource>
<Extension()>
Public Function WithHostPort (builder As IResourceBuilder(Of PgWebContainerResource), port As Nullable(Of Integer)) As IResourceBuilder(Of PgWebContainerResource)

Parameters

builder
IResourceBuilder<PgWebContainerResource>

The resource builder for pgweb.

port
Nullable<Int32>

The port to bind on the host. If null is used random port will be assigned.

Returns

The resource builder for pgweb.

Applies to