ConfigRule
AWS Config rules evaluate the configuration settings of your AWS resources. A rule can run when AWS Config detects a configuration change to an AWS resource or at a periodic frequency that you choose (for example, every 24 hours). There are two types of rules: AWS Config Managed Rules and AWS Config Custom Rules.
AWS Config Managed Rules are predefined, customizable rules created by AWS Config. For a list of managed rules, see List of AWS Config Managed Rules.
AWS Config Custom Rules are rules that you create from scratch. There are two ways to create AWS Config custom rules: with Lambda functions
(AWS Lambda Developer Guide) and with Guard (Guard GitHub
Repository
For more information about developing and using AWS Config rules, see Evaluating Resource with AWS Config Rules in the AWS Config Developer Guide.
Note
You can use the AWS CLI and AWS SDKs if you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.
Contents
- Source
-
Provides the rule owner (
AWS
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 AWS resources.Type: Source object
Required: Yes
- ConfigRuleArn
-
The Amazon Resource Name (ARN) of the AWS Config rule.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
- ConfigRuleId
-
The ID of the AWS Config rule.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Required: No
- ConfigRuleName
-
The name that you assign to the AWS 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 AWS Config rule is active or is currently being deleted by AWS Config. It can also indicate the evaluation status for the AWS Config rule.
AWS Config sets the state of the rule to
EVALUATING
temporarily after you use theStartConfigRulesEvaluation
request to evaluate your resources against the AWS Config rule.AWS Config sets the state of the rule to
DELETING_RESULTS
temporarily after you use theDeleteEvaluationResults
request to delete the current evaluation results for the AWS Config rule.AWS Config temporarily sets the state of a rule to
DELETING
after you use theDeleteConfigRule
request to delete the rule. After AWS 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 AWS Config rule.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 256.
Required: No
- EvaluationModes
-
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.
Type: Array of EvaluationModeConfiguration objects
Required: No
- InputParameters
-
A string, in JSON format, that is passed to the AWS Config rule Lambda function.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: No
- MaximumExecutionFrequency
-
The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value for
MaximumExecutionFrequency
when:-
This is for an AWS Config 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.
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 AWS SDKs, see the following: