# AzurePostgresResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.PostgreSQL](/reference/api/csharp/aspire.hosting.azure.postgresql.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresResource.cs)
- Inherits: `AzureProvisioningResource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IValueProvider`, `IValueWithReferences`

Represents an resource for Azure Postgres Flexible Server.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzurePostgresResource
    : Aspire.Hosting.Azure.AzureProvisioningResource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## Constructors

- [AzurePostgresResource(PostgresServerResource, Action<AzureResourceInfrastructure>)](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresresource/constructors.md#constructor-postgresserverresource-action-azureresourceinfrastructure) -- Represents an resource for Azure Postgres Flexible Server.

## Properties

- [Annotations](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresresource/properties.md#annotations) : `ResourceAnnotationCollection` `get`
- [ConnectionString](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresresource/properties.md#connectionstring) : `BicepSecretOutputReference` `get` -- Gets the "connectionString" secret output reference from the bicep template for the Azure Postgres Flexible Server.
- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection template for the manifest for the Azure Postgres Flexible Server.
- [Name](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresresource/properties.md#name) : `string` `get`
