class AccessPoint (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EFS.AccessPoint |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsefs#AccessPoint |
Java | software.amazon.awscdk.services.efs.AccessPoint |
Python | aws_cdk.aws_efs.AccessPoint |
TypeScript (source) | aws-cdk-lib » aws_efs » AccessPoint |
Implements
IConstruct
, IDependable
, IResource
, IAccess
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
Access
Point Props
Construct Props
Name | Type | Description |
---|---|---|
file | IFile | The efs filesystem. |
client | string | The opaque string specified in the request to ensure idempotent creation. |
create | Acl | Specifies the POSIX IDs and permissions to apply when creating the access point's root directory. |
path? | string | 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. |
posix | Posix | 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. |
fileSystem
Type:
IFile
The efs filesystem.
clientToken?
Type:
string
(optional, default: No client token)
The opaque string specified in the request to ensure idempotent creation.
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:
Posix
(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
Name | Type | Description |
---|---|---|
access | string | The ARN of the Access Point. |
access | string | The ID of the Access Point. |
env | Resource | The environment this resource belongs to. |
file | IFile | The file system of the access point. |
node | Node | The tree node. |
stack | Stack | The 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:
Resource
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:
IFile
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
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from | Import an existing Access Point by attributes. |
static from | Import an existing Access Point by id. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
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
).
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
AccessPointAttributes(scope, id, attrs)
static frompublic static fromAccessPointAttributes(scope: Construct, id: string, attrs: AccessPointAttributes): IAccessPoint
Parameters
- scope
Construct
- id
string
- attrs
Access
Point Attributes
Returns
Import an existing Access Point by attributes.
AccessPointId(scope, id, accessPointId)
static frompublic static fromAccessPointId(scope: Construct, id: string, accessPointId: string): IAccessPoint
Parameters
- scope
Construct
- id
string
- accessPointId
string
Returns
Import an existing Access Point by id.