# AzurePostgresResource Constructors

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

Represents an resource for Azure Postgres Flexible Server.

## AzurePostgresResource(PostgresServerResource, Action<AzureResourceInfrastructure>)

- Name: `Constructor(PostgresServerResource, Action<AzureResourceInfrastructure>)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresResource.cs#L15-L17)

Represents an resource for Azure Postgres Flexible Server.

```csharp
public class AzurePostgresResource
{
    public AzurePostgresResource(
        PostgresServerResource innerResource,
        Action<AzureResourceInfrastructure> configureInfrastructure)
    {
        // ...
    }
}
```

## Parameters

- `innerResource` (`PostgresServerResource`)
  `ApplicationModel.PostgresServerResource` that this resource wraps.
- `configureInfrastructure` (`Action<AzureResourceInfrastructure>`)
  Callback to configure the Azure resources.
