Class: AWSCDK::WAFv2::CfnRuleGroup::CustomHTTPHeaderProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wa_fv2/cfn_rule_group.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.



1331
1332
1333
1334
1335
1336
# File 'wa_fv2/cfn_rule_group.rb', line 1331

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 .



1344
1345
1346
# File 'wa_fv2/cfn_rule_group.rb', line 1344

def name
  @name
end

#valueString (readonly)

The value of the custom header.



1349
1350
1351
# File 'wa_fv2/cfn_rule_group.rb', line 1349

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1351
1352
1353
1354
1355
1356
# File 'wa_fv2/cfn_rule_group.rb', line 1351

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

Instance Method Details

#to_jsiiObject



1358
1359
1360
1361
1362
1363
1364
1365
# File 'wa_fv2/cfn_rule_group.rb', line 1358

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