Skip to content

CloudWatchClient.put_insight_rule

rboto-cloudwatch==0.4.0 · Service index · Types

Model summary (excerpt): Creates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs log group, enabling you to find contributor data for the log events in that log group. For more information, see Using Contributor Insights to Analyze High-Cardinality Data . If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might...

Install and imports

python -m pip install "rboto[cloudwatch]==0.4.0"
from rboto import CloudWatchClient
from collections.abc import Sequence
from rboto_cloudwatch.types import (
    PutInsightRuleOutput,
    Tag,
)

Signature

async def put_insight_rule(
    *,
    rule_name: str,
    rule_definition: str,
    rule_state: str | None = None,
    tags: Sequence[Tag] | None = None,
    apply_on_transformed_logs: bool | None = None,
) -> PutInsightRuleOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
rule_name Yes A unique name for the rule.
rule_definition Yes The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax .
rule_state No The state of the rule. Valid values are ENABLED and DISABLED.
tags No A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags with a rule. Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only the resources that have certain tag values. To be able to associate tags with a rule, you must have the...
apply_on_transformed_logs No Specify true to have this rule evaluate log events after they have been transformed by Log transformation . If you specify true , then the log events in log groups that have transformers will be evaluated by Contributor Insights after being transformed. Log groups that don't have transformers will still have their original log events evaluated by Contributor Insights. The default is false If a...

Output

PutInsightRuleOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

No fields.

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

PutInsightRuleOutput, Tag

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_cloudwatch.exceptions:

InvalidParameterValueError, LimitExceededError, MissingRequiredParameterError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model