1. Packages
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. cloudwatch
  6. InsightRule

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.74.1
published on Monday, Aug 3, 2026 by Pulumi
aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.74.1
published on Monday, Aug 3, 2026 by Pulumi

    Resource Type definition for AWS::CloudWatch::InsightRule. Creates a Contributor Insights rule that analyzes log data to identify top contributors and usage patterns.

    Create InsightRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new InsightRule(name: string, args: InsightRuleArgs, opts?: CustomResourceOptions);
    @overload
    def InsightRule(resource_name: str,
                    args: InsightRuleArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def InsightRule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    rule_body: Optional[str] = None,
                    rule_state: Optional[InsightRuleRuleState] = None,
                    apply_on_transformed_logs: Optional[bool] = None,
                    rule_name: Optional[str] = None,
                    tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
    func NewInsightRule(ctx *Context, name string, args InsightRuleArgs, opts ...ResourceOption) (*InsightRule, error)
    public InsightRule(string name, InsightRuleArgs args, CustomResourceOptions? opts = null)
    public InsightRule(String name, InsightRuleArgs args)
    public InsightRule(String name, InsightRuleArgs args, CustomResourceOptions options)
    
    type: aws-native:cloudwatch:InsightRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws-native_cloudwatch_insight_rule" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args InsightRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args InsightRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args InsightRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InsightRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InsightRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    InsightRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The InsightRule resource accepts the following input properties:

    RuleBody string
    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 .
    RuleState Pulumi.AwsNative.CloudWatch.InsightRuleRuleState
    The current state of the rule. Valid values are ENABLED and DISABLED .
    ApplyOnTransformedLogs bool
    Determines whether the rules is evaluated on transformed versions of logs. Valid values are TRUE and FALSE .
    RuleName string
    The name of the rule.
    Tags List<Pulumi.AwsNative.Inputs.Tag>

    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.

    RuleBody string
    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 .
    RuleState InsightRuleRuleState
    The current state of the rule. Valid values are ENABLED and DISABLED .
    ApplyOnTransformedLogs bool
    Determines whether the rules is evaluated on transformed versions of logs. Valid values are TRUE and FALSE .
    RuleName string
    The name of the rule.
    Tags TagArgs

    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.

    rule_body string
    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_state "ENABLED" | "DISABLED"
    The current state of the rule. Valid values are ENABLED and DISABLED .
    apply_on_transformed_logs bool
    Determines whether the rules is evaluated on transformed versions of logs. Valid values are TRUE and FALSE .
    rule_name string
    The name of the rule.
    tags list(object)

    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.

    ruleBody String
    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 .
    ruleState InsightRuleRuleState
    The current state of the rule. Valid values are ENABLED and DISABLED .
    applyOnTransformedLogs Boolean
    Determines whether the rules is evaluated on transformed versions of logs. Valid values are TRUE and FALSE .
    ruleName String
    The name of the rule.
    tags List<Tag>

    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.

    ruleBody string
    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 .
    ruleState InsightRuleRuleState
    The current state of the rule. Valid values are ENABLED and DISABLED .
    applyOnTransformedLogs boolean
    Determines whether the rules is evaluated on transformed versions of logs. Valid values are TRUE and FALSE .
    ruleName string
    The name of the rule.
    tags Tag[]

    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.

    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_state InsightRuleRuleState
    The current state of the rule. Valid values are ENABLED and DISABLED .
    apply_on_transformed_logs bool
    Determines whether the rules is evaluated on transformed versions of logs. Valid values are TRUE and FALSE .
    rule_name str
    The name of the rule.
    tags Sequence[TagArgs]

    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.

    ruleBody String
    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 .
    ruleState "ENABLED" | "DISABLED"
    The current state of the rule. Valid values are ENABLED and DISABLED .
    applyOnTransformedLogs Boolean
    Determines whether the rules is evaluated on transformed versions of logs. Valid values are TRUE and FALSE .
    ruleName String
    The name of the rule.
    tags List<Property Map>

    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the InsightRule resource produces the following output properties:

    Arn string
    The ARN of the Contributor Insights rule, such as arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName .
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The ARN of the Contributor Insights rule, such as arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName .
    Id string
    The provider-assigned unique ID for this managed resource.
    arn string
    The ARN of the Contributor Insights rule, such as arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName .
    id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the Contributor Insights rule, such as arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName .
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The ARN of the Contributor Insights rule, such as arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName .
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The ARN of the Contributor Insights rule, such as arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName .
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the Contributor Insights rule, such as arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName .
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    InsightRuleRuleState, InsightRuleRuleStateArgs

    Enabled
    ENABLED
    Disabled
    DISABLED
    InsightRuleRuleStateEnabled
    ENABLED
    InsightRuleRuleStateDisabled
    DISABLED
    "ENABLED"
    ENABLED
    "DISABLED"
    DISABLED
    Enabled
    ENABLED
    Disabled
    DISABLED
    Enabled
    ENABLED
    Disabled
    DISABLED
    ENABLED
    ENABLED
    DISABLED
    DISABLED
    "ENABLED"
    ENABLED
    "DISABLED"
    DISABLED

    Tag, TagArgs

    A set of tags to apply to the resource.
    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.74.1
    published on Monday, Aug 3, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial