Class EfsVolume.Builder
java.lang.Object
software.amazon.awscdk.services.batch.EfsVolume.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EfsVolume>
- Enclosing class:
EfsVolume
@Stability(Stable)
public static final class EfsVolume.Builder
extends Object
implements software.amazon.jsii.Builder<EfsVolume>
A fluent builder for
EfsVolume
.-
Method Summary
Modifier and TypeMethodDescriptionaccessPointId
(String accessPointId) The Amazon EFS access point ID to use.build()
containerPath
(String containerPath) the path on the container where this volume is mounted.static EfsVolume.Builder
create()
enableTransitEncryption
(Boolean enableTransitEncryption) Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.fileSystem
(IFileSystem fileSystem) The EFS File System that supports this volume.the name of this volume.if set, the container will have readonly access to the volume.rootDirectory
(String rootDirectory) The directory within the Amazon EFS file system to mount as the root directory inside the host.transitEncryptionPort
(Number transitEncryptionPort) The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.useJobRole
(Boolean useJobRole) Whether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system.
-
Method Details
-
create
- Returns:
- a new instance of
EfsVolume.Builder
.
-
containerPath
the path on the container where this volume is mounted.- Parameters:
containerPath
- the path on the container where this volume is mounted. This parameter is required.- Returns:
this
-
name
the name of this volume.- Parameters:
name
- the name of this volume. This parameter is required.- Returns:
this
-
readonly
if set, the container will have readonly access to the volume.Default: false
- Parameters:
readonly
- if set, the container will have readonly access to the volume. This parameter is required.- Returns:
this
-
fileSystem
The EFS File System that supports this volume.- Parameters:
fileSystem
- The EFS File System that supports this volume. This parameter is required.- Returns:
this
-
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 betrue
.Default: - no accessPointId
- Parameters:
accessPointId
- The Amazon EFS access point ID to use. This parameter is required.- Returns:
this
- See Also:
-
enableTransitEncryption
@Stability(Stable) public EfsVolume.Builder enableTransitEncryption(Boolean enableTransitEncryption) Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.Default: false
- Parameters:
enableTransitEncryption
- Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server. This parameter is required.- Returns:
this
- See Also:
-
rootDirectory
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
- Parameters:
rootDirectory
- The directory within the Amazon EFS file system to mount as the root directory inside the host. This parameter is required.- Returns:
this
-
transitEncryptionPort
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
- Parameters:
transitEncryptionPort
- The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server. This parameter is required.- Returns:
this
- See Also:
-
useJobRole
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 betrue
.Default: false
- Parameters:
useJobRole
- Whether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system. This parameter is required.- Returns:
this
- See Also:
-
build
-