Class AccessPointOptions
Options to create an AccessPoint.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EFS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AccessPointOptions : Object, IAccessPointOptions
Syntax (vb)
Public Class AccessPointOptions
Inherits Object
Implements IAccessPointOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.EFS;
// create a new VPC
var vpc = new Vpc(this, "VPC");
// create a new Amazon EFS filesystem
var fileSystem = new FileSystem(this, "Efs", new FileSystemProps { Vpc = vpc });
// create a new access point from the filesystem
var accessPoint = fileSystem.AddAccessPoint("AccessPoint", new AccessPointOptions {
// set /export/lambda as the root of the access point
Path = "/export/lambda",
// as /export/lambda does not exist in a new efs filesystem, the efs will create the directory with the following createAcl
CreateAcl = new Acl {
OwnerUid = "1001",
OwnerGid = "1001",
Permissions = "750"
},
// enforce the POSIX identity so lambda function will access with this identity
PosixUser = new PosixUser {
Uid = "1001",
Gid = "1001"
}
});
var fn = new Function(this, "MyLambda", new FunctionProps {
// mount the access point to /mnt/msg in the lambda runtime environment
Filesystem = FileSystem.FromEfsAccessPoint(accessPoint, "/mnt/msg"),
Runtime = Runtime.NODEJS_18_X,
Handler = "index.handler",
Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
Vpc = vpc
});
Synopsis
Constructors
AccessPointOptions() |
Properties
CreateAcl | Specifies the POSIX IDs and permissions to apply when creating the access point's root directory. |
Path | Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. |
PosixUser | The full POSIX identity, including the user ID, group ID, and any secondary group IDs, on the access point that is used for all file system operations performed by NFS clients using the access point. |
Constructors
AccessPointOptions()
public AccessPointOptions()
Properties
CreateAcl
Specifies the POSIX IDs and permissions to apply when creating the access point's root directory.
public IAcl CreateAcl { get; set; }
Property Value
Remarks
If the
root directory specified by path
does not exist, EFS creates the root directory and applies the
permissions specified here. If the specified path
does not exist, you must specify createAcl
.
Default: - None. The directory specified by path
must exist.
Path
Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system.
public string Path { get; set; }
Property Value
System.String
Remarks
Default: '/'
PosixUser
The full POSIX identity, including the user ID, group ID, and any secondary group IDs, on the access point that is used for all file system operations performed by NFS clients using the access point.
public IPosixUser PosixUser { get; set; }
Property Value
Remarks
Specify this to enforce a user identity using an access point.
Default: - user identity not enforced