# AzureStorageEmulatorResource.WithDataVolume

- Module: [Aspire.Hosting.Azure.Storage](/reference/api/go/aspire.hosting.azure.storage.md)
- Defined on: [AzureStorageEmulatorResource](/reference/api/go/aspire.hosting.azure.storage/azurestorageemulatorresource.md)
- Version: `17.0.0`
- Kind: `method`

Adds a named volume for the data folder to an Azure Storage emulator resource.

## Definition

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

## Signature

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

## 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 application and resource names.
- `IsReadOnly` (`*bool`) -- A flag that indicates if this is a read-only volume.

## Returns

[`AzureStorageEmulatorResource`](/reference/api/go/aspire.hosting.azure.storage/azurestorageemulatorresource.md) -- A builder for the `AzureStorageEmulatorResource`.

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

## Defined on

- [AzureStorageEmulatorResource](/reference/api/go/aspire.hosting.azure.storage/azurestorageemulatorresource.md) -- `handle`
