Skip to content

get_finding

get_finding(
    analyzer_arn: AnalyzerArn,
    id: FindingId,
    *,
    config_overrides: Optional[AccessAnalyzerClientConfig] = None,
) -> GetFindingResponse

Retrieves information about the specified finding. GetFinding and GetFindingV2 both use access-analyzer:GetFinding in the Action element of an IAM policy statement. You must have permission to perform the access-analyzer:GetFinding action.

GetFinding is supported only for external access analyzers. You must use GetFindingV2 for internal and unused access analyzers.

Parameters:

Raises:

Source code in docs_src/capo_accessanalyzer/_services/access_analyzer.py
def get_finding(
    self,
    analyzer_arn: "capo_accessanalyzer.types.analyzer_arn.AnalyzerArn",
    id: "capo_accessanalyzer.types.finding_id.FindingId",
    *,
    config_overrides: Optional[AccessAnalyzerClientConfig] = None,
) -> "capo_accessanalyzer.types.get_finding_response.GetFindingResponse":
    """<p>Retrieves information about the specified finding. GetFinding and GetFindingV2 both use <code>access-analyzer:GetFinding</code> in the <code>Action</code> element of an IAM policy statement. You must have permission to perform the <code>access-analyzer:GetFinding</code> action.</p> <note> <p>GetFinding is supported only for external access analyzers. You must use GetFindingV2 for internal and unused access analyzers.</p> </note>

    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 finding.</p>
        id: <p>The ID of the finding to retrieve.</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.get_finding_request.GetFindingRequest]",
    ) -> OperationResponse[
        "capo_accessanalyzer.types.get_finding_response.GetFindingResponse"
    ]:
        import capo_accessanalyzer._operations.access_analyzer.get_finding

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetFinding")
    )
    input_: capo_accessanalyzer.types.get_finding_request.GetFindingRequest = {
        "analyzer_arn": analyzer_arn,
        "id": id,
    }

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