Show / Hide Table of Contents

Class Acl

Permissions as POSIX ACL.

Inheritance
System.Object
Acl
Implements
IAcl
Namespace: Amazon.CDK.AWS.EFS
Assembly: Amazon.CDK.AWS.EFS.dll
Syntax (csharp)
public class Acl : Object, IAcl
Syntax (vb)
Public Class Acl
    Inherits Object
    Implements IAcl
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_16_X,
    Handler = "index.handler",
    Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
    Vpc = vpc
});

Synopsis

Constructors

Acl()

Properties

OwnerGid

Specifies the POSIX group ID to apply to the RootDirectory.

OwnerUid

Specifies the POSIX user ID to apply to the RootDirectory.

Permissions

Specifies the POSIX permissions to apply to the RootDirectory, in the format of an octal number representing the file's mode bits.

Constructors

Acl()

public Acl()

Properties

OwnerGid

Specifies the POSIX group ID to apply to the RootDirectory.

public string OwnerGid { get; set; }
Property Value

System.String

Remarks

Accepts values from 0 to 2^32 (4294967295).

OwnerUid

Specifies the POSIX user ID to apply to the RootDirectory.

public string OwnerUid { get; set; }
Property Value

System.String

Remarks

Accepts values from 0 to 2^32 (4294967295).

Permissions

Specifies the POSIX permissions to apply to the RootDirectory, in the format of an octal number representing the file's mode bits.

public string Permissions { get; set; }
Property Value

System.String

Implements

IAcl
Back to top Generated by DocFX