Class CfnWebACL.RateBasedStatementCustomKeyProperty
Specifies a single custom aggregate key for a rate-base rule.
Inheritance
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RateBasedStatementCustomKeyProperty : Object, CfnWebACL.IRateBasedStatementCustomKeyProperty
Syntax (vb)
Public Class RateBasedStatementCustomKeyProperty
Inherits Object
Implements CfnWebACL.IRateBasedStatementCustomKeyProperty
Remarks
Web requests that are missing any of the components specified in the aggregation keys are omitted from the rate-based rule evaluation and handling.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAFv2;
var forwardedIp;
var httpMethod;
var ip;
var rateBasedStatementCustomKeyProperty = new RateBasedStatementCustomKeyProperty {
Cookie = new RateLimitCookieProperty {
Name = "name",
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
},
ForwardedIp = forwardedIp,
Header = new RateLimitHeaderProperty {
Name = "name",
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
},
HttpMethod = httpMethod,
Ip = ip,
LabelNamespace = new RateLimitLabelNamespaceProperty {
Namespace = "namespace"
},
QueryArgument = new RateLimitQueryArgumentProperty {
Name = "name",
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
},
QueryString = new RateLimitQueryStringProperty {
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
},
UriPath = new RateLimitUriPathProperty {
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
}
};
Synopsis
Constructors
RateBasedStatementCustomKeyProperty() |
Properties
Cookie | Use the value of a cookie in the request as an aggregate key. |
ForwardedIp | Use the first IP address in an HTTP header as an aggregate key. |
Header | Use the value of a header in the request as an aggregate key. |
HttpMethod | Use the request's HTTP method as an aggregate key. |
Ip | Use the request's originating IP address as an aggregate key. Each distinct IP address contributes to the aggregation instance. |
LabelNamespace | Use the specified label namespace as an aggregate key. |
QueryArgument | Use the specified query argument as an aggregate key. |
QueryString | Use the request's query string as an aggregate key. |
UriPath | Use the request's URI path as an aggregate key. |
Constructors
RateBasedStatementCustomKeyProperty()
public RateBasedStatementCustomKeyProperty()
Properties
Cookie
Use the value of a cookie in the request as an aggregate key.
public object Cookie { get; set; }
Property Value
System.Object
Remarks
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.
ForwardedIp
Use the first IP address in an HTTP header as an aggregate key.
public object ForwardedIp { get; set; }
Property Value
System.Object
Remarks
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.
Header
Use the value of a header in the request as an aggregate key.
public object Header { get; set; }
Property Value
System.Object
Remarks
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.
HttpMethod
Use the request's HTTP method as an aggregate key.
public object HttpMethod { get; set; }
Property Value
System.Object
Remarks
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.
Ip
Use the request's originating IP address as an aggregate key. Each distinct IP address contributes to the aggregation instance.
public object Ip { get; set; }
Property Value
System.Object
Remarks
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
.
LabelNamespace
Use the specified label namespace as an aggregate key.
public object LabelNamespace { get; set; }
Property Value
System.Object
Remarks
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 AWS WAF Developer Guide .
QueryArgument
Use the specified query argument as an aggregate key.
public object QueryArgument { get; set; }
Property Value
System.Object
Remarks
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.
QueryString
Use the request's query string as an aggregate key.
public object QueryString { get; set; }
Property Value
System.Object
Remarks
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.
UriPath
Use the request's URI path as an aggregate key.
public object UriPath { get; set; }
Property Value
System.Object
Remarks
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.