Class: AWSCDK::SecurityHub::CfnAutomationRuleProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SecurityHub::CfnAutomationRuleProps
- Defined in:
- security_hub/cfn_automation_rule_props.rb
Overview
Properties for defining a CfnAutomationRule.
Instance Attribute Summary collapse
-
#actions ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::SecurityHub::CfnAutomationRule::AutomationRulesActionProperty>
readonly
One or more actions to update finding fields if a finding matches the conditions specified in
Criteria. -
#criteria ⇒ AWSCDK::IResolvable, AWSCDK::SecurityHub::CfnAutomationRule::AutomationRulesFindingFiltersProperty
readonly
A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub CSPM uses to filter findings.
-
#description ⇒ String
readonly
A description of the rule.
-
#is_terminal ⇒ Boolean, ...
readonly
Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.
-
#rule_name ⇒ String
readonly
The name of the rule.
-
#rule_order ⇒ Numeric
readonly
An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.
-
#rule_status ⇒ String?
readonly
Whether the rule is active after it is created.
-
#tags ⇒ Hash{String => String}?
readonly
User-defined tags associated with an automation rule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(actions:, criteria:, description:, rule_name:, rule_order:, is_terminal: nil, rule_status: nil, tags: nil) ⇒ CfnAutomationRuleProps
constructor
A new instance of CfnAutomationRuleProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(actions:, criteria:, description:, rule_name:, rule_order:, is_terminal: nil, rule_status: nil, tags: nil) ⇒ CfnAutomationRuleProps
Returns a new instance of CfnAutomationRuleProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'security_hub/cfn_automation_rule_props.rb', line 17 def initialize(actions:, criteria:, description:, rule_name:, rule_order:, is_terminal: nil, rule_status: nil, tags: nil) @actions = actions Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VjdXJpdHlodWIuQ2ZuQXV0b21hdGlvblJ1bGUuQXV0b21hdGlvblJ1bGVzQWN0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "actions") @criteria = criteria.is_a?(Hash) ? ::AWSCDK::SecurityHub::CfnAutomationRule::AutomationRulesFindingFiltersProperty.new(**criteria.transform_keys(&:to_sym)) : criteria Jsii::Type.check_type(@criteria, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZWN1cml0eWh1Yi5DZm5BdXRvbWF0aW9uUnVsZS5BdXRvbWF0aW9uUnVsZXNGaW5kaW5nRmlsdGVyc1Byb3BlcnR5In1dfX0=")), "criteria") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") @rule_name = rule_name Jsii::Type.check_type(@rule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleName") @rule_order = rule_order Jsii::Type.check_type(@rule_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ruleOrder") @is_terminal = is_terminal Jsii::Type.check_type(@is_terminal, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "isTerminal") unless @is_terminal.nil? @rule_status = rule_status Jsii::Type.check_type(@rule_status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleStatus") unless @rule_status.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#actions ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::SecurityHub::CfnAutomationRule::AutomationRulesActionProperty> (readonly)
One or more actions to update finding fields if a finding matches the conditions specified in Criteria .
40 41 42 |
# File 'security_hub/cfn_automation_rule_props.rb', line 40 def actions @actions end |
#criteria ⇒ AWSCDK::IResolvable, AWSCDK::SecurityHub::CfnAutomationRule::AutomationRulesFindingFiltersProperty (readonly)
A set of AWS Security Finding Format (ASFF) finding field attributes and corresponding expected values that Security Hub CSPM uses to filter findings. If a rule is enabled and a finding matches the criteria specified in this parameter, Security Hub CSPM applies the rule action to the finding.
45 46 47 |
# File 'security_hub/cfn_automation_rule_props.rb', line 45 def criteria @criteria end |
#description ⇒ String (readonly)
A description of the rule.
50 51 52 |
# File 'security_hub/cfn_automation_rule_props.rb', line 50 def description @description end |
#is_terminal ⇒ Boolean, ... (readonly)
Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.
This is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule is terminal, Security Hub CSPM applies the rule action to a finding that matches the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal.
69 70 71 |
# File 'security_hub/cfn_automation_rule_props.rb', line 69 def is_terminal @is_terminal end |
#rule_name ⇒ String (readonly)
The name of the rule.
55 56 57 |
# File 'security_hub/cfn_automation_rule_props.rb', line 55 def rule_name @rule_name end |
#rule_order ⇒ Numeric (readonly)
An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.
Security Hub CSPM applies rules with lower values for this parameter first.
62 63 64 |
# File 'security_hub/cfn_automation_rule_props.rb', line 62 def rule_order @rule_order end |
#rule_status ⇒ String? (readonly)
Whether the rule is active after it is created.
If this parameter is equal to ENABLED , Security Hub CSPM applies the rule to findings and finding updates after the rule is created.
76 77 78 |
# File 'security_hub/cfn_automation_rule_props.rb', line 76 def rule_status @rule_status end |
#tags ⇒ Hash{String => String}? (readonly)
User-defined tags associated with an automation rule.
81 82 83 |
# File 'security_hub/cfn_automation_rule_props.rb', line 81 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'security_hub/cfn_automation_rule_props.rb', line 83 def self.jsii_properties { :actions => "actions", :criteria => "criteria", :description => "description", :rule_name => "ruleName", :rule_order => "ruleOrder", :is_terminal => "isTerminal", :rule_status => "ruleStatus", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'security_hub/cfn_automation_rule_props.rb', line 96 def to_jsii result = {} result.merge!({ "actions" => @actions, "criteria" => @criteria, "description" => @description, "ruleName" => @rule_name, "ruleOrder" => @rule_order, "isTerminal" => @is_terminal, "ruleStatus" => @rule_status, "tags" => @tags, }) result.compact end |