@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.848Z") @Stability(value=Stable) public interface AccessPointOptions extends software.amazon.jsii.JsiiSerializable
Example:
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.efs.*;
// create a new VPC
Vpc vpc = new Vpc(this, "VPC");
// create a new Amazon EFS filesystem
FileSystem fileSystem = FileSystem.Builder.create(this, "Efs").vpc(vpc).build();
// create a new access point from the filesystem
AccessPoint accessPoint = fileSystem.addAccessPoint("AccessPoint", AccessPointOptions.builder()
// 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(Acl.builder()
.ownerUid("1001")
.ownerGid("1001")
.permissions("750")
.build())
// enforce the POSIX identity so lambda function will access with this identity
.posixUser(PosixUser.builder()
.uid("1001")
.gid("1001")
.build())
.build());
Function fn = Function.Builder.create(this, "MyLambda")
// mount the access point to /mnt/msg in the lambda runtime environment
.filesystem(FileSystem.fromEfsAccessPoint(accessPoint, "/mnt/msg"))
.runtime(Runtime.NODEJS_16_X)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "lambda-handler")))
.vpc(vpc)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
AccessPointOptions.Builder
A builder for
AccessPointOptions |
static class |
AccessPointOptions.Jsii$Proxy
An implementation for
AccessPointOptions |
| Modifier and Type | Method and Description |
|---|---|
static AccessPointOptions.Builder |
builder() |
default Acl |
getCreateAcl()
Specifies the POSIX IDs and permissions to apply when creating the access point's root directory.
|
default String |
getPath()
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.
|
default PosixUser |
getPosixUser()
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.
|
@Stability(value=Stable) @Nullable default Acl getCreateAcl()
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.
@Stability(value=Stable) @Nullable default String getPath()
Default: '/'
@Stability(value=Stable) @Nullable default PosixUser getPosixUser()
Specify this to enforce a user identity using an access point.
Default: - user identity not enforced
@Stability(value=Stable) static AccessPointOptions.Builder builder()
AccessPointOptions.Builder of AccessPointOptionsCopyright © 2022. All rights reserved.