# AzurePostgresFlexibleServerDatabaseResource

- 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/AzurePostgresFlexibleServerDatabaseResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<AzurePostgresFlexibleServerResource>`, `IValueProvider`, `IValueWithReferences`

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).

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzurePostgresFlexibleServerDatabaseResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IResourceWithParent,
      Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.Azure.AzurePostgresFlexibleServerResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## Constructors

- [AzurePostgresFlexibleServerDatabaseResource(string, string, AzurePostgresFlexibleServerResource)](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/constructors.md#constructor-string-string-azurepostgresflexibleserverresource) -- 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).

## Properties

- [Annotations](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/properties.md#annotations) : `ResourceAnnotationCollection` `get`
- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the Postgres database.
- [DatabaseName](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/properties.md#databasename) : `string` `get` -- Gets the database name.
- [IsContainer](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/properties.md#iscontainer) : `bool` `get` -- Gets a value indicating whether the current resource represents a container. If so the actual resource is not running in Azure.
- [JdbcConnectionString](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/properties.md#jdbcconnectionstring) : `ReferenceExpression` `get` -- Gets the JDBC connection string for the Azure Postgres Flexible Server database.
- [Parent](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/properties.md#parent) : [AzurePostgresFlexibleServerResource](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md) `get` -- Gets the parent Azure PostgresSQL resource.
- [UriExpression](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverdatabaseresource/properties.md#uriexpression) : `ReferenceExpression` `get` -- Gets the connection URI expression for the PostgreSQL server.
