# LavinMQContainerResource

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

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

## Definition

```go
type LavinMQContainerResource interface {
    ExpressionValue
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithConnectionString
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- `ExpressionValue`
- `IComputeResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithConnectionString`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- `ResourceWithWaitSupport`

## 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/go/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.
  ```go
  WithDataBindMount(source string, options ...*WithDataBindMountOptions) LavinMQContainerResource
  ```
- [WithDataVolume](/reference/api/go/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.
  ```go
  WithDataVolume(name string, options ...*WithDataVolumeOptions) LavinMQContainerResource
  ```
