Skip to content

Commit

Permalink
feat(client-budgets): Add a budgets ThrottlingException. Update the C…
Browse files Browse the repository at this point in the history
…ostFilters value pattern.
  • Loading branch information
awstools committed Jun 14, 2022
1 parent 9536104 commit 3f98cfc
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clients/client-budgets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

AWS SDK for JavaScript Budgets Client for Node.js, Browser and React Native.

<p>The Amazon Web Services Budgets API enables you to use Amazon Web Services Budgets to plan your service usage, service costs, and instance reservations. The API reference provides descriptions, syntax, and usage examples for each of the actions and data types for Amazon Web Services Budgets. </p>
<p>Use the Amazon Web Services Budgets API to plan your service usage, service costs, and instance reservations. This API reference provides descriptions, syntax, and usage examples for each of the actions and data types for the Amazon Web Services Budgets feature. </p>
<p>Budgets provide you with a way to see the following information:</p>
<ul>
<li>
Expand Down
6 changes: 3 additions & 3 deletions clients/client-budgets/src/Budgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ import {
} from "./commands/UpdateSubscriberCommand";

/**
* <p>The Amazon Web Services Budgets API enables you to use Amazon Web Services Budgets to plan your service usage, service costs, and instance reservations. The API reference provides descriptions, syntax, and usage examples for each of the actions and data types for Amazon Web Services Budgets. </p>
* <p>Use the Amazon Web Services Budgets API to plan your service usage, service costs, and instance reservations. This API reference provides descriptions, syntax, and usage examples for each of the actions and data types for the Amazon Web Services Budgets feature. </p>
* <p>Budgets provide you with a way to see the following information:</p>
* <ul>
* <li>
Expand Down Expand Up @@ -155,13 +155,13 @@ import {
* </li>
* </ul>
* <p>Service Endpoint</p>
* <p>The Amazon Web Services Budgets API provides the following endpoint:</p>
* <p>The Amazon Web Services Budgets API provides the following endpoint:</p>
* <ul>
* <li>
* <p>https://budgets.amazonaws.com</p>
* </li>
* </ul>
* <p>For information about costs that are associated with the Amazon Web Services Budgets API, see <a href="https://aws.amazon.com/aws-cost-management/pricing/">Amazon Web Services Cost Management Pricing</a>.</p>
* <p>For information about costs that are associated with the Amazon Web Services Budgets API, see <a href="https://aws.amazon.com/aws-cost-management/pricing/">Amazon Web Services Cost Management Pricing</a>.</p>
*/
export class Budgets extends BudgetsClient {
/**
Expand Down
6 changes: 3 additions & 3 deletions clients/client-budgets/src/BudgetsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ type BudgetsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandl
export interface BudgetsClientResolvedConfig extends BudgetsClientResolvedConfigType {}

/**
* <p>The Amazon Web Services Budgets API enables you to use Amazon Web Services Budgets to plan your service usage, service costs, and instance reservations. The API reference provides descriptions, syntax, and usage examples for each of the actions and data types for Amazon Web Services Budgets. </p>
* <p>Use the Amazon Web Services Budgets API to plan your service usage, service costs, and instance reservations. This API reference provides descriptions, syntax, and usage examples for each of the actions and data types for the Amazon Web Services Budgets feature. </p>
* <p>Budgets provide you with a way to see the following information:</p>
* <ul>
* <li>
Expand Down Expand Up @@ -345,13 +345,13 @@ export interface BudgetsClientResolvedConfig extends BudgetsClientResolvedConfig
* </li>
* </ul>
* <p>Service Endpoint</p>
* <p>The Amazon Web Services Budgets API provides the following endpoint:</p>
* <p>The Amazon Web Services Budgets API provides the following endpoint:</p>
* <ul>
* <li>
* <p>https://budgets.amazonaws.com</p>
* </li>
* </ul>
* <p>For information about costs that are associated with the Amazon Web Services Budgets API, see <a href="https://aws.amazon.com/aws-cost-management/pricing/">Amazon Web Services Cost Management Pricing</a>.</p>
* <p>For information about costs that are associated with the Amazon Web Services Budgets API, see <a href="https://aws.amazon.com/aws-cost-management/pricing/">Amazon Web Services Cost Management Pricing</a>.</p>
*/
export class BudgetsClient extends __Client<
__HttpHandlerOptions,
Expand Down
26 changes: 26 additions & 0 deletions clients/client-budgets/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,32 @@ export class InvalidParameterException extends __BaseException {
}
}

/**
* <p>
* The number of API requests has exceeded the maximum allowed API request throttling limit for the account.
* </p>
*/
export class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException" = "ThrottlingException";
readonly $fault: "client" = "client";
/**
* <p>The error message the exception carries.</p>
*/
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
super({
name: "ThrottlingException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ThrottlingException.prototype);
this.Message = opts.Message;
}
}

