Skip to content

list_checks

list_checks(
    *,
    config_overrides: Optional[TrustedAdvisorClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
    pillar: Optional[RecommendationPillar] = None,
    aws_service: Optional[RecommendationAwsService] = None,
    source: Optional[RecommendationSource] = None,
    language: Optional[RecommendationLanguage] = None,
) -> ListChecksResponse

List a filterable set of Checks. This API provides global recommendations, eliminating the need to call the API in each AWS Region.

Parameters:

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

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

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

    The maximum number of results to return per page.

  • pillar (Optional[RecommendationPillar], default: None ) –

    The pillar of the check

  • aws_service (Optional[RecommendationAwsService], default: None ) –

    The aws service associated with the check

  • source (Optional[RecommendationSource], default: None ) –

    The source of the check

  • language (Optional[RecommendationLanguage], default: None ) –

    The ISO 639-1 code for the language that you want your checks to appear in.

Raises:

Examples:

List all AWS Trusted Advisor Checks

>>> client.list_checks()
Source code in docs_src/capo_trustedadvisor/_services/trusted_advisor.py
def list_checks(
    self,
    *,
    config_overrides: Optional[TrustedAdvisorClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
    pillar: Optional[
        "capo_trustedadvisor.types.recommendation_pillar.RecommendationPillar"
    ] = None,
    aws_service: Optional[
        "capo_trustedadvisor.types.recommendation_aws_service.RecommendationAwsService"
    ] = None,
    source: Optional[
        "capo_trustedadvisor.types.recommendation_source.RecommendationSource"
    ] = None,
    language: Optional[
        "capo_trustedadvisor.types.recommendation_language.RecommendationLanguage"
    ] = None,
) -> "capo_trustedadvisor.types.list_checks_response.ListChecksResponse":
    """<p>List a filterable set of Checks. This API provides global recommendations, eliminating the need to call the API in each AWS Region.</p>

    Args:
        next_token: <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. </p>
        max_results: <p>The maximum number of results to return per page.</p>
        pillar: <p>The pillar of the check</p>
        aws_service: <p>The aws service associated with the check</p>
        source: <p>The source of the check</p>
        language: <p>The ISO 639-1 code for the language that you want your checks to appear in.</p>

    Raises:
        capo_trustedadvisor.errors.access_denied_exception.AccessDeniedException: <p>Exception that access has been denied due to insufficient access</p>
        capo_trustedadvisor.errors.internal_server_exception.InternalServerException: <p>Exception to notify that an unexpected internal error occurred during processing of the request</p>
        capo_trustedadvisor.errors.throttling_exception.ThrottlingException: <p>Exception to notify that requests are being throttled</p>
        capo_trustedadvisor.errors.validation_exception.ValidationException: <p>Exception that the request failed to satisfy service constraints</p>
        capo_trustedadvisor.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List all AWS Trusted Advisor Checks

        >>> client.list_checks()
    """

    def _handler(
        req: "OperationRequest[capo_trustedadvisor.types.list_checks_request.ListChecksRequest]",
    ) -> OperationResponse[
        "capo_trustedadvisor.types.list_checks_response.ListChecksResponse"
    ]:
        import capo_trustedadvisor._operations.trusted_advisor.list_checks

        output, http_response = (
            capo_trustedadvisor._operations.trusted_advisor.list_checks.list_checks(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListChecks")
    )
    input_: capo_trustedadvisor.types.list_checks_request.ListChecksRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if pillar is not None:
        input_["pillar"] = pillar
    if aws_service is not None:
        input_["aws_service"] = aws_service
    if source is not None:
        input_["source"] = source
    if language is not None:
        input_["language"] = language

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