# EmptyDirVolumeOptions

Options for a Kubernetes EmptyDir volume.

Extends: EmptyDirVolumeOptions
Extends: EksVolumeOptions
Used as props by: EmptyDirVolume

- Source: [`aws-batch/lib/eks-container-definition.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-batch/lib/eks-container-definition.ts#L741)
- Type last changed: v2.96.0 · 13 Sep 2023

## Example

```ts
const jobDefn = new batch.EksJobDefinition(this, 'eksf2', {
  container: new batch.EksContainerDefinition(this, 'container', {
    image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
    volumes: [batch.EksVolume.emptyDir({
      name: 'myEmptyDirVolume',
      mountPath: '/mount/path',
      medium: batch.EmptyDirMediumType.MEMORY,
      readonly: true,
      sizeLimit: cdk.Size.mebibytes(2048),
    })],
  }),
});
```

## Properties

- `medium`: [EmptyDirMediumType](/cdk/api/v2/docs/aws-cdk-lib.aws_batch.EmptyDirMediumType.html) = `EmptyDirMediumType.DISK` — The storage type to use for this Volume.

- `mountPath`: string — The path on the container where the volume is mounted.

  **Default:** the volume is not mounted

- `name`: string (required) — The name of this volume.

  The name must be a valid DNS subdomain name.

- `readonly`: boolean = false — If specified, the container has readonly access to the volume.

  Otherwise, the container has read/write access.

- `sizeLimit`: [Size](/cdk/api/v2/docs/aws-cdk-lib.Size.html) — The maximum size for this Volume.

  **Default:** no size limit
