Skip to content

list_control_insights_by_control_domain

list_control_insights_by_control_domain(
    control_domain_id: ControlDomainId,
    *,
    config_overrides: Optional[AuditManagerClientConfig] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[MaxResults] = None,
) -> ListControlInsightsByControlDomainResponse

Lists the latest analytics data for controls within a specific control domain across all active assessments.

Control insights are listed only if the control belongs to the control domain that was specified and the control collected evidence on the lastUpdated date of controlInsightsMetadata. If neither of these conditions are met, no data is listed for that control.

Parameters:

  • control_domain_id (ControlDomainId) –

    The unique identifier for the control domain.

    Audit Manager supports the control domains that are provided by Amazon Web Services Control Catalog. For information about how to find a list of available control domains, see ListDomains in the Amazon Web Services Control Catalog API Reference.

  • next_token (Optional[Token], default: None ) –

    The pagination token that's used to fetch the next set of results.

  • max_results (Optional[MaxResults], default: None ) –

    Represents the maximum number of results on a page or for an API request call.

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.

  • ResourceNotFoundException –

    The resource that's specified in the request can't be found.

  • ValidationException –

    The request has invalid or missing parameters.

  • UnknownServiceError –

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

Source code in docs_src/capo_auditmanager/_services/audit_manager.py
def list_control_insights_by_control_domain(
    self,
    control_domain_id: "capo_auditmanager.types.control_domain_id.ControlDomainId",
    *,
    config_overrides: Optional[AuditManagerClientConfig] = None,
    next_token: Optional["capo_auditmanager.types.token.Token"] = None,
    max_results: Optional["capo_auditmanager.types.max_results.MaxResults"] = None,
) -> "capo_auditmanager.types.list_control_insights_by_control_domain_response.ListControlInsightsByControlDomainResponse":
    """<p>Lists the latest analytics data for controls within a specific control domain across all active assessments.</p> <note> <p>Control insights are listed only if the control belongs to the control domain that was specified and the control collected evidence on the <code>lastUpdated</code> date of <code>controlInsightsMetadata</code>. If neither of these conditions are met, no data is listed for that control. </p> </note>

    Args:
        control_domain_id: <p>The unique identifier for the control domain. </p> <p>Audit Manager supports the control domains that are provided by Amazon Web Services Control Catalog. For information about how to find a list of available control domains, see <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListDomains.html"> <code>ListDomains</code> </a> in the Amazon Web Services Control Catalog API Reference.</p>
        next_token: <p>The pagination token that's used to fetch the next set of results. </p>
        max_results: <p>Represents the maximum number of results on a page or for an API request call. </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.resource_not_found_exception.ResourceNotFoundException: <p> The resource that's specified in the request can't be found. </p>
        capo_auditmanager.errors.validation_exception.ValidationException: <p> The request has invalid or missing parameters. </p>
        capo_auditmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_auditmanager.types.list_control_insights_by_control_domain_request.ListControlInsightsByControlDomainRequest]",
    ) -> OperationResponse[
        "capo_auditmanager.types.list_control_insights_by_control_domain_response.ListControlInsightsByControlDomainResponse"
    ]:
        import capo_auditmanager._operations.bedrock_assessment_manager_lambda.list_control_insights_by_control_domain

        output, http_response = (
            capo_auditmanager._operations.bedrock_assessment_manager_lambda.list_control_insights_by_control_domain.list_control_insights_by_control_domain(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListControlInsightsByControlDomain")
    )
    input_: capo_auditmanager.types.list_control_insights_by_control_domain_request.ListControlInsightsByControlDomainRequest = {
        "control_domain_id": control_domain_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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