Skip to content

get_insights async

get_insights(
    *, config_overrides: Optional[AsyncAuditManagerClientConfig] = None
) -> GetInsightsResponse

Gets the latest analytics data for all your current active assessments.

Raises:

  • AccessDeniedException –

    Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again.

  • InternalServerException –

    An internal service error occurred during the processing of your request. Try again later.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_auditmanager/_services/async_audit_manager.py
async def get_insights(
    self, *, config_overrides: Optional[AsyncAuditManagerClientConfig] = None
) -> "capo_auditmanager.types.get_insights_response.GetInsightsResponse":
    """<p>Gets the latest analytics data for all your current active assessments. </p>

    Raises:
        capo_auditmanager.errors.access_denied_exception.AccessDeniedException: <p> Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again. </p>
        capo_auditmanager.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
        capo_auditmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_auditmanager.types.get_insights_request.GetInsightsRequest]",
    ) -> AsyncOperationResponse[
        "capo_auditmanager.types.get_insights_response.GetInsightsResponse"
    ]:
        import capo_auditmanager._operations.bedrock_assessment_manager_lambda.get_insights

        (
            output,
            http_response,
        ) = await capo_auditmanager._operations.bedrock_assessment_manager_lambda.get_insights.async_get_insights(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetInsights")
    )
    input_: capo_auditmanager.types.get_insights_request.GetInsightsRequest = {}

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