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.Types.ConfigRule

Description

 
Synopsis

Documentation

data ConfigRule Source #

Config rules evaluate the configuration settings of your Amazon Web Services resources. A rule can run when Config detects a configuration change to an Amazon Web Services resource or at a periodic frequency that you choose (for example, every 24 hours). There are two types of rules: Config Managed Rules and Config Custom Rules. Managed rules are predefined, customizable rules created by Config. For a list of managed rules, see List of 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. It is invoked by events that are published to it by an event source, which Config invokes when the custom rule is initiated.

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

You can use the Amazon Web Services CLI and Amazon Web Services SDKs if you want to create a rule that triggers evaluations for your resources when Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.

See: newConfigRule smart constructor.

Constructors

ConfigRule' 

Fields

  • configRuleArn :: Maybe Text

    The Amazon Resource Name (ARN) of the Config rule.

  • configRuleId :: Maybe Text

    The ID of the Config rule.

  • configRuleName :: Maybe Text

    The name that you assign to the Config rule. The name is required if you are adding a new rule.

  • configRuleState :: Maybe ConfigRuleState

    Indicates whether the Config rule is active or is currently being deleted by Config. It can also indicate the evaluation status for the Config rule.

    Config sets the state of the rule to EVALUATING temporarily after you use the StartConfigRulesEvaluation request to evaluate your resources against the Config rule.

    Config sets the state of the rule to DELETING_RESULTS temporarily after you use the DeleteEvaluationResults request to delete the current evaluation results for the Config rule.

    Config temporarily sets the state of a rule to DELETING after you use the DeleteConfigRule request to delete the rule. After Config deletes the rule, the rule and all of its evaluations are erased and are no longer available.

  • createdBy :: Maybe Text

    Service principal name of the service that created the rule.

    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.

  • description :: Maybe Text

    The description that you provide for the Config rule.

  • evaluationModes :: Maybe [EvaluationModeConfiguration]

    The modes the Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.

  • inputParameters :: Maybe Text

    A string, in JSON format, that is passed to the Config rule Lambda function.

  • maximumExecutionFrequency :: Maybe MaximumExecutionFrequency

    The maximum frequency with which Config runs evaluations for a rule. You can specify a value for MaximumExecutionFrequency when:

    • This is for an Config managed rule that is triggered at a periodic frequency.
    • Your custom rule is triggered when 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 MaximumExecutionFrequency parameter.

  • scope :: Maybe 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.

    The scope can be empty.

  • source :: Source

    Provides the rule owner (Amazon Web Services for managed rules, CUSTOM_POLICY for Custom Policy rules, and CUSTOM_LAMBDA for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your Amazon Web Services resources.

Instances

Instances details
FromJSON ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

ToJSON ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

Generic ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

Associated Types

type Rep ConfigRule :: Type -> Type #

Read ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

Show ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

NFData ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

Methods

rnf :: ConfigRule -> () #

Eq ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

Hashable ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

type Rep ConfigRule Source # 
Instance details

Defined in Amazonka.Config.Types.ConfigRule

type Rep ConfigRule = D1 ('MetaData "ConfigRule" "Amazonka.Config.Types.ConfigRule" "amazonka-config-2.0-7GF0fBbVw65uROwJwpcE3" 'False) (C1 ('MetaCons "ConfigRule'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "configRuleArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "configRuleId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "configRuleName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "configRuleState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ConfigRuleState)) :*: S1 ('MetaSel ('Just "createdBy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "evaluationModes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [EvaluationModeConfiguration])) :*: S1 ('MetaSel ('Just "inputParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "maximumExecutionFrequency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MaximumExecutionFrequency)) :*: (S1 ('MetaSel ('Just "scope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Scope)) :*: S1 ('MetaSel ('Just "source") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Source))))))

newConfigRule Source #

Create a value of ConfigRule 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:configRuleArn:ConfigRule', configRule_configRuleArn - The Amazon Resource Name (ARN) of the Config rule.

$sel:configRuleId:ConfigRule', configRule_configRuleId - The ID of the Config rule.

$sel:configRuleName:ConfigRule', configRule_configRuleName - The name that you assign to the Config rule. The name is required if you are adding a new rule.

$sel:configRuleState:ConfigRule', configRule_configRuleState - Indicates whether the Config rule is active or is currently being deleted by Config. It can also indicate the evaluation status for the Config rule.

Config sets the state of the rule to EVALUATING temporarily after you use the StartConfigRulesEvaluation request to evaluate your resources against the Config rule.

Config sets the state of the rule to DELETING_RESULTS temporarily after you use the DeleteEvaluationResults request to delete the current evaluation results for the Config rule.

Config temporarily sets the state of a rule to DELETING after you use the DeleteConfigRule request to delete the rule. After Config deletes the rule, the rule and all of its evaluations are erased and are no longer available.

$sel:createdBy:ConfigRule', configRule_createdBy - Service principal name of the service that created the rule.

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.

$sel:description:ConfigRule', configRule_description - The description that you provide for the Config rule.

$sel:evaluationModes:ConfigRule', configRule_evaluationModes - The modes the Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.

$sel:inputParameters:ConfigRule', configRule_inputParameters - A string, in JSON format, that is passed to the Config rule Lambda function.

$sel:maximumExecutionFrequency:ConfigRule', configRule_maximumExecutionFrequency - The maximum frequency with which Config runs evaluations for a rule. You can specify a value for MaximumExecutionFrequency when:

  • This is for an Config managed rule that is triggered at a periodic frequency.
  • Your custom rule is triggered when 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 MaximumExecutionFrequency parameter.

$sel:scope:ConfigRule', configRule_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.

The scope can be empty.

$sel:source:ConfigRule', configRule_source - Provides the rule owner (Amazon Web Services for managed rules, CUSTOM_POLICY for Custom Policy rules, and CUSTOM_LAMBDA for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your Amazon Web Services resources.

configRule_configRuleArn :: Lens' ConfigRule (Maybe Text) Source #

The Amazon Resource Name (ARN) of the Config rule.

configRule_configRuleId :: Lens' ConfigRule (Maybe Text) Source #

The ID of the Config rule.

configRule_configRuleName :: Lens' ConfigRule (Maybe Text) Source #

The name that you assign to the Config rule. The name is required if you are adding a new rule.

configRule_configRuleState :: Lens' ConfigRule (Maybe ConfigRuleState) Source #

Indicates whether the Config rule is active or is currently being deleted by Config. It can also indicate the evaluation status for the Config rule.

Config sets the state of the rule to EVALUATING temporarily after you use the StartConfigRulesEvaluation request to evaluate your resources against the Config rule.

Config sets the state of the rule to DELETING_RESULTS temporarily after you use the DeleteEvaluationResults request to delete the current evaluation results for the Config rule.

Config temporarily sets the state of a rule to DELETING after you use the DeleteConfigRule request to delete the rule. After Config deletes the rule, the rule and all of its evaluations are erased and are no longer available.

configRule_createdBy :: Lens' ConfigRule (Maybe Text) Source #

Service principal name of the service that created the rule.

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.

configRule_description :: Lens' ConfigRule (Maybe Text) Source #

The description that you provide for the Config rule.

configRule_evaluationModes :: Lens' ConfigRule (Maybe [EvaluationModeConfiguration]) Source #

The modes the Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.

configRule_inputParameters :: Lens' ConfigRule (Maybe Text) Source #

A string, in JSON format, that is passed to the Config rule Lambda function.

configRule_maximumExecutionFrequency :: Lens' ConfigRule (Maybe MaximumExecutionFrequency) Source #

The maximum frequency with which Config runs evaluations for a rule. You can specify a value for MaximumExecutionFrequency when:

  • This is for an Config managed rule that is triggered at a periodic frequency.
  • Your custom rule is triggered when 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 MaximumExecutionFrequency parameter.

configRule_scope :: Lens' ConfigRule (Maybe Scope) Source #

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.

The scope can be empty.

configRule_source :: Lens' ConfigRule Source Source #

Provides the rule owner (Amazon Web Services for managed rules, CUSTOM_POLICY for Custom Policy rules, and CUSTOM_LAMBDA for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your Amazon Web Services resources.