Class: AWSCDK::ElasticLoadBalancingv2::CfnListenerRule::HttpHeaderConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancingv2/cfn_listener_rule.rb

Overview

Information about an HTTP header condition.

There is a set of standard HTTP header fields. You can also define custom HTTP header fields.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_header_name: nil, regex_values: nil, values: nil) ⇒ HttpHeaderConfigProperty

Returns a new instance of HttpHeaderConfigProperty.

Parameters:

  • http_header_name (String, nil) (defaults to: nil)

    The name of the HTTP header field.

  • regex_values (Array<String>, nil) (defaults to: nil)
  • values (Array<String>, nil) (defaults to: nil)

    The strings to compare against the value of the HTTP header.



1118
1119
1120
1121
1122
1123
1124
1125
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1118

def initialize(http_header_name: nil, regex_values: nil, values: nil)
  @http_header_name = http_header_name
  Jsii::Type.check_type(@http_header_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "httpHeaderName") unless @http_header_name.nil?
  @regex_values = regex_values
  Jsii::Type.check_type(@regex_values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "regexValues") unless @regex_values.nil?
  @values = values
  Jsii::Type.check_type(@values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "values") unless @values.nil?
end

Instance Attribute Details

#http_header_nameString? (readonly)

The name of the HTTP header field.

The maximum size is 40 characters. The header name is case insensitive. The allowed characters are specified by RFC 7230. Wildcards are not supported.



1133
1134
1135
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1133

def http_header_name
  @http_header_name
end

#regex_valuesArray<String>? (readonly)



1136
1137
1138
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1136

def regex_values
  @regex_values
end

#valuesArray<String>? (readonly)

The strings to compare against the value of the HTTP header.

The maximum length of each string is 128 characters. The comparison strings are case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).

If the same header appears multiple times in the request, we search them in order until a match is found.

If you specify multiple strings, the condition is satisfied if one of the strings matches the value of the HTTP header. To require that all of the strings are a match, create one condition per string.



1147
1148
1149
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1147

def values
  @values
end

Class Method Details

.jsii_propertiesObject



1149
1150
1151
1152
1153
1154
1155
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1149

def self.jsii_properties
  {
    :http_header_name => "httpHeaderName",
    :regex_values => "regexValues",
    :values => "values",
  }
end

Instance Method Details

#to_jsiiObject



1157
1158
1159
1160
1161
1162
1163
1164
1165
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1157

def to_jsii
  result = {}
  result.merge!({
    "httpHeaderName" => @http_header_name,
    "regexValues" => @regex_values,
    "values" => @values,
  })
  result.compact
end