/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the wafv2-2019-07-29.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.WAFV2.Model { /// /// Inspect the body of the web request as JSON. The body immediately follows the request /// headers. /// /// /// /// This is used to indicate the web request component to inspect, in the FieldToMatch /// specification. /// /// /// /// Use the specifications in this object to indicate which parts of the JSON body to /// inspect using the rule's inspection criteria. WAF inspects only the parts of the JSON /// that result from the matches that you indicate. /// /// /// /// Example JSON: "JsonBody": { "MatchPattern": { "All": {} }, "MatchScope": "ALL" /// } /// /// public partial class JsonBody { private BodyParsingFallbackBehavior _invalidFallbackBehavior; private JsonMatchPattern _matchPattern; private JsonMatchScope _matchScope; private OversizeHandling _oversizeHandling; /// /// Gets and sets the property InvalidFallbackBehavior. /// /// What WAF should do if it fails to completely parse the JSON body. The options are /// the following: /// /// /// /// If you don't provide this setting, WAF parses and evaluates the content only up to /// the first parsing failure that it encounters. /// /// /// /// WAF does its best to parse the entire JSON body, but might be forced to stop for reasons /// such as invalid characters, duplicate keys, truncation, and any content whose root /// node isn't an object or an array. /// /// /// /// WAF parses the JSON in the following examples as two valid key, value pairs: /// /// /// public BodyParsingFallbackBehavior InvalidFallbackBehavior { get { return this._invalidFallbackBehavior; } set { this._invalidFallbackBehavior = value; } } // Check to see if InvalidFallbackBehavior property is set internal bool IsSetInvalidFallbackBehavior() { return this._invalidFallbackBehavior != null; } /// /// Gets and sets the property MatchPattern. /// /// The patterns to look for in the JSON body. WAF inspects the results of these pattern /// matches against the rule inspection criteria. /// /// [AWSProperty(Required=true)] public JsonMatchPattern MatchPattern { get { return this._matchPattern; } set { this._matchPattern = value; } } // Check to see if MatchPattern property is set internal bool IsSetMatchPattern() { return this._matchPattern != null; } /// /// Gets and sets the property MatchScope. /// /// The parts of the JSON to match against using the MatchPattern. If you /// specify All, WAF matches against keys and values. /// /// [AWSProperty(Required=true)] public JsonMatchScope MatchScope { get { return this._matchScope; } set { this._matchScope = value; } } // Check to see if MatchScope property is set internal bool IsSetMatchScope() { return this._matchScope != null; } /// /// Gets and sets the property OversizeHandling. /// /// What WAF should do if the body is larger than WAF can inspect. WAF does not support /// inspecting the entire contents of the web request body if the body exceeds the limit /// for the resource type. If the body is larger than the limit, the underlying host service /// only forwards the contents that are below the limit to WAF for inspection. /// /// /// /// The default limit is 8 KB (8,192 kilobytes) for regional resources and 16 KB (16,384 /// kilobytes) for CloudFront distributions. For CloudFront distributions, you can increase /// the limit in the web ACL AssociationConfig, for additional processing /// fees. /// /// /// /// The options for oversize handling are the following: /// /// /// /// You can combine the MATCH or NO_MATCH settings for oversize /// handling with your rule and web ACL action settings, so that you block any request /// whose body is over the limit. /// /// /// /// Default: CONTINUE /// /// public OversizeHandling OversizeHandling { get { return this._oversizeHandling; } set { this._oversizeHandling = value; } } // Check to see if OversizeHandling property is set internal bool IsSetOversizeHandling() { return this._oversizeHandling != null; } } }