Skip to content

update_findings

update_findings(
    analyzer_arn: AnalyzerArn,
    status: FindingStatusUpdate,
    *,
    config_overrides: Optional[AccessAnalyzerClientConfig] = None,
    ids: Optional[FindingIdList] = None,
    resource_arn: Optional[ResourceArn] = None,
    client_token: Optional[str] = None,
) -> None

Updates the status for the specified findings.

Parameters:

  • analyzer_arn (AnalyzerArn) –

    The ARN of the analyzer that generated the findings to update.

  • status (FindingStatusUpdate) –

    The state represents the action to take to update the finding Status. Use ARCHIVE to change an Active finding to an Archived finding. Use ACTIVE to change an Archived finding to an Active finding.

  • ids (Optional[FindingIdList], default: None ) –

    The IDs of the findings to update.

  • resource_arn (Optional[ResourceArn], default: None ) –

    The ARN of the resource identified in the finding.

  • client_token (Optional[str], default: None ) –

    A client token.

Raises:

Source code in docs_src/capo_accessanalyzer/_services/access_analyzer.py
def update_findings(
    self,
    analyzer_arn: "capo_accessanalyzer.types.analyzer_arn.AnalyzerArn",
    status: "capo_accessanalyzer.types.finding_status_update.FindingStatusUpdate",
    *,
    config_overrides: Optional[AccessAnalyzerClientConfig] = None,
    ids: Optional["capo_accessanalyzer.types.finding_id_list.FindingIdList"] = None,
    resource_arn: Optional[
        "capo_accessanalyzer.types.resource_arn.ResourceArn"
    ] = None,
    client_token: Optional[str] = None,
) -> None:
    """<p>Updates the status for the specified findings.</p>

    Args:
        analyzer_arn: <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources">ARN of the analyzer</a> that generated the findings to update.</p>
        status: <p>The state represents the action to take to update the finding Status. Use <code>ARCHIVE</code> to change an Active finding to an Archived finding. Use <code>ACTIVE</code> to change an Archived finding to an Active finding.</p>
        ids: <p>The IDs of the findings to update.</p>
        resource_arn: <p>The ARN of the resource identified in the finding.</p>
        client_token: <p>A client token.</p>

    Raises:
        capo_accessanalyzer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_accessanalyzer.errors.internal_server_exception.InternalServerException: <p>Internal server error.</p>
        capo_accessanalyzer.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
        capo_accessanalyzer.errors.throttling_exception.ThrottlingException: <p>Throttling limit exceeded error.</p>
        capo_accessanalyzer.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
        capo_accessanalyzer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_accessanalyzer.types.update_findings_request.UpdateFindingsRequest]",
    ) -> OperationResponse[None]:
        import capo_accessanalyzer._operations.access_analyzer.update_findings

        output, http_response = (
            capo_accessanalyzer._operations.access_analyzer.update_findings.update_findings(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFindings")
    )
    input_: capo_accessanalyzer.types.update_findings_request.UpdateFindingsRequest = {
        "analyzer_arn": analyzer_arn,
        "status": status,
    }
    if ids is not None:
        input_["ids"] = ids
    if resource_arn is not None:
        input_["resource_arn"] = resource_arn
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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