| Copyright | (c) 2013-2021 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
Amazonka.Config.PutConfigRule
Description
Adds or updates an Config rule for evaluating whether your Amazon Web Services resources comply with your desired configurations.
You can use this action for custom Config rules and Config managed rules. A custom Config rule is a rule that you develop and maintain. An Config managed rule is a customizable, predefined rule that Config provides.
If you are adding a new custom Config rule, you must first create the
Lambda function that the rule invokes to evaluate your resources. When
you use the PutConfigRule action to add the rule to Config, you must
specify the Amazon Resource Name (ARN) that Lambda assigns to the
function. Specify the ARN for the SourceIdentifier key. This key is
part of the Source object, which is part of the ConfigRule object.
If you are adding an Config managed rule, specify the rule's identifier
for the SourceIdentifier key. To reference Config managed rule
identifiers, see
About Config managed rules.
For any new rule that you add, specify the ConfigRuleName in the
ConfigRule object. Do not specify the ConfigRuleArn or the
ConfigRuleId. These values are generated by Config for new rules.
If you are updating a rule that you added previously, you can specify
the rule by ConfigRuleName, ConfigRuleId, or ConfigRuleArn in the
ConfigRule data type that you use in this request.
The maximum number of rules that Config supports is 150.
For information about requesting a rule limit increase, see Config Limits in the Amazon Web Services General Reference Guide.
For more information about developing and using Config rules, see Evaluating Amazon Web Services resource Configurations with Config in the Config Developer Guide.
Synopsis
- data PutConfigRule = PutConfigRule' {
- tags :: Maybe [Tag]
- configRule :: ConfigRule
- newPutConfigRule :: ConfigRule -> PutConfigRule
- putConfigRule_tags :: Lens' PutConfigRule (Maybe [Tag])
- putConfigRule_configRule :: Lens' PutConfigRule ConfigRule
- data PutConfigRuleResponse = PutConfigRuleResponse' {
- newPutConfigRuleResponse :: PutConfigRuleResponse
Creating a Request
data PutConfigRule Source #
See: newPutConfigRule smart constructor.
Constructors
| PutConfigRule' | |
Fields
| |
Instances
Arguments
| :: ConfigRule | |
| -> PutConfigRule |
Create a value of PutConfigRule with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:tags:PutConfigRule', putConfigRule_tags - An array of tag object.
$sel:configRule:PutConfigRule', putConfigRule_configRule - The rule that you want to add to your account.
Request Lenses
putConfigRule_tags :: Lens' PutConfigRule (Maybe [Tag]) Source #
An array of tag object.
putConfigRule_configRule :: Lens' PutConfigRule ConfigRule Source #
The rule that you want to add to your account.
Destructuring the Response
data PutConfigRuleResponse Source #
See: newPutConfigRuleResponse smart constructor.
Constructors
| PutConfigRuleResponse' | |
Instances
newPutConfigRuleResponse :: PutConfigRuleResponse Source #
Create a value of PutConfigRuleResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.