Skip to content

Commit 108f81d

Browse files
author
awstools
committed
feat(client-transfer): Allow additional operations to throw ThrottlingException
1 parent 6c5beed commit 108f81d

File tree

2 files changed

+45
-21
lines changed

2 files changed

+45
-21
lines changed

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,27 @@ export interface CreateAgreementResponse {
623623
AgreementId: string | undefined;
624624
}
625625

626+
/**
627+
* <p>The request was denied due to request throttling.</p>
628+
*/
629+
export class ThrottlingException extends __BaseException {
630+
readonly name: "ThrottlingException" = "ThrottlingException";
631+
readonly $fault: "client" = "client";
632+
RetryAfterSeconds?: string;
633+
/**
634+
* @internal
635+
*/
636+
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
637+
super({
638+
name: "ThrottlingException",
639+
$fault: "client",
640+
...opts,
641+
});
642+
Object.setPrototypeOf(this, ThrottlingException.prototype);
643+
this.RetryAfterSeconds = opts.RetryAfterSeconds;
644+
}
645+
}
646+
626647
export interface CreateConnectorRequest {
627648
/**
628649
* <p>The URL of the partner's AS2 endpoint.</p>
@@ -1265,27 +1286,6 @@ export interface CreateServerResponse {
12651286
ServerId: string | undefined;
12661287
}
12671288

1268-
/**
1269-
* <p>The request was denied due to request throttling.</p>
1270-
*/
1271-
export class ThrottlingException extends __BaseException {
1272-
readonly name: "ThrottlingException" = "ThrottlingException";
1273-
readonly $fault: "client" = "client";
1274-
RetryAfterSeconds?: string;
1275-
/**
1276-
* @internal
1277-
*/
1278-
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
1279-
super({
1280-
name: "ThrottlingException",
1281-
$fault: "client",
1282-
...opts,
1283-
});
1284-
Object.setPrototypeOf(this, ThrottlingException.prototype);
1285-
this.RetryAfterSeconds = opts.RetryAfterSeconds;
1286-
}
1287-
}
1288-
12891289
export interface CreateUserRequest {
12901290
/**
12911291
* <p>The landing directory (folder) for a user when they log in to the server using the client.</p>

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,9 @@ const deserializeAws_json1_1CreateAgreementCommandError = async (
11081108
case "ServiceUnavailableException":
11091109
case "com.amazonaws.transfer#ServiceUnavailableException":
11101110
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
1111+
case "ThrottlingException":
1112+
case "com.amazonaws.transfer#ThrottlingException":
1113+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
11111114
default:
11121115
const parsedBody = parsedOutput.body;
11131116
throwDefaultError({
@@ -1161,6 +1164,9 @@ const deserializeAws_json1_1CreateConnectorCommandError = async (
11611164
case "ServiceUnavailableException":
11621165
case "com.amazonaws.transfer#ServiceUnavailableException":
11631166
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
1167+
case "ThrottlingException":
1168+
case "com.amazonaws.transfer#ThrottlingException":
1169+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
11641170
default:
11651171
const parsedBody = parsedOutput.body;
11661172
throwDefaultError({
@@ -1211,6 +1217,9 @@ const deserializeAws_json1_1CreateProfileCommandError = async (
12111217
case "ServiceUnavailableException":
12121218
case "com.amazonaws.transfer#ServiceUnavailableException":
12131219
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
1220+
case "ThrottlingException":
1221+
case "com.amazonaws.transfer#ThrottlingException":
1222+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
12141223
default:
12151224
const parsedBody = parsedOutput.body;
12161225
throwDefaultError({
@@ -3603,6 +3612,9 @@ const deserializeAws_json1_1UpdateAccessCommandError = async (
36033612
case "ServiceUnavailableException":
36043613
case "com.amazonaws.transfer#ServiceUnavailableException":
36053614
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
3615+
case "ThrottlingException":
3616+
case "com.amazonaws.transfer#ThrottlingException":
3617+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
36063618
default:
36073619
const parsedBody = parsedOutput.body;
36083620
throwDefaultError({
@@ -3656,6 +3668,9 @@ const deserializeAws_json1_1UpdateAgreementCommandError = async (
36563668
case "ServiceUnavailableException":
36573669
case "com.amazonaws.transfer#ServiceUnavailableException":
36583670
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
3671+
case "ThrottlingException":
3672+
case "com.amazonaws.transfer#ThrottlingException":
3673+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
36593674
default:
36603675
const parsedBody = parsedOutput.body;
36613676
throwDefaultError({
@@ -3706,6 +3721,9 @@ const deserializeAws_json1_1UpdateCertificateCommandError = async (
37063721
case "ServiceUnavailableException":
37073722
case "com.amazonaws.transfer#ServiceUnavailableException":
37083723
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
3724+
case "ThrottlingException":
3725+
case "com.amazonaws.transfer#ThrottlingException":
3726+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
37093727
default:
37103728
const parsedBody = parsedOutput.body;
37113729
throwDefaultError({
@@ -3759,6 +3777,9 @@ const deserializeAws_json1_1UpdateConnectorCommandError = async (
37593777
case "ServiceUnavailableException":
37603778
case "com.amazonaws.transfer#ServiceUnavailableException":
37613779
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
3780+
case "ThrottlingException":
3781+
case "com.amazonaws.transfer#ThrottlingException":
3782+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
37623783
default:
37633784
const parsedBody = parsedOutput.body;
37643785
throwDefaultError({
@@ -3862,6 +3883,9 @@ const deserializeAws_json1_1UpdateProfileCommandError = async (
38623883
case "ServiceUnavailableException":
38633884
case "com.amazonaws.transfer#ServiceUnavailableException":
38643885
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
3886+
case "ThrottlingException":
3887+
case "com.amazonaws.transfer#ThrottlingException":
3888+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
38653889
default:
38663890
const parsedBody = parsedOutput.body;
38673891
throwDefaultError({

0 commit comments

Comments
 (0)