Class: AWSCDK::WAFv2::CfnWebACL::CustomHTTPHeaderProperty

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

Overview

A custom header for custom request and response handling.

This is used in CustomResponse and CustomRequestHandling .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ CustomHTTPHeaderProperty

Returns a new instance of CustomHTTPHeaderProperty.

Parameters:

  • name (String)

    The name of the custom header.

  • value (String)

    The value of the custom header.



2002
2003
2004
2005
2006
2007
# File 'wa_fv2/cfn_web_acl.rb', line 2002

def initialize(name:, value:)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
end

Instance Attribute Details

#nameString (readonly)

The name of the custom header.

For custom request header insertion, when AWS WAF inserts the header into the request, it prefixes this name x-amzn-waf- , to avoid confusion with the headers that are already in the request. For example, for the header name sample , AWS WAF inserts the header x-amzn-waf-sample .



2015
2016
2017
# File 'wa_fv2/cfn_web_acl.rb', line 2015

def name
  @name
end

#valueString (readonly)

The value of the custom header.



2020
2021
2022
# File 'wa_fv2/cfn_web_acl.rb', line 2020

def value
  @value
end

Class Method Details

.jsii_propertiesObject



2022
2023
2024
2025
2026
2027
# File 'wa_fv2/cfn_web_acl.rb', line 2022

def self.jsii_properties
  {
    :name => "name",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



2029
2030
2031
2032
2033
2034
2035
2036
# File 'wa_fv2/cfn_web_acl.rb', line 2029

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