Class PosixUser
Represents the PosixUser.
Inheritance
System.Object
PosixUser
Implements
Namespace: Amazon.CDK.AWS.EFS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PosixUser : Object, IPosixUser
Syntax (vb)
Public Class PosixUser
Inherits Object
Implements IPosixUser
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
PosixUser() |
Properties
Gid | The POSIX group ID used for all file system operations using this access point. |
SecondaryGids | Secondary POSIX group IDs used for all file system operations using this access point. |
Uid | The POSIX user ID used for all file system operations using this access point. |
Constructors
PosixUser()
public PosixUser()
Properties
Gid
The POSIX group ID used for all file system operations using this access point.
public string Gid { get; set; }
Property Value
System.String
SecondaryGids
Secondary POSIX group IDs used for all file system operations using this access point.
public string[] SecondaryGids { get; set; }
Property Value
System.String[]
Remarks
Default: - None
Uid
The POSIX user ID used for all file system operations using this access point.
public string Uid { get; set; }
Property Value
System.String