# ContainerMountAnnotation

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/ContainerMountAnnotation.cs)
- Implements: [IResourceAnnotation](/reference/api/csharp/aspire.hosting/iresourceannotation.md)

Represents a mount annotation for a container resource.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class ContainerMountAnnotation
    : Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
    // ...
}
```

## Constructors

- [ContainerMountAnnotation(string?, string, ContainerMountType, bool)](/reference/api/csharp/aspire.hosting/containermountannotation/constructors.md#constructor-string-string-containermounttype-bool) -- Instantiates a mount annotation that specifies the details for a container mount.

## Properties

- [IsReadOnly](/reference/api/csharp/aspire.hosting/containermountannotation/properties.md#isreadonly) : `bool` `get` -- Gets a value indicating whether the volume mount is read-only.
- [Source](/reference/api/csharp/aspire.hosting/containermountannotation/properties.md#source) : `string?` `get` -- Gets the source of the bind mount or name if a volume. Can be `null` if the mount is an anonymous volume.
- [Target](/reference/api/csharp/aspire.hosting/containermountannotation/properties.md#target) : `string` `get` -- Gets the target of the mount.
- [Type](/reference/api/csharp/aspire.hosting/containermountannotation/properties.md#type) : [ContainerMountType](/reference/api/csharp/aspire.hosting/containermounttype.md) `get` -- Gets the type of the mount.
