Skip to content

Commit f2b63ad

Browse files
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 d59fa35 commit f2b63ad

File tree

10 files changed

+60
-6
lines changed

10 files changed

+60
-6
lines changed

generator/ServiceModels/wafv2/wafv2-2019-07-29.api.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
{"shape":"WAFInvalidParameterException"},
2929
{"shape":"WAFNonexistentItemException"},
3030
{"shape":"WAFUnavailableEntityException"},
31-
{"shape":"WAFInvalidOperationException"}
31+
{"shape":"WAFInvalidOperationException"},
32+
{"shape":"WAFLimitsExceededException"}
3233
]
3334
},
3435
"CheckCapacity":{

generator/ServiceModels/wafv2/wafv2-2019-07-29.endpoint-rule-set.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
"builtIn": "AWS::Region",
66
"required": false,
77
"documentation": "The AWS region used to dispatch the request.",
8-
"type": "String"
8+
"type": "string"
99
},
1010
"UseDualStack": {
1111
"builtIn": "AWS::UseDualStack",
1212
"required": true,
1313
"default": false,
1414
"documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
15-
"type": "Boolean"
15+
"type": "boolean"
1616
},
1717
"UseFIPS": {
1818
"builtIn": "AWS::UseFIPS",
1919
"required": true,
2020
"default": false,
2121
"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.",
22-
"type": "Boolean"
22+
"type": "boolean"
2323
},
2424
"Endpoint": {
2525
"builtIn": "SDK::Endpoint",
2626
"required": false,
2727
"documentation": "Override the endpoint used to send this request",
28-
"type": "String"
28+
"type": "string"
2929
}
3030
},
3131
"rules": [

generator/ServiceModels/wafv2/wafv2-2019-07-29.normal.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
{"shape":"WAFInvalidParameterException"},
2929
{"shape":"WAFNonexistentItemException"},
3030
{"shape":"WAFUnavailableEntityException"},
31-
{"shape":"WAFInvalidOperationException"}
31+
{"shape":"WAFInvalidOperationException"},
32+
{"shape":"WAFLimitsExceededException"}
3233
],
3334
"documentation":"<p>Associates a web ACL with a resource, to protect the resource. </p> <p>Use this for all resource types except for Amazon CloudFront distributions. For Amazon CloudFront, call <code>UpdateDistribution</code> for the distribution and provide the Amazon Resource Name (ARN) of the web ACL in the web ACL ID. For information, see <a href=\"https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html\">UpdateDistribution</a> in the <i>Amazon CloudFront Developer Guide</i>. </p> <p> <b>Required permissions for customer-managed IAM policies</b> </p> <p>This call requires permissions that are specific to the protected resource type. For details, see <a href=\"https://docs.aws.amazon.com/waf/latest/developerguide/security_iam_service-with-iam.html#security_iam_action-AssociateWebACL\">Permissions for AssociateWebACL</a> in the <i>WAF Developer Guide</i>. </p> <p> <b>Temporary inconsistencies during updates</b> </p> <p>When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes. </p> <p>The following are examples of the temporary inconsistencies that you might notice during change propagation: </p> <ul> <li> <p>After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable. </p> </li> <li> <p>After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another.</p> </li> <li> <p>After you change a rule action setting, you might see the old action in some places and the new action in others. </p> </li> <li> <p>After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another.</p> </li> </ul>"
3435
},

