Skip to content

get_event async

get_event(
    event_id: string,
    event_type_name: string,
    *,
    config_overrides: Optional[AsyncFraudDetectorClientConfig] = None,
) -> GetEventResult

Retrieves details of events stored with Amazon Fraud Detector. This action does not retrieve prediction results.

Parameters:

  • event_id (string) –

    The ID of the event to retrieve.

  • event_type_name (string) –

    The event type of the event to retrieve.

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.

  • 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/async_fraud_detector.py
async def get_event(
    self,
    event_id: "capo_frauddetector.types.string.string",
    event_type_name: "capo_frauddetector.types.string.string",
    *,
    config_overrides: Optional[AsyncFraudDetectorClientConfig] = None,
) -> "capo_frauddetector.types.get_event_result.GetEventResult":
    """<p>Retrieves details of events stored with Amazon Fraud Detector. This action does not retrieve prediction results.</p>

    Args:
        event_id: <p>The ID of the event to retrieve.</p>
        event_type_name: <p>The event type of the event to retrieve.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_frauddetector.types.get_event_request.GetEventRequest]",
    ) -> AsyncOperationResponse[
        "capo_frauddetector.types.get_event_result.GetEventResult"
    ]:
        import capo_frauddetector._operations.aws_hawks_nest_service_facade.get_event

        (
            output,
            http_response,
        ) = await capo_frauddetector._operations.aws_hawks_nest_service_facade.get_event.async_get_event(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_frauddetector.types.get_event_result.GetEventResult",
    ) -> dict[str, Any]:
        import capo_frauddetector.types.get_event_result

        return capo_frauddetector.types.get_event_result.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetEvent", redact_output=_redact_output)
    )
    input_: capo_frauddetector.types.get_event_request.GetEventRequest = {
        "event_id": event_id,
        "event_type_name": event_type_name,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output