# RuleProps

Construction properties for a new rule.

- Source: [`aws-config/lib/rule.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-config/lib/rule.ts#L240)
- Type last changed: v2.145.0 · 7 Jun 2024

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
};
```

Golang:

```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

- `configRuleName`: string — A name for the AWS Config rule.

  **Default:** CloudFormation generated name

- `description`: string — A description about this AWS Config rule.

  **Default:** No description

- `evaluationModes`: [EvaluationMode](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_config.EvaluationMode.html) — The modes the AWS Config rule can be evaluated in.

  **Default:** Detective evaluation mode only

  The valid values are distinct objects.

- `inputParameters`: { [key: string]: any } — Input parameter values that are passed to the AWS Config rule.

  **Default:** No input parameters

- `maximumExecutionFrequency`: [MaximumExecutionFrequency](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_config.MaximumExecutionFrequency.html) — The maximum frequency at which the AWS Config rule runs evaluations.

  **Default:** MaximumExecutionFrequency.TWENTY_FOUR_HOURS

- `ruleScope`: [RuleScope](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_config.RuleScope.html) — 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.
