# AzurePostgresFlexibleServerResource Constructors

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

Represents an resource for Azure Postgres Flexible Server.

## AzurePostgresFlexibleServerResource(string, Action<AzureResourceInfrastructure>)

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

Represents an resource for Azure Postgres Flexible Server.

```csharp
public class AzurePostgresFlexibleServerResource
{
    public AzurePostgresFlexibleServerResource(
        string name,
        Action<AzureResourceInfrastructure> configureInfrastructure)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `configureInfrastructure` (`Action<AzureResourceInfrastructure>`)
  Callback to configure infrastructure.
