# Aspire.Hosting.Azure.PostgreSQL

- Module: `Aspire.Hosting.Azure.PostgreSQL`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `5`
- Types: `5`

## Handles

- [AzureKeyVaultResource](/reference/api/go/aspire.hosting.azure.postgresql/azurekeyvaultresource.md) -- `interface` `marker` - 0 members
- [AzurePostgresFlexibleServerDatabaseResource](/reference/api/go/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource.md) -- `handle` - 1 members
- [AzurePostgresFlexibleServerResource](/reference/api/go/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md) -- `handle` - 3 members
- [PostgresMcpContainerResource](/reference/api/go/aspire.hosting.azure.postgresql/postgresmcpcontainerresource.md) -- `handle` - 0 members
- [PostgresServerResource](/reference/api/go/aspire.hosting.azure.postgresql/postgresserverresource.md) -- `handle` - 0 members

## Functions

- [WithPostgresMcp](/reference/api/go/aspire.hosting.azure.postgresql/withpostgresmcp.md) -- `method` - on `AzurePostgresFlexibleServerDatabaseResource` -- Adds a Postgres MCP server container and configures it to connect to the database represented by `builder`.
- [AddDatabase](/reference/api/go/aspire.hosting.azure.postgresql/adddatabase.md) -- `method` - on `AzurePostgresFlexibleServerResource` -- Adds an Azure PostgreSQL database to the application model.
- [RunAsContainer](/reference/api/go/aspire.hosting.azure.postgresql/runascontainer.md) -- `method` - on `AzurePostgresFlexibleServerResource` -- Configures an Azure PostgreSQL Flexible Server resource to run locally in a container.
- [WithPasswordAuthentication](/reference/api/go/aspire.hosting.azure.postgresql/withpasswordauthentication.md) -- `method` - on `AzurePostgresFlexibleServerResource` -- Configures password authentication for Azure PostgreSQL Flexible Server
- [AddAzurePostgresFlexibleServer](/reference/api/go/aspire.hosting.azure.postgresql/addazurepostgresflexibleserver.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure PostgreSQL Flexible Server resource to the application model.
