Class: AWSCDK::WAFv2::CfnWebACL::RegexPatternSetReferenceStatementProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::RegexPatternSetReferenceStatementProperty
- Defined in:
- wa_fv2/cfn_web_acl.rb
Overview
A rule statement used to search web request components for matches with regular expressions.
To use this, create a RegexPatternSet that specifies the expressions that you want to detect, then use that set in this statement. A web request matches the pattern set rule statement if the request component matches any of the patterns in the set.
Each regex pattern set rule statement references a regex pattern set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, AWS WAF automatically updates all rules that reference it.
Instance Attribute Summary collapse
-
#arn ⇒ String
readonly
The Amazon Resource Name (ARN) of the
RegexPatternSetthat this statement references. -
#field_to_match ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::FieldToMatchProperty
readonly
The part of the web request that you want AWS WAF to inspect.
-
#text_transformations ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::TextTransformationProperty>
readonly
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(arn:, field_to_match:, text_transformations:) ⇒ RegexPatternSetReferenceStatementProperty
constructor
A new instance of RegexPatternSetReferenceStatementProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(arn:, field_to_match:, text_transformations:) ⇒ RegexPatternSetReferenceStatementProperty
Returns a new instance of RegexPatternSetReferenceStatementProperty.
4816 4817 4818 4819 4820 4821 4822 4823 |
# File 'wa_fv2/cfn_web_acl.rb', line 4816 def initialize(arn:, field_to_match:, text_transformations:) @arn = arn Jsii::Type.check_type(@arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arn") @field_to_match = field_to_match.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::FieldToMatchProperty.new(**field_to_match.transform_keys(&:to_sym)) : field_to_match Jsii::Type.check_type(@field_to_match, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuRmllbGRUb01hdGNoUHJvcGVydHkifV19fQ==")), "fieldToMatch") @text_transformations = text_transformations Jsii::Type.check_type(@text_transformations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2FmdjIuQ2ZuV2ViQUNMLlRleHRUcmFuc2Zvcm1hdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "textTransformations") end |
Instance Attribute Details
#arn ⇒ String (readonly)
The Amazon Resource Name (ARN) of the RegexPatternSet that this statement references.
4829 4830 4831 |
# File 'wa_fv2/cfn_web_acl.rb', line 4829 def arn @arn end |
#field_to_match ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::FieldToMatchProperty (readonly)
The part of the web request that you want AWS WAF to inspect.
4834 4835 4836 |
# File 'wa_fv2/cfn_web_acl.rb', line 4834 def field_to_match @field_to_match end |
#text_transformations ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::TextTransformationProperty> (readonly)
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.
If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.
4841 4842 4843 |
# File 'wa_fv2/cfn_web_acl.rb', line 4841 def text_transformations @text_transformations end |
Class Method Details
.jsii_properties ⇒ Object
4843 4844 4845 4846 4847 4848 4849 |
# File 'wa_fv2/cfn_web_acl.rb', line 4843 def self.jsii_properties { :arn => "arn", :field_to_match => "fieldToMatch", :text_transformations => "textTransformations", } end |
Instance Method Details
#to_jsii ⇒ Object
4851 4852 4853 4854 4855 4856 4857 4858 4859 |
# File 'wa_fv2/cfn_web_acl.rb', line 4851 def to_jsii result = {} result.merge!({ "arn" => @arn, "fieldToMatch" => @field_to_match, "textTransformations" => @text_transformations, }) result.compact end |