Skip to content

update_findings_feedback async

update_findings_feedback(
    detector_id: DetectorId,
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
    finding_ids: Optional[FindingIds] = None,
    feedback: Optional[Feedback] = None,
    comments: Optional[SensitiveString] = None,
) -> UpdateFindingsFeedbackResponse

Marks the specified GuardDuty findings as useful or not useful.

Parameters:

  • detector_id (DetectorId) –

    The ID of the detector that is associated with the findings for which you want to update the feedback.

    To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

  • finding_ids (Optional[FindingIds], default: None ) –

    The IDs of the findings that you want to mark as useful or not useful.

  • feedback (Optional[Feedback], default: None ) –

    The feedback for the finding.

  • comments (Optional[SensitiveString], default: None ) –

    Additional feedback about the GuardDuty findings.

Raises:

Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
async def update_findings_feedback(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
    finding_ids: Optional["capo_guardduty.types.finding_ids.FindingIds"] = None,
    feedback: Optional["capo_guardduty.types.feedback.Feedback"] = None,
    comments: Optional[
        "capo_guardduty.types.sensitive_string.SensitiveString"
    ] = None,
) -> "capo_guardduty.types.update_findings_feedback_response.UpdateFindingsFeedbackResponse":
    """<p>Marks the specified GuardDuty findings as useful or not useful.</p>

    Args:
        detector_id: <p>The ID of the detector that is associated with the findings for which you want to update the feedback.</p> <p>To find the <code>detectorId</code> in the current Region, see the Settings page in the GuardDuty console, or run the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html">ListDetectors</a> API.</p>
        finding_ids: <p>The IDs of the findings that you want to mark as useful or not useful.</p>
        feedback: <p>The feedback for the finding.</p>
        comments: <p>Additional feedback about the GuardDuty findings.</p>

    Raises:
        capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
        capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
        capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_guardduty.types.update_findings_feedback_request.UpdateFindingsFeedbackRequest]",
    ) -> AsyncOperationResponse[
        "capo_guardduty.types.update_findings_feedback_response.UpdateFindingsFeedbackResponse"
    ]:
        import capo_guardduty._operations.guard_duty_api_service.update_findings_feedback

        (
            output,
            http_response,
        ) = await capo_guardduty._operations.guard_duty_api_service.update_findings_feedback.async_update_findings_feedback(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_guardduty.types.update_findings_feedback_request.UpdateFindingsFeedbackRequest",
    ) -> dict[str, Any]:
        import capo_guardduty.types.update_findings_feedback_request

        return (
            capo_guardduty.types.update_findings_feedback_request.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateFindingsFeedback", redact_input=_redact_input),
    )
    input_: capo_guardduty.types.update_findings_feedback_request.UpdateFindingsFeedbackRequest = {
        "detector_id": detector_id
    }
    if finding_ids is not None:
        input_["finding_ids"] = finding_ids
    if feedback is not None:
        input_["feedback"] = feedback
    if comments is not None:
        input_["comments"] = comments

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