Skip to content

get_investigation async

get_investigation(
    detector_id: DetectorId,
    investigation_id: InvestigationId,
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
) -> GetInvestigationResponse

This API is currently available as a preview. This feature is available in the following Amazon Web Services Regions: US East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), Europe (Frankfurt), Europe (Ireland), Europe (London), Europe (Paris), Europe (Stockholm), and Asia Pacific (Tokyo).

Retrieves the results and status of a specific GuardDuty investigation.

An administrator account can retrieve any investigation within the organization. Member accounts can only retrieve investigations that belong to them.

Parameters:

  • detector_id (DetectorId) –

    The unique ID of the GuardDuty detector associated with the investigation.

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

  • investigation_id (InvestigationId) –

    The unique identifier of the investigation to retrieve.

Raises:

Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
async def get_investigation(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    investigation_id: "capo_guardduty.types.investigation_id.InvestigationId",
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
) -> "capo_guardduty.types.get_investigation_response.GetInvestigationResponse":
    """<p>This API is currently available as a preview. This feature is available in the following Amazon Web Services Regions: US East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), Europe (Frankfurt), Europe (Ireland), Europe (London), Europe (Paris), Europe (Stockholm), and Asia Pacific (Tokyo).</p> <p>Retrieves the results and status of a specific GuardDuty investigation.</p> <p>An administrator account can retrieve any investigation within the organization. Member accounts can only retrieve investigations that belong to them.</p>

    Args:
        detector_id: <p>The unique ID of the GuardDuty detector associated with the investigation.</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>
        investigation_id: <p>The unique identifier of the investigation to retrieve.</p>

    Raises:
        capo_guardduty.errors.access_denied_exception.AccessDeniedException: <p>An access denied exception object.</p>
        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.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_guardduty._operations.guard_duty_api_service.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_guardduty.types.get_investigation_request.GetInvestigationRequest = {
        "detector_id": detector_id,
        "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