Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AzurePostgresFlexibleServerResource

Handle
📦 Aspire.Hosting.Azure.PostgreSQL v17.0.0
type AzurePostgresFlexibleServerResource interface {
ExpressionValue
Resource
ResourceWithConnectionString
ResourceWithEndpoints
}

Methods

methodAddDatabasebuilder
Adds an Azure PostgreSQL database to the application model.
AddDatabase(
name string,
options ...*AddDatabaseOptions,
) AzurePostgresFlexibleServerDatabaseResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
options...*AddDatabaseOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddDatabaseOptions argument.

DatabaseName*stringThe name of the database. If not provided, this defaults to the same value as name.
AzurePostgresFlexibleServerDatabaseResource

The resource builder.

Returns a handle; failures surface later via Err().

methodRunAsContainerbuilder
Configures an Azure PostgreSQL Flexible Server resource to run locally in a container.
RunAsContainer(options ...*RunAsContainerOptions) AzurePostgresFlexibleServerResource
options...*RunAsContainerOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*RunAsContainerOptions argument.

ConfigureContainerfunc(obj PostgresServerResource)callbackCallback that exposes underlying container to allow for customization.
AzurePostgresFlexibleServerResource

The resource builder.

Returns a handle; failures surface later via Err().

Configures password authentication for Azure PostgreSQL Flexible Server
WithPasswordAuthentication(options ...*WithPasswordAuthenticationOptions) AzurePostgresFlexibleServerResource
options...*WithPasswordAuthenticationOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithPasswordAuthenticationOptions argument.

KeyVaultBuilder*AzureKeyVaultResource
UserName*ParameterResource
Password*ParameterResource
AzurePostgresFlexibleServerResource

Returns a handle; failures surface later via Err().