/* * 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 { /// /// Specifies a single custom aggregate key for a rate-base rule. /// /// /// /// Web requests that are missing any of the components specified in the aggregation keys /// are omitted from the rate-based rule evaluation and handling. /// /// /// public partial class RateBasedStatementCustomKey { private RateLimitCookie _cookie; private RateLimitForwardedIP _forwardedIP; private RateLimitHeader _header; private RateLimitHTTPMethod _httpMethod; private RateLimitIP _ip; private RateLimitLabelNamespace _labelNamespace; private RateLimitQueryArgument _queryArgument; private RateLimitQueryString _queryString; private RateLimitUriPath _uriPath; /// /// Gets and sets the property Cookie. /// /// Use the value of a cookie in the request as an aggregate key. Each distinct value /// in the cookie contributes to the aggregation instance. If you use a single cookie /// as your custom key, then each value fully defines an aggregation instance. /// /// public RateLimitCookie Cookie { get { return this._cookie; } set { this._cookie = value; } } // Check to see if Cookie property is set internal bool IsSetCookie() { return this._cookie != null; } /// /// Gets and sets the property ForwardedIP. /// /// Use the first IP address in an HTTP header as an aggregate key. Each distinct forwarded /// IP address contributes to the aggregation instance. /// /// /// /// When you specify an IP or forwarded IP in the custom key settings, you must also specify /// at least one other key to use. You can aggregate on only the forwarded IP address /// by specifying FORWARDED_IP in your rate-based statement's AggregateKeyType. /// /// /// /// /// With this option, you must specify the header to use in the rate-based rule's ForwardedIPConfig /// property. /// /// public RateLimitForwardedIP ForwardedIP { get { return this._forwardedIP; } set { this._forwardedIP = value; } } // Check to see if ForwardedIP property is set internal bool IsSetForwardedIP() { return this._forwardedIP != null; } /// /// Gets and sets the property Header. /// /// Use the value of a header in the request as an aggregate key. Each distinct value /// in the header contributes to the aggregation instance. If you use a single header /// as your custom key, then each value fully defines an aggregation instance. /// /// public RateLimitHeader Header { get { return this._header; } set { this._header = value; } } // Check to see if Header property is set internal bool IsSetHeader() { return this._header != null; } /// /// Gets and sets the property HTTPMethod. /// /// Use the request's HTTP method as an aggregate key. Each distinct HTTP method contributes /// to the aggregation instance. If you use just the HTTP method as your custom key, then /// each method fully defines an aggregation instance. /// /// public RateLimitHTTPMethod HTTPMethod { get { return this._httpMethod; } set { this._httpMethod = value; } } // Check to see if HTTPMethod property is set internal bool IsSetHTTPMethod() { return this._httpMethod != null; } /// /// Gets and sets the property IP. /// /// Use the request's originating IP address as an aggregate key. Each distinct IP address /// contributes to the aggregation instance. /// /// /// /// When you specify an IP or forwarded IP in the custom key settings, you must also specify /// at least one other key to use. You can aggregate on only the IP address by specifying /// IP in your rate-based statement's AggregateKeyType. /// /// public RateLimitIP IP { get { return this._ip; } set { this._ip = value; } } // Check to see if IP property is set internal bool IsSetIP() { return this._ip != null; } /// /// Gets and sets the property LabelNamespace. /// /// Use the specified label namespace as an aggregate key. Each distinct fully qualified /// label name that has the specified label namespace contributes to the aggregation instance. /// If you use just one label namespace as your custom key, then each label name fully /// defines an aggregation instance. /// /// /// /// This uses only labels that have been added to the request by rules that are evaluated /// before this rate-based rule in the web ACL. /// /// /// /// For information about label namespaces and names, see Label /// syntax and naming requirements in the WAF Developer Guide. /// /// public RateLimitLabelNamespace LabelNamespace { get { return this._labelNamespace; } set { this._labelNamespace = value; } } // Check to see if LabelNamespace property is set internal bool IsSetLabelNamespace() { return this._labelNamespace != null; } /// /// Gets and sets the property QueryArgument. /// /// Use the specified query argument as an aggregate key. Each distinct value for the /// named query argument contributes to the aggregation instance. If you use a single /// query argument as your custom key, then each value fully defines an aggregation instance. /// /// /// public RateLimitQueryArgument QueryArgument { get { return this._queryArgument; } set { this._queryArgument = value; } } // Check to see if QueryArgument property is set internal bool IsSetQueryArgument() { return this._queryArgument != null; } /// /// Gets and sets the property QueryString. /// /// Use the request's query string as an aggregate key. Each distinct string contributes /// to the aggregation instance. If you use just the query string as your custom key, /// then each string fully defines an aggregation instance. /// /// public RateLimitQueryString 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 UriPath. /// /// Use the request's URI path as an aggregate key. Each distinct URI path contributes /// to the aggregation instance. If you use just the URI path as your custom key, then /// each URI path fully defines an aggregation instance. /// /// public RateLimitUriPath UriPath { get { return this._uriPath; } set { this._uriPath = value; } } // Check to see if UriPath property is set internal bool IsSetUriPath() { return this._uriPath != null; } } }