# CfnConfigRuleProps

Properties for defining a `CfnConfigRule`.

Extends: CfnConfigRuleProps
Used as props by: CfnConfigRule

- Source: Generated code
- Type last changed: v2.91.0 · 10 Aug 2023

## 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 inputParameters: any;
const cfnConfigRuleProps: config.CfnConfigRuleProps = {
  source: {
    owner: 'owner',

    // the properties below are optional
    customPolicyDetails: {
      enableDebugLogDelivery: false,
      policyRuntime: 'policyRuntime',
      policyText: 'policyText',
    },
    sourceDetails: [{
      eventSource: 'eventSource',
      messageType: 'messageType',

      // the properties below are optional
      maximumExecutionFrequency: 'maximumExecutionFrequency',
    }],
    sourceIdentifier: 'sourceIdentifier',
  },

  // the properties below are optional
  compliance: {
    type: 'type',
  },
  configRuleName: 'configRuleName',
  description: 'description',
  evaluationModes: [{
    mode: 'mode',
  }],
  inputParameters: inputParameters,
  maximumExecutionFrequency: 'maximumExecutionFrequency',
  scope: {
    complianceResourceId: 'complianceResourceId',
    complianceResourceTypes: ['complianceResourceTypes'],
    tagKey: 'tagKey',
    tagValue: 'tagValue',
  },
};
```

## Properties

- `compliance`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigRule.ComplianceProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_config.CfnConfigRule.ComplianceProperty.html) — Indicates whether an AWS resource or AWS Config rule is compliant and provides the number of contributors that affect the compliance.

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

  If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the rule name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .

- `description`: string — The description that you provide for the AWS Config rule.

- `evaluationModes`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigRule.EvaluationModeConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_config.CfnConfigRule.EvaluationModeConfigurationProperty.html)[] — The modes the AWS Config rule can be evaluated in.

  The valid values are distinct objects. By default, the value is Detective evaluation mode only.

- `inputParameters`: any — A string, in JSON format, that is passed to the AWS Config rule Lambda function.

- `maximumExecutionFrequency`: string — The maximum frequency with which AWS Config runs evaluations for a rule.

  You can specify a value for `MaximumExecutionFrequency` when:

  - You are using an AWS managed rule that is triggered at a periodic frequency.
  - Your custom rule is triggered when AWS Config delivers the configuration snapshot. For more information, see [ConfigSnapshotDeliveryProperties](https://docs.aws.amazon.com/config/latest/APIReference/API_ConfigSnapshotDeliveryProperties.html) .

  > By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the `MaximumExecutionFrequency` parameter.

- `scope`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigRule.ScopeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_config.CfnConfigRule.ScopeProperty.html) — Defines which resources can trigger an evaluation for the rule.

  The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes.

- `source`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigRule.SourceProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_config.CfnConfigRule.SourceProperty.html) (required) — Provides the rule owner ( `AWS` for managed rules, `CUSTOM_POLICY` for Custom Policy rules, and `CUSTOM_LAMBDA` for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your AWS resources.
