# AzurePostgresFlexibleServerResource

- Module: [Aspire.Hosting.Azure.PostgreSQL](/reference/api/go/aspire.hosting.azure.postgresql.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

## Definition

```go
type AzurePostgresFlexibleServerResource interface {
    ExpressionValue
    Resource
    ResourceWithConnectionString
    ResourceWithEndpoints
}
```

## Embeds

- `ExpressionValue`
- `Resource`
- `ResourceWithConnectionString`
- `ResourceWithEndpoints`

## Methods

- [AddDatabase](/reference/api/go/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource/adddatabase.md) -- `method` -- Adds an Azure PostgreSQL database to the application model.
  ```go
  AddDatabase(name string, options ...*AddDatabaseOptions) AzurePostgresFlexibleServerDatabaseResource
  ```
- [RunAsContainer](/reference/api/go/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource/runascontainer.md) -- `method` -- Configures an Azure PostgreSQL Flexible Server resource to run locally in a container.
  ```go
  RunAsContainer(options ...*RunAsContainerOptions) AzurePostgresFlexibleServerResource
  ```
- [WithPasswordAuthentication](/reference/api/go/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource/withpasswordauthentication.md) -- `method` -- Configures password authentication for Azure PostgreSQL Flexible Server
  ```go
  WithPasswordAuthentication(options ...*WithPasswordAuthenticationOptions) AzurePostgresFlexibleServerResource
  ```
