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/cloud_watch.py
| def describe_insight_rules(
self,
*,
config_overrides: Optional[CloudWatchClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch.types.describe_insight_rules_input.DescribeInsightRulesInput]",
) -> OperationResponse[
"capo_cloudwatch.types.describe_insight_rules_output.DescribeInsightRulesOutput"
]:
import capo_cloudwatch._operations.granite_service_version20100801.describe_insight_rules
output, http_response = (
capo_cloudwatch._operations.granite_service_version20100801.describe_insight_rules.describe_insight_rules(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|