Class: AWSCDK::WAFv2::CfnWebACL::RuleActionOverrideProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::RuleActionOverrideProperty
- Defined in:
- wa_fv2/cfn_web_acl.rb
Overview
Action setting to use in the place of a rule action that is configured inside the rule group.
You specify one override for each rule whose action you want to change.
You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.
Instance Attribute Summary collapse
-
#action_to_use ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::RuleActionProperty
readonly
The override action to use, in place of the configured action of the rule in the rule group.
-
#name ⇒ String
readonly
The name of the rule to override.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action_to_use:, name:) ⇒ RuleActionOverrideProperty
constructor
A new instance of RuleActionOverrideProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action_to_use:, name:) ⇒ RuleActionOverrideProperty
Returns a new instance of RuleActionOverrideProperty.
5491 5492 5493 5494 5495 5496 |
# File 'wa_fv2/cfn_web_acl.rb', line 5491 def initialize(action_to_use:, name:) @action_to_use = action_to_use.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::RuleActionProperty.new(**action_to_use.transform_keys(&:to_sym)) : action_to_use Jsii::Type.check_type(@action_to_use, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuUnVsZUFjdGlvblByb3BlcnR5In1dfX0=")), "actionToUse") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") end |
Instance Attribute Details
#action_to_use ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::RuleActionProperty (readonly)
The override action to use, in place of the configured action of the rule in the rule group.
5502 5503 5504 |
# File 'wa_fv2/cfn_web_acl.rb', line 5502 def action_to_use @action_to_use end |
#name ⇒ String (readonly)
The name of the rule to override.
5507 5508 5509 |
# File 'wa_fv2/cfn_web_acl.rb', line 5507 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
5509 5510 5511 5512 5513 5514 |
# File 'wa_fv2/cfn_web_acl.rb', line 5509 def self.jsii_properties { :action_to_use => "actionToUse", :name => "name", } end |
Instance Method Details
#to_jsii ⇒ Object
5516 5517 5518 5519 5520 5521 5522 5523 |
# File 'wa_fv2/cfn_web_acl.rb', line 5516 def to_jsii result = {} result.merge!({ "actionToUse" => @action_to_use, "name" => @name, }) result.compact end |