Skip to content

Commit

Permalink
feat(client-pricing): Add ResourceNotFoundException to ListPriceLists…
Browse files Browse the repository at this point in the history
… and GetPriceListFileUrl APIs
  • Loading branch information
awstools committed Mar 22, 2024
1 parent 9099163 commit 816e1f3
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export interface GetPriceListFileUrlCommandOutput extends GetPriceListFileUrlRes
* @throws {@link NotFoundException} (client fault)
* <p>The requested resource can't be found.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The requested resource can't be found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>You've made too many requests exceeding service quotas.
* </p>
Expand Down
3 changes: 3 additions & 0 deletions clients/client-pricing/src/commands/ListPriceListsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ export interface ListPriceListsCommandOutput extends ListPriceListsResponse, __M
* @throws {@link NotFoundException} (client fault)
* <p>The requested resource can't be found.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The requested resource can't be found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>You've made too many requests exceeding service quotas.
* </p>
Expand Down
22 changes: 22 additions & 0 deletions clients/client-pricing/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,28 @@ export interface GetPriceListFileUrlResponse {
Url?: string;
}

/**
* <p>The requested resource can't be found.</p>
* @public
*/
export class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException" = "ResourceNotFoundException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
this.Message = opts.Message;
}
}

/**
* @public
* @enum
Expand Down
22 changes: 22 additions & 0 deletions clients/client-pricing/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
InvalidParameterException,
ListPriceListsRequest,
NotFoundException,
ResourceNotFoundException,
ThrottlingException,
} from "../models/models_0";
import { PricingServiceException as __BaseException } from "../models/PricingServiceException";
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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<ResourceNotFoundException> => {
const body = parsedOutput.body;
const deserialized: any = _json(body);
const exception = new ResourceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return __decorateServiceException(exception, body);
};

/**
* deserializeAws_json1_1ThrottlingExceptionRes
*/
Expand Down Expand Up @@ -436,6 +456,8 @@ const de_PriceListJsonItems = (output: any, context: __SerdeContext): (__LazyJso

// de_PriceLists omitted.

// de_ResourceNotFoundException omitted.

// de_Service omitted.

// de_ServiceList omitted.
Expand Down
19 changes: 19 additions & 0 deletions codegen/sdk-codegen/aws-models/pricing.json
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,9 @@
{
"target": "com.amazonaws.pricing#NotFoundException"
},
{
"target": "com.amazonaws.pricing#ResourceNotFoundException"
},
{
"target": "com.amazonaws.pricing#ThrottlingException"
}
Expand Down Expand Up @@ -1261,6 +1264,9 @@
{
"target": "com.amazonaws.pricing#NotFoundException"
},
{
"target": "com.amazonaws.pricing#ResourceNotFoundException"
},
{
"target": "com.amazonaws.pricing#ThrottlingException"
}
Expand Down Expand Up @@ -1429,6 +1435,19 @@
}
}
},
"com.amazonaws.pricing#ResourceNotFoundException": {
"type": "structure",
"members": {
"Message": {
"target": "com.amazonaws.pricing#errorMessage"
}
},
"traits": {
"smithy.api#documentation": "<p>The requested resource can't be found.</p>",
"smithy.api#error": "client",
"smithy.api#httpError": 404
}
},
"com.amazonaws.pricing#Service": {
"type": "structure",
"members": {
Expand Down

0 comments on commit 816e1f3

Please sign in to comment.