Class ManagedRule
A new managed rule.
Inheritance
Inherited Members
Namespace: Amazon.CDK.AWS.Config
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ManagedRule : Resource, IRule, IResource
Syntax (vb)
Public Class ManagedRule
Inherits Resource
Implements IRule, IResource
Remarks
Resource: AWS::Config::ConfigRule
ExampleMetadata: infused
Examples
// https://docs.aws.amazon.com/config/latest/developerguide/access-keys-rotated.html
// https://docs.aws.amazon.com/config/latest/developerguide/access-keys-rotated.html
new ManagedRule(this, "AccessKeysRotated", new ManagedRuleProps {
Identifier = ManagedRuleIdentifiers.ACCESS_KEYS_ROTATED,
InputParameters = new Dictionary<string, object> {
{ "maxAccessKeyAge", 60 }
},
// default is 24 hours
MaximumExecutionFrequency = MaximumExecutionFrequency.TWELVE_HOURS
});
Synopsis
Constructors
ManagedRule(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ManagedRule(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
ManagedRule(Construct, String, IManagedRuleProps) |
Properties
ConfigRuleArn | The arn of the rule. |
ConfigRuleComplianceType | The compliance status of the rule. |
ConfigRuleId | The id of the rule. |
ConfigRuleName | The name of the rule. |
IsCustomWithChanges | |
IsManaged | |
RuleScope |
Methods
FromConfigRuleName(Construct, String, String) | Imports an existing rule. |
OnComplianceChange(String, IOnEventOptions) | Defines an EventBridge event rule which triggers for rule compliance events. |
OnEvent(String, IOnEventOptions) | Defines an EventBridge event rule which triggers for rule events. |
OnReEvaluationStatus(String, IOnEventOptions) | Defines an EventBridge event rule which triggers for rule re-evaluation status events. |
Constructors
ManagedRule(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ManagedRule(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ManagedRule(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ManagedRule(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
ManagedRule(Construct, String, IManagedRuleProps)
public ManagedRule(Construct scope, string id, IManagedRuleProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IManagedRuleProps
Properties
ConfigRuleArn
The arn of the rule.
public virtual string ConfigRuleArn { get; }
Property Value
System.String
Remarks
Attribute: true
ConfigRuleComplianceType
The compliance status of the rule.
public virtual string ConfigRuleComplianceType { get; }
Property Value
System.String
Remarks
Attribute: true
ConfigRuleId
The id of the rule.
public virtual string ConfigRuleId { get; }
Property Value
System.String
Remarks
Attribute: true
ConfigRuleName
The name of the rule.
public virtual string ConfigRuleName { get; }
Property Value
System.String
Remarks
Attribute: true
IsCustomWithChanges
protected virtual Nullable<bool> IsCustomWithChanges { get; set; }
Property Value
System.Nullable<System.Boolean>
IsManaged
protected virtual Nullable<bool> IsManaged { get; set; }
Property Value
System.Nullable<System.Boolean>
RuleScope
Methods
FromConfigRuleName(Construct, String, String)
Imports an existing rule.
public static IRule FromConfigRuleName(Construct scope, string id, string configRuleName)
Parameters
- scope Constructs.Construct
- id System.String
- configRuleName System.String
the name of the rule.
Returns
OnComplianceChange(String, IOnEventOptions)
Defines an EventBridge event rule which triggers for rule compliance events.
public virtual Rule OnComplianceChange(string id, IOnEventOptions options = null)
Parameters
- id System.String
- options IOnEventOptions
Returns
OnEvent(String, IOnEventOptions)
Defines an EventBridge event rule which triggers for rule events.
public virtual Rule OnEvent(string id, IOnEventOptions options = null)
Parameters
- id System.String
- options IOnEventOptions
Returns
Remarks
Use
rule.addEventPattern(pattern)
to specify a filter.
OnReEvaluationStatus(String, IOnEventOptions)
Defines an EventBridge event rule which triggers for rule re-evaluation status events.
public virtual Rule OnReEvaluationStatus(string id, IOnEventOptions options = null)
Parameters
- id System.String
- options IOnEventOptions
Returns