Class: AWSCDK::WAFv2::CfnWebACL::ResponseInspectionBodyContainsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wa_fv2/cfn_web_acl.rb

Overview

Configures inspection of the response body.

AWS WAF can inspect the first 65,536 bytes (64 KB) of the response body. This is part of the ResponseInspection configuration for AWSManagedRulesATPRuleSet and AWSManagedRulesACFPRuleSet .

Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(failure_strings:, success_strings:) ⇒ ResponseInspectionBodyContainsProperty

Returns a new instance of ResponseInspectionBodyContainsProperty.

Parameters:

  • failure_strings (Array<String>)

    Strings in the body of the response that indicate a failed login or account creation attempt.

  • success_strings (Array<String>)

    Strings in the body of the response that indicate a successful login or account creation attempt.



5174
5175
5176
5177
5178
5179
# File 'wa_fv2/cfn_web_acl.rb', line 5174

def initialize(failure_strings:, success_strings:)
  @failure_strings = failure_strings
  Jsii::Type.check_type(@failure_strings, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "failureStrings")
  @success_strings = success_strings
  Jsii::Type.check_type(@success_strings, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "successStrings")
end

Instance Attribute Details

#failure_stringsArray<String> (readonly)

Strings in the body of the response that indicate a failed login or account creation attempt.

To be counted as a failure, the string can be anywhere in the body and must be an exact match, including case. Each string must be unique among the success and failure strings.

JSON example: "FailureStrings": [ "Request failed" ]



5189
5190
5191
# File 'wa_fv2/cfn_web_acl.rb', line 5189

def failure_strings
  @failure_strings
end

#success_stringsArray<String> (readonly)

Strings in the body of the response that indicate a successful login or account creation attempt.

To be counted as a success, the string can be anywhere in the body and must be an exact match, including case. Each string must be unique among the success and failure strings.

JSON examples: "SuccessStrings": [ "Login successful" ] and "SuccessStrings": [ "Account creation successful", "Welcome to our site!" ]



5198
5199
5200
# File 'wa_fv2/cfn_web_acl.rb', line 5198

def success_strings
  @success_strings
end

Class Method Details

.jsii_propertiesObject



5200
5201
5202
5203
5204
5205
# File 'wa_fv2/cfn_web_acl.rb', line 5200

def self.jsii_properties
  {
    :failure_strings => "failureStrings",
    :success_strings => "successStrings",
  }
end

Instance Method Details

#to_jsiiObject



5207
5208
5209
5210
5211
5212
5213
5214
# File 'wa_fv2/cfn_web_acl.rb', line 5207

def to_jsii
  result = {}
  result.merge!({
    "failureStrings" => @failure_strings,
    "successStrings" => @success_strings,
  })
  result.compact
end