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.104.0 (build e79254c)",
date="2024-12-06T14:43:16.548Z")
@Stability(Stable)
public class ManagedRule
extends Resource
implements IRule
A new managed rule.
Example:
Function fn; String samplePolicyText; ManagedRule.Builder.create(this, "ManagedRule") .identifier(ManagedRuleIdentifiers.API_GW_XRAY_ENABLED) .evaluationModes(EvaluationMode.DETECTIVE_AND_PROACTIVE) .build(); CustomRule.Builder.create(this, "CustomRule") .lambdaFunction(fn) .evaluationModes(EvaluationMode.PROACTIVE) .build(); CustomPolicy.Builder.create(this, "CustomPolicy") .policyText(samplePolicyText) .evaluationModes(EvaluationMode.DETECTIVE) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.config.IRule
IRule.Jsii$Default, IRule.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
ManagedRule
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ManagedRule
(software.amazon.jsii.JsiiObjectRef objRef) ManagedRule
(software.constructs.Construct scope, String id, ManagedRuleProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IRule
fromConfigRuleName
(software.constructs.Construct scope, String id, String configRuleName) Imports an existing rule.The arn of the rule.The compliance status of the rule.The id of the rule.The name of the rule.protected Boolean
protected Boolean
protected RuleScope
Defines an EventBridge event rule which triggers for rule compliance events.onComplianceChange
(String id, OnEventOptions options) Defines an EventBridge event rule which triggers for rule compliance events.Defines an EventBridge event rule which triggers for rule events.onEvent
(String id, OnEventOptions options) Defines an EventBridge event rule which triggers for rule events.Defines an EventBridge event rule which triggers for rule re-evaluation status events.onReEvaluationStatus
(String id, OnEventOptions options) Defines an EventBridge event rule which triggers for rule re-evaluation status events.protected void
setIsCustomWithChanges
(Boolean value) protected void
setIsManaged
(Boolean value) protected void
setRuleScope
(RuleScope value) Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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 interfaceIRule
- Parameters:
id
- This parameter is required.options
-
-
onComplianceChange
Defines an EventBridge event rule which triggers for rule compliance events.- Specified by:
onComplianceChange
in interfaceIRule
- 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. -
onEvent
Defines an EventBridge event rule which triggers for rule events.Use
rule.addEventPattern(pattern)
to specify a filter. -
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 interfaceIRule
- Parameters:
id
- This parameter is required.options
-
-
onReEvaluationStatus
Defines an EventBridge event rule which triggers for rule re-evaluation status events.- Specified by:
onReEvaluationStatus
in interfaceIRule
- Parameters:
id
- This parameter is required.
-
getConfigRuleArn
The arn of the rule. -
getConfigRuleComplianceType
The compliance status of the rule. -
getConfigRuleId
The id of the rule. -
getConfigRuleName
The name of the rule.- Specified by:
getConfigRuleName
in interfaceIRule
-
getIsCustomWithChanges
-
setIsCustomWithChanges
-
getIsManaged
-
setIsManaged
-
getRuleScope
-
setRuleScope
-