Class: AWSCDK::WAFv2::CfnWebACL::BlockActionProperty

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

Overview

Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request.

This is used in the context of other settings, for example to specify values for a rule action or a web ACL default action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(custom_response: nil) ⇒ BlockActionProperty

Returns a new instance of BlockActionProperty.

Parameters:



1302
1303
1304
1305
# File 'wa_fv2/cfn_web_acl.rb', line 1302

def initialize(custom_response: nil)
  @custom_response = custom_response.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::CustomResponseProperty.new(**custom_response.transform_keys(&:to_sym)) : custom_response
  Jsii::Type.check_type(@custom_response, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuQ3VzdG9tUmVzcG9uc2VQcm9wZXJ0eSJ9XX19")), "customResponse") unless @custom_response.nil?
end

Instance Attribute Details

#custom_responseAWSCDK::IResolvable, ... (readonly)

Defines a custom response for the web request.

For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .



1313
1314
1315
# File 'wa_fv2/cfn_web_acl.rb', line 1313

def custom_response
  @custom_response
end

Class Method Details

.jsii_propertiesObject



1315
1316
1317
1318
1319
# File 'wa_fv2/cfn_web_acl.rb', line 1315

def self.jsii_properties
  {
    :custom_response => "customResponse",
  }
end

Instance Method Details

#to_jsiiObject



1321
1322
1323
1324
1325
1326
1327
# File 'wa_fv2/cfn_web_acl.rb', line 1321

def to_jsii
  result = {}
  result.merge!({
    "customResponse" => @custom_response,
  })
  result.compact
end