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 Details

    • create

      @Stability(Stable) public static EfsVolume.Builder create()
      Returns:
      a new instance of EfsVolume.Builder.
    • containerPath

      @Stability(Stable) public EfsVolume.Builder containerPath(String 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

      @Stability(Stable) public EfsVolume.Builder name(String name)
      the name of this volume.

      Parameters:
      name - the name of this volume. This parameter is required.
      Returns:
      this
    • readonly

      @Stability(Stable) public EfsVolume.Builder readonly(Boolean 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

      @Stability(Stable) public EfsVolume.Builder fileSystem(IFileSystem 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

      @Stability(Stable) public EfsVolume.Builder accessPointId(String 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.

      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

      @Stability(Stable) public EfsVolume.Builder rootDirectory(String 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

      @Stability(Stable) public EfsVolume.Builder transitEncryptionPort(Number 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

      @Stability(Stable) public EfsVolume.Builder 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.

      If specified, enableTransitEncryption must be true.

      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

      @Stability(Stable) public EfsVolume build()
      Specified by:
      build in interface software.amazon.jsii.Builder<EfsVolume>
      Returns:
      a newly built instance of EfsVolume.