/*
* 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
{
///
/// The part of the web request that you want WAF to inspect. Include the single FieldToMatch
/// type that you want to inspect, with additional specifications as needed, according
/// to the type. You specify a single request component in FieldToMatch
for
/// each rule statement that requires it. To inspect more than one component of the web
/// request, create a separate rule statement for each component.
///
///
///
/// Example JSON for a QueryString
field to match:
///
///
///
/// "FieldToMatch": { "QueryString": {} }
///
///
///
/// Example JSON for a Method
field to match specification:
///
///
///
/// "FieldToMatch": { "Method": { "Name": "DELETE" } }
///
///
public partial class FieldToMatch
{
private AllQueryArguments _allQueryArguments;
private Body _body;
private Cookies _cookies;
private HeaderOrder _headerOrder;
private Headers _headers;
private JsonBody _jsonBody;
private Method _method;
private QueryString _queryString;
private SingleHeader _singleHeader;
private SingleQueryArgument _singleQueryArgument;
private UriPath _uriPath;
///
/// Gets and sets the property AllQueryArguments.
///
/// Inspect all query arguments.
///
///
public AllQueryArguments AllQueryArguments
{
get { return this._allQueryArguments; }
set { this._allQueryArguments = value; }
}
// Check to see if AllQueryArguments property is set
internal bool IsSetAllQueryArguments()
{
return this._allQueryArguments != null;
}
///
/// Gets and sets the property Body.
///
/// Inspect the request body as plain text. The request body immediately follows the request
/// headers. This is the part of a request that contains any additional data that you
/// want to send to your web server as the HTTP request body, such as data from a form.
///
///
///
///
/// A limited amount of the request body is forwarded to WAF for inspection by the underlying
/// host service. For regional resources, the limit is 8 KB (8,192 kilobytes) and for
/// CloudFront distributions, the limit is 16 KB (16,384 kilobytes). For CloudFront distributions,
/// you can increase the limit in the web ACL's AssociationConfig
, for additional
/// processing fees.
///
///
///
/// For information about how to handle oversized request bodies, see the Body
/// object configuration.
///
///
public Body Body
{
get { return this._body; }
set { this._body = value; }
}
// Check to see if Body property is set
internal bool IsSetBody()
{
return this._body != null;
}
///
/// Gets and sets the property Cookies.
///
/// Inspect the request cookies. You must configure scope and pattern matching filters
/// in the Cookies
object, to define the set of cookies and the parts of
/// the cookies that WAF inspects.
///
///
///
/// Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies
/// are forwarded to WAF for inspection by the underlying host service. You must configure
/// how to handle any oversize cookie content in the Cookies
object. WAF
/// applies the pattern matching filters to the cookies that it receives from the underlying
/// host service.
///
///
public Cookies Cookies
{
get { return this._cookies; }
set { this._cookies = value; }
}
// Check to see if Cookies property is set
internal bool IsSetCookies()
{
return this._cookies != null;
}
///
/// Gets and sets the property HeaderOrder.
///
/// Inspect a string containing the list of the request's header names, ordered as they
/// appear in the web request that WAF receives for inspection. WAF generates the string
/// and then uses that as the field to match component in its inspection. WAF separates
/// the header names in the string using colons and no added spaces, for example host:user-agent:accept:authorization:referer
.
///
///
public HeaderOrder HeaderOrder
{
get { return this._headerOrder; }
set { this._headerOrder = value; }
}
// Check to see if HeaderOrder property is set
internal bool IsSetHeaderOrder()
{
return this._headerOrder != null;
}
///
/// Gets and sets the property Headers.
///
/// Inspect the request headers. You must configure scope and pattern matching filters
/// in the Headers
object, to define the set of headers to and the parts
/// of the headers that WAF inspects.
///
///
///
/// Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers
/// are forwarded to WAF for inspection by the underlying host service. You must configure
/// how to handle any oversize header content in the Headers
object. WAF
/// applies the pattern matching filters to the headers that it receives from the underlying
/// host service.
///
///
public Headers Headers
{
get { return this._headers; }
set { this._headers = value; }
}
// Check to see if Headers property is set
internal bool IsSetHeaders()
{
return this._headers != null;
}
///
/// Gets and sets the property JsonBody.
///
/// Inspect the request body as JSON. The request body immediately follows the request
/// headers. This is the part of a request that contains any additional data that you
/// want to send to your web server as the HTTP request body, such as data from a form.
///
///
///
///
/// A limited amount of the request body is forwarded to WAF for inspection by the underlying
/// host service. For regional resources, the limit is 8 KB (8,192 kilobytes) and for
/// CloudFront distributions, the limit is 16 KB (16,384 kilobytes). For CloudFront distributions,
/// you can increase the limit in the web ACL's AssociationConfig
, for additional
/// processing fees.
///
///
///
/// For information about how to handle oversized request bodies, see the JsonBody
/// object configuration.
///
///
public JsonBody JsonBody
{
get { return this._jsonBody; }
set { this._jsonBody = value; }
}
// Check to see if JsonBody property is set
internal bool IsSetJsonBody()
{
return this._jsonBody != null;
}
///
/// Gets and sets the property Method.
///
/// Inspect the HTTP method. The method indicates the type of operation that the request
/// is asking the origin to perform.
///
///
public Method Method
{
get { return this._method; }
set { this._method = value; }
}
// Check to see if Method property is set
internal bool IsSetMethod()
{
return this._method != null;
}
///
/// Gets and sets the property QueryString.
///
/// Inspect the query string. This is the part of a URL that appears after a ?
/// character, if any.
///
///
public QueryString QueryString
{
get { return this._queryString; }
set { this._queryString = value; }
}
// Check to see if QueryString property is set
internal bool IsSetQueryString()
{
return this._queryString != null;
}
///
/// Gets and sets the property SingleHeader.
///
/// Inspect a single header. Provide the name of the header to inspect, for example, User-Agent
/// or Referer
. This setting isn't case sensitive.
///
///
///
/// Example JSON: "SingleHeader": { "Name": "haystack" }
///
///
///
/// Alternately, you can filter and inspect all headers with the Headers
/// FieldToMatch
setting.
///
///
public SingleHeader SingleHeader
{
get { return this._singleHeader; }
set { this._singleHeader = value; }
}
// Check to see if SingleHeader property is set
internal bool IsSetSingleHeader()
{
return this._singleHeader != null;
}
///
/// Gets and sets the property SingleQueryArgument.
///
/// Inspect a single query argument. Provide the name of the query argument to inspect,
/// such as UserName or SalesRegion. The name can be up to 30 characters
/// long and isn't case sensitive.
///
///
///
/// Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
///
///
public SingleQueryArgument SingleQueryArgument
{
get { return this._singleQueryArgument; }
set { this._singleQueryArgument = value; }
}
// Check to see if SingleQueryArgument property is set
internal bool IsSetSingleQueryArgument()
{
return this._singleQueryArgument != null;
}
///
/// Gets and sets the property UriPath.
///
/// Inspect the request URI path. This is the part of the web request that identifies
/// a resource, for example, /images/daily-ad.jpg
.
///
///
public UriPath UriPath
{
get { return this._uriPath; }
set { this._uriPath = value; }
}
// Check to see if UriPath property is set
internal bool IsSetUriPath()
{
return this._uriPath != null;
}
}
}