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. |
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.
virtual Nullable<bool> AllowAnonymousAccess { get; }
Property Value
System.Nullable<System.Boolean>
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.
virtual Nullable<bool> EnableAutomaticBackups { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Encrypted
Defines if the data at rest in the file system is encrypted or not.
virtual Nullable<bool> Encrypted { get; }
Property Value
System.Nullable<System.Boolean>
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.
virtual string FileSystemName { get; }
Property Value
System.String
Remarks
Default: - CDK generated name
FileSystemPolicy
File system policy is an IAM resource policy used to control NFS access to an EFS file system.
virtual PolicyDocument FileSystemPolicy { get; }
Property Value
Remarks
Default: none
KmsKey
The KMS key used for encryption.
virtual IKey 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.
virtual Nullable<LifecyclePolicy> LifecyclePolicy { get; }
Property Value
System.Nullable<LifecyclePolicy>
Remarks
Default: - None. EFS will not transition files to the IA storage class.
OneZone
Whether this is a One Zone file system.
virtual Nullable<bool> OneZone { get; }
Property Value
System.Nullable<System.Boolean>
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.
virtual Nullable<OutOfInfrequentAccessPolicy> OutOfInfrequentAccessPolicy { get; }
Property Value
System.Nullable<OutOfInfrequentAccessPolicy>
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.
virtual Nullable<PerformanceMode> PerformanceMode { get; }
Property Value
System.Nullable<PerformanceMode>
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.
virtual 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.
virtual Nullable<RemovalPolicy> RemovalPolicy { get; }
Property Value
System.Nullable<RemovalPolicy>
Remarks
Default: RemovalPolicy.RETAIN
ReplicationOverwriteProtection
Whether to enable the filesystem's replication overwrite protection or not.
virtual Nullable<ReplicationOverwriteProtection> ReplicationOverwriteProtection { get; }
Property Value
System.Nullable<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.
virtual 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.
virtual Nullable<ThroughputMode> ThroughputMode { get; }
Property Value
System.Nullable<ThroughputMode>
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.
virtual Nullable<LifecyclePolicy> TransitionToArchivePolicy { get; }
Property Value
System.Nullable<LifecyclePolicy>
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
VpcSubnets
Which subnets to place the mount target in the VPC.
virtual ISubnetSelection VpcSubnets { get; }
Property Value
Remarks
Default: - the Vpc default strategy if not specified