From 816e1f3cb781e5896e07b50e151956bfe3a83a52 Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 22 Mar 2024 18:13:20 +0000 Subject: [PATCH] feat(client-pricing): Add ResourceNotFoundException to ListPriceLists and GetPriceListFileUrl APIs --- .../commands/GetPriceListFileUrlCommand.ts | 3 +++ .../src/commands/ListPriceListsCommand.ts | 3 +++ clients/client-pricing/src/models/models_0.ts | 22 +++++++++++++++++++ .../src/protocols/Aws_json1_1.ts | 22 +++++++++++++++++++ codegen/sdk-codegen/aws-models/pricing.json | 19 ++++++++++++++++ 5 files changed, 69 insertions(+) diff --git a/clients/client-pricing/src/commands/GetPriceListFileUrlCommand.ts b/clients/client-pricing/src/commands/GetPriceListFileUrlCommand.ts index d844fd8d0f628..3acb3e6e8fe4c 100644 --- a/clients/client-pricing/src/commands/GetPriceListFileUrlCommand.ts +++ b/clients/client-pricing/src/commands/GetPriceListFileUrlCommand.ts @@ -71,6 +71,9 @@ export interface GetPriceListFileUrlCommandOutput extends GetPriceListFileUrlRes * @throws {@link NotFoundException} (client fault) *

The requested resource can't be found.

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

The requested resource can't be found.

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

You've made too many requests exceeding service quotas. *

diff --git a/clients/client-pricing/src/commands/ListPriceListsCommand.ts b/clients/client-pricing/src/commands/ListPriceListsCommand.ts index c83fdf3e5511f..4432b605f4ccf 100644 --- a/clients/client-pricing/src/commands/ListPriceListsCommand.ts +++ b/clients/client-pricing/src/commands/ListPriceListsCommand.ts @@ -95,6 +95,9 @@ export interface ListPriceListsCommandOutput extends ListPriceListsResponse, __M * @throws {@link NotFoundException} (client fault) *

The requested resource can't be found.

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

The requested resource can't be found.

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

You've made too many requests exceeding service quotas. *

diff --git a/clients/client-pricing/src/models/models_0.ts b/clients/client-pricing/src/models/models_0.ts index 0a1c435e46476..9b749a2519ceb 100644 --- a/clients/client-pricing/src/models/models_0.ts +++ b/clients/client-pricing/src/models/models_0.ts @@ -333,6 +333,28 @@ export interface GetPriceListFileUrlResponse { Url?: string; } +/** + *

The requested resource can't be found.

+ * @public + */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.Message = opts.Message; + } +} + /** * @public * @enum diff --git a/clients/client-pricing/src/protocols/Aws_json1_1.ts b/clients/client-pricing/src/protocols/Aws_json1_1.ts index 9777fd63d56af..5978226fc77ac 100644 --- a/clients/client-pricing/src/protocols/Aws_json1_1.ts +++ b/clients/client-pricing/src/protocols/Aws_json1_1.ts @@ -39,6 +39,7 @@ import { InvalidParameterException, ListPriceListsRequest, NotFoundException, + ResourceNotFoundException, ThrottlingException, } from "../models/models_0"; import { PricingServiceException as __BaseException } from "../models/PricingServiceException"; @@ -239,6 +240,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "AccessDeniedException": case "com.amazonaws.pricing#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.pricing#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; return throwDefaultError({ @@ -342,6 +346,22 @@ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContex return __decorateServiceException(exception, body); }; +/** + * deserializeAws_json1_1ResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_json1_1ThrottlingExceptionRes */ @@ -436,6 +456,8 @@ const de_PriceListJsonItems = (output: any, context: __SerdeContext): (__LazyJso // de_PriceLists omitted. +// de_ResourceNotFoundException omitted. + // de_Service omitted. // de_ServiceList omitted. diff --git a/codegen/sdk-codegen/aws-models/pricing.json b/codegen/sdk-codegen/aws-models/pricing.json index 7cd0a7d94d7ef..a313bdd819123 100644 --- a/codegen/sdk-codegen/aws-models/pricing.json +++ b/codegen/sdk-codegen/aws-models/pricing.json @@ -1046,6 +1046,9 @@ { "target": "com.amazonaws.pricing#NotFoundException" }, + { + "target": "com.amazonaws.pricing#ResourceNotFoundException" + }, { "target": "com.amazonaws.pricing#ThrottlingException" } @@ -1261,6 +1264,9 @@ { "target": "com.amazonaws.pricing#NotFoundException" }, + { + "target": "com.amazonaws.pricing#ResourceNotFoundException" + }, { "target": "com.amazonaws.pricing#ThrottlingException" } @@ -1429,6 +1435,19 @@ } } }, + "com.amazonaws.pricing#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.pricing#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The requested resource can't be found.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, "com.amazonaws.pricing#Service": { "type": "structure", "members": {