Skip to content

create_access_point

create_access_point(
    file_system_id: FileSystemId,
    *,
    config_overrides: Optional[S3FilesClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagList] = None,
    posix_user: Optional[PosixUser] = None,
    root_directory: Optional[RootDirectory] = None,
) -> CreateAccessPointResponse

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.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

    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.

  • tags (Optional[TagList], default: None ) –

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

  • file_system_id (FileSystemId) –

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

  • posix_user (Optional[PosixUser], default: None ) –

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

  • root_directory (Optional[RootDirectory], default: None ) –

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

Raises:

  • ThrottlingException –

    The request was throttled. Retry your request using exponential backoff.

  • ConflictException –

    The request conflicts with the current state of the resource. This can occur when trying to create a resource that already exists or delete a resource that is in use.

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • ResourceNotFoundException –

    The specified resource was not found. Verify that the resource exists and that you have permission to access it.

  • ServiceQuotaExceededException –

    The request would exceed a service quota. Review your service quotas and either delete resources or request a quota increase.

  • ValidationException –

    The input parameters are not valid. Check the parameter values and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_s3files/_services/s3_files.py
def create_access_point(
    self,
    file_system_id: "capo_s3files.types.file_system_id.FileSystemId",
    *,
    config_overrides: Optional[S3FilesClientConfig] = None,
    client_token: Optional["capo_s3files.types.client_token.ClientToken"] = None,
    tags: Optional["capo_s3files.types.tag_list.TagList"] = None,
    posix_user: Optional["capo_s3files.types.posix_user.PosixUser"] = None,
    root_directory: Optional[
        "capo_s3files.types.root_directory.RootDirectory"
    ] = None,
) -> "capo_s3files.types.create_access_point_response.CreateAccessPointResponse":
    """<p>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.</p>

    Args:
        client_token: <p>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.</p>
        tags: <p>An array of key-value pairs to apply to the access point for resource tagging.</p>
        file_system_id: <p>The ID or Amazon Resource Name (ARN) of the S3 File System.</p>
        posix_user: <p>The POSIX identity with uid, gid, and secondary group IDs for user enforcement when accessing the file system through this access point.</p>
        root_directory: <p>The root directory path for the access point, with optional creation permissions for newly created directories.</p>

    Raises:
        capo_s3files.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry your request using exponential backoff.</p>
        capo_s3files.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. This can occur when trying to create a resource that already exists or delete a resource that is in use.</p>
        capo_s3files.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_s3files.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource exists and that you have permission to access it.</p>
        capo_s3files.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed a service quota. Review your service quotas and either delete resources or request a quota increase.</p>
        capo_s3files.errors.validation_exception.ValidationException: <p>The input parameters are not valid. Check the parameter values and try again.</p>
        capo_s3files.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_s3files.types.create_access_point_request.CreateAccessPointRequest]",
    ) -> OperationResponse[
        "capo_s3files.types.create_access_point_response.CreateAccessPointResponse"
    ]:
        import capo_s3files._operations.s3_files.create_access_point

        output, http_response = (
            capo_s3files._operations.s3_files.create_access_point.create_access_point(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateAccessPoint")
    )
    input_: capo_s3files.types.create_access_point_request.CreateAccessPointRequest = {
        "file_system_id": file_system_id
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags
    if posix_user is not None:
        input_["posix_user"] = posix_user
    if root_directory is not None:
        input_["root_directory"] = root_directory

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output