Interface ICustomRuleProps
Construction properties for a CustomRule.
Inherited Members
Namespace: Amazon.CDK.AWS.Config
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICustomRuleProps : IRuleProps
Syntax (vb)
Public Interface ICustomRuleProps
Inherits IRuleProps
Remarks
ExampleMetadata: infused
Examples
// Lambda function containing logic that evaluates compliance with the rule.
var evalComplianceFn = new Function(this, "CustomFunction", new FunctionProps {
Code = AssetCode.FromInline("exports.handler = (event) => console.log(event);"),
Handler = "index.handler",
Runtime = Runtime.NODEJS_18_X
});
// A custom rule that runs on configuration changes of EC2 instances
var customRule = new CustomRule(this, "Custom", new CustomRuleProps {
ConfigurationChanges = true,
LambdaFunction = evalComplianceFn,
RuleScope = RuleScope.FromResource(ResourceType.EC2_INSTANCE)
});
Synopsis
Properties
ConfigurationChanges | Whether to run the rule on configuration changes. |
LambdaFunction | The Lambda function to run. |
Periodic | Whether to run the rule on a fixed frequency. |
Properties
ConfigurationChanges
Whether to run the rule on configuration changes.
virtual Nullable<bool> ConfigurationChanges { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
LambdaFunction
Periodic
Whether to run the rule on a fixed frequency.
virtual Nullable<bool> Periodic { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false