Deletes the specified event.
When you delete an event, Amazon Fraud Detector permanently deletes that event and the event data is no longer stored in Amazon Fraud Detector. If deleteAuditHistory is True, event data is available through search for up to 30 seconds after the delete operation is completed.
Parameters:
-
event_id
(identifier)
–
The ID of the event to delete.
-
event_type_name
(identifier)
–
The name of the event type.
-
delete_audit_history
(Optional[DeleteAuditHistory], default:
None
)
–
Specifies whether or not to delete any predictions associated with the event. If set to True,
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.
-
InternalServerException
–
An exception indicating an internal server error.
-
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_event(
self,
event_id: "capo_frauddetector.types.identifier.identifier",
event_type_name: "capo_frauddetector.types.identifier.identifier",
*,
config_overrides: Optional[FraudDetectorClientConfig] = None,
delete_audit_history: Optional[
"capo_frauddetector.types.delete_audit_history.DeleteAuditHistory"
] = None,
) -> "capo_frauddetector.types.delete_event_result.DeleteEventResult":
"""<p>Deletes the specified event.</p> <p>When you delete an event, Amazon Fraud Detector permanently deletes that event and the event data is no longer stored in Amazon Fraud Detector. If <code>deleteAuditHistory</code> is <code>True</code>, event data is available through search for up to 30 seconds after the delete operation is completed.</p>
Args:
event_id: <p>The ID of the event to delete.</p>
event_type_name: <p>The name of the event type.</p>
delete_audit_history: <p>Specifies whether or not to delete any predictions associated with the event. If set to <code>True</code>, </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.internal_server_exception.InternalServerException: <p>An exception indicating an internal server error.</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_event_request.DeleteEventRequest]",
) -> OperationResponse[
"capo_frauddetector.types.delete_event_result.DeleteEventResult"
]:
import capo_frauddetector._operations.aws_hawks_nest_service_facade.delete_event
output, http_response = (
capo_frauddetector._operations.aws_hawks_nest_service_facade.delete_event.delete_event(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteEvent")
)
input_: capo_frauddetector.types.delete_event_request.DeleteEventRequest = {
"event_id": event_id,
"event_type_name": event_type_name,
}
if delete_audit_history is not None:
input_["delete_audit_history"] = delete_audit_history
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|