Interface IFileSystemProps
Properties of EFS FileSystem.
Namespace: Amazon.CDK.AWS.EFS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IFileSystemProps
Syntax (vb)
Public Interface IFileSystemProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.IAM;
var role = new Role(this, "ClientRole", new RoleProps {
AssumedBy = new AnyPrincipal()
});
var fileSystem = new FileSystem(this, "MyEfsFileSystem", new FileSystemProps {
Vpc = new Vpc(this, "VPC"),
AllowAnonymousAccess = true
});
fileSystem.GrantRead(role);
Synopsis
Properties
| AllowAnonymousAccess | Allow access from anonymous client that doesn't use IAM authentication. |
| EnableAutomaticBackups | Whether to enable automatic backups for the file system. |
| Encrypted | Defines if the data at rest in the file system is encrypted or not. |
| FileSystemName | The file system's name. |
| FileSystemPolicy | File system policy is an IAM resource policy used to control NFS access to an EFS file system. |
| KmsKey | The KMS key used for encryption. |
| LifecyclePolicy | A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class. |
| OneZone | Whether this is a One Zone file system. |
| OutOfInfrequentAccessPolicy | A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class. |
| PerformanceMode | The performance mode that the file system will operate under. |
| ProvisionedThroughputPerSecond | Provisioned throughput for the file system. |
| RemovalPolicy | The removal policy to apply to the file system. |
| ReplicationConfiguration | Replication configuration for the file system. |
| ReplicationOverwriteProtection | Whether to enable the filesystem's replication overwrite protection or not. |
| SecurityGroup | Security Group to assign to this file system. |
| ThroughputMode | Enum to mention the throughput mode of the file system. |
| 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 | VPC to launch the file system in. |
| VpcSubnets | Which subnets to place the mount target in the VPC. |
Properties
AllowAnonymousAccess
Allow access from anonymous client that doesn't use IAM authentication.
bool? AllowAnonymousAccess { get; }
Property Value
bool?
Remarks
Default: false when using grantRead, grantWrite, grantRootAccess
or set @aws-cdk/aws-efs:denyAnonymousAccess feature flag, otherwise true
EnableAutomaticBackups
Whether to enable automatic backups for the file system.
bool? EnableAutomaticBackups { get; }
Property Value
bool?
Remarks
Default: false
Encrypted
Defines if the data at rest in the file system is encrypted or not.
bool? Encrypted { get; }
Property Value
bool?
Remarks
Default: - If your application has the '@aws-cdk/aws-efs:defaultEncryptionAtRest' feature flag set, the default is true, otherwise, the default is false.
Link: https://docs.aws.amazon.com/cdk/latest/guide/featureflags.html
FileSystemName
The file system's name.
string? FileSystemName { get; }
Property Value
Remarks
Default: - CDK generated name
FileSystemPolicy
File system policy is an IAM resource policy used to control NFS access to an EFS file system.
PolicyDocument? FileSystemPolicy { get; }
Property Value
Remarks
Default: none
KmsKey
The KMS key used for encryption.
IKeyRef? KmsKey { get; }
Property Value
Remarks
This is required to encrypt the data at rest if
Default: - if 'encrypted' is true, the default key for EFS (/aws/elasticfilesystem) is used
Encrypted: is set to true.
LifecyclePolicy
A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.
LifecyclePolicy? LifecyclePolicy { get; }
Property Value
Remarks
Default: - None. EFS will not transition files to the IA storage class.
OneZone
Whether this is a One Zone file system.
bool? OneZone { get; }
Property Value
bool?
Remarks
If enabled, performanceMode must be set to GENERAL_PURPOSE and vpcSubnets cannot be set.
Default: false
Link: https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html#file-system-type
OutOfInfrequentAccessPolicy
A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.
OutOfInfrequentAccessPolicy? OutOfInfrequentAccessPolicy { get; }
Property Value
Remarks
Default: - None. EFS will not transition files from IA storage to primary storage.
PerformanceMode
The performance mode that the file system will operate under.
PerformanceMode? PerformanceMode { get; }
Property Value
Remarks
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
ProvisionedThroughputPerSecond
Provisioned throughput for the file system.
Size? ProvisionedThroughputPerSecond { get; }
Property Value
Remarks
This is a required property if the throughput mode is set to PROVISIONED. Must be at least 1MiB/s.
Default: - none, errors out
RemovalPolicy
The removal policy to apply to the file system.
RemovalPolicy? RemovalPolicy { get; }
Property Value
Remarks
Default: RemovalPolicy.RETAIN
ReplicationConfiguration
Replication configuration for the file system.
ReplicationConfiguration? ReplicationConfiguration { get; }
Property Value
Remarks
Default: - no replication
ReplicationOverwriteProtection
Whether to enable the filesystem's replication overwrite protection or not.
ReplicationOverwriteProtection? ReplicationOverwriteProtection { get; }
Property Value
ReplicationOverwriteProtection?
Remarks
Set false if you want to create a read-only filesystem for use as a replication destination.
Default: ReplicationOverwriteProtection.ENABLED
See: https://docs.aws.amazon.com/efs/latest/ug/replication-use-cases.html#replicate-existing-destination
SecurityGroup
Security Group to assign to this file system.
ISecurityGroup? SecurityGroup { get; }
Property Value
Remarks
Default: - creates new security group which allows all outbound traffic
ThroughputMode
Enum to mention the throughput mode of the file system.
ThroughputMode? ThroughputMode { get; }
Property Value
Remarks
Default: ThroughputMode.BURSTING
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.
LifecyclePolicy? TransitionToArchivePolicy { get; }
Property Value
Remarks
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.
Vpc
VPC to launch the file system in.
IVpc Vpc { get; }
Property Value
Remarks
ExampleMetadata: infused
VpcSubnets
Which subnets to place the mount target in the VPC.
ISubnetSelection? VpcSubnets { get; }
Property Value
Remarks
Default: - the Vpc default strategy if not specified