Skip to content

create_and_attach_s3_access_point

create_and_attach_s3_access_point(
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    client_request_token: Optional[ClientRequestToken] = None,
    name: Optional[S3AccessPointAttachmentName] = None,
    type: Optional[S3AccessPointAttachmentType] = None,
    open_zfs_configuration: Optional[
        CreateAndAttachS3AccessPointOpenZFSConfiguration
    ] = None,
    ontap_configuration: Optional[
        CreateAndAttachS3AccessPointOntapConfiguration
    ] = None,
    s3_access_point: Optional[CreateAndAttachS3AccessPointS3Configuration] = None,
) -> CreateAndAttachS3AccessPointResponse

Creates an S3 access point and attaches it to an Amazon FSx volume. For FSx for OpenZFS file systems, the volume must be hosted on a high-availability file system, either Single-AZ or Multi-AZ. For more information, see Accessing your data using Amazon S3 access points. in the Amazon FSx for OpenZFS User Guide.

The requester requires the following permissions to perform these actions:

  • fsx:CreateAndAttachS3AccessPoint

  • s3:CreateAccessPoint

  • s3:GetAccessPoint

  • s3:PutAccessPointPolicy

  • s3:DeleteAccessPoint

The following actions are related to CreateAndAttachS3AccessPoint:

Parameters:

Raises:

  • AccessPointAlreadyOwnedByYou –

    An access point with that name already exists in the Amazon Web Services Region in your Amazon Web Services account.

  • BadRequest –

    A generic error indicating a failure with a client request.

  • IncompatibleParameterError –

    The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.

  • InternalServerError –

    A generic error indicating a server-side failure.

  • InvalidAccessPoint –

    The access point specified doesn't exist.

  • InvalidRequest –

    The action or operation requested is invalid. Verify that the action is typed correctly.

  • TooManyAccessPoints –

    You have reached the maximum number of S3 access points attachments allowed for your account in this Amazon Web Services Region, or for the file system. For more information, or to request an increase, see Service quotas on FSx resources in the FSx for OpenZFS User Guide.

  • UnsupportedOperation –

    The requested operation is not supported for this resource or API.

  • VolumeNotFound –

    No Amazon FSx volumes were found based upon the supplied parameters.

  • UnknownServiceError –

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

Source code in docs_src/capo_fsx/_services/f_sx.py
def create_and_attach_s3_access_point(
    self,
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    client_request_token: Optional[
        "capo_fsx.types.client_request_token.ClientRequestToken"
    ] = None,
    name: Optional[
        "capo_fsx.types.s3_access_point_attachment_name.S3AccessPointAttachmentName"
    ] = None,
    type: Optional[
        "capo_fsx.types.s3_access_point_attachment_type.S3AccessPointAttachmentType"
    ] = None,
    open_zfs_configuration: Optional[
        "capo_fsx.types.create_and_attach_s3_access_point_open_zfs_configuration.CreateAndAttachS3AccessPointOpenZFSConfiguration"
    ] = None,
    ontap_configuration: Optional[
        "capo_fsx.types.create_and_attach_s3_access_point_ontap_configuration.CreateAndAttachS3AccessPointOntapConfiguration"
    ] = None,
    s3_access_point: Optional[
        "capo_fsx.types.create_and_attach_s3_access_point_s3_configuration.CreateAndAttachS3AccessPointS3Configuration"
    ] = None,
) -> "capo_fsx.types.create_and_attach_s3_access_point_response.CreateAndAttachS3AccessPointResponse":
    """<p>Creates an S3 access point and attaches it to an Amazon FSx volume. For FSx for OpenZFS file systems, the volume must be hosted on a high-availability file system, either Single-AZ or Multi-AZ. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/s3accesspoints-for-FSx.html">Accessing your data using Amazon S3 access points</a>. in the Amazon FSx for OpenZFS User Guide. </p> <p>The requester requires the following permissions to perform these actions:</p> <ul> <li> <p> <code>fsx:CreateAndAttachS3AccessPoint</code> </p> </li> <li> <p> <code>s3:CreateAccessPoint</code> </p> </li> <li> <p> <code>s3:GetAccessPoint</code> </p> </li> <li> <p> <code>s3:PutAccessPointPolicy</code> </p> </li> <li> <p> <code>s3:DeleteAccessPoint</code> </p> </li> </ul> <p>The following actions are related to <code>CreateAndAttachS3AccessPoint</code>:</p> <ul> <li> <p> <a>DescribeS3AccessPointAttachments</a> </p> </li> <li> <p> <a>DetachAndDeleteS3AccessPoint</a> </p> </li> </ul>

    Args:
        name: <p>The name you want to assign to this S3 access point.</p>
        type: <p>The type of S3 access point you want to create. Only <code>OpenZFS</code> is supported.</p>
        open_zfs_configuration: <p>Specifies the configuration to use when creating and attaching an S3 access point to an FSx for OpenZFS volume.</p>
        s3_access_point: <p>Specifies the virtual private cloud (VPC) configuration if you're creating an access point that is restricted to a VPC. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/access-points-vpc.html">Creating access points restricted to a virtual private cloud</a>.</p>

    Raises:
        capo_fsx.errors.access_point_already_owned_by_you.AccessPointAlreadyOwnedByYou: <p>An access point with that name already exists in the Amazon Web Services Region in your Amazon Web Services account.</p>
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.incompatible_parameter_error.IncompatibleParameterError: <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.invalid_access_point.InvalidAccessPoint: <p>The access point specified doesn't exist.</p>
        capo_fsx.errors.invalid_request.InvalidRequest: <p>The action or operation requested is invalid. Verify that the action is typed correctly.</p>
        capo_fsx.errors.too_many_access_points.TooManyAccessPoints: <p>You have reached the maximum number of S3 access points attachments allowed for your account in this Amazon Web Services Region, or for the file system. For more information, or to request an increase, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/limits.html">Service quotas on FSx resources</a> in the FSx for OpenZFS User Guide.</p>
        capo_fsx.errors.unsupported_operation.UnsupportedOperation: <p>The requested operation is not supported for this resource or API.</p>
        capo_fsx.errors.volume_not_found.VolumeNotFound: <p>No Amazon FSx volumes were found based upon the supplied parameters.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fsx.types.create_and_attach_s3_access_point_request.CreateAndAttachS3AccessPointRequest]",
    ) -> OperationResponse[
        "capo_fsx.types.create_and_attach_s3_access_point_response.CreateAndAttachS3AccessPointResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.create_and_attach_s3_access_point

        output, http_response = (
            capo_fsx._operations.aws_simba_api_service_v20180301.create_and_attach_s3_access_point.create_and_attach_s3_access_point(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateAndAttachS3AccessPoint")
    )
    input_: capo_fsx.types.create_and_attach_s3_access_point_request.CreateAndAttachS3AccessPointRequest = {}
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if name is not None:
        input_["name"] = name
    if type is not None:
        input_["type"] = type
    if open_zfs_configuration is not None:
        input_["open_zfs_configuration"] = open_zfs_configuration
    if ontap_configuration is not None:
        input_["ontap_configuration"] = ontap_configuration
    if s3_access_point is not None:
        input_["s3_access_point"] = s3_access_point

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