Skip to content

update_event_label async

update_event_label(
    event_id: identifier,
    event_type_name: identifier,
    assigned_label: identifier,
    label_timestamp: utcTimestampISO8601,
    *,
    config_overrides: Optional[AsyncFraudDetectorClientConfig] = None,
) -> UpdateEventLabelResult

Updates the specified event with a new label.

Parameters:

  • event_id (identifier) –

    The ID of the event associated with the label to update.

  • event_type_name (identifier) –

    The event type of the event associated with the label to update.

  • assigned_label (identifier) –

    The new label to assign to the event.

  • label_timestamp (utcTimestampISO8601) –

    The timestamp associated with the label. The timestamp must be specified using ISO 8601 standard in UTC.

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/async_fraud_detector.py
async def update_event_label(
    self,
    event_id: "capo_frauddetector.types.identifier.identifier",
    event_type_name: "capo_frauddetector.types.identifier.identifier",
    assigned_label: "capo_frauddetector.types.identifier.identifier",
    label_timestamp: "capo_frauddetector.types.utc_timestamp_iso8601.utcTimestampISO8601",
    *,
    config_overrides: Optional[AsyncFraudDetectorClientConfig] = None,
) -> "capo_frauddetector.types.update_event_label_result.UpdateEventLabelResult":
    """<p>Updates the specified event with a new label.</p>

    Args:
        event_id: <p>The ID of the event associated with the label to update.</p>
        event_type_name: <p>The event type of the event associated with the label to update.</p>
        assigned_label: <p>The new label to assign to the event.</p>
        label_timestamp: <p>The timestamp associated with the label. The timestamp must be specified using ISO 8601 standard in UTC. </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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_frauddetector.types.update_event_label_request.UpdateEventLabelRequest]",
    ) -> AsyncOperationResponse[
        "capo_frauddetector.types.update_event_label_result.UpdateEventLabelResult"
    ]:
        import capo_frauddetector._operations.aws_hawks_nest_service_facade.update_event_label

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateEventLabel")
    )
    input_: capo_frauddetector.types.update_event_label_request.UpdateEventLabelRequest = {
        "event_id": event_id,
        "event_type_name": event_type_name,
        "assigned_label": assigned_label,
        "label_timestamp": label_timestamp,
    }

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