@aws-cdk_aws-batch-alpha.EmptyDirVolumeOptions

interface EmptyDirVolumeOptions ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Batch.Alpha.EmptyDirVolumeOptions
Gogithub.com/aws/aws-cdk-go/awscdkbatchalpha/v2#EmptyDirVolumeOptions
Javasoftware.amazon.awscdk.services.batch.alpha.EmptyDirVolumeOptions
Pythonaws_cdk.aws_batch_alpha.EmptyDirVolumeOptions
TypeScript (source)@aws-cdk/aws-batch-alpha ยป EmptyDirVolumeOptions

Options for a Kubernetes EmptyDir volume.

See also: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir

Example

import * as cdk from 'aws-cdk-lib';
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

NameTypeDescription
name๐Ÿ”นstringThe name of this volume.
medium?๐Ÿ”นEmptyDirMediumTypeThe storage type to use for this Volume.
mountPath?๐Ÿ”นstringThe path on the container where the volume is mounted.
readonly?๐Ÿ”นbooleanIf specified, the container has readonly access to the volume.
sizeLimit?๐Ÿ”นSizeThe maximum size for this Volume.

name๐Ÿ”น

Type: string

The name of this volume.

The name must be a valid DNS subdomain name.

See also: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names


medium?๐Ÿ”น

Type: EmptyDirMediumType (optional, default: EmptyDirMediumType.DISK)

The storage type to use for this Volume.


mountPath?๐Ÿ”น

Type: string (optional, default: the volume is not mounted)

The path on the container where the volume is mounted.


readonly?๐Ÿ”น

Type: boolean (optional, default: false)

If specified, the container has readonly access to the volume.

Otherwise, the container has read/write access.


sizeLimit?๐Ÿ”น

Type: Size (optional, default: no size limit)

The maximum size for this Volume.