Show / Hide Table of Contents

Class Acl

Permissions as POSIX ACL.

Inheritance
object
Acl
Implements
IAcl
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.EFS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Acl : IAcl
Syntax (vb)
Public Class Acl 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_LATEST,
                Handler = "index.handler",
                Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
                Vpc = vpc
            });

Synopsis

Constructors

Acl()

Permissions as POSIX 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()

Permissions as POSIX ACL.

public Acl()
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_LATEST,
                Handler = "index.handler",
                Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
                Vpc = vpc
            });

Properties

OwnerGid

Specifies the POSIX group ID to apply to the RootDirectory.

public string OwnerGid { get; set; }
Property Value

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

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

string

Remarks

ExampleMetadata: infused

Implements

IAcl
Back to top Generated by DocFX