From 8306abb9e6a60b9be472332e644bd34e66f38c11 Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 23 May 2023 18:30:36 +0000 Subject: [PATCH] feat(client-fms): Fixes issue that could cause calls to GetAdminScope and ListAdminAccountsForOrganization to return a 500 Internal Server error. --- clients/client-fms/src/commands/GetAdminScopeCommand.ts | 6 ++++++ .../src/commands/ListAdminAccountsForOrganizationCommand.ts | 6 ++++++ clients/client-fms/src/protocols/Aws_json1_1.ts | 6 ++++++ codegen/sdk-codegen/aws-models/fms.json | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/clients/client-fms/src/commands/GetAdminScopeCommand.ts b/clients/client-fms/src/commands/GetAdminScopeCommand.ts index 17bdcfef65a8..9e268140a54b 100644 --- a/clients/client-fms/src/commands/GetAdminScopeCommand.ts +++ b/clients/client-fms/src/commands/GetAdminScopeCommand.ts @@ -102,6 +102,12 @@ export interface GetAdminScopeCommandOutput extends GetAdminScopeResponse, __Met * that's disabled by default, and that you need to enable for the Firewall Manager * administrator account and for Organizations before you can access it.

* + * @throws {@link LimitExceededException} (client fault) + *

The operation exceeds a resource limit, for example, the maximum number of + * policy objects that you can create for an Amazon Web Services account. For more information, + * see Firewall + * Manager Limits in the WAF Developer Guide.

+ * * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource was not found.

* diff --git a/clients/client-fms/src/commands/ListAdminAccountsForOrganizationCommand.ts b/clients/client-fms/src/commands/ListAdminAccountsForOrganizationCommand.ts index be7f822ccb2c..12fac9f7aaea 100644 --- a/clients/client-fms/src/commands/ListAdminAccountsForOrganizationCommand.ts +++ b/clients/client-fms/src/commands/ListAdminAccountsForOrganizationCommand.ts @@ -85,6 +85,12 @@ export interface ListAdminAccountsForOrganizationCommandOutput * that's disabled by default, and that you need to enable for the Firewall Manager * administrator account and for Organizations before you can access it.

* + * @throws {@link LimitExceededException} (client fault) + *

The operation exceeds a resource limit, for example, the maximum number of + * policy objects that you can create for an Amazon Web Services account. For more information, + * see Firewall + * Manager Limits in the WAF Developer Guide.

+ * * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource was not found.

* diff --git a/clients/client-fms/src/protocols/Aws_json1_1.ts b/clients/client-fms/src/protocols/Aws_json1_1.ts index 960067545c58..21cb4904e879 100644 --- a/clients/client-fms/src/protocols/Aws_json1_1.ts +++ b/clients/client-fms/src/protocols/Aws_json1_1.ts @@ -1423,6 +1423,9 @@ const de_GetAdminScopeCommandError = async ( case "InvalidOperationException": case "com.amazonaws.fms#InvalidOperationException": throw await de_InvalidOperationExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.fms#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.fms#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); @@ -1955,6 +1958,9 @@ const de_ListAdminAccountsForOrganizationCommandError = async ( case "InvalidOperationException": case "com.amazonaws.fms#InvalidOperationException": throw await de_InvalidOperationExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.fms#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.fms#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); diff --git a/codegen/sdk-codegen/aws-models/fms.json b/codegen/sdk-codegen/aws-models/fms.json index 76db93be44ea..60d032c73d6e 100644 --- a/codegen/sdk-codegen/aws-models/fms.json +++ b/codegen/sdk-codegen/aws-models/fms.json @@ -3241,6 +3241,9 @@ { "target": "com.amazonaws.fms#InvalidOperationException" }, + { + "target": "com.amazonaws.fms#LimitExceededException" + }, { "target": "com.amazonaws.fms#ResourceNotFoundException" } @@ -4008,6 +4011,9 @@ { "target": "com.amazonaws.fms#InvalidOperationException" }, + { + "target": "com.amazonaws.fms#LimitExceededException" + }, { "target": "com.amazonaws.fms#ResourceNotFoundException" }