Skip to content

Commit 022ccd4

Browse files
author
awstools
committed
feat(client-pricing): Add Throttling Exception to all APIs.
1 parent 36a775b commit 022ccd4

File tree

11 files changed

+104
-6
lines changed

11 files changed

+104
-6
lines changed

clients/client-pricing/src/Pricing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export interface Pricing {
140140
* an <code>AmazonEC2</code> instance, with a <code>Provisioned IOPS</code>
141141
* <code>volumeType</code>.</p>
142142
* <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Using the
143-
* Amazon Web Services Price List API</a> in the <i>Billing User
143+
* Amazon Web Services Price List API</a> in the <i>Billing User
144144
* Guide</i>.</p>
145145
*/
146146
export class Pricing extends PricingClient implements Pricing {}

clients/client-pricing/src/PricingClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export interface PricingClientResolvedConfig extends PricingClientResolvedConfig
286286
* an <code>AmazonEC2</code> instance, with a <code>Provisioned IOPS</code>
287287
* <code>volumeType</code>.</p>
288288
* <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Using the
289-
* Amazon Web Services Price List API</a> in the <i>Billing User
289+
* Amazon Web Services Price List API</a> in the <i>Billing User
290290
* Guide</i>.</p>
291291
*/
292292
export class PricingClient extends __Client<

clients/client-pricing/src/commands/DescribeServicesCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ export interface DescribeServicesCommandOutput extends DescribeServicesResponse,
8585
* @throws {@link NotFoundException} (client fault)
8686
* <p>The requested resource can't be found.</p>
8787
*
88+
* @throws {@link ThrottlingException} (client fault)
89+
* <p>You've made too many requests exceeding service quotas.
90+
* </p>
91+
*
8892
* @throws {@link PricingServiceException}
8993
* <p>Base exception class for all service exceptions from Pricing service.</p>
9094
*

clients/client-pricing/src/commands/GetAttributeValuesCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ export interface GetAttributeValuesCommandOutput extends GetAttributeValuesRespo
7878
* @throws {@link NotFoundException} (client fault)
7979
* <p>The requested resource can't be found.</p>
8080
*
81+
* @throws {@link ThrottlingException} (client fault)
82+
* <p>You've made too many requests exceeding service quotas.
83+
* </p>
84+
*
8185
* @throws {@link PricingServiceException}
8286
* <p>Base exception class for all service exceptions from Pricing service.</p>
8387
*

clients/client-pricing/src/commands/GetPriceListFileUrlCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export interface GetPriceListFileUrlCommandOutput extends GetPriceListFileUrlRes
7272
* @throws {@link NotFoundException} (client fault)
7373
* <p>The requested resource can't be found.</p>
7474
*
75+
* @throws {@link ThrottlingException} (client fault)
76+
* <p>You've made too many requests exceeding service quotas.
77+
* </p>
78+
*
7579
* @throws {@link PricingServiceException}
7680
* <p>Base exception class for all service exceptions from Pricing service.</p>
7781
*

clients/client-pricing/src/commands/GetProductsCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ export interface GetProductsCommandOutput extends GetProductsResponse, __Metadat
8181
* @throws {@link NotFoundException} (client fault)
8282
* <p>The requested resource can't be found.</p>
8383
*
84+
* @throws {@link ThrottlingException} (client fault)
85+
* <p>You've made too many requests exceeding service quotas.
86+
* </p>
87+
*
8488
* @throws {@link PricingServiceException}
8589
* <p>Base exception class for all service exceptions from Pricing service.</p>
8690
*

clients/client-pricing/src/commands/ListPriceListsCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ export interface ListPriceListsCommandOutput extends ListPriceListsResponse, __M
9696
* @throws {@link NotFoundException} (client fault)
9797
* <p>The requested resource can't be found.</p>
9898
*
99+
* @throws {@link ThrottlingException} (client fault)
100+
* <p>You've made too many requests exceeding service quotas.
101+
* </p>
102+
*
99103
* @throws {@link PricingServiceException}
100104
* <p>Base exception class for all service exceptions from Pricing service.</p>
101105
*

clients/client-pricing/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* an <code>AmazonEC2</code> instance, with a <code>Provisioned IOPS</code>
2929
* <code>volumeType</code>.</p>
3030
* <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Using the
31-
* Amazon Web Services Price List API</a> in the <i>Billing User
31+
* Amazon Web Services Price List API</a> in the <i>Billing User
3232
* Guide</i>.</p>
3333
*
3434
* @packageDocumentation

clients/client-pricing/src/models/models_0.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export class ExpiredNextTokenException extends __BaseException {
146146
export class InternalErrorException extends __BaseException {
147147
readonly name: "InternalErrorException" = "InternalErrorException";
148148
readonly $fault: "server" = "server";
149+
$retryable = {};
149150
Message?: string;
150151
/**
151152
* @internal
@@ -227,6 +228,32 @@ export class NotFoundException extends __BaseException {
227228
}
228229
}
229230

231+
/**
232+
* @public
233+
* <p>You've made too many requests exceeding service quotas.
234+
* </p>
235+
*/
236+
export class ThrottlingException extends __BaseException {
237+
readonly name: "ThrottlingException" = "ThrottlingException";
238+
readonly $fault: "client" = "client";
239+
$retryable = {
240+
throttling: true,
241+
};
242+
Message?: string;
243+
/**
244+
* @internal
245+
*/
246+
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
247+
super({
248+
name: "ThrottlingException",
249+
$fault: "client",
250+
...opts,
251+
});
252+
Object.setPrototypeOf(this, ThrottlingException.prototype);
253+
this.Message = opts.Message;
254+
}
255+
}
256+
230257
/**
231258
* @public
232259
*/

clients/client-pricing/src/protocols/Aws_json1_1.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
InvalidParameterException,
3939
ListPriceListsRequest,
4040
NotFoundException,
41+
ThrottlingException,
4142
} from "../models/models_0";
4243
import { PricingServiceException as __BaseException } from "../models/PricingServiceException";
4344

@@ -231,6 +232,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
231232
case "NotFoundException":
232233
case "com.amazonaws.pricing#NotFoundException":
233234
throw await de_NotFoundExceptionRes(parsedOutput, context);
235+
case "ThrottlingException":
236+
case "com.amazonaws.pricing#ThrottlingException":
237+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
234238
case "AccessDeniedException":
235239
case "com.amazonaws.pricing#AccessDeniedException":
236240
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
@@ -337,6 +341,19 @@ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContex
337341
return __decorateServiceException(exception, body);
338342
};
339343

344+
/**
345+
* deserializeAws_json1_1ThrottlingExceptionRes
346+
*/
347+
const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise<ThrottlingException> => {
348+
const body = parsedOutput.body;
349+
const deserialized: any = _json(body);
350+
const exception = new ThrottlingException({
351+
$metadata: deserializeMetadata(parsedOutput),
352+
...deserialized,
353+
});
354+
return __decorateServiceException(exception, body);
355+
};
356+
340357
// se_DescribeServicesRequest omitted.
341358

342359
// se_Filter omitted.
@@ -422,6 +439,8 @@ const de_PriceListJsonItems = (output: any, context: __SerdeContext): (__LazyJso
422439

423440
// de_ServiceList omitted.
424441

442+
// de_ThrottlingException omitted.
443+
425444
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
426445
httpStatusCode: output.statusCode,
427446
requestId:

0 commit comments

Comments
 (0)