/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace WAFV2 { namespace Model { /** *

Inspect all headers in the web request. You can specify the parts of the * headers to inspect and you can narrow the set of headers to inspect by including * or excluding specific keys.

This is used to indicate the web request * component to inspect, in the FieldToMatch specification.

If you * want to inspect just the value of a single header, use the * SingleHeader FieldToMatch setting instead.

*

Example JSON: "Headers": { "MatchPattern": { "All": {} }, "MatchScope": * "KEY", "OversizeHandling": "MATCH" }

See Also:

AWS API * Reference

*/ class Headers { public: AWS_WAFV2_API Headers(); AWS_WAFV2_API Headers(Aws::Utils::Json::JsonView jsonValue); AWS_WAFV2_API Headers& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The filter to use to identify the subset of headers to inspect in a web * request.

You must specify exactly one setting: either All, * IncludedHeaders, or ExcludedHeaders.

Example * JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", * "KeyToExclude2" ] }

*/ inline const HeaderMatchPattern& GetMatchPattern() const{ return m_matchPattern; } /** *

The filter to use to identify the subset of headers to inspect in a web * request.

You must specify exactly one setting: either All, * IncludedHeaders, or ExcludedHeaders.

Example * JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", * "KeyToExclude2" ] }

*/ inline bool MatchPatternHasBeenSet() const { return m_matchPatternHasBeenSet; } /** *

The filter to use to identify the subset of headers to inspect in a web * request.

You must specify exactly one setting: either All, * IncludedHeaders, or ExcludedHeaders.

Example * JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", * "KeyToExclude2" ] }

*/ inline void SetMatchPattern(const HeaderMatchPattern& value) { m_matchPatternHasBeenSet = true; m_matchPattern = value; } /** *

The filter to use to identify the subset of headers to inspect in a web * request.

You must specify exactly one setting: either All, * IncludedHeaders, or ExcludedHeaders.

Example * JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", * "KeyToExclude2" ] }

*/ inline void SetMatchPattern(HeaderMatchPattern&& value) { m_matchPatternHasBeenSet = true; m_matchPattern = std::move(value); } /** *

The filter to use to identify the subset of headers to inspect in a web * request.

You must specify exactly one setting: either All, * IncludedHeaders, or ExcludedHeaders.

Example * JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", * "KeyToExclude2" ] }

*/ inline Headers& WithMatchPattern(const HeaderMatchPattern& value) { SetMatchPattern(value); return *this;} /** *

The filter to use to identify the subset of headers to inspect in a web * request.

You must specify exactly one setting: either All, * IncludedHeaders, or ExcludedHeaders.

Example * JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", * "KeyToExclude2" ] }

*/ inline Headers& WithMatchPattern(HeaderMatchPattern&& value) { SetMatchPattern(std::move(value)); return *this;} /** *

The parts of the headers to match with the rule inspection criteria. If you * specify All, WAF inspects both keys and values.

*/ inline const MapMatchScope& GetMatchScope() const{ return m_matchScope; } /** *

The parts of the headers to match with the rule inspection criteria. If you * specify All, WAF inspects both keys and values.

*/ inline bool MatchScopeHasBeenSet() const { return m_matchScopeHasBeenSet; } /** *

The parts of the headers to match with the rule inspection criteria. If you * specify All, WAF inspects both keys and values.

*/ inline void SetMatchScope(const MapMatchScope& value) { m_matchScopeHasBeenSet = true; m_matchScope = value; } /** *

The parts of the headers to match with the rule inspection criteria. If you * specify All, WAF inspects both keys and values.

*/ inline void SetMatchScope(MapMatchScope&& value) { m_matchScopeHasBeenSet = true; m_matchScope = std::move(value); } /** *

The parts of the headers to match with the rule inspection criteria. If you * specify All, WAF inspects both keys and values.

*/ inline Headers& WithMatchScope(const MapMatchScope& value) { SetMatchScope(value); return *this;} /** *

The parts of the headers to match with the rule inspection criteria. If you * specify All, WAF inspects both keys and values.

*/ inline Headers& WithMatchScope(MapMatchScope&& value) { SetMatchScope(std::move(value)); return *this;} /** *

What WAF should do if the headers of the request are more numerous or larger * than WAF can inspect. WAF does not support inspecting the entire contents of * request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The * underlying host service forwards a maximum of 200 headers and at most 8 KB of * header contents to WAF.

The options for oversize handling are the * following:

  • CONTINUE - Inspect the available * headers normally, according to the rule inspection criteria.

  • * MATCH - Treat the web request as matching the rule statement. WAF * applies the rule action to the request.

  • NO_MATCH * - Treat the web request as not matching the rule statement.

*/ inline const OversizeHandling& GetOversizeHandling() const{ return m_oversizeHandling; } /** *

What WAF should do if the headers of the request are more numerous or larger * than WAF can inspect. WAF does not support inspecting the entire contents of * request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The * underlying host service forwards a maximum of 200 headers and at most 8 KB of * header contents to WAF.

The options for oversize handling are the * following:

  • CONTINUE - Inspect the available * headers normally, according to the rule inspection criteria.

  • * MATCH - Treat the web request as matching the rule statement. WAF * applies the rule action to the request.

  • NO_MATCH * - Treat the web request as not matching the rule statement.

*/ inline bool OversizeHandlingHasBeenSet() const { return m_oversizeHandlingHasBeenSet; } /** *

What WAF should do if the headers of the request are more numerous or larger * than WAF can inspect. WAF does not support inspecting the entire contents of * request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The * underlying host service forwards a maximum of 200 headers and at most 8 KB of * header contents to WAF.

The options for oversize handling are the * following:

  • CONTINUE - Inspect the available * headers normally, according to the rule inspection criteria.

  • * MATCH - Treat the web request as matching the rule statement. WAF * applies the rule action to the request.

  • NO_MATCH * - Treat the web request as not matching the rule statement.

*/ inline void SetOversizeHandling(const OversizeHandling& value) { m_oversizeHandlingHasBeenSet = true; m_oversizeHandling = value; } /** *

What WAF should do if the headers of the request are more numerous or larger * than WAF can inspect. WAF does not support inspecting the entire contents of * request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The * underlying host service forwards a maximum of 200 headers and at most 8 KB of * header contents to WAF.

The options for oversize handling are the * following:

  • CONTINUE - Inspect the available * headers normally, according to the rule inspection criteria.

  • * MATCH - Treat the web request as matching the rule statement. WAF * applies the rule action to the request.

  • NO_MATCH * - Treat the web request as not matching the rule statement.

*/ inline void SetOversizeHandling(OversizeHandling&& value) { m_oversizeHandlingHasBeenSet = true; m_oversizeHandling = std::move(value); } /** *

What WAF should do if the headers of the request are more numerous or larger * than WAF can inspect. WAF does not support inspecting the entire contents of * request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The * underlying host service forwards a maximum of 200 headers and at most 8 KB of * header contents to WAF.

The options for oversize handling are the * following:

  • CONTINUE - Inspect the available * headers normally, according to the rule inspection criteria.

  • * MATCH - Treat the web request as matching the rule statement. WAF * applies the rule action to the request.

  • NO_MATCH * - Treat the web request as not matching the rule statement.

*/ inline Headers& WithOversizeHandling(const OversizeHandling& value) { SetOversizeHandling(value); return *this;} /** *

What WAF should do if the headers of the request are more numerous or larger * than WAF can inspect. WAF does not support inspecting the entire contents of * request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The * underlying host service forwards a maximum of 200 headers and at most 8 KB of * header contents to WAF.

The options for oversize handling are the * following:

  • CONTINUE - Inspect the available * headers normally, according to the rule inspection criteria.

  • * MATCH - Treat the web request as matching the rule statement. WAF * applies the rule action to the request.

  • NO_MATCH * - Treat the web request as not matching the rule statement.

*/ inline Headers& WithOversizeHandling(OversizeHandling&& value) { SetOversizeHandling(std::move(value)); return *this;} private: HeaderMatchPattern m_matchPattern; bool m_matchPatternHasBeenSet = false; MapMatchScope m_matchScope; bool m_matchScopeHasBeenSet = false; OversizeHandling m_oversizeHandling; bool m_oversizeHandlingHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws