# QdrantServerResource.WithDataVolume

- Module: [Aspire.Hosting.Qdrant](/reference/api/go/aspire.hosting.qdrant.md)
- Defined on: [QdrantServerResource](/reference/api/go/aspire.hosting.qdrant/qdrantserverresource.md)
- Version: `17.0.0`
- Kind: `method`

Adds a named volume for the data folder to a Qdrant container resource.

## Definition

```go
type QdrantServerResource interface {
    // ... omitted for brevity
    WithDataVolume(options ...*WithDataVolumeOptions) QdrantServerResource
}
```

## Signature

```go
WithDataVolume(options ...*WithDataVolumeOptions) QdrantServerResource
```

## Parameters

- `options` (`...*WithDataVolumeOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithDataVolumeOptions` argument.

- `Name` (`*string`) -- The name of the volume. Defaults to an auto-generated name based on the resource name.
- `IsReadOnly` (`*bool`) -- A flag that indicates if this is a read-only volume.

## Returns

[`QdrantServerResource`](/reference/api/go/aspire.hosting.qdrant/qdrantserverresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [QdrantServerResource](/reference/api/go/aspire.hosting.qdrant/qdrantserverresource.md) -- `handle`
