Class FileSystemProps.Builder
java.lang.Object
software.amazon.awscdk.services.efs.FileSystemProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FileSystemProps>
- Enclosing interface:
FileSystemProps
@Stability(Stable)
public static final class FileSystemProps.Builder
extends Object
implements software.amazon.jsii.Builder<FileSystemProps>
A builder for
FileSystemProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.enableAutomaticBackups
(Boolean enableAutomaticBackups) Sets the value ofFileSystemProps.getEnableAutomaticBackups()
Sets the value ofFileSystemProps.getEncrypted()
fileSystemName
(String fileSystemName) Sets the value ofFileSystemProps.getFileSystemName()
Sets the value ofFileSystemProps.getKmsKey()
lifecyclePolicy
(LifecyclePolicy lifecyclePolicy) Sets the value ofFileSystemProps.getLifecyclePolicy()
outOfInfrequentAccessPolicy
(OutOfInfrequentAccessPolicy outOfInfrequentAccessPolicy) Sets the value ofFileSystemProps.getOutOfInfrequentAccessPolicy()
performanceMode
(PerformanceMode performanceMode) Sets the value ofFileSystemProps.getPerformanceMode()
provisionedThroughputPerSecond
(Size provisionedThroughputPerSecond) Sets the value ofFileSystemProps.getProvisionedThroughputPerSecond()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofFileSystemProps.getRemovalPolicy()
securityGroup
(ISecurityGroup securityGroup) Sets the value ofFileSystemProps.getSecurityGroup()
throughputMode
(ThroughputMode throughputMode) Sets the value ofFileSystemProps.getThroughputMode()
Sets the value ofFileSystemProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofFileSystemProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
vpc
Sets the value ofFileSystemProps.getVpc()
- Parameters:
vpc
- VPC to launch the file system in. This parameter is required.- Returns:
this
-
enableAutomaticBackups
@Stability(Stable) public FileSystemProps.Builder enableAutomaticBackups(Boolean enableAutomaticBackups) Sets the value ofFileSystemProps.getEnableAutomaticBackups()
- Parameters:
enableAutomaticBackups
- Whether to enable automatic backups for the file system.- Returns:
this
-
encrypted
Sets the value ofFileSystemProps.getEncrypted()
- Parameters:
encrypted
- Defines if the data at rest in the file system is encrypted or not.- Returns:
this
-
fileSystemName
Sets the value ofFileSystemProps.getFileSystemName()
- Parameters:
fileSystemName
- The file system's name.- Returns:
this
-
kmsKey
Sets the value ofFileSystemProps.getKmsKey()
- Parameters:
kmsKey
- The KMS key used for encryption. This is required to encrypt the data at rest if @encrypted is set to true.- Returns:
this
-
lifecyclePolicy
Sets the value ofFileSystemProps.getLifecyclePolicy()
- Parameters:
lifecyclePolicy
- A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.- Returns:
this
-
outOfInfrequentAccessPolicy
@Stability(Stable) public FileSystemProps.Builder outOfInfrequentAccessPolicy(OutOfInfrequentAccessPolicy outOfInfrequentAccessPolicy) Sets the value ofFileSystemProps.getOutOfInfrequentAccessPolicy()
- Parameters:
outOfInfrequentAccessPolicy
- A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.- Returns:
this
-
performanceMode
Sets the value ofFileSystemProps.getPerformanceMode()
- Parameters:
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.- Returns:
this
-
provisionedThroughputPerSecond
@Stability(Stable) public FileSystemProps.Builder provisionedThroughputPerSecond(Size provisionedThroughputPerSecond) Sets the value ofFileSystemProps.getProvisionedThroughputPerSecond()
- Parameters:
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.- Returns:
this
-
removalPolicy
Sets the value ofFileSystemProps.getRemovalPolicy()
- Parameters:
removalPolicy
- The removal policy to apply to the file system.- Returns:
this
-
securityGroup
Sets the value ofFileSystemProps.getSecurityGroup()
- Parameters:
securityGroup
- Security Group to assign to this file system.- Returns:
this
-
throughputMode
Sets the value ofFileSystemProps.getThroughputMode()
- Parameters:
throughputMode
- Enum to mention the throughput mode of the file system.- Returns:
this
-
vpcSubnets
Sets the value ofFileSystemProps.getVpcSubnets()
- Parameters:
vpcSubnets
- Which subnets to place the mount target in the VPC.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<FileSystemProps>
- Returns:
- a new instance of
FileSystemProps
- Throws:
NullPointerException
- if any required attribute was not provided
-