Interface AccessPointOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
AccessPointProps
All Known Implementing Classes:
AccessPointOptions.Jsii$Proxy, AccessPointProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.110Z") @Stability(Stable) public interface AccessPointOptions extends software.amazon.jsii.JsiiSerializable
Options to create an AccessPoint.

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();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for AccessPointOptions
    static final class 
    An implementation for AccessPointOptions
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default Acl
    Specifies the POSIX IDs and permissions to apply when creating the access point's root directory.
    default String
    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
    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.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getCreateAcl

      @Stability(Stable) @Nullable default Acl getCreateAcl()
      Specifies the POSIX IDs and permissions to apply when creating the access point's root directory.

      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.

    • getPath

      @Stability(Stable) @Nullable 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: '/'

    • getPosixUser

      @Stability(Stable) @Nullable 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.

      Specify this to enforce a user identity using an access point.

      Default: - user identity not enforced

      See Also:
    • builder

      @Stability(Stable) static AccessPointOptions.Builder builder()
      Returns:
      a AccessPointOptions.Builder of AccessPointOptions