sdk/src/Services/WAFV2/Generated/Model/Internal/MarshallTransformations/AssociateWebACLResponseUnmarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ public override AmazonServiceException UnmarshallException(JsonUnmarshallerConte
8282
{
8383
return WAFInvalidParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
8484
}
85+
if (errorResponse.Code != null && errorResponse.Code.Equals("WAFLimitsExceededException"))
86+
{
87+
return WAFLimitsExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
88+
}
8589
if (errorResponse.Code != null && errorResponse.Code.Equals("WAFNonexistentItemException"))
8690
{
8791
return WAFNonexistentItemExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);

sdk/src/Services/WAFV2/Generated/_bcl35/AmazonWAFV2Client.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,12 @@ protected override void Dispose(bool disposing)
402402
/// </para>
403403
/// </li> </ul>
404404
/// </exception>
405+
/// <exception cref="Amazon.WAFV2.Model.WAFLimitsExceededException">
406+
/// WAF couldn’t perform the operation because you exceeded your resource limit. For example,
407+
/// the maximum number of <c>WebACL</c> objects that you can create for an Amazon Web
408+
/// Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF
409+
/// quotas</a> in the <i>WAF Developer Guide</i>.
410+
/// </exception>
405411
/// <exception cref="Amazon.WAFV2.Model.WAFNonexistentItemException">
406412
/// WAF couldn’t perform the operation because your resource doesn't exist. If you've
407413
/// just created a resource that you're using in this operation, you might just need to

sdk/src/Services/WAFV2/Generated/_bcl35/IAmazonWAFV2.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ public partial interface IAmazonWAFV2 : IAmazonService, IDisposable
196196
/// </para>
197197
/// </li> </ul>
198198
/// </exception>
199+
/// <exception cref="Amazon.WAFV2.Model.WAFLimitsExceededException">
200+
/// WAF couldn’t perform the operation because you exceeded your resource limit. For example,
201+
/// the maximum number of <c>WebACL</c> objects that you can create for an Amazon Web
202+
/// Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF
203+
/// quotas</a> in the <i>WAF Developer Guide</i>.
204+
/// </exception>
199205
/// <exception cref="Amazon.WAFV2.Model.WAFNonexistentItemException">
200206
/// WAF couldn’t perform the operation because your resource doesn't exist. If you've
201207
/// just created a resource that you're using in this operation, you might just need to

sdk/src/Services/WAFV2/Generated/_bcl45/AmazonWAFV2Client.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,12 @@ protected override void Dispose(bool disposing)
405405
/// </para>
406406
/// </li> </ul>
407407
/// </exception>
408+
/// <exception cref="Amazon.WAFV2.Model.WAFLimitsExceededException">
409+
/// WAF couldn’t perform the operation because you exceeded your resource limit. For example,
410+
/// the maximum number of <c>WebACL</c> objects that you can create for an Amazon Web
411+
/// Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF
412+
/// quotas</a> in the <i>WAF Developer Guide</i>.
413+
/// </exception>
408414
/// <exception cref="Amazon.WAFV2.Model.WAFNonexistentItemException">
409415
/// WAF couldn’t perform the operation because your resource doesn't exist. If you've
410416
/// just created a resource that you're using in this operation, you might just need to
@@ -524,6 +530,12 @@ public virtual AssociateWebACLResponse AssociateWebACL(AssociateWebACLRequest re
524530
/// </para>
525531
/// </li> </ul>
526532
/// </exception>
533+
/// <exception cref="Amazon.WAFV2.Model.WAFLimitsExceededException">
534+
/// WAF couldn’t perform the operation because you exceeded your resource limit. For example,
535+
/// the maximum number of <c>WebACL</c> objects that you can create for an Amazon Web
536+
/// Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF
537+
/// quotas</a> in the <i>WAF Developer Guide</i>.
538+
/// </exception>
527539
/// <exception cref="Amazon.WAFV2.Model.WAFNonexistentItemException">
528540
/// WAF couldn’t perform the operation because your resource doesn't exist. If you've
529541
/// just created a resource that you're using in this operation, you might just need to

sdk/src/Services/WAFV2/Generated/_bcl45/IAmazonWAFV2.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ public partial interface IAmazonWAFV2 : IAmazonService, IDisposable
196196
/// </para>
197197
/// </li> </ul>
198198
/// </exception>
199+
/// <exception cref="Amazon.WAFV2.Model.WAFLimitsExceededException">
200+
/// WAF couldn’t perform the operation because you exceeded your resource limit. For example,
201+
/// the maximum number of <c>WebACL</c> objects that you can create for an Amazon Web
202+
/// Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF
203+
/// quotas</a> in the <i>WAF Developer Guide</i>.
204+
/// </exception>
199205
/// <exception cref="Amazon.WAFV2.Model.WAFNonexistentItemException">
200206
/// WAF couldn’t perform the operation because your resource doesn't exist. If you've
201207
/// just created a resource that you're using in this operation, you might just need to
@@ -309,6 +315,12 @@ public partial interface IAmazonWAFV2 : IAmazonService, IDisposable
309315
/// </para>
310316
/// </li> </ul>
311317
/// </exception>
318+
/// <exception cref="Amazon.WAFV2.Model.WAFLimitsExceededException">
319+
/// WAF couldn’t perform the operation because you exceeded your resource limit. For example,
320+
/// the maximum number of <c>WebACL</c> objects that you can create for an Amazon Web
321+
/// Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF
322+
/// quotas</a> in the <i>WAF Developer Guide</i>.
323+
/// </exception>
312324
/// <exception cref="Amazon.WAFV2.Model.WAFNonexistentItemException">
313325
/// WAF couldn’t perform the operation because your resource doesn't exist. If you've
314326
/// just created a resource that you're using in this operation, you might just need to

sdk/src/Services/WAFV2/Generated/_netstandard/AmazonWAFV2Client.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,12 @@ internal virtual AssociateWebACLResponse AssociateWebACL(AssociateWebACLRequest
420420
/// </para>
421421
/// </li> </ul>
422422
/// </exception>
423+
/// <exception cref="Amazon.WAFV2.Model.WAFLimitsExceededException">
424+
/// WAF couldn’t perform the operation because you exceeded your resource limit. For example,
425+
/// the maximum number of <c>WebACL</c> objects that you can create for an Amazon Web
426+
/// Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF
427+
/// quotas</a> in the <i>WAF Developer Guide</i>.
428+
/// </exception>
423429
/// <exception cref="Amazon.WAFV2.Model.WAFNonexistentItemException">
424430
/// WAF couldn’t perform the operation because your resource doesn't exist. If you've
425431
/// just created a resource that you're using in this operation, you might just need to

sdk/src/Services/WAFV2/Generated/_netstandard/IAmazonWAFV2.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ public partial interface IAmazonWAFV2 : IAmazonService, IDisposable
198198
/// </para>
199199
/// </li> </ul>
200200
/// </exception>
201+
/// <exception cref="Amazon.WAFV2.Model.WAFLimitsExceededException">
202+
/// WAF couldn’t perform the operation because you exceeded your resource limit. For example,
203+
/// the maximum number of <c>WebACL</c> objects that you can create for an Amazon Web
204+
/// Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF
205+
/// quotas</a> in the <i>WAF Developer Guide</i>.
206+
/// </exception>
201207
/// <exception cref="Amazon.WAFV2.Model.WAFNonexistentItemException">
202208
/// WAF couldn’t perform the operation because your resource doesn't exist. If you've
203209
/// just created a resource that you're using in this operation, you might just need to

0 commit comments

Comments
 (0)