# PostaResource

- Module: [CommunityToolkit.Aspire.Hosting.Posta](/reference/api/typescript/communitytoolkit.aspire.hosting.posta.md)
- Version: `13.5.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1)

Resource for the Posta email delivery platform.

## Definition

```typescript
interface PostaResource
  extends IComputeResource,
    IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithArgs,
    IResourceWithConnectionString,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IValueProvider,
    IValueWithReferences {
  readonly adminPasswordParameter: ParameterResource;
  readonly connectionStringExpression: ReferenceExpression;
  readonly host: EndpointReferenceExpression;
  readonly jwtSecretParameter: ParameterResource;
  readonly port: EndpointReferenceExpression;
  readonly primaryEndpoint: EndpointReference;
  readonly smtpEndpoint: EndpointReference;
  readonly smtpRelayEndpoint: EndpointReference;
  readonly uriExpression: ReferenceExpression;
  withDataBindMount(
      source: string,
      isReadOnly?: boolean): PostaResource;
  withDataVolume(
      name?: string,
      isReadOnly?: boolean): PostaResource;
  withPostgresReference(database: PostgresDatabaseResource): PostaResource;
  withRedisReference(
      redis: RedisResource,
      redisPassword?: ParameterResource): PostaResource;
}
```

## Properties

- `adminPasswordParameter`: `ParameterResource` `get` -- Gets the parameter that contains the initial admin password.
- `connectionStringExpression`: `ReferenceExpression` `get` -- Connection string for the Posta HTTP API in the form of Endpoint=http://host:port.
- `host`: `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for the HTTP endpoint.
- `jwtSecretParameter`: `ParameterResource` `get` -- Gets the parameter that contains the JWT signing secret.
- `port`: `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for the HTTP endpoint.
- `primaryEndpoint`: `EndpointReference` `get` -- Gets the primary HTTP endpoint for the Posta server.
- `smtpEndpoint`: `EndpointReference` `get` -- Gets the inbound SMTP endpoint for the Posta server.
- `smtpRelayEndpoint`: `EndpointReference` `get` -- Gets the authenticated SMTP relay endpoint for the Posta server.
- `uriExpression`: `ReferenceExpression` `get` -- Gets the connection URI expression for the Posta HTTP API.

## Methods

- [withDataBindMount](/reference/api/typescript/communitytoolkit.aspire.hosting.posta/postaresource/withdatabindmount.md) -- `method` -- Adds a bind mount for Posta's filesystem-backed attachment data.
    ```typescript
  withDataBindMount(source: string, isReadOnly?: boolean): PostaResource
  ```
- [withDataVolume](/reference/api/typescript/communitytoolkit.aspire.hosting.posta/postaresource/withdatavolume.md) -- `method` -- Adds a named volume for Posta's filesystem-backed attachment data.
    ```typescript
  withDataVolume(name?: string, isReadOnly?: boolean): PostaResource
  ```
- [withPostgresReference](/reference/api/typescript/communitytoolkit.aspire.hosting.posta/postaresource/withpostgresreference.md) -- `method` -- Configures the PostgreSQL database used by Posta.
    ```typescript
  withPostgresReference(database: PostgresDatabaseResource): PostaResource
  ```
- [withRedisReference](/reference/api/typescript/communitytoolkit.aspire.hosting.posta/postaresource/withredisreference.md) -- `method` -- Configures the Redis server used by Posta.
    ```typescript
  withRedisReference(redis: RedisResource, redisPassword?: ParameterResource): PostaResource
  ```
