Class: AWSCDK::WAFv2::CfnWebACL::CustomResponseBodyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::CustomResponseBodyProperty
- Defined in:
- wa_fv2/cfn_web_acl.rb
Overview
The response body to use in a custom response to a web request.
This is referenced by key from CustomResponse CustomResponseBodyKey .
Instance Attribute Summary collapse
-
#content ⇒ String
readonly
The payload of the custom response.
-
#content_type ⇒ String
readonly
The type of content in the payload that you are defining in the
Contentstring.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content:, content_type:) ⇒ CustomResponseBodyProperty
constructor
A new instance of CustomResponseBodyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content:, content_type:) ⇒ CustomResponseBodyProperty
Returns a new instance of CustomResponseBodyProperty.
2088 2089 2090 2091 2092 2093 |
# File 'wa_fv2/cfn_web_acl.rb', line 2088 def initialize(content:, content_type:) @content = content Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "content") @content_type = content_type Jsii::Type.check_type(@content_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentType") end |
Instance Attribute Details
#content ⇒ String (readonly)
The payload of the custom response.
You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType setting.
For information about the limits on count and size for custom request and response settings, see AWS WAF quotas in the AWS WAF Developer Guide .
2103 2104 2105 |
# File 'wa_fv2/cfn_web_acl.rb', line 2103 def content @content end |
#content_type ⇒ String (readonly)
The type of content in the payload that you are defining in the Content string.
2108 2109 2110 |
# File 'wa_fv2/cfn_web_acl.rb', line 2108 def content_type @content_type end |
Class Method Details
.jsii_properties ⇒ Object
2110 2111 2112 2113 2114 2115 |
# File 'wa_fv2/cfn_web_acl.rb', line 2110 def self.jsii_properties { :content => "content", :content_type => "contentType", } end |
Instance Method Details
#to_jsii ⇒ Object
2117 2118 2119 2120 2121 2122 2123 2124 |
# File 'wa_fv2/cfn_web_acl.rb', line 2117 def to_jsii result = {} result.merge!({ "content" => @content, "contentType" => @content_type, }) result.compact end |