Skip to content

Commit 33438d9

Browse files
author
awstools
committed
feat(client-wafv2): This release adds the ability to throw WafLimitsExceededException when the maximum number of Application Load Balancer (ALB) associations per AWS WAF v2 WebACL is exceeded.
1 parent 72c12a0 commit 33438d9

File tree

5 files changed

+49
-40
lines changed

5 files changed

+49
-40
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ export interface AssociateWebACLCommandOutput extends AssociateWebACLResponse, _
106106
* </li>
107107
* </ul>
108108
*
109+
* @throws {@link WAFLimitsExceededException} (client fault)
110+
* <p>WAF couldn’t perform the operation because you exceeded your resource limit. For
111+
* example, the maximum number of <code>WebACL</code> objects that you can create for an Amazon Web Services
112+
* account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF quotas</a> in the
113+
* <i>WAF Developer Guide</i>.</p>
114+
*
109115
* @throws {@link WAFNonexistentItemException} (client fault)
110116
* <p>WAF couldn’t perform the operation because your resource doesn't exist.
111117
* If you've just created a resource that you're using in this operation, you might

clients/client-wafv2/src/endpoint/ruleset.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ d="error",
1717
e="endpoint",
1818
f="tree",
1919
g="PartitionResult",
20-
h={[s]:false,"type":"String"},
21-
i={[s]:true,"default":false,"type":"Boolean"},
20+
h={[s]:false,"type":"string"},
21+
i={[s]:true,"default":false,"type":"boolean"},
2222
j={[v]:"Endpoint"},
2323
k={[t]:c,[u]:[{[v]:"UseFIPS"},true]},
2424
l={[t]:c,[u]:[{[v]:"UseDualStack"},true]},

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

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3758,6 +3758,37 @@ export class WAFInvalidParameterException extends __BaseException {
37583758
}
37593759
}
37603760

3761+
/**
3762+
* <p>WAF couldn’t perform the operation because you exceeded your resource limit. For
3763+
* example, the maximum number of <code>WebACL</code> objects that you can create for an Amazon Web Services
3764+
* account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF quotas</a> in the
3765+
* <i>WAF Developer Guide</i>.</p>
3766+
* @public
3767+
*/
3768+
export class WAFLimitsExceededException extends __BaseException {
3769+
readonly name: "WAFLimitsExceededException" = "WAFLimitsExceededException";
3770+
readonly $fault: "client" = "client";
3771+
Message?: string | undefined;
3772+
/**
3773+
* <p>Source type for the exception. </p>
3774+
* @public
3775+
*/
3776+
SourceType?: string | undefined;
3777+
/**
3778+
* @internal
3779+
*/
3780+
constructor(opts: __ExceptionOptionType<WAFLimitsExceededException, __BaseException>) {
3781+
super({
3782+
name: "WAFLimitsExceededException",
3783+
$fault: "client",
3784+
...opts,
3785+
});
3786+
Object.setPrototypeOf(this, WAFLimitsExceededException.prototype);
3787+
this.Message = opts.Message;
3788+
this.SourceType = opts.SourceType;
3789+
}
3790+
}
3791+
37613792
/**
37623793
* <p>WAF couldn’t perform the operation because your resource doesn't exist.
37633794
* If you've just created a resource that you're using in this operation, you might
@@ -4083,37 +4114,6 @@ export class WAFInvalidResourceException extends __BaseException {
40834114
}
40844115
}
40854116

4086-
/**
4087-
* <p>WAF couldn’t perform the operation because you exceeded your resource limit. For
4088-
* example, the maximum number of <code>WebACL</code> objects that you can create for an Amazon Web Services
4089-
* account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF quotas</a> in the
4090-
* <i>WAF Developer Guide</i>.</p>
4091-
* @public
4092-
*/
4093-
export class WAFLimitsExceededException extends __BaseException {
4094-
readonly name: "WAFLimitsExceededException" = "WAFLimitsExceededException";
4095-
readonly $fault: "client" = "client";
4096-
Message?: string | undefined;
4097-
/**
4098-
* <p>Source type for the exception. </p>
4099-
* @public
4100-
*/
4101-
SourceType?: string | undefined;
4102-
/**
4103-
* @internal
4104-
*/
4105-
constructor(opts: __ExceptionOptionType<WAFLimitsExceededException, __BaseException>) {
4106-
super({
4107-
name: "WAFLimitsExceededException",
4108-
$fault: "client",
4109-
...opts,
4110-
});
4111-
Object.setPrototypeOf(this, WAFLimitsExceededException.prototype);
4112-
this.Message = opts.Message;
4113-
this.SourceType = opts.SourceType;
4114-
}
4115-
}
4116-
41174117
/**
41184118
* <p>You tried to use a managed rule group that's available by subscription, but you aren't
41194119
* subscribed to it yet. </p>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
21692169
case "WAFInvalidParameterException":
21702170
case "com.amazonaws.wafv2#WAFInvalidParameterException":
21712171
throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context);
2172+
case "WAFLimitsExceededException":
2173+
case "com.amazonaws.wafv2#WAFLimitsExceededException":
2174+
throw await de_WAFLimitsExceededExceptionRes(parsedOutput, context);
21722175
case "WAFNonexistentItemException":
21732176
case "com.amazonaws.wafv2#WAFNonexistentItemException":
21742177
throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context);
@@ -2181,9 +2184,6 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
21812184
case "WAFInvalidResourceException":
21822185
case "com.amazonaws.wafv2#WAFInvalidResourceException":
21832186
throw await de_WAFInvalidResourceExceptionRes(parsedOutput, context);
2184-
case "WAFLimitsExceededException":
2185-
case "com.amazonaws.wafv2#WAFLimitsExceededException":
2186-
throw await de_WAFLimitsExceededExceptionRes(parsedOutput, context);
21872187
case "WAFSubscriptionNotFoundException":
21882188
case "com.amazonaws.wafv2#WAFSubscriptionNotFoundException":
21892189
throw await de_WAFSubscriptionNotFoundExceptionRes(parsedOutput, context);

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,27 +418,27 @@
418418
"builtIn": "AWS::Region",
419419
"required": false,
420420
"documentation": "The AWS region used to dispatch the request.",
421-
"type": "String"
421+
"type": "string"
422422
},
423423
"UseDualStack": {
424424
"builtIn": "AWS::UseDualStack",
425425
"required": true,
426426
"default": false,
427427
"documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
428-
"type": "Boolean"
428+
"type": "boolean"
429429
},
430430
"UseFIPS": {
431431
"builtIn": "AWS::UseFIPS",
432432
"required": true,
433433
"default": false,
434434
"documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
435-
"type": "Boolean"
435+
"type": "boolean"
436436
},
437437
"Endpoint": {
438438
"builtIn": "SDK::Endpoint",
439439
"required": false,
440440
"documentation": "Override the endpoint used to send this request",
441-
"type": "String"
441+
"type": "string"
442442
}
443443
},
444444
"rules": [
@@ -1815,6 +1815,9 @@
18151815
{
18161816
"target": "com.amazonaws.wafv2#WAFInvalidParameterException"
18171817
},
1818+
{
1819+
"target": "com.amazonaws.wafv2#WAFLimitsExceededException"
1820+
},
18181821
{
18191822
"target": "com.amazonaws.wafv2#WAFNonexistentItemException"
18201823
},

0 commit comments

Comments
 (0)