Skip to content

describe_insight_rules async

describe_insight_rules(
    *,
    config_overrides: Optional[AsyncCloudWatchClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[InsightRuleMaxResults] = None,
) -> DescribeInsightRulesOutput

Returns a list of all the Contributor Insights rules in your account.

For more information about Contributor Insights, see Using Contributor Insights to Analyze High-Cardinality Data.

Parameters:

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

    Include this value, if it was returned by the previous operation, to get the next set of rules.

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

    The maximum number of results to return in one operation. If you omit this parameter, the default of 500 is used.

Raises:

Source code in docs_src/capo_cloudwatch/_services/async_cloud_watch.py
async def describe_insight_rules(
    self,
    *,
    config_overrides: Optional[AsyncCloudWatchClientConfig] = None,
    next_token: Optional["capo_cloudwatch.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_cloudwatch.types.insight_rule_max_results.InsightRuleMaxResults"
    ] = None,
) -> (
    "capo_cloudwatch.types.describe_insight_rules_output.DescribeInsightRulesOutput"
):
    """<p>Returns a list of all the Contributor Insights rules in your account.</p> <p>For more information about Contributor Insights, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights.html">Using Contributor Insights to Analyze High-Cardinality Data</a>.</p>

    Args:
        next_token: <p>Include this value, if it was returned by the previous operation, to get the next set of rules.</p>
        max_results: <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 500 is used.</p>

    Raises:
        capo_cloudwatch.errors.invalid_next_token.InvalidNextToken: <p>The next token specified is invalid.</p>
        capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatch.types.describe_insight_rules_input.DescribeInsightRulesInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatch.types.describe_insight_rules_output.DescribeInsightRulesOutput"
    ]:
        import capo_cloudwatch._operations.granite_service_version20100801.describe_insight_rules

        (
            output,
            http_response,
        ) = await capo_cloudwatch._operations.granite_service_version20100801.describe_insight_rules.async_describe_insight_rules(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeInsightRules")
    )
    input_: capo_cloudwatch.types.describe_insight_rules_input.DescribeInsightRulesInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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