# RedisInsightResource.WithDataVolume

- Module: [Aspire.Hosting.Redis](/reference/api/go/aspire.hosting.redis.md)
- Defined on: [RedisInsightResource](/reference/api/go/aspire.hosting.redis/redisinsightresource.md)
- Version: `17.0.0`
- Kind: `method`

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

## Definition

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

## Signature

```go
WithDataVolume(options ...*RedisInsightResourceWithDataVolumeOptions) RedisInsightResource
```

## Parameters

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

## Options

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

- `Name` (`*string`) -- The name of the volume. Defaults to an auto-generated name based on the application and resource names.

## Returns

[`RedisInsightResource`](/reference/api/go/aspire.hosting.redis/redisinsightresource.md) -- The resource builder.

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

## Defined on

- [RedisInsightResource](/reference/api/go/aspire.hosting.redis/redisinsightresource.md) -- `handle`
