Interface EfsVolumeOptions
- All Superinterfaces:
EcsVolumeOptions,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EfsVolumeOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:05.914Z")
@Stability(Stable)
public interface EfsVolumeOptions
extends software.amazon.jsii.JsiiSerializable, EcsVolumeOptions
Options for configuring an EfsVolume.
Example:
IFileSystem myFileSystem;
Role myJobRole;
myFileSystem.grantRead(myJobRole);
EcsJobDefinition jobDefn = EcsJobDefinition.Builder.create(this, "JobDefn")
.container(EcsEc2ContainerDefinition.Builder.create(this, "containerDefn")
.image(ContainerImage.fromRegistry("public.ecr.aws/amazonlinux/amazonlinux:latest"))
.memory(Size.mebibytes(2048))
.cpu(256)
.volumes(List.of(EcsVolume.efs(EfsVolumeOptions.builder()
.name("myVolume")
.fileSystem(myFileSystem)
.containerPath("/Volumes/myVolume")
.useJobRole(true)
.build())))
.jobRole(myJobRole)
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEfsVolumeOptionsstatic final classAn implementation forEfsVolumeOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic EfsVolumeOptions.Builderbuilder()default StringThe Amazon EFS access point ID to use.default BooleanEnables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.The EFS File System that supports this volume.default StringThe directory within the Amazon EFS file system to mount as the root directory inside the host.default NumberThe port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.default BooleanWhether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system.Methods inherited from interface software.amazon.awscdk.services.batch.EcsVolumeOptions
getContainerPath, getName, getReadonlyMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getFileSystem
The EFS File System that supports this volume. -
getAccessPointId
The Amazon EFS access point ID to use.If an access point is specified,
rootDirectorymust either be omitted or set to/which enforces the path set on the EFS access point. If an access point is used,enableTransitEncryptionmust betrue.Default: - no accessPointId
- See Also:
-
getEnableTransitEncryption
Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.Default: false
- See Also:
-
getRootDirectory
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.Default: - root of the EFS File System
-
getTransitEncryptionPort
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.
Default: - chosen by the EFS Mount Helper
- See Also:
-
getUseJobRole
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,
enableTransitEncryptionmust betrue.Default: false
- See Also:
-
builder
- Returns:
- a
EfsVolumeOptions.BuilderofEfsVolumeOptions
-