Class: AWSCDK::Config::CloudFormationStackDriftDetectionCheckProps
- Inherits:
-
RuleProps
- Object
- RuleProps
- AWSCDK::Config::CloudFormationStackDriftDetectionCheckProps
- Defined in:
- config/cloud_formation_stack_drift_detection_check_props.rb
Overview
Construction properties for a CloudFormationStackDriftDetectionCheck.
Instance Attribute Summary collapse
-
#config_rule_name ⇒ String?
readonly
A name for the AWS Config rule.
-
#description ⇒ String?
readonly
A description about this AWS Config rule.
-
#evaluation_modes ⇒ AWSCDK::Config::EvaluationMode?
readonly
The modes the AWS Config rule can be evaluated in.
-
#input_parameters ⇒ Hash{String => Object}?
readonly
Input parameter values that are passed to the AWS Config rule.
-
#maximum_execution_frequency ⇒ AWSCDK::Config::MaximumExecutionFrequency?
readonly
The maximum frequency at which the AWS Config rule runs evaluations.
-
#own_stack_only ⇒ Boolean?
readonly
Whether to check only the stack where this rule is deployed.
-
#role ⇒ AWSCDK::Interfaces::AWSIAM::IRoleRef?
readonly
The IAM role to use for this rule.
-
#rule_scope ⇒ AWSCDK::Config::RuleScope?
readonly
Defines which resources trigger an evaluation for an AWS Config rule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config_rule_name: nil, description: nil, evaluation_modes: nil, input_parameters: nil, maximum_execution_frequency: nil, rule_scope: nil, own_stack_only: nil, role: nil) ⇒ CloudFormationStackDriftDetectionCheckProps
constructor
A new instance of CloudFormationStackDriftDetectionCheckProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(config_rule_name: nil, description: nil, evaluation_modes: nil, input_parameters: nil, maximum_execution_frequency: nil, rule_scope: nil, own_stack_only: nil, role: nil) ⇒ CloudFormationStackDriftDetectionCheckProps
Returns a new instance of CloudFormationStackDriftDetectionCheckProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 15 def initialize(config_rule_name: nil, description: nil, evaluation_modes: nil, input_parameters: nil, maximum_execution_frequency: nil, rule_scope: nil, own_stack_only: nil, role: 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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29uZmlnLkV2YWx1YXRpb25Nb2RlIn0=")), "evaluationModes") unless @evaluation_modes.nil? @input_parameters = input_parameters Jsii::Type.check_type(@input_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "inputParameters") unless @input_parameters.nil? @maximum_execution_frequency = maximum_execution_frequency Jsii::Type.check_type(@maximum_execution_frequency, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29uZmlnLk1heGltdW1FeGVjdXRpb25GcmVxdWVuY3kifQ==")), "maximumExecutionFrequency") unless @maximum_execution_frequency.nil? @rule_scope = rule_scope Jsii::Type.check_type(@rule_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29uZmlnLlJ1bGVTY29wZSJ9")), "ruleScope") unless @rule_scope.nil? @own_stack_only = own_stack_only Jsii::Type.check_type(@own_stack_only, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "ownStackOnly") unless @own_stack_only.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifQ==")), "role") unless @role.nil? end |
Instance Attribute Details
#config_rule_name ⇒ String? (readonly)
Default: - CloudFormation generated name
A name for the AWS Config rule.
38 39 40 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 38 def config_rule_name @config_rule_name end |
#description ⇒ String? (readonly)
Default: - No description
A description about this AWS Config rule.
43 44 45 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 43 def description @description end |
#evaluation_modes ⇒ AWSCDK::Config::EvaluationMode? (readonly)
Default: - Detective evaluation mode only
The modes the AWS Config rule can be evaluated in.
The valid values are distinct objects.
50 51 52 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 50 def evaluation_modes @evaluation_modes end |
#input_parameters ⇒ Hash{String => Object}? (readonly)
Default: - No input parameters
Input parameter values that are passed to the AWS Config rule.
55 56 57 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 55 def input_parameters @input_parameters end |
#maximum_execution_frequency ⇒ AWSCDK::Config::MaximumExecutionFrequency? (readonly)
Default: MaximumExecutionFrequency.TWENTY_FOUR_HOURS
The maximum frequency at which the AWS Config rule runs evaluations.
60 61 62 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 60 def maximum_execution_frequency @maximum_execution_frequency end |
#own_stack_only ⇒ Boolean? (readonly)
Default: false
Whether to check only the stack where this rule is deployed.
70 71 72 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 70 def own_stack_only @own_stack_only end |
#role ⇒ AWSCDK::Interfaces::AWSIAM::IRoleRef? (readonly)
Default: - A role will be created
The IAM role to use for this rule.
It must have permissions to detect drift
for AWS CloudFormation stacks. Ensure to attach config.amazonaws.com trusted
permissions and ReadOnlyAccess policy permissions. For specific policy permissions,
refer to https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html.
80 81 82 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 80 def role @role end |
#rule_scope ⇒ AWSCDK::Config::RuleScope? (readonly)
Default: - evaluations for the rule are triggered when any resource in the recording group changes.
Defines which resources trigger an evaluation for an AWS Config rule.
65 66 67 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 65 def rule_scope @rule_scope end |
Class Method Details
.jsii_properties ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 82 def self.jsii_properties { :config_rule_name => "configRuleName", :description => "description", :evaluation_modes => "evaluationModes", :input_parameters => "inputParameters", :maximum_execution_frequency => "maximumExecutionFrequency", :rule_scope => "ruleScope", :own_stack_only => "ownStackOnly", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'config/cloud_formation_stack_drift_detection_check_props.rb', line 95 def to_jsii result = {} result.merge!(super) result.merge!({ "configRuleName" => @config_rule_name, "description" => @description, "evaluationModes" => @evaluation_modes, "inputParameters" => @input_parameters, "maximumExecutionFrequency" => @maximum_execution_frequency, "ruleScope" => @rule_scope, "ownStackOnly" => @own_stack_only, "role" => @role, }) result.compact end |