# AzurePostgresFlexibleServerDatabaseResource Constructors

- Package: [Aspire.Hosting.Azure.PostgreSQL](/reference/api/csharp/aspire.hosting.azure.postgresql.md)
- Type: [AzurePostgresFlexibleServerDatabaseResource](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource.md)
- Kind: `Constructors`
- Members: `1`

A resource that represents an Azure PostgreSQL database. This is a child resource of an [AzurePostgresFlexibleServerResource](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md).

## AzurePostgresFlexibleServerDatabaseResource(string, string, AzurePostgresFlexibleServerResource)

- Name: `Constructor(string, string, AzurePostgresFlexibleServerResource)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs#L19-L34)

A resource that represents an Azure PostgreSQL database. This is a child resource of an [AzurePostgresFlexibleServerResource](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md).

```csharp
public class AzurePostgresFlexibleServerDatabaseResource
{
    public AzurePostgresFlexibleServerDatabaseResource(
        string name,
        string databaseName,
        AzurePostgresFlexibleServerResource postgresParentResource)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `databaseName` (`string`)
  The database name.
- `postgresParentResource` ([AzurePostgresFlexibleServerResource](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md))
  The Azure PostgreSQL parent resource associated with this database.
