@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:08.120Z") @Stability(value=Experimental) public interface PosixUser extends software.amazon.jsii.JsiiSerializable
Example:
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
// 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_12_X)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "lambda-handler")))
.vpc(vpc)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
PosixUser.Builder
A builder for
PosixUser |
static class |
PosixUser.Jsii$Proxy
An implementation for
PosixUser |
| Modifier and Type | Method and Description |
|---|---|
static PosixUser.Builder |
builder() |
String |
getGid()
(experimental) The POSIX group ID used for all file system operations using this access point.
|
default List<String> |
getSecondaryGids()
(experimental) Secondary POSIX group IDs used for all file system operations using this access point.
|
String |
getUid()
(experimental) The POSIX user ID used for all file system operations using this access point.
|
@Stability(value=Experimental) @NotNull String getGid()
@Stability(value=Experimental) @NotNull String getUid()
@Stability(value=Experimental) @Nullable default List<String> getSecondaryGids()
Default: - None
@Stability(value=Experimental) static PosixUser.Builder builder()
PosixUser.Builder of PosixUserCopyright © 2022. All rights reserved.