# LavinMQContainerResource

- Module: [CommunityToolkit.Aspire.Hosting.LavinMQ](/reference/api/typescript/communitytoolkit.aspire.hosting.lavinmq.md)
- Version: `13.4.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)

Represents a container resource for LavinMQ with configurable authentication parameters and connection endpoint details, implementing the IResourceWithConnectionString interface.

## Definition

```typescript
interface LavinMQContainerResource
  extends IComputeResource,
    IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithArgs,
    IResourceWithConnectionString,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IValueProvider,
    IValueWithReferences {
  readonly connectionStringExpression: ReferenceExpression;
  readonly host: EndpointReferenceExpression;
  readonly port: EndpointReferenceExpression;
  readonly primaryEndpoint: EndpointReference;
  readonly uriExpression: ReferenceExpression;
  withDataBindMount(
      source: string,
      isReadOnly?: boolean): LavinMQContainerResource;
  withDataVolume(
      name: string,
      isReadOnly?: boolean): LavinMQContainerResource;
}
```

## Properties

- `connectionStringExpression`: `ReferenceExpression` `get` -- ConnectionString for the LavinMQ server in the form of amqp://guest:guest@host:port/.
- `host`: `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for this resource.
- `port`: `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for this resource.
- `primaryEndpoint`: `EndpointReference` `get` -- Gets the primary AMQP endpoint for the LavinMQ resource.
- `uriExpression`: `ReferenceExpression` `get` -- Gets the connection URI expression for the LavinMQ server.

## Methods

- [withDataBindMount](/reference/api/typescript/communitytoolkit.aspire.hosting.lavinmq/lavinmqcontainerresource/withdatabindmount.md) -- `method` -- Configures a bind mount for the LavinMQ container resource to allow data persistence. The method mounts a specified source path on the host to the container's data directory.
    ```typescript
  withDataBindMount(source: string, isReadOnly?: boolean): LavinMQContainerResource
  ```
- [withDataVolume](/reference/api/typescript/communitytoolkit.aspire.hosting.lavinmq/lavinmqcontainerresource/withdatavolume.md) -- `method` -- Configures a data volume for the LavinMQ container resource by specifying its name and read-only status.
    ```typescript
  withDataVolume(name: string, isReadOnly?: boolean): LavinMQContainerResource
  ```
