# AzurePostgresFlexibleServerDatabaseResource Properties

- 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: `Properties`
- Members: `7`

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

## Annotations

- Name: `Annotations`
- Modifiers: `override` `get`
- Returns: `ResourceAnnotationCollection`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs#L72)

```csharp
public override ResourceAnnotationCollection Annotations { get; }
```

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs#L29)

Gets the connection string expression for the Postgres database.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## DatabaseName

- Name: `DatabaseName`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs#L34)

Gets the database name.

```csharp
public string DatabaseName { get; }
```

## IsContainer

- Name: `IsContainer`
- Modifiers: `get`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs#L47)

Gets a value indicating whether the current resource represents a container. If so the actual resource is not running in Azure.

```csharp
public bool IsContainer { get; }
```

## JdbcConnectionString

- Name: `JdbcConnectionString`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs#L67-L69)

Gets the JDBC connection string for the Azure Postgres Flexible Server database.

```csharp
public ReferenceExpression JdbcConnectionString { get; }
```

## Remarks

Format: `jdbc:postgresql://{host}:{port}/{database}?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin`.

## Parent

- Name: `Parent`
- Modifiers: `get`
- Returns: [AzurePostgresFlexibleServerResource](/reference/api/csharp/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs#L24)

Gets the parent Azure PostgresSQL resource.

```csharp
public AzurePostgresFlexibleServerResource Parent { get; }
```

## UriExpression

- Name: `UriExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs#L56-L58)

Gets the connection URI expression for the PostgreSQL server.

```csharp
public ReferenceExpression UriExpression { get; }
```

## Remarks

Format: `postgresql://{user}:{password}@{host}:{port}/{database}`.
