Class: Aws::ConfigService::Types::ConfigRule
- Inherits:
-
Struct
- Object
- Struct
- Aws::ConfigService::Types::ConfigRule
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-configservice/types.rb
Overview
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*.
Config Managed Rules are predefined, customizable rules created by Config. For a list of managed rules, see [List of Config Managed Rules].
Config Custom Rules are rules that you create from scratch. There are two ways to create Config custom rules: with Lambda functions ([ Lambda Developer Guide]) and with Guard ([Guard GitHub Repository]), a policy-as-code language. Config custom rules created with Lambda are called *Config Custom Lambda Rules* and Config custom rules created with Guard are called *Config Custom Policy Rules*.
For more information about developing and using Config rules, see
- Evaluating Resource with Config Rules][4
-
in the *Config Developer
Guide*.
<note markdown=“1”> 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.
</note>
[1]: docs.aws.amazon.com/config/latest/developerguide/managed-rules-by-aws-config.html [2]: docs.aws.amazon.com/config/latest/developerguide/gettingstarted-concepts.html#gettingstarted-concepts-function [3]: github.com/aws-cloudformation/cloudformation-guard [4]: docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#config_rule_arn ⇒ String
The Amazon Resource Name (ARN) of the Config rule.
-
#config_rule_id ⇒ String
The ID of the Config rule.
-
#config_rule_name ⇒ String
The name that you assign to the Config rule.
-
#config_rule_state ⇒ String
Indicates whether the Config rule is active or is currently being deleted by Config.
-
#created_by ⇒ String
Service principal name of the service that created the rule.
-
#description ⇒ String
The description that you provide for the Config rule.
-
#evaluation_modes ⇒ Array<Types::EvaluationModeConfiguration>
The modes the Config rule can be evaluated in.
-
#input_parameters ⇒ String
A string, in JSON format, that is passed to the Config rule Lambda function.
-
#maximum_execution_frequency ⇒ String
The maximum frequency with which Config runs evaluations for a rule.
-
#scope ⇒ Types::Scope
Defines which resources can trigger an evaluation for the rule.
-
#source ⇒ Types::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.
Instance Attribute Details
#config_rule_arn ⇒ String
The Amazon Resource Name (ARN) of the Config rule.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#config_rule_id ⇒ String
The ID of the Config rule.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#config_rule_name ⇒ String
The name that you assign to the Config rule. The name is required if you are adding a new rule.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#config_rule_state ⇒ String
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.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#created_by ⇒ String
Service principal name of the service that created the rule.
<note markdown=“1”> 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.
</note>
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#description ⇒ String
The description that you provide for the Config rule.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#evaluation_modes ⇒ Array<Types::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.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#input_parameters ⇒ String
A string, in JSON format, that is passed to the Config rule Lambda function.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#maximum_execution_frequency ⇒ String
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.
<note markdown=“1”> By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the ‘MaximumExecutionFrequency` parameter.
</note>
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#scope ⇒ Types::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 markdown=“1”> The scope can be empty.
</note>
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |
#source ⇒ Types::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.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/aws-sdk-configservice/types.rb', line 970 class ConfigRule < Struct.new( :config_rule_name, :config_rule_arn, :config_rule_id, :description, :scope, :source, :input_parameters, :maximum_execution_frequency, :config_rule_state, :created_by, :evaluation_modes) SENSITIVE = [] include Aws::Structure end |