Skip to content

detach_and_delete_s3_access_point

detach_and_delete_s3_access_point(
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    client_request_token: Optional[ClientRequestToken] = None,
    name: Optional[S3AccessPointAttachmentName] = None,
) -> DetachAndDeleteS3AccessPointResponse

Detaches an S3 access point from an Amazon FSx volume and deletes the S3 access point.

The requester requires the following permission to perform this action:

  • fsx:DetachAndDeleteS3AccessPoint

  • s3:DeleteAccessPoint

Parameters:

Raises:

  • 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.

  • S3AccessPointAttachmentNotFound –

    The access point specified was not found.

  • UnsupportedOperation –

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

  • UnknownServiceError –

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

Source code in docs_src/capo_fsx/_services/f_sx.py
def detach_and_delete_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,
) -> "capo_fsx.types.detach_and_delete_s3_access_point_response.DetachAndDeleteS3AccessPointResponse":
    """<p>Detaches an S3 access point from an Amazon FSx volume and deletes the S3 access point.</p> <p>The requester requires the following permission to perform this action:</p> <ul> <li> <p> <code>fsx:DetachAndDeleteS3AccessPoint</code> </p> </li> <li> <p> <code>s3:DeleteAccessPoint</code> </p> </li> </ul>

    Args:
        name: <p>The name of the S3 access point attachment that you want to delete.</p>

    Raises:
        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.s3_access_point_attachment_not_found.S3AccessPointAttachmentNotFound: <p>The access point specified was not found.</p>
        capo_fsx.errors.unsupported_operation.UnsupportedOperation: <p>The requested operation is not supported for this resource or API.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fsx.types.detach_and_delete_s3_access_point_request.DetachAndDeleteS3AccessPointRequest]",
    ) -> OperationResponse[
        "capo_fsx.types.detach_and_delete_s3_access_point_response.DetachAndDeleteS3AccessPointResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.detach_and_delete_s3_access_point

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DetachAndDeleteS3AccessPoint")
    )
    input_: capo_fsx.types.detach_and_delete_s3_access_point_request.DetachAndDeleteS3AccessPointRequest = {}
    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

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