Class FileSystemProps
Properties of EFS FileSystem.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EFS
Assembly: Amazon.CDK.AWS.EFS.dll
Syntax (csharp)
public class FileSystemProps : Object, IFileSystemProps
Syntax (vb)
Public Class FileSystemProps
Inherits Object
Implements IFileSystemProps
Remarks
ExampleMetadata: infused
Examples
var fileSystem = new FileSystem(this, "MyEfsFileSystem", new FileSystemProps {
Vpc = new Vpc(this, "VPC"),
LifecyclePolicy = LifecyclePolicy.AFTER_14_DAYS, // files are not transitioned to infrequent access (IA) storage by default
PerformanceMode = PerformanceMode.GENERAL_PURPOSE, // default
OutOfInfrequentAccessPolicy = OutOfInfrequentAccessPolicy.AFTER_1_ACCESS
});
Synopsis
Constructors
FileSystemProps() |
Properties
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. |
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. |
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. |
SecurityGroup | Security Group to assign to this file system. |
ThroughputMode | Enum to mention the throughput mode of the file system. |
Vpc | VPC to launch the file system in. |
VpcSubnets | Which subnets to place the mount target in the VPC. |
Constructors
FileSystemProps()
public FileSystemProps()
Properties
EnableAutomaticBackups
Whether to enable automatic backups for the file system.
public Nullable<bool> EnableAutomaticBackups { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Encrypted
Defines if the data at rest in the file system is encrypted or not.
public Nullable<bool> Encrypted { get; set; }
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.
public string FileSystemName { get; set; }
Property Value
System.String
Remarks
Default: - CDK generated name
KmsKey
The KMS key used for encryption.
public IKey KmsKey { get; set; }
Property Value
Remarks
This is required to encrypt the data at rest if @encrypted is set to true.
Default: - if 'encrypted' is true, the default key for EFS (/aws/elasticfilesystem) is used
LifecyclePolicy
A policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.
public Nullable<LifecyclePolicy> LifecyclePolicy { get; set; }
Property Value
System.Nullable<LifecyclePolicy>
Remarks
Default: - None. EFS will not transition files to the IA storage class.
OutOfInfrequentAccessPolicy
A policy used by EFS lifecycle management to transition files from Infrequent Access (IA) storage class to primary storage class.
public Nullable<OutOfInfrequentAccessPolicy> OutOfInfrequentAccessPolicy { get; set; }
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.
public Nullable<PerformanceMode> PerformanceMode { get; set; }
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.
public Size ProvisionedThroughputPerSecond { get; set; }
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.
public Nullable<RemovalPolicy> RemovalPolicy { get; set; }
Property Value
System.Nullable<RemovalPolicy>
Remarks
Default: RemovalPolicy.RETAIN
SecurityGroup
Security Group to assign to this file system.
public ISecurityGroup SecurityGroup { get; set; }
Property Value
Remarks
Default: - creates new security group which allows all outbound traffic
ThroughputMode
Enum to mention the throughput mode of the file system.
public Nullable<ThroughputMode> ThroughputMode { get; set; }
Property Value
System.Nullable<ThroughputMode>
Remarks
Default: ThroughputMode.BURSTING
Vpc
VpcSubnets
Which subnets to place the mount target in the VPC.
public ISubnetSelection VpcSubnets { get; set; }
Property Value
Remarks
Default: - the Vpc default strategy if not specified