interface FileSystemProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EFS.FileSystemProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsefs#FileSystemProps |
Java | software.amazon.awscdk.services.efs.FileSystemProps |
Python | aws_cdk.aws_efs.FileSystemProps |
TypeScript (source) | aws-cdk-lib » aws_efs » FileSystemProps |
Properties of EFS FileSystem.
Example
import * as iam from 'aws-cdk-lib/aws-iam';
const role = new iam.Role(this, 'ClientRole', {
assumedBy: new iam.AnyPrincipal(),
});
const fileSystem = new efs.FileSystem(this, 'MyEfsFileSystem', {
vpc: new ec2.Vpc(this, 'VPC'),
allowAnonymousAccess: true,
});
fileSystem.grantRead(role);
Properties
Name | Type | Description |
---|---|---|
vpc | IVpc | VPC to launch the file system in. |
allow | boolean | Allow access from anonymous client that doesn't use IAM authentication. |
enable | boolean | Whether to enable automatic backups for the file system. |
encrypted? | boolean | Defines if the data at rest in the file system is encrypted or not. |
file | string | The file system's name. |
file | Policy | File system policy is an IAM resource policy used to control NFS access to an EFS file system. |
kms | IKey | The KMS key used for encryption. |
lifecycle | Lifecycle | A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class. |
one | boolean | Whether this is a One Zone file system. |
out | Out | A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class. |
performance | Performance | The performance mode that the file system will operate under. |
provisioned | Size | Provisioned throughput for the file system. |
removal | Removal | The removal policy to apply to the file system. |
replication | Replication | Replication configuration for the file system. |
replication | Replication | Whether to enable the filesystem's replication overwrite protection or not. |
security | ISecurity | Security Group to assign to this file system. |
throughput | Throughput | Enum to mention the throughput mode of the file system. |
transition | Lifecycle | 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 | Subnet | Which subnets to place the mount target in the VPC. |
vpc
Type:
IVpc
VPC to launch the file system in.
allowAnonymousAccess?
Type:
boolean
(optional, default: false when using grantRead
, grantWrite
, grantRootAccess
or set @aws-cdk/aws-efs:denyAnonymousAccess
feature flag, otherwise true)
Allow access from anonymous client that doesn't use IAM authentication.
enableAutomaticBackups?
Type:
boolean
(optional, default: false)
Whether to enable automatic backups for the file system.
encrypted?
Type:
boolean
(optional, default: If your application has the '@aws-cdk/aws-efs:defaultEncryptionAtRest' feature flag set, the default is true, otherwise, the default is false.)
Defines if the data at rest in the file system is encrypted or not.
fileSystemName?
Type:
string
(optional, default: CDK generated name)
The file system's name.
fileSystemPolicy?
Type:
Policy
(optional, default: none)
File system policy is an IAM resource policy used to control NFS access to an EFS file system.
kmsKey?
Type:
IKey
(optional, default: if 'encrypted' is true, the default key for EFS (/aws/elasticfilesystem) is used)
The KMS key used for encryption.
This is required to encrypt the data at rest if
lifecyclePolicy?
Type:
Lifecycle
(optional, default: None. EFS will not transition files to the IA storage class.)
A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.
oneZone?
Type:
boolean
(optional, default: false)
Whether this is a One Zone file system.
If enabled, performanceMode
must be set to GENERAL_PURPOSE
and vpcSubnets
cannot be set.
outOfInfrequentAccessPolicy?
Type:
Out
(optional, default: None. EFS will not transition files from IA storage to primary storage.)
A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.
performanceMode?
Type:
Performance
(optional, default: PerformanceMode.GENERAL_PURPOSE)
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.
provisionedThroughputPerSecond?
Type:
Size
(optional, default: none, errors out)
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.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.RETAIN)
The removal policy to apply to the file system.
replicationConfiguration?
Type:
Replication
(optional, default: no replication)
Replication configuration for the file system.
replicationOverwriteProtection?
Type:
Replication
(optional, default: ReplicationOverwriteProtection.ENABLED)
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.
See also: https://docs.aws.amazon.com/efs/latest/ug/replication-use-cases.html#replicate-existing-destination
securityGroup?
Type:
ISecurity
(optional, default: creates new security group which allows all outbound traffic)
Security Group to assign to this file system.
throughputMode?
Type:
Throughput
(optional, default: ThroughputMode.BURSTING)
Enum to mention the throughput mode of the file system.
transitionToArchivePolicy?
Type:
Lifecycle
(optional, default: None. EFS will not transition files to Archive storage class.)
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.
vpcSubnets?
Type:
Subnet
(optional, default: the Vpc default strategy if not specified)
Which subnets to place the mount target in the VPC.