# VolumeSnapshot

- Kind: `record`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CustomResourceSnapshot.cs)
- Implements: `IEquatable<VolumeSnapshot>`

A snapshot of a volume, mounted to a container.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed record VolumeSnapshot
    : System.IEquatable<Aspire.Hosting.ApplicationModel.VolumeSnapshot>
{
    // ...
}
```

## Constructors

- [VolumeSnapshot(string?, string, string, bool)](/reference/api/csharp/aspire.hosting/volumesnapshot/constructors.md#constructor-string-string-string-bool) -- A snapshot of a volume, mounted to a container.

## Properties

- [IsReadOnly](/reference/api/csharp/aspire.hosting/volumesnapshot/properties.md#isreadonly) : `bool` `get; init` -- Whether the volume mount is read-only or not.
- [MountType](/reference/api/csharp/aspire.hosting/volumesnapshot/properties.md#mounttype) : `string` `get; init` -- Gets the mount type, such as `VolumeMountType.Bind` or `VolumeMountType.Volume`
- [Source](/reference/api/csharp/aspire.hosting/volumesnapshot/properties.md#source) : `string?` `get; init` -- The name of the volume. Can be `null` if the mount is an anonymous volume.
- [Target](/reference/api/csharp/aspire.hosting/volumesnapshot/properties.md#target) : `string` `get; init` -- The target of the mount.

## Methods

- [<Clone>$](/reference/api/csharp/aspire.hosting/volumesnapshot/methods.md#clone) : [VolumeSnapshot](/reference/api/csharp/aspire.hosting/volumesnapshot.md)
- [Deconstruct(string?, string, string, bool)](/reference/api/csharp/aspire.hosting/volumesnapshot/methods.md#deconstruct-string-string-string-bool)
- [Equals(object?)](/reference/api/csharp/aspire.hosting/volumesnapshot/methods.md#equals-object) : `bool` -- Determines whether the specified object is equal to the current object.
- [Equals(VolumeSnapshot?)](/reference/api/csharp/aspire.hosting/volumesnapshot/methods.md#equals-volumesnapshot) : `bool` -- Indicates whether the current object is equal to another object of the same type.
- [GetHashCode](/reference/api/csharp/aspire.hosting/volumesnapshot/methods.md#gethashcode) : `int` -- Serves as the default hash function.
- [op_Equality(VolumeSnapshot?, VolumeSnapshot?)](/reference/api/csharp/aspire.hosting/volumesnapshot/methods.md#op-equality-volumesnapshot-volumesnapshot) : `bool` `static`
- [op_Inequality(VolumeSnapshot?, VolumeSnapshot?)](/reference/api/csharp/aspire.hosting/volumesnapshot/methods.md#op-inequality-volumesnapshot-volumesnapshot) : `bool` `static`
- [ToString](/reference/api/csharp/aspire.hosting/volumesnapshot/methods.md#tostring) : `string` -- Returns a string that represents the current object.
