createAccessPoint method

Future<CreateAccessPointResponse> createAccessPoint({
  1. required String fileSystemId,
  2. String? clientToken,
  3. PosixUser? posixUser,
  4. RootDirectory? rootDirectory,
  5. List<Tag>? tags,
})

Creates an S3 File System Access Point for application-specific access with POSIX user identity and root directory enforcement. Access points provide a way to manage access to shared datasets in multi-tenant scenarios.

May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter fileSystemId : The ID or Amazon Resource Name (ARN) of the S3 File System.

Parameter clientToken : A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Web Services ignores the request, but does not return an error.

Parameter posixUser : The POSIX identity with uid, gid, and secondary group IDs for user enforcement when accessing the file system through this access point.

Parameter rootDirectory : The root directory path for the access point, with optional creation permissions for newly created directories.

Parameter tags : An array of key-value pairs to apply to the access point for resource tagging.

Implementation

Future<CreateAccessPointResponse> createAccessPoint({
  required String fileSystemId,
  String? clientToken,
  PosixUser? posixUser,
  RootDirectory? rootDirectory,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'fileSystemId': fileSystemId,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (posixUser != null) 'posixUser': posixUser,
    if (rootDirectory != null) 'rootDirectory': rootDirectory,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/access-points',
    exceptionFnMap: _exceptionFns,
  );
  return CreateAccessPointResponse.fromJson(response);
}