Class CustomRuleProps
Construction properties for a CustomRule.
Inherited Members
Namespace: Amazon.CDK.AWS.Config
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CustomRuleProps : ICustomRuleProps, IRuleProps
Syntax (vb)
Public Class CustomRuleProps Implements ICustomRuleProps, IRuleProps
Remarks
ExampleMetadata: infused
Examples
Function fn;
string samplePolicyText;
new ManagedRule(this, "ManagedRule", new ManagedRuleProps {
Identifier = ManagedRuleIdentifiers.API_GW_XRAY_ENABLED,
EvaluationModes = EvaluationMode.DETECTIVE_AND_PROACTIVE
});
new CustomRule(this, "CustomRule", new CustomRuleProps {
LambdaFunction = fn,
EvaluationModes = EvaluationMode.PROACTIVE
});
new CustomPolicy(this, "CustomPolicy", new CustomPolicyProps {
PolicyText = samplePolicyText,
EvaluationModes = EvaluationMode.DETECTIVE
});
Synopsis
Constructors
| CustomRuleProps() | Construction properties for a CustomRule. |
Properties
| ConfigRuleName | A name for the AWS Config rule. |
| ConfigurationChanges | Whether to run the rule on configuration changes. |
| Description | A description about this AWS Config rule. |
| EvaluationModes | The modes the AWS Config rule can be evaluated in. |
| InputParameters | Input parameter values that are passed to the AWS Config rule. |
| LambdaFunction | The Lambda function to run. |
| MaximumExecutionFrequency | The maximum frequency at which the AWS Config rule runs evaluations. |
| Periodic | Whether to run the rule on a fixed frequency. |
| RuleScope | Defines which resources trigger an evaluation for an AWS Config rule. |
Constructors
CustomRuleProps()
Construction properties for a CustomRule.
public CustomRuleProps()
Remarks
ExampleMetadata: infused
Examples
Function fn;
string samplePolicyText;
new ManagedRule(this, "ManagedRule", new ManagedRuleProps {
Identifier = ManagedRuleIdentifiers.API_GW_XRAY_ENABLED,
EvaluationModes = EvaluationMode.DETECTIVE_AND_PROACTIVE
});
new CustomRule(this, "CustomRule", new CustomRuleProps {
LambdaFunction = fn,
EvaluationModes = EvaluationMode.PROACTIVE
});
new CustomPolicy(this, "CustomPolicy", new CustomPolicyProps {
PolicyText = samplePolicyText,
EvaluationModes = EvaluationMode.DETECTIVE
});
Properties
ConfigRuleName
A name for the AWS Config rule.
public string? ConfigRuleName { get; set; }
Property Value
Remarks
Default: - CloudFormation generated name
ConfigurationChanges
Whether to run the rule on configuration changes.
public bool? ConfigurationChanges { get; set; }
Property Value
bool?
Remarks
Default: false
Description
A description about this AWS Config rule.
public string? Description { get; set; }
Property Value
Remarks
Default: - No description
EvaluationModes
The modes the AWS Config rule can be evaluated in.
public EvaluationMode? EvaluationModes { get; set; }
Property Value
Remarks
The valid values are distinct objects.
Default: - Detective evaluation mode only
InputParameters
Input parameter values that are passed to the AWS Config rule.
public IDictionary<string, object>? InputParameters { get; set; }
Property Value
Remarks
Default: - No input parameters
LambdaFunction
The Lambda function to run.
public IFunction LambdaFunction { get; set; }
Property Value
Remarks
ExampleMetadata: infused
MaximumExecutionFrequency
The maximum frequency at which the AWS Config rule runs evaluations.
public MaximumExecutionFrequency? MaximumExecutionFrequency { get; set; }
Property Value
Remarks
Default: MaximumExecutionFrequency.TWENTY_FOUR_HOURS
Periodic
Whether to run the rule on a fixed frequency.
public bool? Periodic { get; set; }
Property Value
bool?
Remarks
Default: false
RuleScope
Defines which resources trigger an evaluation for an AWS Config rule.
public RuleScope? RuleScope { get; set; }
Property Value
Remarks
Default: - evaluations for the rule are triggered when any resource in the recording group changes.