Class CfnFileSystem
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.efs.CfnFileSystem
- All Implemented Interfaces:
IInspectable,ITaggable,IFileSystemRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:39.430Z")
@Stability(Stable)
public class CfnFileSystem
extends CfnResource
implements IInspectable, IFileSystemRef, ITaggable
The
AWS::EFS::FileSystem resource creates a new, empty file system in Amazon Elastic File System ( Amazon EFS ).
You must create a mount target ( AWS::EFS::MountTarget ) to mount your EFS file system on an Amazon EC2 or other AWS cloud compute resource.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.efs.*;
Object fileSystemPolicy;
CfnFileSystem cfnFileSystem = CfnFileSystem.Builder.create(this, "MyCfnFileSystem")
.availabilityZoneName("availabilityZoneName")
.backupPolicy(BackupPolicyProperty.builder()
.status("status")
.build())
.bypassPolicyLockoutSafetyCheck(false)
.encrypted(false)
.fileSystemPolicy(fileSystemPolicy)
.fileSystemProtection(FileSystemProtectionProperty.builder()
.replicationOverwriteProtection("replicationOverwriteProtection")
.build())
.fileSystemTags(List.of(ElasticFileSystemTagProperty.builder()
.key("key")
.value("value")
.build()))
.kmsKeyId("kmsKeyId")
.lifecyclePolicies(List.of(LifecyclePolicyProperty.builder()
.transitionToArchive("transitionToArchive")
.transitionToIa("transitionToIa")
.transitionToPrimaryStorageClass("transitionToPrimaryStorageClass")
.build()))
.performanceMode("performanceMode")
.provisionedThroughputInMibps(123)
.replicationConfiguration(ReplicationConfigurationProperty.builder()
.destinations(List.of(ReplicationDestinationProperty.builder()
.availabilityZoneName("availabilityZoneName")
.fileSystemId("fileSystemId")
.kmsKeyId("kmsKeyId")
.region("region")
.roleArn("roleArn")
.status("status")
.statusMessage("statusMessage")
.build()))
.build())
.throughputMode("throughputMode")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe backup policy turns automatic backups for the file system on or off.static final classA fluent builder forCfnFileSystem.static interfaceA tag is a key-value pair attached to a file system.static interfaceDescribes the protection on the file system.static interfaceDescribes a policy used by Lifecycle management that specifies when to transition files into and out of the EFS storage classes.static interfaceDescribes the replication configuration for a specific file system.static interfaceDescribes the destination file system in the replication configuration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.efs.IFileSystemRef
IFileSystemRef.Jsii$Default, IFileSystemRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnFileSystem(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnFileSystem(software.amazon.jsii.JsiiObjectRef objRef) CfnFileSystem(software.constructs.Construct scope, String id) CfnFileSystem(software.constructs.Construct scope, String id, CfnFileSystemProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IFileSystemReffromFileSystemArn(software.constructs.Construct scope, String id, String arn) Creates a new IFileSystemRef from an ARN.static IFileSystemReffromFileSystemId(software.constructs.Construct scope, String id, String fileSystemId) Creates a new IFileSystemRef from a fileSystemId.The Amazon Resource Name (ARN) of the EFS file system.The ID of the EFS file system.For One Zone file systems, specify the AWS Availability Zone in which to create the file system.Use theBackupPolicyto turn automatic backups on or off for the file system.(Optional) A boolean that specifies whether or not to bypass theFileSystemPolicylockout safety check.A Boolean value that, if true, creates an encrypted file system.TheFileSystemPolicyfor the EFS file system.Describes the protection on the file system.A reference to a FileSystem resource.Use to create one or more tags associated with the file system.The ID of the AWS KMS key to be used to protect the encrypted file system.An array ofLifecyclePolicyobjects that define the file system'sLifecycleConfigurationobject.The performance mode of the file system.The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating.Describes the replication configuration for a specific file system.getTags()Tag Manager which manages the tags for this resource.Specifies the throughput mode for the file system.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAvailabilityZoneName(String value) For One Zone file systems, specify the AWS Availability Zone in which to create the file system.voidsetBackupPolicy(IResolvable value) Use theBackupPolicyto turn automatic backups on or off for the file system.voidUse theBackupPolicyto turn automatic backups on or off for the file system.void(Optional) A boolean that specifies whether or not to bypass theFileSystemPolicylockout safety check.void(Optional) A boolean that specifies whether or not to bypass theFileSystemPolicylockout safety check.voidsetEncrypted(Boolean value) A Boolean value that, if true, creates an encrypted file system.voidsetEncrypted(IResolvable value) A Boolean value that, if true, creates an encrypted file system.voidsetFileSystemPolicy(Object value) TheFileSystemPolicyfor the EFS file system.voidDescribes the protection on the file system.voidDescribes the protection on the file system.voidUse to create one or more tags associated with the file system.voidsetKmsKeyId(String value) The ID of the AWS KMS key to be used to protect the encrypted file system.voidsetLifecyclePolicies(List<Object> value) An array ofLifecyclePolicyobjects that define the file system'sLifecycleConfigurationobject.voidsetLifecyclePolicies(IResolvable value) An array ofLifecyclePolicyobjects that define the file system'sLifecycleConfigurationobject.voidsetPerformanceMode(String value) The performance mode of the file system.voidThe throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating.voidDescribes the replication configuration for a specific file system.voidDescribes the replication configuration for a specific file system.voidsetThroughputMode(String value) Specifies the throughput mode for the file system.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnFileSystem
protected CfnFileSystem(software.amazon.jsii.JsiiObjectRef objRef) -
CfnFileSystem
protected CfnFileSystem(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnFileSystem
@Stability(Stable) public CfnFileSystem(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnFileSystemProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
-
CfnFileSystem
@Stability(Stable) public CfnFileSystem(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
fromFileSystemArn
@Stability(Stable) @NotNull public static IFileSystemRef fromFileSystemArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IFileSystemRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromFileSystemId
@Stability(Stable) @NotNull public static IFileSystemRef fromFileSystemId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String fileSystemId) Creates a new IFileSystemRef from a fileSystemId.- Parameters:
scope- This parameter is required.id- This parameter is required.fileSystemId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the EFS file system.Example:
arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-0123456789abcdef8 -
getAttrFileSystemId
The ID of the EFS file system.For example:
fs-abcdef0123456789a -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getFileSystemRef
A reference to a FileSystem resource.- Specified by:
getFileSystemRefin interfaceIFileSystemRef
-
getTags
Tag Manager which manages the tags for this resource. -
getAvailabilityZoneName
For One Zone file systems, specify the AWS Availability Zone in which to create the file system. -
setAvailabilityZoneName
For One Zone file systems, specify the AWS Availability Zone in which to create the file system. -
getBackupPolicy
Use theBackupPolicyto turn automatic backups on or off for the file system.Returns union: either
IResolvableorCfnFileSystem.BackupPolicyProperty -
setBackupPolicy
Use theBackupPolicyto turn automatic backups on or off for the file system. -
setBackupPolicy
Use theBackupPolicyto turn automatic backups on or off for the file system. -
getBypassPolicyLockoutSafetyCheck
(Optional) A boolean that specifies whether or not to bypass theFileSystemPolicylockout safety check.Returns union: either
BooleanorIResolvable -
setBypassPolicyLockoutSafetyCheck
(Optional) A boolean that specifies whether or not to bypass theFileSystemPolicylockout safety check. -
setBypassPolicyLockoutSafetyCheck
(Optional) A boolean that specifies whether or not to bypass theFileSystemPolicylockout safety check. -
getEncrypted
A Boolean value that, if true, creates an encrypted file system.Returns union: either
BooleanorIResolvable -
setEncrypted
A Boolean value that, if true, creates an encrypted file system. -
setEncrypted
A Boolean value that, if true, creates an encrypted file system. -
getFileSystemPolicy
TheFileSystemPolicyfor the EFS file system. -
setFileSystemPolicy
TheFileSystemPolicyfor the EFS file system. -
getFileSystemProtection
Describes the protection on the file system.Returns union: either
IResolvableorCfnFileSystem.FileSystemProtectionProperty -
setFileSystemProtection
Describes the protection on the file system. -
setFileSystemProtection
@Stability(Stable) public void setFileSystemProtection(@Nullable CfnFileSystem.FileSystemProtectionProperty value) Describes the protection on the file system. -
getFileSystemTagsRaw
@Stability(Stable) @Nullable public List<CfnFileSystem.ElasticFileSystemTagProperty> getFileSystemTagsRaw()Use to create one or more tags associated with the file system. -
setFileSystemTagsRaw
@Stability(Stable) public void setFileSystemTagsRaw(@Nullable List<CfnFileSystem.ElasticFileSystemTagProperty> value) Use to create one or more tags associated with the file system. -
getKmsKeyId
The ID of the AWS KMS key to be used to protect the encrypted file system. -
setKmsKeyId
The ID of the AWS KMS key to be used to protect the encrypted file system. -
getLifecyclePolicies
An array ofLifecyclePolicyobjects that define the file system'sLifecycleConfigurationobject.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnFileSystem.LifecyclePolicyProperty> -
setLifecyclePolicies
An array ofLifecyclePolicyobjects that define the file system'sLifecycleConfigurationobject. -
setLifecyclePolicies
An array ofLifecyclePolicyobjects that define the file system'sLifecycleConfigurationobject. -
getPerformanceMode
The performance mode of the file system. -
setPerformanceMode
The performance mode of the file system. -
getProvisionedThroughputInMibps
The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. -
setProvisionedThroughputInMibps
The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. -
getReplicationConfiguration
Describes the replication configuration for a specific file system.Returns union: either
IResolvableorCfnFileSystem.ReplicationConfigurationProperty -
setReplicationConfiguration
Describes the replication configuration for a specific file system. -
setReplicationConfiguration
@Stability(Stable) public void setReplicationConfiguration(@Nullable CfnFileSystem.ReplicationConfigurationProperty value) Describes the replication configuration for a specific file system. -
getThroughputMode
Specifies the throughput mode for the file system. -
setThroughputMode
Specifies the throughput mode for the file system.
-