addDatabase

Method
📦 Aspire.Hosting.Azure.PostgreSQL v17.0.0
interface AzurePostgresFlexibleServerResource {
// ... omitted for brevity
addDatabase(
name: string,
databaseName?: string): AzurePostgresFlexibleServerDatabaseResource;
}

Signature

methodaddDatabasebuilder
Adds an Azure PostgreSQL database to the application model.
addDatabase(
name: string,
databaseName?: string): AzurePostgresFlexibleServerDatabaseResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
databaseNamestringoptionalThe name of the database. If not provided, this defaults to the same value as `name`.
AzurePostgresFlexibleServerDatabaseResource

Applies to

This method applies to the following types: