Skip to content

get_analyzed_resource

get_analyzed_resource(
    analyzer_arn: AnalyzerArn,
    resource_arn: ResourceArn,
    *,
    config_overrides: Optional[AccessAnalyzerClientConfig] = None,
) -> GetAnalyzedResourceResponse

Retrieves information about a resource that was analyzed.

This action is supported only for external access analyzers.

Parameters:

Raises:

Source code in docs_src/capo_accessanalyzer/_services/access_analyzer.py
def get_analyzed_resource(
    self,
    analyzer_arn: "capo_accessanalyzer.types.analyzer_arn.AnalyzerArn",
    resource_arn: "capo_accessanalyzer.types.resource_arn.ResourceArn",
    *,
    config_overrides: Optional[AccessAnalyzerClientConfig] = None,
) -> "capo_accessanalyzer.types.get_analyzed_resource_response.GetAnalyzedResourceResponse":
    """<p>Retrieves information about a resource that was analyzed.</p> <note> <p>This action is supported only for external 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> to retrieve information from.</p>
        resource_arn: <p>The ARN of the resource to retrieve information about.</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_analyzed_resource_request.GetAnalyzedResourceRequest]",
    ) -> OperationResponse[
        "capo_accessanalyzer.types.get_analyzed_resource_response.GetAnalyzedResourceResponse"
    ]:
        import capo_accessanalyzer._operations.access_analyzer.get_analyzed_resource

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAnalyzedResource")
    )
    input_: capo_accessanalyzer.types.get_analyzed_resource_request.GetAnalyzedResourceRequest = {
        "analyzer_arn": analyzer_arn,
        "resource_arn": resource_arn,
    }

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