Class EfsVolumeOptions.Builder
java.lang.Object
software.amazon.awscdk.services.batch.EfsVolumeOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EfsVolumeOptions>
- Enclosing interface:
EfsVolumeOptions
@Stability(Stable)
public static final class EfsVolumeOptions.Builder
extends Object
implements software.amazon.jsii.Builder<EfsVolumeOptions>
A builder for
EfsVolumeOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessPointId(String accessPointId) Sets the value ofEfsVolumeOptions.getAccessPointId()build()Builds the configured instance.containerPath(String containerPath) Sets the value ofEcsVolumeOptions.getContainerPath()enableTransitEncryption(Boolean enableTransitEncryption) Sets the value ofEfsVolumeOptions.getEnableTransitEncryption()fileSystem(IFileSystem fileSystem) Sets the value ofEfsVolumeOptions.getFileSystem()Sets the value ofEcsVolumeOptions.getName()Sets the value ofEcsVolumeOptions.getReadonly()rootDirectory(String rootDirectory) Sets the value ofEfsVolumeOptions.getRootDirectory()transitEncryptionPort(Number transitEncryptionPort) Sets the value ofEfsVolumeOptions.getTransitEncryptionPort()useJobRole(Boolean useJobRole) Sets the value ofEfsVolumeOptions.getUseJobRole()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fileSystem
Sets the value ofEfsVolumeOptions.getFileSystem()- Parameters:
fileSystem- The EFS File System that supports this volume. This parameter is required.- Returns:
this
-
accessPointId
Sets the value ofEfsVolumeOptions.getAccessPointId()- Parameters:
accessPointId- 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.- Returns:
this
-
enableTransitEncryption
@Stability(Stable) public EfsVolumeOptions.Builder enableTransitEncryption(Boolean enableTransitEncryption) Sets the value ofEfsVolumeOptions.getEnableTransitEncryption()- Parameters:
enableTransitEncryption- Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.- Returns:
this
-
rootDirectory
Sets the value ofEfsVolumeOptions.getRootDirectory()- Parameters:
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.- Returns:
this
-
transitEncryptionPort
@Stability(Stable) public EfsVolumeOptions.Builder transitEncryptionPort(Number transitEncryptionPort) Sets the value ofEfsVolumeOptions.getTransitEncryptionPort()- Parameters:
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.- Returns:
this
-
useJobRole
Sets the value ofEfsVolumeOptions.getUseJobRole()- 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. If specified,enableTransitEncryptionmust betrue.- Returns:
this
-
containerPath
Sets the value ofEcsVolumeOptions.getContainerPath()- Parameters:
containerPath- the path on the container where this volume is mounted. This parameter is required.- Returns:
this
-
name
Sets the value ofEcsVolumeOptions.getName()- Parameters:
name- the name of this volume. This parameter is required.- Returns:
this
-
readonly
Sets the value ofEcsVolumeOptions.getReadonly()- Parameters:
readonly- if set, the container will have readonly access to the volume.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<EfsVolumeOptions>- Returns:
- a new instance of
EfsVolumeOptions - Throws:
NullPointerException- if any required attribute was not provided
-