export interface CreateBudgetActionRequest {
/**
* <p>The account ID of the user. It's a 12-digit number.</p>
Expand Down
89 changes: 89 additions & 0 deletions clients/client-budgets/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import {
Spend,
SsmActionDefinition,
Subscriber,
ThrottlingException,
TimePeriod,
UpdateBudgetActionRequest,
UpdateBudgetActionResponse,
Expand Down Expand Up @@ -491,6 +492,9 @@ const deserializeAws_json1_1CreateBudgetCommandError = async (
case "InvalidParameterException":
case "com.amazonaws.budgets#InvalidParameterException":
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -549,6 +553,9 @@ const deserializeAws_json1_1CreateBudgetActionCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -607,6 +614,9 @@ const deserializeAws_json1_1CreateNotificationCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -665,6 +675,9 @@ const deserializeAws_json1_1CreateSubscriberCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -717,6 +730,9 @@ const deserializeAws_json1_1DeleteBudgetCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -772,6 +788,9 @@ const deserializeAws_json1_1DeleteBudgetActionCommandError = async (
case "ResourceLockedException":
case "com.amazonaws.budgets#ResourceLockedException":
throw await deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -824,6 +843,9 @@ const deserializeAws_json1_1DeleteNotificationCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -876,6 +898,9 @@ const deserializeAws_json1_1DeleteSubscriberCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -928,6 +953,9 @@ const deserializeAws_json1_1DescribeBudgetCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -980,6 +1008,9 @@ const deserializeAws_json1_1DescribeBudgetActionCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1035,6 +1066,9 @@ const deserializeAws_json1_1DescribeBudgetActionHistoriesCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1087,6 +1121,9 @@ const deserializeAws_json1_1DescribeBudgetActionsForAccountCommandError = async
case "InvalidParameterException":
case "com.amazonaws.budgets#InvalidParameterException":
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1142,6 +1179,9 @@ const deserializeAws_json1_1DescribeBudgetActionsForBudgetCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1200,6 +1240,9 @@ const deserializeAws_json1_1DescribeBudgetNotificationsForAccountCommandError =
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1258,6 +1301,9 @@ const deserializeAws_json1_1DescribeBudgetPerformanceHistoryCommandError = async
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1316,6 +1362,9 @@ const deserializeAws_json1_1DescribeBudgetsCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1374,6 +1423,9 @@ const deserializeAws_json1_1DescribeNotificationsForBudgetCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1432,6 +1484,9 @@ const deserializeAws_json1_1DescribeSubscribersForNotificationCommandError = asy
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1487,6 +1542,9 @@ const deserializeAws_json1_1ExecuteBudgetActionCommandError = async (
case "ResourceLockedException":
case "com.amazonaws.budgets#ResourceLockedException":
throw await deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1539,6 +1597,9 @@ const deserializeAws_json1_1UpdateBudgetCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1594,6 +1655,9 @@ const deserializeAws_json1_1UpdateBudgetActionCommandError = async (
case "ResourceLockedException":
case "com.amazonaws.budgets#ResourceLockedException":
throw await deserializeAws_json1_1ResourceLockedExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1649,6 +1713,9 @@ const deserializeAws_json1_1UpdateNotificationCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1704,6 +1771,9 @@ const deserializeAws_json1_1UpdateSubscriberCommandError = async (
case "NotFoundException":
case "com.amazonaws.budgets#NotFoundException":
throw await deserializeAws_json1_1NotFoundExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazonaws.budgets#ThrottlingException":
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -1832,6 +1902,19 @@ const deserializeAws_json1_1ResourceLockedExceptionResponse = async (
return __decorateServiceException(exception, body);
};

const deserializeAws_json1_1ThrottlingExceptionResponse = async (
parsedOutput: any,
context: __SerdeContext
): Promise<ThrottlingException> => {
const body = parsedOutput.body;
const deserialized: any = deserializeAws_json1_1ThrottlingException(body, context);
const exception = new ThrottlingException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return __decorateServiceException(exception, body);
};

const serializeAws_json1_1ActionThreshold = (input: ActionThreshold, context: __SerdeContext): any => {
return {
...(input.ActionThresholdType !== undefined &&
Expand Down Expand Up @@ -3157,6 +3240,12 @@ const deserializeAws_json1_1TargetIds = (output: any, context: __SerdeContext):
return retVal;
};

const deserializeAws_json1_1ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => {
return {
Message: __expectString(output.Message),
} as any;
};

const deserializeAws_json1_1TimePeriod = (output: any, context: __SerdeContext): TimePeriod => {
return {
End:
Expand Down
Loading

0 comments on commit 3f98cfc

Please sign in to comment.