amazonka-config-2.0: Amazon Config SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Config.PutConfigRule

Description

Adds or updates an Config rule to evaluate if your Amazon Web Services resources comply with your desired configurations. For information on how many Config rules you can have per account, see Service Limits in the Config Developer Guide.

There are two types of rules: Config Custom Rules and Config Managed Rules. You can use PutConfigRule to create both Config custom rules and Config managed rules.

Custom rules are rules that you can create using either Guard or Lambda functions. Guard (Guard GitHub Repository) is a policy-as-code language that allows you to write policies that are enforced by Config Custom Policy rules. Lambda uses custom code that you upload to evaluate a custom rule. If you are adding a new Custom Lambda rule, you first need to create an Lambda function that the rule invokes to evaluate your resources. When you use PutConfigRule to add a Custom Lambda rule to Config, you must specify the Amazon Resource Name (ARN) that Lambda assigns to the function. You specify the ARN in the SourceIdentifier key. This key is part of the Source object, which is part of the ConfigRule object.

Managed rules are predefined, customizable rules created by Config. For a list of managed rules, see List of Config Managed Rules. If you are adding an Config managed rule, you must specify the rule's identifier for the SourceIdentifier key.

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.

For more information about developing and using Config rules, see Evaluating Amazon Web Services resource Configurations with Config in the Config Developer Guide.

Synopsis

Creating a Request

data PutConfigRule Source #

See: newPutConfigRule smart constructor.

Constructors

PutConfigRule' 

Fields

Instances

Instances details
ToJSON PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

ToHeaders PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

ToPath PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

ToQuery PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

AWSRequest PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

Associated Types

type AWSResponse PutConfigRule #

Generic PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

Associated Types

type Rep PutConfigRule :: Type -> Type #

Read PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

Show PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

NFData PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

Methods

rnf :: PutConfigRule -> () #

Eq PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

Hashable PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

type AWSResponse PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

type Rep PutConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

type Rep PutConfigRule = D1 ('MetaData "PutConfigRule" "Amazonka.Config.PutConfigRule" "amazonka-config-2.0-7GF0fBbVw65uROwJwpcE3" 'False) (C1 ('MetaCons "PutConfigRule'" 'PrefixI 'True) (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "configRule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ConfigRule)))

newPutConfigRule Source #

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:

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.

Instances

Instances details
Generic PutConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

Associated Types

type Rep PutConfigRuleResponse :: Type -> Type #

Read PutConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

Show PutConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

NFData PutConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

Methods

rnf :: PutConfigRuleResponse -> () #

Eq PutConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

type Rep PutConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutConfigRule

type Rep PutConfigRuleResponse = D1 ('MetaData "PutConfigRuleResponse" "Amazonka.Config.PutConfigRule" "amazonka-config-2.0-7GF0fBbVw65uROwJwpcE3" 'False) (C1 ('MetaCons "PutConfigRuleResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newPutConfigRuleResponse :: PutConfigRuleResponse Source #

Create a value of PutConfigRuleResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.