Skip to content
v2.276.0

RuleProps Struct ​

Construction properties for a new rule.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_config as config } from 'aws-cdk-lib';

declare const evaluationMode: config.EvaluationMode;
declare const inputParameters: any;
declare const ruleScope: config.RuleScope;
const ruleProps: config.RuleProps = {
  configRuleName: 'configRuleName',
  description: 'description',
  evaluationModes: evaluationMode,
  inputParameters: {
    inputParametersKey: inputParameters,
  },
  maximumExecutionFrequency: config.MaximumExecutionFrequency.ONE_HOUR,
  ruleScope: ruleScope,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_config as config

# evaluation_mode: config.EvaluationMode
# input_parameters: Any
# rule_scope: config.RuleScope

rule_props = config.RuleProps(
    config_rule_name="configRuleName",
    description="description",
    evaluation_modes=evaluation_mode,
    input_parameters={
        "input_parameters_key": input_parameters
    },
    maximum_execution_frequency=config.MaximumExecutionFrequency.ONE_HOUR,
    rule_scope=rule_scope
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.config.*;

EvaluationMode evaluationMode;
Object inputParameters;
RuleScope ruleScope;

RuleProps ruleProps = RuleProps.builder()
        .configRuleName("configRuleName")
        .description("description")
        .evaluationModes(evaluationMode)
        .inputParameters(Map.of(
                "inputParametersKey", inputParameters))
        .maximumExecutionFrequency(MaximumExecutionFrequency.ONE_HOUR)
        .ruleScope(ruleScope)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Config;

EvaluationMode evaluationMode;
var inputParameters;
RuleScope ruleScope;

var ruleProps = new RuleProps {
    ConfigRuleName = "configRuleName",
    Description = "description",
    EvaluationModes = evaluationMode,
    InputParameters = new Dictionary<string, object> {
        { "inputParametersKey", inputParameters }
    },
    MaximumExecutionFrequency = MaximumExecutionFrequency.ONE_HOUR,
    RuleScope = ruleScope
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var evaluationMode EvaluationMode
var inputParameters interface{}
var ruleScope RuleScope

ruleProps := &RuleProps{
	ConfigRuleName: jsii.String("configRuleName"),
	Description: jsii.String("description"),
	EvaluationModes: evaluationMode,
	InputParameters: map[string]interface{}{
		"inputParametersKey": inputParameters,
	},
	MaximumExecutionFrequency: awscdk.Aws_config.MaximumExecutionFrequency_ONE_HOUR,
	RuleScope: ruleScope,
}

Properties ​

configRuleNameoptionalstringconfig_rule_nameoptionalstrconfigRuleNameoptionalStringConfigRuleNameoptionalstringConfigRuleNameoptional*string#
A name for the AWS Config rule.

Default: CloudFormation generated name

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
A description about this AWS Config rule.

Default: No description

evaluationModesoptionalEvaluationModeevaluation_modesoptionalEvaluationModeevaluationModesoptionalEvaluationModeEvaluationModesoptionalEvaluationModeEvaluationModesoptionalEvaluationMode#
The modes the AWS Config rule can be evaluated in.

Default: Detective evaluation mode only

The valid values are distinct objects.

inputParametersoptional{ [key: string]: any }input_parametersoptionaltyping.Mapping[str, Any]inputParametersoptionalMap<String, Object>InputParametersoptionalIDictionary<string, object>InputParametersoptional*map[string]interface{}#
Input parameter values that are passed to the AWS Config rule.

Default: No input parameters

maximumExecutionFrequencyoptionalMaximumExecutionFrequencymaximum_execution_frequencyoptionalMaximumExecutionFrequencymaximumExecutionFrequencyoptionalMaximumExecutionFrequencyMaximumExecutionFrequencyoptionalMaximumExecutionFrequencyMaximumExecutionFrequencyoptionalMaximumExecutionFrequency#
The maximum frequency at which the AWS Config rule runs evaluations.

Default: MaximumExecutionFrequency.TWENTY_FOUR_HOURS

ruleScopeoptionalRuleScoperule_scopeoptionalRuleScoperuleScopeoptionalRuleScopeRuleScopeoptionalRuleScopeRuleScopeoptionalRuleScope#
Defines which resources trigger an evaluation for an AWS Config rule.

Default: evaluations for the rule are triggered when any resource in the recording group changes.