Class: AWSCDK::WAFv2::CfnWebACL::RuleActionOverrideProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_to_use:, name:) ⇒ RuleActionOverrideProperty

Returns a new instance of RuleActionOverrideProperty.

Parameters:



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_useAWSCDK::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

#nameString (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_propertiesObject



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_jsiiObject



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