aws-cdk-lib.aws_efs.AccessPoint

class AccessPoint (construct)

LanguageType name
.NETAmazon.CDK.AWS.EFS.AccessPoint
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsefs#AccessPoint
Javasoftware.amazon.awscdk.services.efs.AccessPoint
Pythonaws_cdk.aws_efs.AccessPoint
TypeScript (source)aws-cdk-lib » aws_efs » AccessPoint

Implements IConstruct, IDependable, IResource, IAccessPoint

Represents the AccessPoint.

Example

efs.AccessPoint.fromAccessPointAttributes(this, 'ap', {
  accessPointId: 'fsap-1293c4d9832fo0912',
  fileSystem: efs.FileSystem.fromFileSystemAttributes(this, 'efs', {
    fileSystemId: 'fs-099d3e2f',
    securityGroup: ec2.SecurityGroup.fromSecurityGroupId(this, 'sg', 'sg-51530134'),
  }),
});

Initializer

new AccessPoint(scope: Construct, id: string, props: AccessPointProps)

Parameters

  • scope Construct
  • id string
  • props AccessPointProps

Construct Props

NameTypeDescription
fileSystemIFileSystemThe efs filesystem.
createAcl?AclSpecifies the POSIX IDs and permissions to apply when creating the access point's root directory.
path?stringSpecifies 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.
posixUser?PosixUserThe 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.

fileSystem

Type: IFileSystem

The efs filesystem.


createAcl?

Type: Acl (optional, default: None. The directory specified by path must exist.)

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.


path?

Type: string (optional, default: '/')

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.


posixUser?

Type: PosixUser (optional, default: user identity not enforced)

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.

See also: [ - Enforcing a User Identity Using an Access Point]( - Enforcing a User Identity Using an Access Point)

Properties

NameTypeDescription
accessPointArnstringThe ARN of the Access Point.
accessPointIdstringThe ID of the Access Point.
envResourceEnvironmentThe environment this resource belongs to.
fileSystemIFileSystemThe file system of the access point.
nodeNodeThe tree node.
stackStackThe stack in which this resource is defined.

accessPointArn

Type: string

The ARN of the Access Point.


accessPointId

Type: string

The ID of the Access Point.


env

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


fileSystem

Type: IFileSystem

The file system of the access point.


node

Type: Node

The tree node.


stack

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
applyRemovalPolicy(policy)Apply the given removal policy to this resource.
toString()Returns a string representation of this construct.
static fromAccessPointAttributes(scope, id, attrs)Import an existing Access Point by attributes.
static fromAccessPointId(scope, id, accessPointId)Import an existing Access Point by id.

applyRemovalPolicy(policy)

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).


toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromAccessPointAttributes(scope, id, attrs)

public static fromAccessPointAttributes(scope: Construct, id: string, attrs: AccessPointAttributes): IAccessPoint

Parameters

  • scope Construct
  • id string
  • attrs AccessPointAttributes

Returns

  • IAccessPoint

Import an existing Access Point by attributes.


static fromAccessPointId(scope, id, accessPointId)

public static fromAccessPointId(scope: Construct, id: string, accessPointId: string): IAccessPoint

Parameters

  • scope Construct
  • id string
  • accessPointId string

Returns

  • IAccessPoint

Import an existing Access Point by id.