Class FileSystem.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FileSystem>
- Enclosing class:
FileSystem
FileSystem
.-
Method Summary
Modifier and TypeMethodDescriptionallowAnonymousAccess
(Boolean allowAnonymousAccess) Allow access from anonymous client that doesn't use IAM authentication.build()
static FileSystem.Builder
enableAutomaticBackups
(Boolean enableAutomaticBackups) Whether to enable automatic backups for the file system.Defines if the data at rest in the file system is encrypted or not.fileSystemName
(String fileSystemName) The file system's name.fileSystemPolicy
(PolicyDocument fileSystemPolicy) File system policy is an IAM resource policy used to control NFS access to an EFS file system.The KMS key used for encryption.lifecyclePolicy
(LifecyclePolicy lifecyclePolicy) A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.Whether this is a One Zone file system.outOfInfrequentAccessPolicy
(OutOfInfrequentAccessPolicy outOfInfrequentAccessPolicy) A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.performanceMode
(PerformanceMode performanceMode) The performance mode that the file system will operate under.provisionedThroughputPerSecond
(Size provisionedThroughputPerSecond) Provisioned throughput for the file system.removalPolicy
(RemovalPolicy removalPolicy) The removal policy to apply to the file system.replicationConfiguration
(ReplicationConfiguration replicationConfiguration) Replication configuration for the file system.replicationOverwriteProtection
(ReplicationOverwriteProtection replicationOverwriteProtection) Whether to enable the filesystem's replication overwrite protection or not.securityGroup
(ISecurityGroup securityGroup) Security Group to assign to this file system.throughputMode
(ThroughputMode throughputMode) Enum to mention the throughput mode of the file system.transitionToArchivePolicy
(LifecyclePolicy transitionToArchivePolicy) The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage.VPC to launch the file system in.vpcSubnets
(SubnetSelection vpcSubnets) Which subnets to place the mount target in the VPC.
-
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
VPC to launch the file system in.- Parameters:
vpc
- VPC to launch the file system in. This parameter is required.- Returns:
this
-
allowAnonymousAccess
Allow access from anonymous client that doesn't use IAM authentication.Default: false when using `grantRead`, `grantWrite`, `grantRootAccess` or set `@aws-cdk/aws-efs:denyAnonymousAccess` feature flag, otherwise true
- Parameters:
allowAnonymousAccess
- Allow access from anonymous client that doesn't use IAM authentication. This parameter is required.- Returns:
this
-
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
Defines if the data at rest in the file system is encrypted or not.Default: - If your application has the '@aws-cdk/aws-efs:defaultEncryptionAtRest' feature flag set, the default is true, otherwise, the default is false.
- Parameters:
encrypted
- Defines if the data at rest in the file system is encrypted or not. This parameter is required.- Returns:
this
-
fileSystemName
The file system's name.Default: - CDK generated name
- Parameters:
fileSystemName
- The file system's name. This parameter is required.- Returns:
this
-
fileSystemPolicy
File system policy is an IAM resource policy used to control NFS access to an EFS file system.Default: none
- Parameters:
fileSystemPolicy
- File system policy is an IAM resource policy used to control NFS access to an EFS file system. This parameter is required.- Returns:
this
-
kmsKey
The KMS key used for encryption.This is required to encrypt the data at rest if
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
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
-
oneZone
Whether this is a One Zone file system.If enabled,
performanceMode
must be set toGENERAL_PURPOSE
andvpcSubnets
cannot be set.Default: false
- Parameters:
oneZone
- Whether this is a One Zone file system. 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
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
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
-
replicationConfiguration
@Stability(Stable) public FileSystem.Builder replicationConfiguration(ReplicationConfiguration replicationConfiguration) Replication configuration for the file system.Default: - no replication
- Parameters:
replicationConfiguration
- Replication configuration for the file system. This parameter is required.- Returns:
this
-
replicationOverwriteProtection
@Stability(Stable) public FileSystem.Builder replicationOverwriteProtection(ReplicationOverwriteProtection replicationOverwriteProtection) Whether to enable the filesystem's replication overwrite protection or not.Set false if you want to create a read-only filesystem for use as a replication destination.
Default: ReplicationOverwriteProtection.ENABLED
- Parameters:
replicationOverwriteProtection
- Whether to enable the filesystem's replication overwrite protection or not. This parameter is required.- Returns:
this
- See Also:
-
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
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
-
transitionToArchivePolicy
@Stability(Stable) public FileSystem.Builder transitionToArchivePolicy(LifecyclePolicy transitionToArchivePolicy) The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage.Metadata operations such as listing the contents of a directory don't count as file access events.
Default: - None. EFS will not transition files to Archive storage class.
- Parameters:
transitionToArchivePolicy
- The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage. This parameter is required.- Returns:
this
-
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<FileSystem>
- Returns:
- a newly built instance of
FileSystem
.
-