Class: AWSCDK::WAFv2::CfnWebACL::RegexMatchStatementProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::RegexMatchStatementProperty
- Defined in:
- wa_fv2/cfn_web_acl.rb
Overview
A rule statement used to search web request components for a match against a single regular expression.
Instance Attribute Summary collapse
-
#field_to_match ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::FieldToMatchProperty
readonly
The part of the web request that you want AWS WAF to inspect.
-
#regex_string ⇒ String
readonly
The string representing the regular expression.
-
#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(field_to_match:, regex_string:, text_transformations:) ⇒ RegexMatchStatementProperty
constructor
A new instance of RegexMatchStatementProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(field_to_match:, regex_string:, text_transformations:) ⇒ RegexMatchStatementProperty
Returns a new instance of RegexMatchStatementProperty.
4757 4758 4759 4760 4761 4762 4763 4764 |
# File 'wa_fv2/cfn_web_acl.rb', line 4757 def initialize(field_to_match:, regex_string:, text_transformations:) @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") @regex_string = regex_string Jsii::Type.check_type(@regex_string, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "regexString") @text_transformations = text_transformations Jsii::Type.check_type(@text_transformations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2FmdjIuQ2ZuV2ViQUNMLlRleHRUcmFuc2Zvcm1hdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "textTransformations") end |
Instance Attribute Details
#field_to_match ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::FieldToMatchProperty (readonly)
The part of the web request that you want AWS WAF to inspect.
4770 4771 4772 |
# File 'wa_fv2/cfn_web_acl.rb', line 4770 def field_to_match @field_to_match end |
#regex_string ⇒ String (readonly)
The string representing the regular expression.
4775 4776 4777 |
# File 'wa_fv2/cfn_web_acl.rb', line 4775 def regex_string @regex_string 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.
4782 4783 4784 |
# File 'wa_fv2/cfn_web_acl.rb', line 4782 def text_transformations @text_transformations end |
Class Method Details
.jsii_properties ⇒ Object
4784 4785 4786 4787 4788 4789 4790 |
# File 'wa_fv2/cfn_web_acl.rb', line 4784 def self.jsii_properties { :field_to_match => "fieldToMatch", :regex_string => "regexString", :text_transformations => "textTransformations", } end |
Instance Method Details
#to_jsii ⇒ Object
4792 4793 4794 4795 4796 4797 4798 4799 4800 |
# File 'wa_fv2/cfn_web_acl.rb', line 4792 def to_jsii result = {} result.merge!({ "fieldToMatch" => @field_to_match, "regexString" => @regex_string, "textTransformations" => @text_transformations, }) result.compact end |