From fd48f2dd3272ff5889f758ae0a6c08094d820fec Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 4 May 2023 19:41:11 +0000 Subject: [PATCH] feat(client-ecs): Documentation update for new error type NamespaceNotFoundException for CreateCluster and UpdateCluster --- .../src/commands/CreateClusterCommand.ts | 3 ++ .../src/commands/UpdateClusterCommand.ts | 3 ++ clients/client-ecs/src/models/models_0.ts | 40 +++++++++---------- .../client-ecs/src/protocols/Aws_json1_1.ts | 6 +++ 4 files changed, 32 insertions(+), 20 deletions(-) diff --git a/clients/client-ecs/src/commands/CreateClusterCommand.ts b/clients/client-ecs/src/commands/CreateClusterCommand.ts index 54bc9c965a6d..a68f41e91529 100644 --- a/clients/client-ecs/src/commands/CreateClusterCommand.ts +++ b/clients/client-ecs/src/commands/CreateClusterCommand.ts @@ -179,6 +179,9 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met *

The specified parameter isn't valid. Review the available parameters for the API * request.

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

The specified namespace wasn't found.

+ * * @throws {@link ServerException} (server fault) *

These errors are usually caused by a server issue.

* diff --git a/clients/client-ecs/src/commands/UpdateClusterCommand.ts b/clients/client-ecs/src/commands/UpdateClusterCommand.ts index 8815fd5ac5d7..6f15ce389b3f 100644 --- a/clients/client-ecs/src/commands/UpdateClusterCommand.ts +++ b/clients/client-ecs/src/commands/UpdateClusterCommand.ts @@ -156,6 +156,9 @@ export interface UpdateClusterCommandOutput extends UpdateClusterResponse, __Met *

The specified parameter isn't valid. Review the available parameters for the API * request.

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

The specified namespace wasn't found.

+ * * @throws {@link ServerException} (server fault) *

These errors are usually caused by a server issue.

* diff --git a/clients/client-ecs/src/models/models_0.ts b/clients/client-ecs/src/models/models_0.ts index d9f3327b245f..a05e02b34623 100644 --- a/clients/client-ecs/src/models/models_0.ts +++ b/clients/client-ecs/src/models/models_0.ts @@ -1146,6 +1146,26 @@ export interface CreateClusterResponse { cluster?: Cluster; } +/** + * @public + *

The specified namespace wasn't found.

+ */ +export class NamespaceNotFoundException extends __BaseException { + readonly name: "NamespaceNotFoundException" = "NamespaceNotFoundException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "NamespaceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, NamespaceNotFoundException.prototype); + } +} + /** * @public *

The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.

@@ -3045,26 +3065,6 @@ export interface CreateServiceResponse { service?: Service; } -/** - * @public - *

The specified namespace wasn't found.

- */ -export class NamespaceNotFoundException extends __BaseException { - readonly name: "NamespaceNotFoundException" = "NamespaceNotFoundException"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "NamespaceNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, NamespaceNotFoundException.prototype); - } -} - /** * @public *

The specified platform version doesn't satisfy the required capabilities of the task diff --git a/clients/client-ecs/src/protocols/Aws_json1_1.ts b/clients/client-ecs/src/protocols/Aws_json1_1.ts index fa3448cbb7e0..fce531c07cfa 100644 --- a/clients/client-ecs/src/protocols/Aws_json1_1.ts +++ b/clients/client-ecs/src/protocols/Aws_json1_1.ts @@ -1187,6 +1187,9 @@ const de_CreateClusterCommandError = async ( case "InvalidParameterException": case "com.amazonaws.ecs#InvalidParameterException": throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "NamespaceNotFoundException": + case "com.amazonaws.ecs#NamespaceNotFoundException": + throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context); case "ServerException": case "com.amazonaws.ecs#ServerException": throw await de_ServerExceptionRes(parsedOutput, context); @@ -3832,6 +3835,9 @@ const de_UpdateClusterCommandError = async ( case "InvalidParameterException": case "com.amazonaws.ecs#InvalidParameterException": throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "NamespaceNotFoundException": + case "com.amazonaws.ecs#NamespaceNotFoundException": + throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context); case "ServerException": case "com.amazonaws.ecs#ServerException": throw await de_ServerExceptionRes(parsedOutput, context);