Class ManagedRule

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.config.ManagedRule
All Implemented Interfaces:
IResource, IRule, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
Direct Known Subclasses:
AccessKeysRotated, CloudFormationStackDriftDetectionCheck, CloudFormationStackNotificationCheck

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:07.912Z") @Stability(Stable) public class ManagedRule extends Resource implements IRule
A new managed rule.

Example:

 // https://docs.aws.amazon.com/config/latest/developerguide/access-keys-rotated.html
 // https://docs.aws.amazon.com/config/latest/developerguide/access-keys-rotated.html
 ManagedRule.Builder.create(this, "AccessKeysRotated")
         .identifier(ManagedRuleIdentifiers.ACCESS_KEYS_ROTATED)
         .inputParameters(Map.of(
                 "maxAccessKeyAge", 60))
         // default is 24 hours
         .maximumExecutionFrequency(MaximumExecutionFrequency.TWELVE_HOURS)
         .build();
 
  • Constructor Details

    • ManagedRule

      protected ManagedRule(software.amazon.jsii.JsiiObjectRef objRef)
    • ManagedRule

      protected ManagedRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ManagedRule

      @Stability(Stable) public ManagedRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ManagedRuleProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromConfigRuleName

      @Stability(Stable) @NotNull public static IRule fromConfigRuleName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String configRuleName)
      Imports an existing rule.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      configRuleName - the name of the rule. This parameter is required.
    • onComplianceChange

      @Stability(Stable) @NotNull public Rule onComplianceChange(@NotNull String id, @Nullable OnEventOptions options)
      Defines an EventBridge event rule which triggers for rule compliance events.

      Specified by:
      onComplianceChange in interface IRule
      Parameters:
      id - This parameter is required.
      options -
    • onComplianceChange

      @Stability(Stable) @NotNull public Rule onComplianceChange(@NotNull String id)
      Defines an EventBridge event rule which triggers for rule compliance events.

      Specified by:
      onComplianceChange in interface IRule
      Parameters:
      id - This parameter is required.
    • onEvent

      @Stability(Stable) @NotNull public Rule onEvent(@NotNull String id, @Nullable OnEventOptions options)
      Defines an EventBridge event rule which triggers for rule events.

      Use rule.addEventPattern(pattern) to specify a filter.

      Specified by:
      onEvent in interface IRule
      Parameters:
      id - This parameter is required.
      options -
    • onEvent

      @Stability(Stable) @NotNull public Rule onEvent(@NotNull String id)
      Defines an EventBridge event rule which triggers for rule events.

      Use rule.addEventPattern(pattern) to specify a filter.

      Specified by:
      onEvent in interface IRule
      Parameters:
      id - This parameter is required.
    • onReEvaluationStatus

      @Stability(Stable) @NotNull public Rule onReEvaluationStatus(@NotNull String id, @Nullable OnEventOptions options)
      Defines an EventBridge event rule which triggers for rule re-evaluation status events.

      Specified by:
      onReEvaluationStatus in interface IRule
      Parameters:
      id - This parameter is required.
      options -
    • onReEvaluationStatus

      @Stability(Stable) @NotNull public Rule onReEvaluationStatus(@NotNull String id)
      Defines an EventBridge event rule which triggers for rule re-evaluation status events.

      Specified by:
      onReEvaluationStatus in interface IRule
      Parameters:
      id - This parameter is required.
    • getConfigRuleArn

      @Stability(Stable) @NotNull public String getConfigRuleArn()
      The arn of the rule.
    • getConfigRuleComplianceType

      @Stability(Stable) @NotNull public String getConfigRuleComplianceType()
      The compliance status of the rule.
    • getConfigRuleId

      @Stability(Stable) @NotNull public String getConfigRuleId()
      The id of the rule.
    • getConfigRuleName

      @Stability(Stable) @NotNull public String getConfigRuleName()
      The name of the rule.
      Specified by:
      getConfigRuleName in interface IRule
    • getIsCustomWithChanges

      @Stability(Stable) @Nullable protected Boolean getIsCustomWithChanges()
    • setIsCustomWithChanges

      @Stability(Stable) protected void setIsCustomWithChanges(@Nullable Boolean value)
    • getIsManaged

      @Stability(Stable) @Nullable protected Boolean getIsManaged()
    • setIsManaged

      @Stability(Stable) protected void setIsManaged(@Nullable Boolean value)
    • getRuleScope

      @Stability(Stable) @Nullable protected RuleScope getRuleScope()
    • setRuleScope

      @Stability(Stable) protected void setRuleScope(@Nullable RuleScope value)