CreateAccessPoint - Amazon Elastic File System
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

CreateAccessPoint

Creates an EFS access point. An access point is an application-specific view into an EFS file system that applies an operating system user and group, and a file system path, to any file system request made through the access point. The operating system user and group override any identity information provided by the NFS client. The file system path is exposed as the access point's root directory. Applications using the access point can only access data in its own directory and below. To learn more, see Mounting a File System Using EFS Access Points.

This operation requires permissions for the elasticfilesystem:CreateAccessPoint action.

Request Syntax

POST /2015-02-01/access-points HTTP/1.1 Content-type: application/json { "ClientToken": "string", "FileSystemId": "string", "PosixUser": { "Gid": number, "SecondaryGids": [ number ], "Uid": number }, "RootDirectory": { "CreationInfo": { "OwnerGid": number, "OwnerUid": number, "Permissions": "string" }, "Path": "string" }, "Tags": [ { "Key": "string", "Value": "string" } ] }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

ClientToken

A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent creation.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: Yes

FileSystemId

The ID of the EFS file system that the access point provides access to.

Type: String

Required: Yes

PosixUser

The operating system user and group applied to all file system requests made using the access point.

Type: PosixUser object

Required: No

RootDirectory

Specifies the directory on the Amazon EFS file system that the access point exposes as the root directory of your file system to NFS clients using the access point. The clients using the access point can only access the root directory and below. If the RootDirectory > Path specified does not exist, EFS creates it and applies the CreationInfo settings when a client connects to an access point. When specifying a RootDirectory, you need to provide the Path, and the CreationInfo is optional.

Type: RootDirectory object

Required: No

Tags

Creates tags associated with the access point. Each tag is a key-value pair.

Type: Array of Tag objects

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "AccessPointArn": "string", "AccessPointId": "string", "ClientToken": "string", "FileSystemId": "string", "LifeCycleState": "string", "Name": "string", "OwnerId": "string", "PosixUser": { "Gid": number, "SecondaryGids": [ number ], "Uid": number }, "RootDirectory": { "CreationInfo": { "OwnerGid": number, "OwnerUid": number, "Permissions": "string" }, "Path": "string" }, "Tags": [ { "Key": "string", "Value": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AccessPointArn

The unique Amazon Resource Name (ARN) associated with the access point.

Type: String

AccessPointId

The ID of the access point, assigned by Amazon EFS.

Type: String

ClientToken

The opaque string specified in the request to ensure idempotent creation.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

FileSystemId

The ID of the EFS file system that the access point applies to.

Type: String

LifeCycleState

Identifies the lifecycle phase of the access point.

Type: String

Valid Values: creating | available | updating | deleting | deleted

Name

The name of the access point. This is the value of the Name tag.

Type: String

OwnerId

Identified the AWS account that owns the access point resource.

Type: String

PosixUser

The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point that is used for all file operations by NFS clients using the access point.

Type: PosixUser object

RootDirectory

The directory on the Amazon EFS file system that the access point exposes as the root directory to NFS clients using the access point.

Type: RootDirectory object

Tags

The tags associated with the access point, presented as an array of Tag objects.

Type: Array of Tag objects

Errors

AccessPointAlreadyExists

Returned if the access point you are trying to create already exists, with the creation token you provided in the request.

HTTP Status Code: 409

AccessPointLimitExceeded

Returned if the AWS account has already created the maximum number of access points allowed per file system.

HTTP Status Code: 403

BadRequest

Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

HTTP Status Code: 400

FileSystemNotFound

Returned if the specified FileSystemId value doesn't exist in the requester's AWS account.

HTTP Status Code: 404

InternalServerError

Returned if an error occurred on the server side.

HTTP Status Code: 500

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: