EmptyDirVolumeOptions

class aws_cdk.aws_batch.EmptyDirVolumeOptions(*, name, mount_path=None, readonly=None, medium=None, size_limit=None)

Bases: EksVolumeOptions

Options for a Kubernetes EmptyDir volume.

Parameters:
  • name (str) – The name of this volume. The name must be a valid DNS subdomain name.

  • mount_path (Optional[str]) – The path on the container where the volume is mounted. Default: - the volume is not mounted

  • readonly (Optional[bool]) – If specified, the container has readonly access to the volume. Otherwise, the container has read/write access. Default: false

  • medium (Optional[EmptyDirMediumType]) – The storage type to use for this Volume. Default: EmptyDirMediumType.DISK

  • size_limit (Optional[Size]) – The maximum size for this Volume. Default: - no size limit

See:

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

ExampleMetadata:

infused

Example:

job_defn = batch.EksJobDefinition(self, "eksf2",
    container=batch.EksContainerDefinition(self, "container",
        image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
        volumes=[batch.EksVolume.empty_dir(
            name="myEmptyDirVolume",
            mount_path="/mount/path",
            medium=batch.EmptyDirMediumType.MEMORY,
            readonly=True,
            size_limit=cdk.Size.mebibytes(2048)
        )]
    )
)

Attributes

medium

The storage type to use for this Volume.

Default:

EmptyDirMediumType.DISK

mount_path

The path on the container where the volume is mounted.

Default:
  • the volume is not mounted

name

The name of this volume.

The name must be a valid DNS subdomain name.

See:

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

readonly

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

Otherwise, the container has read/write access.

Default:

false

size_limit

The maximum size for this Volume.

Default:
  • no size limit