Interface EfsVolumeOptions

All Superinterfaces:
EcsVolumeOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
EfsVolumeOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-11T18:01:12.003Z") @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();
 
  • Method Details

    • getFileSystem

      @Stability(Stable) @NotNull IFileSystem getFileSystem()
      The EFS File System that supports this volume.
    • getAccessPointId

      @Stability(Stable) @Nullable default String getAccessPointId()
      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

      See Also:
    • getEnableTransitEncryption

      @Stability(Stable) @Nullable default Boolean getEnableTransitEncryption()
      Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.

      Default: false

      See Also:
    • getRootDirectory

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) @Nullable default Number 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

      @Stability(Stable) @Nullable default Boolean 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, enableTransitEncryption must be true.

      Default: false

      See Also:
    • builder

      @Stability(Stable) static EfsVolumeOptions.Builder builder()
      Returns:
      a EfsVolumeOptions.Builder of EfsVolumeOptions