Class FileSystem.Builder

java.lang.Object
software.amazon.awscdk.services.efs.FileSystem.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<FileSystem>
Enclosing class:
FileSystem

@Stability(Stable) public static final class FileSystem.Builder extends Object implements software.amazon.jsii.Builder<FileSystem>
A fluent builder for FileSystem.
  • Method Details

    • create

      @Stability(Stable) public static FileSystem.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of FileSystem.Builder.
    • vpc

      @Stability(Stable) public FileSystem.Builder vpc(IVpc vpc)
      VPC to launch the file system in.

      Parameters:
      vpc - VPC to launch the file system in. This parameter is required.
      Returns:
      this
    • enableAutomaticBackups

      @Stability(Stable) public FileSystem.Builder enableAutomaticBackups(Boolean enableAutomaticBackups)
      Whether to enable automatic backups for the file system.

      Default: false

      Parameters:
      enableAutomaticBackups - Whether to enable automatic backups for the file system. This parameter is required.
      Returns:
      this
    • encrypted

      @Stability(Stable) public FileSystem.Builder encrypted(Boolean encrypted)
      Defines if the data at rest in the file system is encrypted or not.

      Default: - If your application has the '

      Parameters:
      encrypted - Defines if the data at rest in the file system is encrypted or not. This parameter is required.
      Returns:
      this
    • fileSystemName

      @Stability(Stable) public FileSystem.Builder fileSystemName(String fileSystemName)
      The file system's name.

      Default: - CDK generated name

      Parameters:
      fileSystemName - The file system's name. This parameter is required.
      Returns:
      this
    • kmsKey

      @Stability(Stable) public FileSystem.Builder kmsKey(IKey kmsKey)
      The KMS key used for encryption.

      This is required to encrypt the data at rest if @encrypted is set to true.

      Default: - if 'encrypted' is true, the default key for EFS (/aws/elasticfilesystem) is used

      Parameters:
      kmsKey - The KMS key used for encryption. This parameter is required.
      Returns:
      this
    • lifecyclePolicy

      @Stability(Stable) public FileSystem.Builder lifecyclePolicy(LifecyclePolicy lifecyclePolicy)
      A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.

      Default: - None. EFS will not transition files to the IA storage class.

      Parameters:
      lifecyclePolicy - A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class. This parameter is required.
      Returns:
      this
    • outOfInfrequentAccessPolicy

      @Stability(Stable) public FileSystem.Builder outOfInfrequentAccessPolicy(OutOfInfrequentAccessPolicy outOfInfrequentAccessPolicy)
      A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.

      Default: - None. EFS will not transition files from IA storage to primary storage.

      Parameters:
      outOfInfrequentAccessPolicy - A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class. This parameter is required.
      Returns:
      this
    • performanceMode

      @Stability(Stable) public FileSystem.Builder performanceMode(PerformanceMode performanceMode)
      The performance mode that the file system will operate under.

      An Amazon EFS file system's performance mode can't be changed after the file system has been created. Updating this property will replace the file system.

      Default: PerformanceMode.GENERAL_PURPOSE

      Parameters:
      performanceMode - The performance mode that the file system will operate under. This parameter is required.
      Returns:
      this
    • provisionedThroughputPerSecond

      @Stability(Stable) public FileSystem.Builder provisionedThroughputPerSecond(Size provisionedThroughputPerSecond)
      Provisioned throughput for the file system.

      This is a required property if the throughput mode is set to PROVISIONED. Must be at least 1MiB/s.

      Default: - none, errors out

      Parameters:
      provisionedThroughputPerSecond - Provisioned throughput for the file system. This parameter is required.
      Returns:
      this
    • removalPolicy

      @Stability(Stable) public FileSystem.Builder removalPolicy(RemovalPolicy removalPolicy)
      The removal policy to apply to the file system.

      Default: RemovalPolicy.RETAIN

      Parameters:
      removalPolicy - The removal policy to apply to the file system. This parameter is required.
      Returns:
      this
    • securityGroup

      @Stability(Stable) public FileSystem.Builder securityGroup(ISecurityGroup securityGroup)
      Security Group to assign to this file system.

      Default: - creates new security group which allows all outbound traffic

      Parameters:
      securityGroup - Security Group to assign to this file system. This parameter is required.
      Returns:
      this
    • throughputMode

      @Stability(Stable) public FileSystem.Builder throughputMode(ThroughputMode throughputMode)
      Enum to mention the throughput mode of the file system.

      Default: ThroughputMode.BURSTING

      Parameters:
      throughputMode - Enum to mention the throughput mode of the file system. This parameter is required.
      Returns:
      this
    • vpcSubnets

      @Stability(Stable) public FileSystem.Builder vpcSubnets(SubnetSelection vpcSubnets)
      Which subnets to place the mount target in the VPC.

      Default: - the Vpc default strategy if not specified

      Parameters:
      vpcSubnets - Which subnets to place the mount target in the VPC. This parameter is required.
      Returns:
      this
    • build

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