Skip to content

get_investigation async

get_investigation(
    graph_arn: GraphArn,
    investigation_id: InvestigationId,
    *,
    config_overrides: Optional[AsyncDetectiveClientConfig] = None,
) -> GetInvestigationResponse

Detective investigations lets you investigate IAM users and IAM roles using indicators of compromise. An indicator of compromise (IOC) is an artifact observed in or on a network, system, or environment that can (with a high level of confidence) identify malicious activity or a security incident. GetInvestigation returns the investigation results of an investigation for a behavior graph.

Parameters:

  • graph_arn (GraphArn) –

    The Amazon Resource Name (ARN) of the behavior graph.

  • investigation_id (InvestigationId) –

    The investigation ID of the investigation report.

Raises:

Source code in docs_src/capo_detective/_services/async_detective.py
async def get_investigation(
    self,
    graph_arn: "capo_detective.types.graph_arn.GraphArn",
    investigation_id: "capo_detective.types.investigation_id.InvestigationId",
    *,
    config_overrides: Optional[AsyncDetectiveClientConfig] = None,
) -> "capo_detective.types.get_investigation_response.GetInvestigationResponse":
    """<p>Detective investigations lets you investigate IAM users and IAM roles using indicators of compromise. An indicator of compromise (IOC) is an artifact observed in or on a network, system, or environment that can (with a high level of confidence) identify malicious activity or a security incident. <code>GetInvestigation</code> returns the investigation results of an investigation for a behavior graph. </p>

    Args:
        graph_arn: <p>The Amazon Resource Name (ARN) of the behavior graph.</p>
        investigation_id: <p>The investigation ID of the investigation report.</p>

    Raises:
        capo_detective.errors.access_denied_exception.AccessDeniedException: <p>The request issuer does not have permission to access this resource or perform this operation.</p>
        capo_detective.errors.internal_server_exception.InternalServerException: <p>The request was valid but failed because of a problem with the service.</p>
        capo_detective.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request refers to a nonexistent resource.</p>
        capo_detective.errors.too_many_requests_exception.TooManyRequestsException: <p>The request cannot be completed because too many other requests are occurring at the same time.</p>
        capo_detective.errors.validation_exception.ValidationException: <p>The request parameters are invalid.</p>
        capo_detective.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_detective.types.get_investigation_request.GetInvestigationRequest]",
    ) -> AsyncOperationResponse[
        "capo_detective.types.get_investigation_response.GetInvestigationResponse"
    ]:
        import capo_detective._operations.amazon_detective.get_investigation

        (
            output,
            http_response,
        ) = await capo_detective._operations.amazon_detective.get_investigation.async_get_investigation(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetInvestigation")
    )
    input_: capo_detective.types.get_investigation_request.GetInvestigationRequest = {
        "graph_arn": graph_arn,
        "investigation_id": investigation_id,
    }

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