@aws-cdk_aws-batch-alpha.EfsVolume

class EfsVolume ๐Ÿ”น

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

Extends EcsVolume

A Volume that uses an AWS Elastic File System (EFS);

this volume can grow and shrink as needed

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as batch_alpha from '@aws-cdk/aws-batch-alpha';
import { aws_efs as efs } from 'aws-cdk-lib';

declare const fileSystem: efs.FileSystem;
const efsVolume = new batch_alpha.EfsVolume({
  containerPath: 'containerPath',
  fileSystem: fileSystem,
  name: 'name',

  // the properties below are optional
  accessPointId: 'accessPointId',
  enableTransitEncryption: false,
  readonly: false,
  rootDirectory: 'rootDirectory',
  transitEncryptionPort: 123,
  useJobRole: false,
});

Initializer

new EfsVolume(options: EfsVolumeOptions)

Parameters

  • options EfsVolumeOptions

Properties

NameTypeDescription
containerPath๐Ÿ”นstringThe path on the container that this volume will be mounted to.
fileSystem๐Ÿ”นIFileSystemThe EFS File System that supports this volume.
name๐Ÿ”นstringThe name of this volume.
accessPointId?๐Ÿ”นstringThe Amazon EFS access point ID to use.
enableTransitEncryption?๐Ÿ”นbooleanEnables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.
readonly?๐Ÿ”นbooleanWhether or not the container has readonly access to this volume.
rootDirectory?๐Ÿ”นstringThe directory within the Amazon EFS file system to mount as the root directory inside the host.
transitEncryptionPort?๐Ÿ”นnumberThe port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.
useJobRole?๐Ÿ”นbooleanWhether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system.

containerPath๐Ÿ”น

Type: string

The path on the container that this volume will be mounted to.


fileSystem๐Ÿ”น

Type: IFileSystem

The EFS File System that supports this volume.


name๐Ÿ”น

Type: string

The name of this volume.


accessPointId?๐Ÿ”น

Type: string (optional, default: no accessPointId)

The Amazon EFS access point ID to use.

If an access point is specified, rootDirectory must either be omitted or set to / which enforces the path set on the EFS access point. If an access point is used, enableTransitEncryption must be true.

See also: https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html


enableTransitEncryption?๐Ÿ”น

Type: boolean (optional, default: false)

Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.

See also: https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html


readonly?๐Ÿ”น

Type: boolean (optional, default: false)

Whether or not the container has readonly access to this volume.


rootDirectory?๐Ÿ”น

Type: string (optional, default: root of the EFS File System)

The directory within the Amazon EFS file system to mount as the root directory inside the host.

If this parameter is omitted, the root of the Amazon EFS volume is used instead. Specifying / has the same effect as omitting this parameter. The maximum length is 4,096 characters.


transitEncryptionPort?๐Ÿ”น

Type: number (optional, default: chosen by the EFS Mount Helper)

The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.

The value must be between 0 and 65,535.

See also: https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html


useJobRole?๐Ÿ”น

Type: boolean (optional, default: false)

Whether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system.

If specified, enableTransitEncryption must be true.

See also: https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints

Methods

NameDescription
static isEfsVolume(x)๐Ÿ”นReturns true if x is an EfsVolume, false otherwise.

static isEfsVolume(x)๐Ÿ”น

public static isEfsVolume(x: any): boolean

Parameters

  • x any

Returns

  • boolean

Returns true if x is an EfsVolume, false otherwise.