CfnConfigRuleProps Struct
Properties for defining a CfnConfigRule.
Example
// 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',
},
};
# 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
# input_parameters: Any
cfn_config_rule_props = config.CfnConfigRuleProps(
source=config.CfnConfigRule.SourceProperty(
owner="owner",
# the properties below are optional
custom_policy_details=config.CfnConfigRule.CustomPolicyDetailsProperty(
enable_debug_log_delivery=False,
policy_runtime="policyRuntime",
policy_text="policyText"
),
source_details=[config.CfnConfigRule.SourceDetailProperty(
event_source="eventSource",
message_type="messageType",
# the properties below are optional
maximum_execution_frequency="maximumExecutionFrequency"
)],
source_identifier="sourceIdentifier"
),
# the properties below are optional
compliance=config.CfnConfigRule.ComplianceProperty(
type="type"
),
config_rule_name="configRuleName",
description="description",
evaluation_modes=[config.CfnConfigRule.EvaluationModeConfigurationProperty(
mode="mode"
)],
input_parameters=input_parameters,
maximum_execution_frequency="maximumExecutionFrequency",
scope=config.CfnConfigRule.ScopeProperty(
compliance_resource_id="complianceResourceId",
compliance_resource_types=["complianceResourceTypes"],
tag_key="tagKey",
tag_value="tagValue"
)
)
// 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.*;
Object inputParameters;
CfnConfigRuleProps cfnConfigRuleProps = CfnConfigRuleProps.builder()
.source(SourceProperty.builder()
.owner("owner")
// the properties below are optional
.customPolicyDetails(CustomPolicyDetailsProperty.builder()
.enableDebugLogDelivery(false)
.policyRuntime("policyRuntime")
.policyText("policyText")
.build())
.sourceDetails(List.of(SourceDetailProperty.builder()
.eventSource("eventSource")
.messageType("messageType")
// the properties below are optional
.maximumExecutionFrequency("maximumExecutionFrequency")
.build()))
.sourceIdentifier("sourceIdentifier")
.build())
// the properties below are optional
.compliance(ComplianceProperty.builder()
.type("type")
.build())
.configRuleName("configRuleName")
.description("description")
.evaluationModes(List.of(EvaluationModeConfigurationProperty.builder()
.mode("mode")
.build()))
.inputParameters(inputParameters)
.maximumExecutionFrequency("maximumExecutionFrequency")
.scope(ScopeProperty.builder()
.complianceResourceId("complianceResourceId")
.complianceResourceTypes(List.of("complianceResourceTypes"))
.tagKey("tagKey")
.tagValue("tagValue")
.build())
.build();
// 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;
var inputParameters;
var cfnConfigRuleProps = new CfnConfigRuleProps {
Source = new SourceProperty {
Owner = "owner",
// the properties below are optional
CustomPolicyDetails = new CustomPolicyDetailsProperty {
EnableDebugLogDelivery = false,
PolicyRuntime = "policyRuntime",
PolicyText = "policyText"
},
SourceDetails = new [] { new SourceDetailProperty {
EventSource = "eventSource",
MessageType = "messageType",
// the properties below are optional
MaximumExecutionFrequency = "maximumExecutionFrequency"
} },
SourceIdentifier = "sourceIdentifier"
},
// the properties below are optional
Compliance = new ComplianceProperty {
Type = "type"
},
ConfigRuleName = "configRuleName",
Description = "description",
EvaluationModes = new [] { new EvaluationModeConfigurationProperty {
Mode = "mode"
} },
InputParameters = inputParameters,
MaximumExecutionFrequency = "maximumExecutionFrequency",
Scope = new ScopeProperty {
ComplianceResourceId = "complianceResourceId",
ComplianceResourceTypes = new [] { "complianceResourceTypes" },
TagKey = "tagKey",
TagValue = "tagValue"
}
};
// 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 inputParameters interface{}
cfnConfigRuleProps := &CfnConfigRuleProps{
Source: &SourceProperty{
Owner: jsii.String("owner"),
// the properties below are optional
CustomPolicyDetails: &CustomPolicyDetailsProperty{
EnableDebugLogDelivery: jsii.Boolean(false),
PolicyRuntime: jsii.String("policyRuntime"),
PolicyText: jsii.String("policyText"),
},
SourceDetails: []interface{}{
&SourceDetailProperty{
EventSource: jsii.String("eventSource"),
MessageType: jsii.String("messageType"),
// the properties below are optional
MaximumExecutionFrequency: jsii.String("maximumExecutionFrequency"),
},
},
SourceIdentifier: jsii.String("sourceIdentifier"),
},
// the properties below are optional
Compliance: &ComplianceProperty{
Type: jsii.String("type"),
},
ConfigRuleName: jsii.String("configRuleName"),
Description: jsii.String("description"),
EvaluationModes: []interface{}{
&EvaluationModeConfigurationProperty{
Mode: jsii.String("mode"),
},
},
InputParameters: inputParameters,
MaximumExecutionFrequency: jsii.String("maximumExecutionFrequency"),
Scope: &ScopeProperty{
ComplianceResourceId: jsii.String("complianceResourceId"),
ComplianceResourceTypes: []*string{
jsii.String("complianceResourceTypes"),
},
TagKey: jsii.String("tagKey"),
TagValue: jsii.String("tagValue"),
},
}
Properties
complianceoptionalIResolvable | CfnConfigRule.CompliancePropertycomplianceoptionaltyping.Union[IResolvable, ComplianceProperty]complianceoptionalIResolvableComplianceoptionalIResolvableComplianceoptionalinterface{}#configRuleNameoptionalstringconfig_rule_nameoptionalstrconfigRuleNameoptionalStringConfigRuleNameoptionalstringConfigRuleNameoptional*string#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#evaluationModesoptionalIResolvable | IResolvable | CfnConfigRule.EvaluationModeConfigurationProperty[]evaluation_modesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, EvaluationModeConfigurationProperty]]]evaluationModesoptionalIResolvableEvaluationModesoptionalIResolvableEvaluationModesoptionalinterface{}#The valid values are distinct objects. By default, the value is Detective evaluation mode only.
inputParametersoptionalanyinput_parametersoptionalAnyinputParametersoptionalObjectInputParametersoptionalobjectInputParametersoptionalinterface{}#maximumExecutionFrequencyoptionalstringmaximum_execution_frequencyoptionalstrmaximumExecutionFrequencyoptionalStringMaximumExecutionFrequencyoptionalstringMaximumExecutionFrequencyoptional*string#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
MaximumExecutionFrequencyparameter.
scopeoptionalIResolvable | CfnConfigRule.ScopePropertyscopeoptionaltyping.Union[IResolvable, ScopeProperty]scopeoptionalIResolvableScopeoptionalIResolvableScopeoptionalinterface{}#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#