Class: AWSCDK::Config::CfnConfigRuleProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Config::CfnConfigRuleProps
- Defined in:
- config/cfn_config_rule_props.rb
Overview
Properties for defining a CfnConfigRule.
Instance Attribute Summary collapse
-
#compliance ⇒ AWSCDK::IResolvable, ...
readonly
Indicates whether an AWS resource or AWS Config rule is compliant and provides the number of contributors that affect the compliance.
-
#config_rule_name ⇒ String?
readonly
A name for the AWS Config rule.
-
#description ⇒ String?
readonly
The description that you provide for the AWS Config rule.
-
#evaluation_modes ⇒ AWSCDK::IResolvable, ...
readonly
The modes the AWS Config rule can be evaluated in.
-
#input_parameters ⇒ Object?
readonly
A string, in JSON format, that is passed to the AWS Config rule Lambda function.
-
#maximum_execution_frequency ⇒ String?
readonly
The maximum frequency with which AWS Config runs evaluations for a rule.
-
#scope ⇒ AWSCDK::IResolvable, ...
readonly
Defines which resources can trigger an evaluation for the rule.
-
#source ⇒ AWSCDK::IResolvable, AWSCDK::Config::CfnConfigRule::SourceProperty
readonly
Provides the rule owner (
AWSfor managed rules,CUSTOM_POLICYfor Custom Policy rules, andCUSTOM_LAMBDAfor Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your AWS resources.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(source:, compliance: nil, config_rule_name: nil, description: nil, evaluation_modes: nil, input_parameters: nil, maximum_execution_frequency: nil, scope: nil) ⇒ CfnConfigRuleProps
constructor
A new instance of CfnConfigRuleProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(source:, compliance: nil, config_rule_name: nil, description: nil, evaluation_modes: nil, input_parameters: nil, maximum_execution_frequency: nil, scope: nil) ⇒ CfnConfigRuleProps
Returns a new instance of CfnConfigRuleProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'config/cfn_config_rule_props.rb', line 17 def initialize(source:, compliance: nil, config_rule_name: nil, description: nil, evaluation_modes: nil, input_parameters: nil, maximum_execution_frequency: nil, scope: nil) @source = source.is_a?(Hash) ? ::AWSCDK::Config::CfnConfigRule::SourceProperty.new(**source.transform_keys(&:to_sym)) : source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25maWcuQ2ZuQ29uZmlnUnVsZS5Tb3VyY2VQcm9wZXJ0eSJ9XX19")), "source") @compliance = compliance.is_a?(Hash) ? ::AWSCDK::Config::CfnConfigRule::ComplianceProperty.new(**compliance.transform_keys(&:to_sym)) : compliance Jsii::Type.check_type(@compliance, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25maWcuQ2ZuQ29uZmlnUnVsZS5Db21wbGlhbmNlUHJvcGVydHkifV19fQ==")), "compliance") unless @compliance.nil? @config_rule_name = config_rule_name Jsii::Type.check_type(@config_rule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "configRuleName") unless @config_rule_name.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @evaluation_modes = evaluation_modes Jsii::Type.check_type(@evaluation_modes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29uZmlnLkNmbkNvbmZpZ1J1bGUuRXZhbHVhdGlvbk1vZGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "evaluationModes") unless @evaluation_modes.nil? @input_parameters = input_parameters Jsii::Type.check_type(@input_parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "inputParameters") unless @input_parameters.nil? @maximum_execution_frequency = maximum_execution_frequency Jsii::Type.check_type(@maximum_execution_frequency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "maximumExecutionFrequency") unless @maximum_execution_frequency.nil? @scope = scope.is_a?(Hash) ? ::AWSCDK::Config::CfnConfigRule::ScopeProperty.new(**scope.transform_keys(&:to_sym)) : scope Jsii::Type.check_type(@scope, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25maWcuQ2ZuQ29uZmlnUnVsZS5TY29wZVByb3BlcnR5In1dfX0=")), "scope") unless @scope.nil? end |
Instance Attribute Details
#compliance ⇒ AWSCDK::IResolvable, ... (readonly)
Indicates whether an AWS resource or AWS Config rule is compliant and provides the number of contributors that affect the compliance.
45 46 47 |
# File 'config/cfn_config_rule_props.rb', line 45 def compliance @compliance end |
#config_rule_name ⇒ String? (readonly)
A name for the AWS Config rule.
If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the rule name. For more information, see Name Type .
52 53 54 |
# File 'config/cfn_config_rule_props.rb', line 52 def config_rule_name @config_rule_name end |
#description ⇒ String? (readonly)
The description that you provide for the AWS Config rule.
57 58 59 |
# File 'config/cfn_config_rule_props.rb', line 57 def description @description end |
#evaluation_modes ⇒ AWSCDK::IResolvable, ... (readonly)
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.
64 65 66 |
# File 'config/cfn_config_rule_props.rb', line 64 def evaluation_modes @evaluation_modes end |
#input_parameters ⇒ Object? (readonly)
A string, in JSON format, that is passed to the AWS Config rule Lambda function.
69 70 71 |
# File 'config/cfn_config_rule_props.rb', line 69 def input_parameters @input_parameters end |
#maximum_execution_frequency ⇒ String? (readonly)
The maximum frequency with which AWS Config runs evaluations for a rule.
You can specify a value for MaximumExecutionFrequency when:
- You are using an AWS 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 .
By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the
MaximumExecutionFrequencyparameter.
81 82 83 |
# File 'config/cfn_config_rule_props.rb', line 81 def maximum_execution_frequency @maximum_execution_frequency end |
#scope ⇒ AWSCDK::IResolvable, ... (readonly)
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.
88 89 90 |
# File 'config/cfn_config_rule_props.rb', line 88 def scope @scope end |
#source ⇒ AWSCDK::IResolvable, AWSCDK::Config::CfnConfigRule::SourceProperty (readonly)
Provides the rule owner ( AWS 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 AWS resources.
40 41 42 |
# File 'config/cfn_config_rule_props.rb', line 40 def source @source end |
Class Method Details
.jsii_properties ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'config/cfn_config_rule_props.rb', line 90 def self.jsii_properties { :source => "source", :compliance => "compliance", :config_rule_name => "configRuleName", :description => "description", :evaluation_modes => "evaluationModes", :input_parameters => "inputParameters", :maximum_execution_frequency => "maximumExecutionFrequency", :scope => "scope", } end |
Instance Method Details
#to_jsii ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'config/cfn_config_rule_props.rb', line 103 def to_jsii result = {} result.merge!({ "source" => @source, "compliance" => @compliance, "configRuleName" => @config_rule_name, "description" => @description, "evaluationModes" => @evaluation_modes, "inputParameters" => @input_parameters, "maximumExecutionFrequency" => @maximum_execution_frequency, "scope" => @scope, }) result.compact end |