Skip to content
v2.275.0

CfnConfigRuleProps Struct ​

Properties for defining a CfnConfigRule.

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 ​

complianceoptionalIResolvable | CfnConfigRule.CompliancePropertycomplianceoptionaltyping.Union[IResolvable, ComplianceProperty]complianceoptionalIResolvableComplianceoptionalIResolvableComplianceoptionalinterface{}#
Indicates whether an AWS resource or AWS Config rule is compliant and provides the number of contributors that affect the compliance.
configRuleNameoptionalstringconfig_rule_nameoptionalstrconfigRuleNameoptionalStringConfigRuleNameoptionalstringConfigRuleNameoptional*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 .

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
The description that you provide for the AWS Config rule.
evaluationModesoptionalIResolvable | IResolvable | CfnConfigRule.EvaluationModeConfigurationProperty[]evaluation_modesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, EvaluationModeConfigurationProperty]]]evaluationModesoptionalIResolvableEvaluationModesoptionalIResolvableEvaluationModesoptionalinterface{}#
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.

inputParametersoptionalanyinput_parametersoptionalAnyinputParametersoptionalObjectInputParametersoptionalobjectInputParametersoptionalinterface{}#
A string, in JSON format, that is passed to the AWS Config rule Lambda function.
maximumExecutionFrequencyoptionalstringmaximum_execution_frequencyoptionalstrmaximumExecutionFrequencyoptionalStringMaximumExecutionFrequencyoptionalstringMaximumExecutionFrequencyoptional*string#
The maximum frequency with which AWS Config runs evaluations for a rule.
notes

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 .

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

scopeoptionalIResolvable | CfnConfigRule.ScopePropertyscopeoptionaltyping.Union[IResolvable, ScopeProperty]scopeoptionalIResolvableScopeoptionalIResolvableScopeoptionalinterface{}#
Defines which resources can trigger an evaluation for the rule.
notes

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.

sourceIResolvable | CfnConfigRule.SourcePropertysourcetyping.Union[IResolvable, SourceProperty]sourceIResolvableSourceIResolvableSourceinterface{}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.