@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:43.662Z") public class FileSystem extends Resource implements IFileSystem
It creates a new, empty file system in Amazon Elastic File System (Amazon EFS). It also creates mount target (AWS::EFS::MountTarget) implicitly to mount the EFS file system on an Amazon Elastic Compute Cloud (Amazon EC2) instance or another resource.
Example:
FileSystem fileSystem = FileSystem.Builder.create(this, "MyEfsFileSystem") .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) .build();
Modifier and Type | Class and Description |
---|---|
static class |
FileSystem.Builder
A fluent builder for
FileSystem . |
IFileSystem.Jsii$Default, IFileSystem.Jsii$Proxy
Modifier and Type | Field and Description |
---|---|
static java.lang.Number |
DEFAULT_PORT
The default port File System listens on.
|
Modifier | Constructor and Description |
---|---|
protected |
FileSystem(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
FileSystem(software.amazon.jsii.JsiiObjectRef objRef) |
|
FileSystem(software.constructs.Construct scope,
java.lang.String id,
FileSystemProps props)
Constructor for creating a new EFS FileSystem.
|
Modifier and Type | Method and Description |
---|---|
AccessPoint |
addAccessPoint(java.lang.String id)
create access point from this filesystem.
|
AccessPoint |
addAccessPoint(java.lang.String id,
AccessPointOptions accessPointOptions)
create access point from this filesystem.
|
static IFileSystem |
fromFileSystemAttributes(software.constructs.Construct scope,
java.lang.String id,
FileSystemAttributes attrs)
Import an existing File System from the given properties.
|
Connections |
getConnections()
The security groups/rules used to allow network connections to the file system.
|
java.lang.String |
getFileSystemArn()
The ARN of the file system.
|
java.lang.String |
getFileSystemId()
The ID of the file system, assigned by Amazon EFS.
|
IDependable |
getMountTargetsAvailable()
Dependable that can be depended upon to ensure the mount targets of the filesystem are ready.
|
Grant |
grant(IGrantable grantee,
java.lang.String... actions)
Grant the actions defined in actions to the given grantee on this File System resource.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
public static final java.lang.Number DEFAULT_PORT
protected FileSystem(software.amazon.jsii.JsiiObjectRef objRef)
protected FileSystem(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public FileSystem(software.constructs.Construct scope, java.lang.String id, FileSystemProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IFileSystem fromFileSystemAttributes(software.constructs.Construct scope, java.lang.String id, FileSystemAttributes attrs)
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.public AccessPoint addAccessPoint(java.lang.String id, AccessPointOptions accessPointOptions)
id
- This parameter is required.accessPointOptions
- public AccessPoint addAccessPoint(java.lang.String id)
id
- This parameter is required.public Grant grant(IGrantable grantee, java.lang.String... actions)
grant
in interface IFileSystem
grantee
- Principal to grant right to. This parameter is required.actions
- The actions to grant. This parameter is required.public Connections getConnections()
getConnections
in interface IConnectable
public java.lang.String getFileSystemArn()
getFileSystemArn
in interface IFileSystem
public java.lang.String getFileSystemId()
getFileSystemId
in interface IFileSystem
public IDependable getMountTargetsAvailable()
getMountTargetsAvailable
in interface IFileSystem