RateBasedStatementCustomKeyProperty Struct
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.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wafv2 as wafv2 } from 'aws-cdk-lib';
declare const asn: any;
declare const forwardedIp: any;
declare const httpMethod: any;
declare const ip: any;
const rateBasedStatementCustomKeyProperty: wafv2.CfnWebACL.RateBasedStatementCustomKeyProperty = {
asn: asn,
cookie: {
name: 'name',
textTransformations: [{
priority: 123,
type: 'type',
}],
},
forwardedIp: forwardedIp,
header: {
name: 'name',
textTransformations: [{
priority: 123,
type: 'type',
}],
},
httpMethod: httpMethod,
ip: ip,
ja3Fingerprint: {
fallbackBehavior: 'fallbackBehavior',
},
ja4Fingerprint: {
fallbackBehavior: 'fallbackBehavior',
},
labelNamespace: {
namespace: 'namespace',
},
queryArgument: {
name: 'name',
textTransformations: [{
priority: 123,
type: 'type',
}],
},
queryString: {
textTransformations: [{
priority: 123,
type: 'type',
}],
},
uriPath: {
textTransformations: [{
priority: 123,
type: 'type',
}],
},
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wafv2 as wafv2
# asn: Any
# forwarded_ip: Any
# http_method: Any
# ip: Any
rate_based_statement_custom_key_property = wafv2.CfnWebACL.RateBasedStatementCustomKeyProperty(
asn=asn,
cookie=wafv2.CfnWebACL.RateLimitCookieProperty(
name="name",
text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
priority=123,
type="type"
)]
),
forwarded_ip=forwarded_ip,
header=wafv2.CfnWebACL.RateLimitHeaderProperty(
name="name",
text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
priority=123,
type="type"
)]
),
http_method=http_method,
ip=ip,
ja3_fingerprint=wafv2.CfnWebACL.RateLimitJA3FingerprintProperty(
fallback_behavior="fallbackBehavior"
),
ja4_fingerprint=wafv2.CfnWebACL.RateLimitJA4FingerprintProperty(
fallback_behavior="fallbackBehavior"
),
label_namespace=wafv2.CfnWebACL.RateLimitLabelNamespaceProperty(
namespace="namespace"
),
query_argument=wafv2.CfnWebACL.RateLimitQueryArgumentProperty(
name="name",
text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
priority=123,
type="type"
)]
),
query_string=wafv2.CfnWebACL.RateLimitQueryStringProperty(
text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
priority=123,
type="type"
)]
),
uri_path=wafv2.CfnWebACL.RateLimitUriPathProperty(
text_transformations=[wafv2.CfnWebACL.TextTransformationProperty(
priority=123,
type="type"
)]
)
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wafv2.*;
Object asn;
Object forwardedIp;
Object httpMethod;
Object ip;
RateBasedStatementCustomKeyProperty rateBasedStatementCustomKeyProperty = RateBasedStatementCustomKeyProperty.builder()
.asn(asn)
.cookie(RateLimitCookieProperty.builder()
.name("name")
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.forwardedIp(forwardedIp)
.header(RateLimitHeaderProperty.builder()
.name("name")
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.httpMethod(httpMethod)
.ip(ip)
.ja3Fingerprint(RateLimitJA3FingerprintProperty.builder()
.fallbackBehavior("fallbackBehavior")
.build())
.ja4Fingerprint(RateLimitJA4FingerprintProperty.builder()
.fallbackBehavior("fallbackBehavior")
.build())
.labelNamespace(RateLimitLabelNamespaceProperty.builder()
.namespace("namespace")
.build())
.queryArgument(RateLimitQueryArgumentProperty.builder()
.name("name")
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.queryString(RateLimitQueryStringProperty.builder()
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.uriPath(RateLimitUriPathProperty.builder()
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.build();
// Install: dotnet add package Amazon.CDK.Lib
// 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 asn;
var forwardedIp;
var httpMethod;
var ip;
var rateBasedStatementCustomKeyProperty = new RateBasedStatementCustomKeyProperty {
Asn = asn,
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,
Ja3Fingerprint = new RateLimitJA3FingerprintProperty {
FallbackBehavior = "fallbackBehavior"
},
Ja4Fingerprint = new RateLimitJA4FingerprintProperty {
FallbackBehavior = "fallbackBehavior"
},
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"
} }
}
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var asn interface{}
var forwardedIp interface{}
var httpMethod interface{}
var ip interface{}
rateBasedStatementCustomKeyProperty := &RateBasedStatementCustomKeyProperty{
Asn: asn,
Cookie: &RateLimitCookieProperty{
Name: jsii.String("name"),
TextTransformations: []interface{}{
&TextTransformationProperty{
Priority: jsii.Number(123),
Type: jsii.String("type"),
},
},
},
ForwardedIp: forwardedIp,
Header: &RateLimitHeaderProperty{
Name: jsii.String("name"),
TextTransformations: []interface{}{
&TextTransformationProperty{
Priority: jsii.Number(123),
Type: jsii.String("type"),
},
},
},
HttpMethod: httpMethod,
Ip: ip,
Ja3Fingerprint: &RateLimitJA3FingerprintProperty{
FallbackBehavior: jsii.String("fallbackBehavior"),
},
Ja4Fingerprint: &RateLimitJA4FingerprintProperty{
FallbackBehavior: jsii.String("fallbackBehavior"),
},
LabelNamespace: &RateLimitLabelNamespaceProperty{
Namespace: jsii.String("namespace"),
},
QueryArgument: &RateLimitQueryArgumentProperty{
Name: jsii.String("name"),
TextTransformations: []interface{}{
&TextTransformationProperty{
Priority: jsii.Number(123),
Type: jsii.String("type"),
},
},
},
QueryString: &RateLimitQueryStringProperty{
TextTransformations: []interface{}{
&TextTransformationProperty{
Priority: jsii.Number(123),
Type: jsii.String("type"),
},
},
},
UriPath: &RateLimitUriPathProperty{
TextTransformations: []interface{}{
&TextTransformationProperty{
Priority: jsii.Number(123),
Type: jsii.String("type"),
},
},
},
}
Properties
Each distinct ASN contributes to the aggregation instance.
cookieoptionalIResolvable | CfnWebACL.cookieoptionaltyping.Union[IResolvable, RateLimitCookieProperty]cookieoptionalIResolvableCookieoptionalIResolvableCookieoptionalinterface{} #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.
forwardedIpoptionalanyforwarded_ipoptionalAnyforwardedIpoptionalObjectForwardedIpoptionalobjectForwardedIpoptionalinterface{} #notes
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.
headeroptionalIResolvable | CfnWebACL.headeroptionaltyping.Union[IResolvable, RateLimitHeaderProperty]headeroptionalIResolvableHeaderoptionalIResolvableHeaderoptionalinterface{} #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.
httpMethodoptionalanyhttp_methodoptionalAnyhttpMethodoptionalObjectHttpMethodoptionalobjectHttpMethodoptionalinterface{} #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.
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 .
ja3FingerprintoptionalIResolvable | CfnWebACL.ja3_fingerprintoptionaltyping.Union[IResolvable, RateLimitJA3FingerprintProperty]ja3FingerprintoptionalIResolvableJa3FingerprintoptionalIResolvableJa3Fingerprintoptionalinterface{} #If you use a single JA3 fingerprint as your custom key, then each value fully defines an aggregation instance.
ja4FingerprintoptionalIResolvable | CfnWebACL.ja4_fingerprintoptionaltyping.Union[IResolvable, RateLimitJA4FingerprintProperty]ja4FingerprintoptionalIResolvableJa4FingerprintoptionalIResolvableJa4Fingerprintoptionalinterface{} #If you use a single JA4 fingerprint as your custom key, then each value fully defines an aggregation instance.
labelNamespaceoptionalIResolvable | CfnWebACL.label_namespaceoptionaltyping.Union[IResolvable, RateLimitLabelNamespaceProperty]labelNamespaceoptionalIResolvableLabelNamespaceoptionalIResolvableLabelNamespaceoptionalinterface{} #notes
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 .
queryArgumentoptionalIResolvable | CfnWebACL.query_argumentoptionaltyping.Union[IResolvable, RateLimitQueryArgumentProperty]queryArgumentoptionalIResolvableQueryArgumentoptionalIResolvableQueryArgumentoptionalinterface{} #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.
queryStringoptionalIResolvable | CfnWebACL.query_stringoptionaltyping.Union[IResolvable, RateLimitQueryStringProperty]queryStringoptionalIResolvableQueryStringoptionalIResolvableQueryStringoptionalinterface{} #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.
uriPathoptionalIResolvable | CfnWebACL.uri_pathoptionaltyping.Union[IResolvable, RateLimitUriPathProperty]uriPathoptionalIResolvableUriPathoptionalIResolvableUriPathoptionalinterface{} #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.