Skip to content

delete_detector_version

delete_detector_version(
    detector_id: identifier,
    detector_version_id: wholeNumberVersionString,
    *,
    config_overrides: Optional[FraudDetectorClientConfig] = None,
) -> DeleteDetectorVersionResult

Deletes the detector version. You cannot delete detector versions that are in ACTIVE status.

When you delete a detector version, Amazon Fraud Detector permanently deletes the detector and the data is no longer stored in Amazon Fraud Detector.

Parameters:

  • detector_id (identifier) –

    The ID of the parent detector for the detector version to delete.

  • detector_version_id (wholeNumberVersionString) –

    The ID of the detector version to delete.

Raises:

  • AccessDeniedException –

    An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as PutExternalModel, that specifies a role that is not in your account.

  • ConflictException –

    An exception indicating there was a conflict during a delete operation.

  • InternalServerException –

    An exception indicating an internal server error.

  • ResourceNotFoundException –

    An exception indicating the specified resource was not found.

  • ThrottlingException –

    An exception indicating a throttling error.

  • ValidationException –

    An exception indicating a specified value is not allowed.

  • UnknownServiceError –

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

Source code in docs_src/capo_frauddetector/_services/fraud_detector.py
def delete_detector_version(
    self,
    detector_id: "capo_frauddetector.types.identifier.identifier",
    detector_version_id: "capo_frauddetector.types.whole_number_version_string.wholeNumberVersionString",
    *,
    config_overrides: Optional[FraudDetectorClientConfig] = None,
) -> "capo_frauddetector.types.delete_detector_version_result.DeleteDetectorVersionResult":
    """<p>Deletes the detector version. You cannot delete detector versions that are in <code>ACTIVE</code> status.</p> <p>When you delete a detector version, Amazon Fraud Detector permanently deletes the detector and the data is no longer stored in Amazon Fraud Detector.</p>

    Args:
        detector_id: <p>The ID of the parent detector for the detector version to delete.</p>
        detector_version_id: <p>The ID of the detector version to delete.</p>

    Raises:
        capo_frauddetector.errors.access_denied_exception.AccessDeniedException: <p>An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as <code>PutExternalModel</code>, that specifies a role that is not in your account.</p>
        capo_frauddetector.errors.conflict_exception.ConflictException: <p>An exception indicating there was a conflict during a delete operation.</p>
        capo_frauddetector.errors.internal_server_exception.InternalServerException: <p>An exception indicating an internal server error.</p>
        capo_frauddetector.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception indicating the specified resource was not found.</p>
        capo_frauddetector.errors.throttling_exception.ThrottlingException: <p>An exception indicating a throttling error.</p>
        capo_frauddetector.errors.validation_exception.ValidationException: <p>An exception indicating a specified value is not allowed.</p>
        capo_frauddetector.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_frauddetector.types.delete_detector_version_request.DeleteDetectorVersionRequest]",
    ) -> OperationResponse[
        "capo_frauddetector.types.delete_detector_version_result.DeleteDetectorVersionResult"
    ]:
        import capo_frauddetector._operations.aws_hawks_nest_service_facade.delete_detector_version

        output, http_response = (
            capo_frauddetector._operations.aws_hawks_nest_service_facade.delete_detector_version.delete_detector_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDetectorVersion")
    )
    input_: capo_frauddetector.types.delete_detector_version_request.DeleteDetectorVersionRequest = {
        "detector_id": detector_id,
        "detector_version_id": detector_version_id,
    }

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