CfnInsightRuleProps

class aws_cdk.aws_cloudwatch.CfnInsightRuleProps(*, rule_body, rule_name, rule_state, tags=None)

Bases: object

Properties for defining a CfnInsightRule.

Parameters:
  • rule_body (str) – The definition of the rule, as a JSON object. For details about the syntax, see Contributor Insights Rule Syntax in the Amazon CloudWatch User Guide .

  • rule_name (str) – The name of the rule.

  • rule_state (str) – The current state of the rule. Valid values are ENABLED and DISABLED .

  • tags (Union[IResolvable, Sequence[Union[IResolvable, CfnTag, Dict[str, Any]]], None]) – 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. For more information, see Tagging Your Amazon CloudWatch Resources . To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission in addition to the cloudwatch:PutInsightRule permission.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_cloudwatch as cloudwatch

cfn_insight_rule_props = cloudwatch.CfnInsightRuleProps(
    rule_body="ruleBody",
    rule_name="ruleName",
    rule_state="ruleState",

    # the properties below are optional
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

rule_body

The definition of the rule, as a JSON object.

For details about the syntax, see Contributor Insights Rule Syntax in the Amazon CloudWatch User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html#cfn-cloudwatch-insightrule-rulebody

rule_name

The name of the rule.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html#cfn-cloudwatch-insightrule-rulename

rule_state

The current state of the rule.

Valid values are ENABLED and DISABLED .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html#cfn-cloudwatch-insightrule-rulestate

tags

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. For more information, see Tagging Your Amazon CloudWatch Resources .

To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission in addition to the cloudwatch:PutInsightRule permission.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html#cfn-cloudwatch-insightrule-tags