ConfigRule
Amazon Config rules evaluate the configuration settings of your Amazon resources. A rule can run when Amazon Config detects a configuration change to an Amazon resource or at a periodic frequency that you choose (for example, every 24 hours). There are two types of rules: Amazon Config Managed Rules and Amazon Config Custom Rules.
Amazon Config Managed Rules are predefined, customizable rules created by Amazon Config. For a list of managed rules, see List of Amazon Config Managed Rules.
Amazon Config Custom Rules are rules that you create from scratch. There are two ways to create Amazon Config custom rules: with Lambda functions
(Amazon Lambda Developer Guide) and with Guard (Guard GitHub
Repository
For more information about developing and using Amazon Config rules, see Evaluating Resource with Amazon Config Rules in the Amazon Config Developer Guide.
Note
You can use the Amazon CLI and Amazon SDKs if you want to create a rule that triggers evaluations for your resources when Amazon Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.
Contents
- Source
-
Provides the rule owner (
Amazon
for managed rules,CUSTOM_POLICY
for Custom Policy rules, andCUSTOM_LAMBDA
for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your Amazon resources.Type: Source object
Required: Yes
- ConfigRuleArn
-
The Amazon Resource Name (ARN) of the Amazon Config rule.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
- ConfigRuleId
-
The ID of the Amazon Config rule.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Required: No
- ConfigRuleName
-
The name that you assign to the Amazon Config rule. The name is required if you are adding a new rule.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
.*\S.*
Required: No
- ConfigRuleState
-
Indicates whether the Amazon Config rule is active or is currently being deleted by Amazon Config. It can also indicate the evaluation status for the Amazon Config rule.
Amazon Config sets the state of the rule to
EVALUATING
temporarily after you use theStartConfigRulesEvaluation
request to evaluate your resources against the Amazon Config rule.Amazon Config sets the state of the rule to
DELETING_RESULTS
temporarily after you use theDeleteEvaluationResults
request to delete the current evaluation results for the Amazon Config rule.Amazon Config temporarily sets the state of a rule to
DELETING
after you use theDeleteConfigRule
request to delete the rule. After Amazon Config deletes the rule, the rule and all of its evaluations are erased and are no longer available.Type: String
Valid Values:
ACTIVE | DELETING | DELETING_RESULTS | EVALUATING
Required: No
- CreatedBy
-
Service principal name of the service that created the rule.
Note
The field is populated only if the service-linked rule is created by a service. The field is empty if you create your own rule.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
- Description
-
The description that you provide for the Amazon Config rule.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 256.
Required: No
- EvaluationModes
-
The modes the Amazon Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.
Type: Array of EvaluationModeConfiguration objects
Required: No
- InputParameters
-
A string, in JSON format, that is passed to the Amazon Config rule Lambda function.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: No
- MaximumExecutionFrequency
-
The maximum frequency with which Amazon Config runs evaluations for a rule. You can specify a value for
MaximumExecutionFrequency
when:-
This is for an Amazon Config managed rule that is triggered at a periodic frequency.
-
Your custom rule is triggered when Amazon Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.
Note
By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the
MaximumExecutionFrequency
parameter.Type: String
Valid Values:
One_Hour | Three_Hours | Six_Hours | Twelve_Hours | TwentyFour_Hours
Required: No
-
- Scope
-
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.
Note
The scope can be empty.
Type: Scope object
Required: No
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: