Skip to content

Commit 4528e88

Browse files
author
awstools
committed
feat(client-wafv2): AWS WAF now supports configurable time windows for request aggregation with rate-based rules. Customers can now select time windows of 1 minute, 2 minutes or 10 minutes, in addition to the previously supported 5 minutes.
1 parent 52f0665 commit 4528e88

11 files changed

+43
-0
lines changed

clients/client-wafv2/src/commands/CheckCapacityCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ export interface CheckCapacityCommandOutput extends CheckCapacityResponse, __Met
455455
* },
456456
* RateBasedStatement: { // RateBasedStatement
457457
* Limit: Number("long"), // required
458+
* EvaluationWindowSec: Number("long"),
458459
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
459460
* ScopeDownStatement: {
460461
* ByteMatchStatement: {
@@ -538,6 +539,7 @@ export interface CheckCapacityCommandOutput extends CheckCapacityResponse, __Met
538539
* },
539540
* RateBasedStatement: {
540541
* Limit: Number("long"), // required
542+
* EvaluationWindowSec: Number("long"),
541543
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
542544
* ScopeDownStatement: "<Statement>",
543545
* ForwardedIPConfig: {

clients/client-wafv2/src/commands/CreateRuleGroupCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ export interface CreateRuleGroupCommandOutput extends CreateRuleGroupResponse, _
448448
* },
449449
* RateBasedStatement: { // RateBasedStatement
450450
* Limit: Number("long"), // required
451+
* EvaluationWindowSec: Number("long"),
451452
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
452453
* ScopeDownStatement: {
453454
* ByteMatchStatement: {
@@ -531,6 +532,7 @@ export interface CreateRuleGroupCommandOutput extends CreateRuleGroupResponse, _
531532
* },
532533
* RateBasedStatement: {
533534
* Limit: Number("long"), // required
535+
* EvaluationWindowSec: Number("long"),
534536
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
535537
* ScopeDownStatement: "<Statement>",
536538
* ForwardedIPConfig: {

clients/client-wafv2/src/commands/CreateWebACLCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ export interface CreateWebACLCommandOutput extends CreateWebACLResponse, __Metad
461461
* },
462462
* RateBasedStatement: { // RateBasedStatement
463463
* Limit: Number("long"), // required
464+
* EvaluationWindowSec: Number("long"),
464465
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
465466
* ScopeDownStatement: {
466467
* ByteMatchStatement: {
@@ -534,6 +535,7 @@ export interface CreateWebACLCommandOutput extends CreateWebACLResponse, __Metad
534535
* },
535536
* RateBasedStatement: {
536537
* Limit: Number("long"), // required
538+
* EvaluationWindowSec: Number("long"),
537539
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
538540
* ScopeDownStatement: "<Statement>",
539541
* ForwardedIPConfig: {

clients/client-wafv2/src/commands/GetRuleGroupCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ export interface GetRuleGroupCommandOutput extends GetRuleGroupResponse, __Metad
457457
* // },
458458
* // RateBasedStatement: { // RateBasedStatement
459459
* // Limit: Number("long"), // required
460+
* // EvaluationWindowSec: Number("long"),
460461
* // AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
461462
* // ScopeDownStatement: {
462463
* // ByteMatchStatement: {
@@ -540,6 +541,7 @@ export interface GetRuleGroupCommandOutput extends GetRuleGroupResponse, __Metad
540541
* // },
541542
* // RateBasedStatement: {
542543
* // Limit: Number("long"), // required
544+
* // EvaluationWindowSec: Number("long"),
543545
* // AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
544546
* // ScopeDownStatement: "<Statement>",
545547
* // ForwardedIPConfig: {

clients/client-wafv2/src/commands/GetWebACLCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ export interface GetWebACLCommandOutput extends GetWebACLResponse, __MetadataBea
469469
* // },
470470
* // RateBasedStatement: { // RateBasedStatement
471471
* // Limit: Number("long"), // required
472+
* // EvaluationWindowSec: Number("long"),
472473
* // AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
473474
* // ScopeDownStatement: {
474475
* // ByteMatchStatement: {
@@ -542,6 +543,7 @@ export interface GetWebACLCommandOutput extends GetWebACLResponse, __MetadataBea
542543
* // },
543544
* // RateBasedStatement: {
544545
* // Limit: Number("long"), // required
546+
* // EvaluationWindowSec: Number("long"),
545547
* // AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
546548
* // ScopeDownStatement: "<Statement>",
547549
* // ForwardedIPConfig: {

clients/client-wafv2/src/commands/GetWebACLForResourceCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ export interface GetWebACLForResourceCommandOutput extends GetWebACLForResourceR
477477
* // },
478478
* // RateBasedStatement: { // RateBasedStatement
479479
* // Limit: Number("long"), // required
480+
* // EvaluationWindowSec: Number("long"),
480481
* // AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
481482
* // ScopeDownStatement: {
482483
* // ByteMatchStatement: {
@@ -550,6 +551,7 @@ export interface GetWebACLForResourceCommandOutput extends GetWebACLForResourceR
550551
* // },
551552
* // RateBasedStatement: {
552553
* // Limit: Number("long"), // required
554+
* // EvaluationWindowSec: Number("long"),
553555
* // AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
554556
* // ScopeDownStatement: "<Statement>",
555557
* // ForwardedIPConfig: {

clients/client-wafv2/src/commands/UpdateRuleGroupCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ export interface UpdateRuleGroupCommandOutput extends UpdateRuleGroupResponse, _
483483
* },
484484
* RateBasedStatement: { // RateBasedStatement
485485
* Limit: Number("long"), // required
486+
* EvaluationWindowSec: Number("long"),
486487
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
487488
* ScopeDownStatement: {
488489
* ByteMatchStatement: {
@@ -566,6 +567,7 @@ export interface UpdateRuleGroupCommandOutput extends UpdateRuleGroupResponse, _
566567
* },
567568
* RateBasedStatement: {
568569
* Limit: Number("long"), // required
570+
* EvaluationWindowSec: Number("long"),
569571
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
570572
* ScopeDownStatement: "<Statement>",
571573
* ForwardedIPConfig: {

clients/client-wafv2/src/commands/UpdateWebACLCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ export interface UpdateWebACLCommandOutput extends UpdateWebACLResponse, __Metad
498498
* },
499499
* RateBasedStatement: { // RateBasedStatement
500500
* Limit: Number("long"), // required
501+
* EvaluationWindowSec: Number("long"),
501502
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
502503
* ScopeDownStatement: {
503504
* ByteMatchStatement: {
@@ -571,6 +572,7 @@ export interface UpdateWebACLCommandOutput extends UpdateWebACLResponse, __Metad
571572
* },
572573
* RateBasedStatement: {
573574
* Limit: Number("long"), // required
575+
* EvaluationWindowSec: Number("long"),
574576
* AggregateKeyType: "IP" || "FORWARDED_IP" || "CUSTOM_KEYS" || "CONSTANT", // required
575577
* ScopeDownStatement: "<Statement>",
576578
* ForwardedIPConfig: {

clients/client-wafv2/src/models/models_0.ts

+12
Original file line numberDiff line numberDiff line change
@@ -7890,6 +7890,18 @@ export interface RateBasedStatement {
78907890
*/
78917891
Limit: number | undefined;
78927892

7893+
/**
7894+
* @public
7895+
* <p>The amount of time, in seconds, that WAF
7896+
* should include in its request counts, looking back from the current time. For example,
7897+
* for a setting of 120, when WAF checks the rate, it counts the requests for the 2 minutes immediately preceding
7898+
* the current time. Valid settings are 60, 120, 300, and 600. </p>
7899+
* <p>This setting doesn't determine how often WAF checks the rate, but how far back it looks each
7900+
* time it checks. WAF checks the rate about every 10 seconds.</p>
7901+
* <p>Default: <code>300</code> (5 minutes)</p>
7902+
*/
7903+
EvaluationWindowSec?: number;
7904+
78937905
/**
78947906
* @public
78957907
* <p>Setting that indicates how to aggregate the request counts. </p>

clients/client-wafv2/src/protocols/Aws_json1_1.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2855,6 +2855,7 @@ const se_RateBasedStatement = (input: RateBasedStatement, context: __SerdeContex
28552855
return take(input, {
28562856
AggregateKeyType: [],
28572857
CustomKeys: _json,
2858+
EvaluationWindowSec: [],
28582859
ForwardedIPConfig: _json,
28592860
Limit: [],
28602861
ScopeDownStatement: (_) => se_Statement(_, context),
@@ -3642,6 +3643,7 @@ const de_RateBasedStatement = (output: any, context: __SerdeContext): RateBasedS
36423643
return take(output, {
36433644
AggregateKeyType: __expectString,
36443645
CustomKeys: _json,
3646+
EvaluationWindowSec: __expectLong,
36453647
ForwardedIPConfig: _json,
36463648
Limit: __expectLong,
36473649
ScopeDownStatement: (_: any) => de_Statement(_, context),

codegen/sdk-codegen/aws-models/wafv2.json

+13
Original file line numberDiff line numberDiff line change
@@ -5343,6 +5343,12 @@
53435343
"com.amazonaws.wafv2#ErrorReason": {
53445344
"type": "string"
53455345
},
5346+
"com.amazonaws.wafv2#EvaluationWindowSec": {
5347+
"type": "long",
5348+
"traits": {
5349+
"smithy.api#default": 0
5350+
}
5351+
},
53465352
"com.amazonaws.wafv2#ExcludedRule": {
53475353
"type": "structure",
53485354
"members": {
@@ -9682,6 +9688,13 @@
96829688
"smithy.api#required": {}
96839689
}
96849690
},
9691+
"EvaluationWindowSec": {
9692+
"target": "com.amazonaws.wafv2#EvaluationWindowSec",
9693+
"traits": {
9694+
"smithy.api#default": 0,
9695+
"smithy.api#documentation": "<p>The amount of time, in seconds, that WAF\n should include in its request counts, looking back from the current time. For example, \n for a setting of 120, when WAF checks the rate, it counts the requests for the 2 minutes immediately preceding \n the current time. Valid settings are 60, 120, 300, and 600. </p>\n <p>This setting doesn't determine how often WAF checks the rate, but how far back it looks each \n time it checks. WAF checks the rate about every 10 seconds.</p>\n <p>Default: <code>300</code> (5 minutes)</p>"
9696+
}
9697+
},
96859698
"AggregateKeyType": {
96869699
"target": "com.amazonaws.wafv2#RateBasedStatementAggregateKeyType",
96879700
"traits": {

0 commit comments

Comments
 (0)