Class CfnInsightRule.Builder

java.lang.Object
software.amazon.awscdk.services.cloudwatch.CfnInsightRule.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInsightRule>
Enclosing class:
CfnInsightRule

@Stability(Stable) public static final class CfnInsightRule.Builder extends Object implements software.amazon.jsii.Builder<CfnInsightRule>
A fluent builder for CfnInsightRule.
  • Method Details

    • create

      @Stability(Stable) public static CfnInsightRule.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnInsightRule.Builder.
    • ruleBody

      @Stability(Stable) public CfnInsightRule.Builder ruleBody(String ruleBody)
      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 .

      Parameters:
      ruleBody - The definition of the rule, as a JSON object. This parameter is required.
      Returns:
      this
    • ruleName

      @Stability(Stable) public CfnInsightRule.Builder ruleName(String ruleName)
      The name of the rule.

      Parameters:
      ruleName - The name of the rule. This parameter is required.
      Returns:
      this
    • ruleState

      @Stability(Stable) public CfnInsightRule.Builder ruleState(String ruleState)
      The current state of the rule.

      Valid values are ENABLED and DISABLED .

      Parameters:
      ruleState - The current state of the rule. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnInsightRule.Builder tags(IResolvable 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.

      Parameters:
      tags - A list of key-value pairs to associate with the Contributor Insights rule. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnInsightRule.Builder tags(List<? extends Object> 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.

      Parameters:
      tags - A list of key-value pairs to associate with the Contributor Insights rule. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnInsightRule build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnInsightRule>
      Returns:
      a newly built instance of CfnInsightRule.