@aws-cdk_aws-batch-alpha.EksVolume

class EksVolume ๐Ÿ”น

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

Implemented by EmptyDirVolume, HostPathVolume, SecretPathVolume

A Volume that can be mounted to a container supported by EKS.

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),
    })],
  }),
});

Initializer

new EksVolume(options: EksVolumeOptions)

Parameters

  • options EksVolumeOptions

Properties

NameTypeDescription
name๐Ÿ”นstringThe name of this volume.
containerPath?๐Ÿ”นstringThe path on the container where the container is mounted.
readonly?๐Ÿ”นbooleanIf specified, the container has readonly access to the 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


containerPath?๐Ÿ”น

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

The path on the container where the container 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.

Methods

NameDescription
static emptyDir(options)๐Ÿ”นCreates a Kubernetes EmptyDir volume.
static hostPath(options)๐Ÿ”นCreates a Kubernetes HostPath volume.
static secret(options)๐Ÿ”นCreates a Kubernetes Secret volume.

static emptyDir(options)๐Ÿ”น

public static emptyDir(options: EmptyDirVolumeOptions): EmptyDirVolume

Parameters

  • options EmptyDirVolumeOptions

Returns

  • EmptyDirVolume

Creates a Kubernetes EmptyDir volume.

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


static hostPath(options)๐Ÿ”น

public static hostPath(options: HostPathVolumeOptions): HostPathVolume

Parameters

  • options HostPathVolumeOptions

Returns

  • HostPathVolume

Creates a Kubernetes HostPath volume.

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


static secret(options)๐Ÿ”น

public static secret(options: SecretPathVolumeOptions): SecretPathVolume

Parameters

  • options SecretPathVolumeOptions

Returns

  • SecretPathVolume

Creates a Kubernetes Secret volume.

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