@aws-sdk/client-account 3.52.0 → 3.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** generate service exceptions as classes ([#3267](https://github.com/aws/aws-sdk-js-v3/issues/3267)) ([ca64fee](https://github.com/aws/aws-sdk-js-v3/commit/ca64feed3351c394c07dc26b782a5760a396a074))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-account
package/dist-cjs/index.js CHANGED
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountServiceException = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  tslib_1.__exportStar(require("./Account"), exports);
5
6
  tslib_1.__exportStar(require("./AccountClient"), exports);
6
7
  tslib_1.__exportStar(require("./commands"), exports);
7
8
  tslib_1.__exportStar(require("./models"), exports);
9
+ var AccountServiceException_1 = require("./models/AccountServiceException");
10
+ Object.defineProperty(exports, "AccountServiceException", { enumerable: true, get: function () { return AccountServiceException_1.AccountServiceException; } });
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountServiceException = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
5
+ class AccountServiceException extends smithy_client_1.ServiceException {
6
+ constructor(options) {
7
+ super(options);
8
+ Object.setPrototypeOf(this, AccountServiceException.prototype);
9
+ }
10
+ }
11
+ exports.AccountServiceException = AccountServiceException;
@@ -1,7 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PutAlternateContactRequest = exports.GetAlternateContactResponse = exports.AlternateContact = exports.GetAlternateContactRequest = exports.DeleteAlternateContactRequest = exports.AlternateContactType = void 0;
3
+ exports.PutAlternateContactRequest = exports.GetAlternateContactResponse = exports.AlternateContact = exports.GetAlternateContactRequest = exports.ValidationException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InternalServerException = exports.DeleteAlternateContactRequest = exports.AlternateContactType = exports.AccessDeniedException = void 0;
4
4
  const smithy_client_1 = require("@aws-sdk/smithy-client");
5
+ const AccountServiceException_1 = require("./AccountServiceException");
6
+ class AccessDeniedException extends AccountServiceException_1.AccountServiceException {
7
+ constructor(opts) {
8
+ super({
9
+ name: "AccessDeniedException",
10
+ $fault: "client",
11
+ ...opts,
12
+ });
13
+ this.name = "AccessDeniedException";
14
+ this.$fault = "client";
15
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
16
+ }
17
+ }
18
+ exports.AccessDeniedException = AccessDeniedException;
5
19
  var AlternateContactType;
6
20
  (function (AlternateContactType) {
7
21
  AlternateContactType["BILLING"] = "BILLING";
@@ -14,6 +28,62 @@ var DeleteAlternateContactRequest;
14
28
  ...obj,
15
29
  });
16
30
  })(DeleteAlternateContactRequest = exports.DeleteAlternateContactRequest || (exports.DeleteAlternateContactRequest = {}));
31
+ class InternalServerException extends AccountServiceException_1.AccountServiceException {
32
+ constructor(opts) {
33
+ super({
34
+ name: "InternalServerException",
35
+ $fault: "server",
36
+ ...opts,
37
+ });
38
+ this.name = "InternalServerException";
39
+ this.$fault = "server";
40
+ this.$retryable = {};
41
+ Object.setPrototypeOf(this, InternalServerException.prototype);
42
+ }
43
+ }
44
+ exports.InternalServerException = InternalServerException;
45
+ class ResourceNotFoundException extends AccountServiceException_1.AccountServiceException {
46
+ constructor(opts) {
47
+ super({
48
+ name: "ResourceNotFoundException",
49
+ $fault: "client",
50
+ ...opts,
51
+ });
52
+ this.name = "ResourceNotFoundException";
53
+ this.$fault = "client";
54
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
55
+ }
56
+ }
57
+ exports.ResourceNotFoundException = ResourceNotFoundException;
58
+ class TooManyRequestsException extends AccountServiceException_1.AccountServiceException {
59
+ constructor(opts) {
60
+ super({
61
+ name: "TooManyRequestsException",
62
+ $fault: "client",
63
+ ...opts,
64
+ });
65
+ this.name = "TooManyRequestsException";
66
+ this.$fault = "client";
67
+ this.$retryable = {
68
+ throttling: true,
69
+ };
70
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
71
+ }
72
+ }
73
+ exports.TooManyRequestsException = TooManyRequestsException;
74
+ class ValidationException extends AccountServiceException_1.AccountServiceException {
75
+ constructor(opts) {
76
+ super({
77
+ name: "ValidationException",
78
+ $fault: "client",
79
+ ...opts,
80
+ });
81
+ this.name = "ValidationException";
82
+ this.$fault = "client";
83
+ Object.setPrototypeOf(this, ValidationException.prototype);
84
+ }
85
+ }
86
+ exports.ValidationException = ValidationException;
17
87
  var GetAlternateContactRequest;
18
88
  (function (GetAlternateContactRequest) {
19
89
  GetAlternateContactRequest.filterSensitiveLog = (obj) => ({
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deserializeAws_restJson1PutAlternateContactCommand = exports.deserializeAws_restJson1GetAlternateContactCommand = exports.deserializeAws_restJson1DeleteAlternateContactCommand = exports.serializeAws_restJson1PutAlternateContactCommand = exports.serializeAws_restJson1GetAlternateContactCommand = exports.serializeAws_restJson1DeleteAlternateContactCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const AccountServiceException_1 = require("../models/AccountServiceException");
7
+ const models_0_1 = require("../models/models_0");
6
8
  const serializeAws_restJson1DeleteAlternateContactCommand = async (input, context) => {
7
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
10
  const headers = {
@@ -98,59 +100,28 @@ const deserializeAws_restJson1DeleteAlternateContactCommandError = async (output
98
100
  switch (errorCode) {
99
101
  case "AccessDeniedException":
100
102
  case "com.amazonaws.account#AccessDeniedException":
101
- response = {
102
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
103
- name: errorCode,
104
- $metadata: deserializeMetadata(output),
105
- };
106
- break;
103
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
107
104
  case "InternalServerException":
108
105
  case "com.amazonaws.account#InternalServerException":
109
- response = {
110
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
111
- name: errorCode,
112
- $metadata: deserializeMetadata(output),
113
- };
114
- break;
106
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
115
107
  case "ResourceNotFoundException":
116
108
  case "com.amazonaws.account#ResourceNotFoundException":
117
- response = {
118
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
119
- name: errorCode,
120
- $metadata: deserializeMetadata(output),
121
- };
122
- break;
109
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
123
110
  case "TooManyRequestsException":
124
111
  case "com.amazonaws.account#TooManyRequestsException":
125
- response = {
126
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
127
- name: errorCode,
128
- $metadata: deserializeMetadata(output),
129
- };
130
- break;
112
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
131
113
  case "ValidationException":
132
114
  case "com.amazonaws.account#ValidationException":
133
- response = {
134
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
135
- name: errorCode,
136
- $metadata: deserializeMetadata(output),
137
- };
138
- break;
115
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
139
116
  default:
140
117
  const parsedBody = parsedOutput.body;
141
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
142
- response = {
143
- ...parsedBody,
144
- name: `${errorCode}`,
145
- message: parsedBody.message || parsedBody.Message || errorCode,
118
+ response = new AccountServiceException_1.AccountServiceException({
119
+ name: parsedBody.code || parsedBody.Code || errorCode,
146
120
  $fault: "client",
147
121
  $metadata: deserializeMetadata(output),
148
- };
122
+ });
123
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
149
124
  }
150
- const message = response.message || response.Message || errorCode;
151
- response.message = message;
152
- delete response.Message;
153
- return Promise.reject(Object.assign(new Error(message), response));
154
125
  };
155
126
  const deserializeAws_restJson1GetAlternateContactCommand = async (output, context) => {
156
127
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -178,59 +149,28 @@ const deserializeAws_restJson1GetAlternateContactCommandError = async (output, c
178
149
  switch (errorCode) {
179
150
  case "AccessDeniedException":
180
151
  case "com.amazonaws.account#AccessDeniedException":
181
- response = {
182
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
183
- name: errorCode,
184
- $metadata: deserializeMetadata(output),
185
- };
186
- break;
152
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
187
153
  case "InternalServerException":
188
154
  case "com.amazonaws.account#InternalServerException":
189
- response = {
190
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
191
- name: errorCode,
192
- $metadata: deserializeMetadata(output),
193
- };
194
- break;
155
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
195
156
  case "ResourceNotFoundException":
196
157
  case "com.amazonaws.account#ResourceNotFoundException":
197
- response = {
198
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
199
- name: errorCode,
200
- $metadata: deserializeMetadata(output),
201
- };
202
- break;
158
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
203
159
  case "TooManyRequestsException":
204
160
  case "com.amazonaws.account#TooManyRequestsException":
205
- response = {
206
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
207
- name: errorCode,
208
- $metadata: deserializeMetadata(output),
209
- };
210
- break;
161
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
211
162
  case "ValidationException":
212
163
  case "com.amazonaws.account#ValidationException":
213
- response = {
214
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
215
- name: errorCode,
216
- $metadata: deserializeMetadata(output),
217
- };
218
- break;
164
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
219
165
  default:
220
166
  const parsedBody = parsedOutput.body;
221
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
222
- response = {
223
- ...parsedBody,
224
- name: `${errorCode}`,
225
- message: parsedBody.message || parsedBody.Message || errorCode,
167
+ response = new AccountServiceException_1.AccountServiceException({
168
+ name: parsedBody.code || parsedBody.Code || errorCode,
226
169
  $fault: "client",
227
170
  $metadata: deserializeMetadata(output),
228
- };
171
+ });
172
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
229
173
  }
230
- const message = response.message || response.Message || errorCode;
231
- response.message = message;
232
- delete response.Message;
233
- return Promise.reject(Object.assign(new Error(message), response));
234
174
  };
235
175
  const deserializeAws_restJson1PutAlternateContactCommand = async (output, context) => {
236
176
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -254,120 +194,85 @@ const deserializeAws_restJson1PutAlternateContactCommandError = async (output, c
254
194
  switch (errorCode) {
255
195
  case "AccessDeniedException":
256
196
  case "com.amazonaws.account#AccessDeniedException":
257
- response = {
258
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
259
- name: errorCode,
260
- $metadata: deserializeMetadata(output),
261
- };
262
- break;
197
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
263
198
  case "InternalServerException":
264
199
  case "com.amazonaws.account#InternalServerException":
265
- response = {
266
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
267
- name: errorCode,
268
- $metadata: deserializeMetadata(output),
269
- };
270
- break;
200
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
271
201
  case "TooManyRequestsException":
272
202
  case "com.amazonaws.account#TooManyRequestsException":
273
- response = {
274
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
275
- name: errorCode,
276
- $metadata: deserializeMetadata(output),
277
- };
278
- break;
203
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
279
204
  case "ValidationException":
280
205
  case "com.amazonaws.account#ValidationException":
281
- response = {
282
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
283
- name: errorCode,
284
- $metadata: deserializeMetadata(output),
285
- };
286
- break;
206
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
287
207
  default:
288
208
  const parsedBody = parsedOutput.body;
289
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
290
- response = {
291
- ...parsedBody,
292
- name: `${errorCode}`,
293
- message: parsedBody.message || parsedBody.Message || errorCode,
209
+ response = new AccountServiceException_1.AccountServiceException({
210
+ name: parsedBody.code || parsedBody.Code || errorCode,
294
211
  $fault: "client",
295
212
  $metadata: deserializeMetadata(output),
296
- };
213
+ });
214
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
297
215
  }
298
- const message = response.message || response.Message || errorCode;
299
- response.message = message;
300
- delete response.Message;
301
- return Promise.reject(Object.assign(new Error(message), response));
302
216
  };
303
217
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
304
- const contents = {
305
- name: "AccessDeniedException",
306
- $fault: "client",
307
- $metadata: deserializeMetadata(parsedOutput),
308
- message: undefined,
309
- };
218
+ const contents = {};
310
219
  const data = parsedOutput.body;
311
220
  if (data.message !== undefined && data.message !== null) {
312
221
  contents.message = smithy_client_1.expectString(data.message);
313
222
  }
314
- return contents;
223
+ const exception = new models_0_1.AccessDeniedException({
224
+ $metadata: deserializeMetadata(parsedOutput),
225
+ ...contents,
226
+ });
227
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
315
228
  };
316
229
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
317
- const contents = {
318
- name: "InternalServerException",
319
- $fault: "server",
320
- $retryable: {},
321
- $metadata: deserializeMetadata(parsedOutput),
322
- message: undefined,
323
- };
230
+ const contents = {};
324
231
  const data = parsedOutput.body;
325
232
  if (data.message !== undefined && data.message !== null) {
326
233
  contents.message = smithy_client_1.expectString(data.message);
327
234
  }
328
- return contents;
235
+ const exception = new models_0_1.InternalServerException({
236
+ $metadata: deserializeMetadata(parsedOutput),
237
+ ...contents,
238
+ });
239
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
329
240
  };
330
241
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
331
- const contents = {
332
- name: "ResourceNotFoundException",
333
- $fault: "client",
334
- $metadata: deserializeMetadata(parsedOutput),
335
- message: undefined,
336
- };
242
+ const contents = {};
337
243
  const data = parsedOutput.body;
338
244
  if (data.message !== undefined && data.message !== null) {
339
245
  contents.message = smithy_client_1.expectString(data.message);
340
246
  }
341
- return contents;
247
+ const exception = new models_0_1.ResourceNotFoundException({
248
+ $metadata: deserializeMetadata(parsedOutput),
249
+ ...contents,
250
+ });
251
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
342
252
  };
343
253
  const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
344
- const contents = {
345
- name: "TooManyRequestsException",
346
- $fault: "client",
347
- $retryable: {
348
- throttling: true,
349
- },
350
- $metadata: deserializeMetadata(parsedOutput),
351
- message: undefined,
352
- };
254
+ const contents = {};
353
255
  const data = parsedOutput.body;
354
256
  if (data.message !== undefined && data.message !== null) {
355
257
  contents.message = smithy_client_1.expectString(data.message);
356
258
  }
357
- return contents;
259
+ const exception = new models_0_1.TooManyRequestsException({
260
+ $metadata: deserializeMetadata(parsedOutput),
261
+ ...contents,
262
+ });
263
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
358
264
  };
359
265
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
360
- const contents = {
361
- name: "ValidationException",
362
- $fault: "client",
363
- $metadata: deserializeMetadata(parsedOutput),
364
- message: undefined,
365
- };
266
+ const contents = {};
366
267
  const data = parsedOutput.body;
367
268
  if (data.message !== undefined && data.message !== null) {
368
269
  contents.message = smithy_client_1.expectString(data.message);
369
270
  }
370
- return contents;
271
+ const exception = new models_0_1.ValidationException({
272
+ $metadata: deserializeMetadata(parsedOutput),
273
+ ...contents,
274
+ });
275
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
371
276
  };
372
277
  const deserializeAws_restJson1AlternateContact = (output, context) => {
373
278
  return {
package/dist-es/index.js CHANGED
@@ -2,3 +2,4 @@ export * from "./Account";
2
2
  export * from "./AccountClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { AccountServiceException } from "./models/AccountServiceException";
@@ -0,0 +1,12 @@
1
+ import { __extends } from "tslib";
2
+ import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
+ var AccountServiceException = (function (_super) {
4
+ __extends(AccountServiceException, _super);
5
+ function AccountServiceException(options) {
6
+ var _this = _super.call(this, options) || this;
7
+ Object.setPrototypeOf(_this, AccountServiceException.prototype);
8
+ return _this;
9
+ }
10
+ return AccountServiceException;
11
+ }(__ServiceException));
12
+ export { AccountServiceException };
@@ -1,5 +1,18 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __extends } from "tslib";
2
2
  import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
3
+ import { AccountServiceException as __BaseException } from "./AccountServiceException";
4
+ var AccessDeniedException = (function (_super) {
5
+ __extends(AccessDeniedException, _super);
6
+ function AccessDeniedException(opts) {
7
+ var _this = _super.call(this, __assign({ name: "AccessDeniedException", $fault: "client" }, opts)) || this;
8
+ _this.name = "AccessDeniedException";
9
+ _this.$fault = "client";
10
+ Object.setPrototypeOf(_this, AccessDeniedException.prototype);
11
+ return _this;
12
+ }
13
+ return AccessDeniedException;
14
+ }(__BaseException));
15
+ export { AccessDeniedException };
3
16
  export var AlternateContactType;
4
17
  (function (AlternateContactType) {
5
18
  AlternateContactType["BILLING"] = "BILLING";
@@ -10,6 +23,58 @@ export var DeleteAlternateContactRequest;
10
23
  (function (DeleteAlternateContactRequest) {
11
24
  DeleteAlternateContactRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
12
25
  })(DeleteAlternateContactRequest || (DeleteAlternateContactRequest = {}));
26
+ var InternalServerException = (function (_super) {
27
+ __extends(InternalServerException, _super);
28
+ function InternalServerException(opts) {
29
+ var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
30
+ _this.name = "InternalServerException";
31
+ _this.$fault = "server";
32
+ _this.$retryable = {};
33
+ Object.setPrototypeOf(_this, InternalServerException.prototype);
34
+ return _this;
35
+ }
36
+ return InternalServerException;
37
+ }(__BaseException));
38
+ export { InternalServerException };
39
+ var ResourceNotFoundException = (function (_super) {
40
+ __extends(ResourceNotFoundException, _super);
41
+ function ResourceNotFoundException(opts) {
42
+ var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
43
+ _this.name = "ResourceNotFoundException";
44
+ _this.$fault = "client";
45
+ Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
46
+ return _this;
47
+ }
48
+ return ResourceNotFoundException;
49
+ }(__BaseException));
50
+ export { ResourceNotFoundException };
51
+ var TooManyRequestsException = (function (_super) {
52
+ __extends(TooManyRequestsException, _super);
53
+ function TooManyRequestsException(opts) {
54
+ var _this = _super.call(this, __assign({ name: "TooManyRequestsException", $fault: "client" }, opts)) || this;
55
+ _this.name = "TooManyRequestsException";
56
+ _this.$fault = "client";
57
+ _this.$retryable = {
58
+ throttling: true,
59
+ };
60
+ Object.setPrototypeOf(_this, TooManyRequestsException.prototype);
61
+ return _this;
62
+ }
63
+ return TooManyRequestsException;
64
+ }(__BaseException));
65
+ export { TooManyRequestsException };
66
+ var ValidationException = (function (_super) {
67
+ __extends(ValidationException, _super);
68
+ function ValidationException(opts) {
69
+ var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
70
+ _this.name = "ValidationException";
71
+ _this.$fault = "client";
72
+ Object.setPrototypeOf(_this, ValidationException.prototype);
73
+ return _this;
74
+ }
75
+ return ValidationException;
76
+ }(__BaseException));
77
+ export { ValidationException };
13
78
  export var GetAlternateContactRequest;
14
79
  (function (GetAlternateContactRequest) {
15
80
  GetAlternateContactRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,6 +1,8 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, } from "@aws-sdk/smithy-client";
4
+ import { AccountServiceException as __BaseException } from "../models/AccountServiceException";
5
+ import { AccessDeniedException, InternalServerException, ResourceNotFoundException, TooManyRequestsException, ValidationException, } from "../models/models_0";
4
6
  export var serializeAws_restJson1DeleteAlternateContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
5
7
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
6
8
  return __generator(this, function (_c) {
@@ -95,16 +97,16 @@ export var deserializeAws_restJson1DeleteAlternateContactCommand = function (out
95
97
  });
96
98
  }); };
97
99
  var deserializeAws_restJson1DeleteAlternateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
98
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
99
- var _h;
100
- return __generator(this, function (_j) {
101
- switch (_j.label) {
100
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
101
+ var _c;
102
+ return __generator(this, function (_d) {
103
+ switch (_d.label) {
102
104
  case 0:
103
105
  _a = [__assign({}, output)];
104
- _h = {};
106
+ _c = {};
105
107
  return [4, parseBody(output.body, context)];
106
108
  case 1:
107
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
109
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
108
110
  errorCode = "UnknownError";
109
111
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
110
112
  _b = errorCode;
@@ -121,46 +123,24 @@ var deserializeAws_restJson1DeleteAlternateContactCommandError = function (outpu
121
123
  case "com.amazonaws.account#ValidationException": return [3, 10];
122
124
  }
123
125
  return [3, 12];
124
- case 2:
125
- _c = [{}];
126
- return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
127
- case 3:
128
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
129
- return [3, 13];
130
- case 4:
131
- _d = [{}];
132
- return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
133
- case 5:
134
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
135
- return [3, 13];
136
- case 6:
137
- _e = [{}];
138
- return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
139
- case 7:
140
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
141
- return [3, 13];
142
- case 8:
143
- _f = [{}];
144
- return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
145
- case 9:
146
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
147
- return [3, 13];
148
- case 10:
149
- _g = [{}];
150
- return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
151
- case 11:
152
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
153
- return [3, 13];
126
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
127
+ case 3: throw _d.sent();
128
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
129
+ case 5: throw _d.sent();
130
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
131
+ case 7: throw _d.sent();
132
+ case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
133
+ case 9: throw _d.sent();
134
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
135
+ case 11: throw _d.sent();
154
136
  case 12:
155
137
  parsedBody = parsedOutput.body;
156
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
157
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
158
- _j.label = 13;
159
- case 13:
160
- message = response.message || response.Message || errorCode;
161
- response.message = message;
162
- delete response.Message;
163
- return [2, Promise.reject(Object.assign(new Error(message), response))];
138
+ response = new __BaseException({
139
+ name: parsedBody.code || parsedBody.Code || errorCode,
140
+ $fault: "client",
141
+ $metadata: deserializeMetadata(output),
142
+ });
143
+ throw __decorateServiceException(response, parsedBody);
164
144
  }
165
145
  });
166
146
  }); };
@@ -189,16 +169,16 @@ export var deserializeAws_restJson1GetAlternateContactCommand = function (output
189
169
  });
190
170
  }); };
191
171
  var deserializeAws_restJson1GetAlternateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
192
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
193
- var _h;
194
- return __generator(this, function (_j) {
195
- switch (_j.label) {
172
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
173
+ var _c;
174
+ return __generator(this, function (_d) {
175
+ switch (_d.label) {
196
176
  case 0:
197
177
  _a = [__assign({}, output)];
198
- _h = {};
178
+ _c = {};
199
179
  return [4, parseBody(output.body, context)];
200
180
  case 1:
201
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
181
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
202
182
  errorCode = "UnknownError";
203
183
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
204
184
  _b = errorCode;
@@ -215,46 +195,24 @@ var deserializeAws_restJson1GetAlternateContactCommandError = function (output,
215
195
  case "com.amazonaws.account#ValidationException": return [3, 10];
216
196
  }
217
197
  return [3, 12];
218
- case 2:
219
- _c = [{}];
220
- return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
221
- case 3:
222
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
223
- return [3, 13];
224
- case 4:
225
- _d = [{}];
226
- return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
227
- case 5:
228
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
229
- return [3, 13];
230
- case 6:
231
- _e = [{}];
232
- return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
233
- case 7:
234
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
235
- return [3, 13];
236
- case 8:
237
- _f = [{}];
238
- return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
239
- case 9:
240
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
241
- return [3, 13];
242
- case 10:
243
- _g = [{}];
244
- return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
245
- case 11:
246
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
247
- return [3, 13];
198
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
199
+ case 3: throw _d.sent();
200
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
201
+ case 5: throw _d.sent();
202
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
203
+ case 7: throw _d.sent();
204
+ case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
205
+ case 9: throw _d.sent();
206
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
207
+ case 11: throw _d.sent();
248
208
  case 12:
249
209
  parsedBody = parsedOutput.body;
250
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
251
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
252
- _j.label = 13;
253
- case 13:
254
- message = response.message || response.Message || errorCode;
255
- response.message = message;
256
- delete response.Message;
257
- return [2, Promise.reject(Object.assign(new Error(message), response))];
210
+ response = new __BaseException({
211
+ name: parsedBody.code || parsedBody.Code || errorCode,
212
+ $fault: "client",
213
+ $metadata: deserializeMetadata(output),
214
+ });
215
+ throw __decorateServiceException(response, parsedBody);
258
216
  }
259
217
  });
260
218
  }); };
@@ -277,16 +235,16 @@ export var deserializeAws_restJson1PutAlternateContactCommand = function (output
277
235
  });
278
236
  }); };
279
237
  var deserializeAws_restJson1PutAlternateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
280
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
281
- var _g;
282
- return __generator(this, function (_h) {
283
- switch (_h.label) {
238
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
239
+ var _c;
240
+ return __generator(this, function (_d) {
241
+ switch (_d.label) {
284
242
  case 0:
285
243
  _a = [__assign({}, output)];
286
- _g = {};
244
+ _c = {};
287
245
  return [4, parseBody(output.body, context)];
288
246
  case 1:
289
- parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
247
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
290
248
  errorCode = "UnknownError";
291
249
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
292
250
  _b = errorCode;
@@ -301,125 +259,83 @@ var deserializeAws_restJson1PutAlternateContactCommandError = function (output,
301
259
  case "com.amazonaws.account#ValidationException": return [3, 8];
302
260
  }
303
261
  return [3, 10];
304
- case 2:
305
- _c = [{}];
306
- return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
307
- case 3:
308
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
309
- return [3, 11];
310
- case 4:
311
- _d = [{}];
312
- return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
313
- case 5:
314
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
315
- return [3, 11];
316
- case 6:
317
- _e = [{}];
318
- return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
319
- case 7:
320
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
321
- return [3, 11];
322
- case 8:
323
- _f = [{}];
324
- return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
325
- case 9:
326
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
327
- return [3, 11];
262
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
263
+ case 3: throw _d.sent();
264
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
265
+ case 5: throw _d.sent();
266
+ case 6: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
267
+ case 7: throw _d.sent();
268
+ case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
269
+ case 9: throw _d.sent();
328
270
  case 10:
329
271
  parsedBody = parsedOutput.body;
330
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
331
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
332
- _h.label = 11;
333
- case 11:
334
- message = response.message || response.Message || errorCode;
335
- response.message = message;
336
- delete response.Message;
337
- return [2, Promise.reject(Object.assign(new Error(message), response))];
272
+ response = new __BaseException({
273
+ name: parsedBody.code || parsedBody.Code || errorCode,
274
+ $fault: "client",
275
+ $metadata: deserializeMetadata(output),
276
+ });
277
+ throw __decorateServiceException(response, parsedBody);
338
278
  }
339
279
  });
340
280
  }); };
341
281
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
342
- var contents, data;
282
+ var contents, data, exception;
343
283
  return __generator(this, function (_a) {
344
- contents = {
345
- name: "AccessDeniedException",
346
- $fault: "client",
347
- $metadata: deserializeMetadata(parsedOutput),
348
- message: undefined,
349
- };
284
+ contents = {};
350
285
  data = parsedOutput.body;
351
286
  if (data.message !== undefined && data.message !== null) {
352
287
  contents.message = __expectString(data.message);
353
288
  }
354
- return [2, contents];
289
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
290
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
355
291
  });
356
292
  }); };
357
293
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
358
- var contents, data;
294
+ var contents, data, exception;
359
295
  return __generator(this, function (_a) {
360
- contents = {
361
- name: "InternalServerException",
362
- $fault: "server",
363
- $retryable: {},
364
- $metadata: deserializeMetadata(parsedOutput),
365
- message: undefined,
366
- };
296
+ contents = {};
367
297
  data = parsedOutput.body;
368
298
  if (data.message !== undefined && data.message !== null) {
369
299
  contents.message = __expectString(data.message);
370
300
  }
371
- return [2, contents];
301
+ exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
302
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
372
303
  });
373
304
  }); };
374
305
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
375
- var contents, data;
306
+ var contents, data, exception;
376
307
  return __generator(this, function (_a) {
377
- contents = {
378
- name: "ResourceNotFoundException",
379
- $fault: "client",
380
- $metadata: deserializeMetadata(parsedOutput),
381
- message: undefined,
382
- };
308
+ contents = {};
383
309
  data = parsedOutput.body;
384
310
  if (data.message !== undefined && data.message !== null) {
385
311
  contents.message = __expectString(data.message);
386
312
  }
387
- return [2, contents];
313
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
314
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
388
315
  });
389
316
  }); };
390
317
  var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
391
- var contents, data;
318
+ var contents, data, exception;
392
319
  return __generator(this, function (_a) {
393
- contents = {
394
- name: "TooManyRequestsException",
395
- $fault: "client",
396
- $retryable: {
397
- throttling: true,
398
- },
399
- $metadata: deserializeMetadata(parsedOutput),
400
- message: undefined,
401
- };
320
+ contents = {};
402
321
  data = parsedOutput.body;
403
322
  if (data.message !== undefined && data.message !== null) {
404
323
  contents.message = __expectString(data.message);
405
324
  }
406
- return [2, contents];
325
+ exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
326
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
407
327
  });
408
328
  }); };
409
329
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
410
- var contents, data;
330
+ var contents, data, exception;
411
331
  return __generator(this, function (_a) {
412
- contents = {
413
- name: "ValidationException",
414
- $fault: "client",
415
- $metadata: deserializeMetadata(parsedOutput),
416
- message: undefined,
417
- };
332
+ contents = {};
418
333
  data = parsedOutput.body;
419
334
  if (data.message !== undefined && data.message !== null) {
420
335
  contents.message = __expectString(data.message);
421
336
  }
422
- return [2, contents];
337
+ exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
338
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
423
339
  });
424
340
  }); };
425
341
  var deserializeAws_restJson1AlternateContact = function (output, context) {
@@ -2,3 +2,4 @@ export * from "./Account";
2
2
  export * from "./AccountClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { AccountServiceException } from "./models/AccountServiceException";
@@ -0,0 +1,10 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+ /**
3
+ * Base exception class for all service exceptions from Account service.
4
+ */
5
+ export declare class AccountServiceException extends __ServiceException {
6
+ /**
7
+ * @internal
8
+ */
9
+ constructor(options: __ServiceExceptionOptions);
10
+ }
@@ -1,12 +1,16 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { AccountServiceException as __BaseException } from "./AccountServiceException";
2
3
  /**
3
4
  * <p>The operation failed because the calling identity doesn't have the minimum required
4
5
  * permissions.</p>
5
6
  */
6
- export interface AccessDeniedException extends __SmithyException, $MetadataBearer {
7
- name: "AccessDeniedException";
8
- $fault: "client";
9
- message: string | undefined;
7
+ export declare class AccessDeniedException extends __BaseException {
8
+ readonly name: "AccessDeniedException";
9
+ readonly $fault: "client";
10
+ /**
11
+ * @internal
12
+ */
13
+ constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
10
14
  }
11
15
  export declare enum AlternateContactType {
12
16
  BILLING = "BILLING",
@@ -50,39 +54,51 @@ export declare namespace DeleteAlternateContactRequest {
50
54
  * <p>The operation failed because of an error internal to Amazon Web Services. Try your operation again
51
55
  * later.</p>
52
56
  */
53
- export interface InternalServerException extends __SmithyException, $MetadataBearer {
54
- name: "InternalServerException";
55
- $fault: "server";
57
+ export declare class InternalServerException extends __BaseException {
58
+ readonly name: "InternalServerException";
59
+ readonly $fault: "server";
56
60
  $retryable: {};
57
- message: string | undefined;
61
+ /**
62
+ * @internal
63
+ */
64
+ constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
58
65
  }
59
66
  /**
60
67
  * <p>The operation failed because it specified a resource that can't be found.</p>
61
68
  */
62
- export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer {
63
- name: "ResourceNotFoundException";
64
- $fault: "client";
65
- message: string | undefined;
69
+ export declare class ResourceNotFoundException extends __BaseException {
70
+ readonly name: "ResourceNotFoundException";
71
+ readonly $fault: "client";
72
+ /**
73
+ * @internal
74
+ */
75
+ constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
66
76
  }
67
77
  /**
68
78
  * <p>The operation failed because it was called too frequently and exceeded a throttle
69
79
  * limit.</p>
70
80
  */
71
- export interface TooManyRequestsException extends __SmithyException, $MetadataBearer {
72
- name: "TooManyRequestsException";
73
- $fault: "client";
81
+ export declare class TooManyRequestsException extends __BaseException {
82
+ readonly name: "TooManyRequestsException";
83
+ readonly $fault: "client";
74
84
  $retryable: {
75
- throttling: true;
85
+ throttling: boolean;
76
86
  };
77
- message: string | undefined;
87
+ /**
88
+ * @internal
89
+ */
90
+ constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>);
78
91
  }
79
92
  /**
80
93
  * <p>The operation failed because one of the input parameters was invalid.</p>
81
94
  */
82
- export interface ValidationException extends __SmithyException, $MetadataBearer {
83
- name: "ValidationException";
84
- $fault: "client";
85
- message: string | undefined;
95
+ export declare class ValidationException extends __BaseException {
96
+ readonly name: "ValidationException";
97
+ readonly $fault: "client";
98
+ /**
99
+ * @internal
100
+ */
101
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
86
102
  }
87
103
  export interface GetAlternateContactRequest {
88
104
  /**
@@ -2,3 +2,4 @@ export * from "./Account";
2
2
  export * from "./AccountClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { AccountServiceException } from "./models/AccountServiceException";
@@ -0,0 +1,6 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+
3
+ export declare class AccountServiceException extends __ServiceException {
4
+
5
+ constructor(options: __ServiceExceptionOptions);
6
+ }
@@ -1,9 +1,11 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { AccountServiceException as __BaseException } from "./AccountServiceException";
2
3
 
3
- export interface AccessDeniedException extends __SmithyException, $MetadataBearer {
4
- name: "AccessDeniedException";
5
- $fault: "client";
6
- message: string | undefined;
4
+ export declare class AccessDeniedException extends __BaseException {
5
+ readonly name: "AccessDeniedException";
6
+ readonly $fault: "client";
7
+
8
+ constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
7
9
  }
8
10
  export declare enum AlternateContactType {
9
11
  BILLING = "BILLING",
@@ -21,32 +23,36 @@ export declare namespace DeleteAlternateContactRequest {
21
23
  const filterSensitiveLog: (obj: DeleteAlternateContactRequest) => any;
22
24
  }
23
25
 
24
- export interface InternalServerException extends __SmithyException, $MetadataBearer {
25
- name: "InternalServerException";
26
- $fault: "server";
26
+ export declare class InternalServerException extends __BaseException {
27
+ readonly name: "InternalServerException";
28
+ readonly $fault: "server";
27
29
  $retryable: {};
28
- message: string | undefined;
30
+
31
+ constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
29
32
  }
30
33
 
31
- export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer {
32
- name: "ResourceNotFoundException";
33
- $fault: "client";
34
- message: string | undefined;
34
+ export declare class ResourceNotFoundException extends __BaseException {
35
+ readonly name: "ResourceNotFoundException";
36
+ readonly $fault: "client";
37
+
38
+ constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
35
39
  }
36
40
 
37
- export interface TooManyRequestsException extends __SmithyException, $MetadataBearer {
38
- name: "TooManyRequestsException";
39
- $fault: "client";
41
+ export declare class TooManyRequestsException extends __BaseException {
42
+ readonly name: "TooManyRequestsException";
43
+ readonly $fault: "client";
40
44
  $retryable: {
41
- throttling: true;
45
+ throttling: boolean;
42
46
  };
43
- message: string | undefined;
47
+
48
+ constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>);
44
49
  }
45
50
 
46
- export interface ValidationException extends __SmithyException, $MetadataBearer {
47
- name: "ValidationException";
48
- $fault: "client";
49
- message: string | undefined;
51
+ export declare class ValidationException extends __BaseException {
52
+ readonly name: "ValidationException";
53
+ readonly $fault: "client";
54
+
55
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
50
56
  }
51
57
  export interface GetAlternateContactRequest {
52
58
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-account",
3
3
  "description": "AWS SDK for JavaScript Account Client for Node.js, Browser and React Native",
4
- "version": "3.52.0",
4
+ "version": "3.53.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -18,34 +18,34 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.52.0",
22
- "@aws-sdk/config-resolver": "3.52.0",
23
- "@aws-sdk/credential-provider-node": "3.52.0",
24
- "@aws-sdk/fetch-http-handler": "3.52.0",
25
- "@aws-sdk/hash-node": "3.52.0",
26
- "@aws-sdk/invalid-dependency": "3.52.0",
27
- "@aws-sdk/middleware-content-length": "3.52.0",
28
- "@aws-sdk/middleware-host-header": "3.52.0",
29
- "@aws-sdk/middleware-logger": "3.52.0",
30
- "@aws-sdk/middleware-retry": "3.52.0",
31
- "@aws-sdk/middleware-serde": "3.52.0",
32
- "@aws-sdk/middleware-signing": "3.52.0",
33
- "@aws-sdk/middleware-stack": "3.52.0",
34
- "@aws-sdk/middleware-user-agent": "3.52.0",
35
- "@aws-sdk/node-config-provider": "3.52.0",
36
- "@aws-sdk/node-http-handler": "3.52.0",
37
- "@aws-sdk/protocol-http": "3.52.0",
38
- "@aws-sdk/smithy-client": "3.52.0",
39
- "@aws-sdk/types": "3.52.0",
40
- "@aws-sdk/url-parser": "3.52.0",
21
+ "@aws-sdk/client-sts": "3.53.0",
22
+ "@aws-sdk/config-resolver": "3.53.0",
23
+ "@aws-sdk/credential-provider-node": "3.53.0",
24
+ "@aws-sdk/fetch-http-handler": "3.53.0",
25
+ "@aws-sdk/hash-node": "3.53.0",
26
+ "@aws-sdk/invalid-dependency": "3.53.0",
27
+ "@aws-sdk/middleware-content-length": "3.53.0",
28
+ "@aws-sdk/middleware-host-header": "3.53.0",
29
+ "@aws-sdk/middleware-logger": "3.53.0",
30
+ "@aws-sdk/middleware-retry": "3.53.0",
31
+ "@aws-sdk/middleware-serde": "3.53.0",
32
+ "@aws-sdk/middleware-signing": "3.53.0",
33
+ "@aws-sdk/middleware-stack": "3.53.0",
34
+ "@aws-sdk/middleware-user-agent": "3.53.0",
35
+ "@aws-sdk/node-config-provider": "3.53.0",
36
+ "@aws-sdk/node-http-handler": "3.53.0",
37
+ "@aws-sdk/protocol-http": "3.53.0",
38
+ "@aws-sdk/smithy-client": "3.53.0",
39
+ "@aws-sdk/types": "3.53.0",
40
+ "@aws-sdk/url-parser": "3.53.0",
41
41
  "@aws-sdk/util-base64-browser": "3.52.0",
42
42
  "@aws-sdk/util-base64-node": "3.52.0",
43
43
  "@aws-sdk/util-body-length-browser": "3.52.0",
44
44
  "@aws-sdk/util-body-length-node": "3.52.0",
45
- "@aws-sdk/util-defaults-mode-browser": "3.52.0",
46
- "@aws-sdk/util-defaults-mode-node": "3.52.0",
47
- "@aws-sdk/util-user-agent-browser": "3.52.0",
48
- "@aws-sdk/util-user-agent-node": "3.52.0",
45
+ "@aws-sdk/util-defaults-mode-browser": "3.53.0",
46
+ "@aws-sdk/util-defaults-mode-node": "3.53.0",
47
+ "@aws-sdk/util-user-agent-browser": "3.53.0",
48
+ "@aws-sdk/util-user-agent-node": "3.53.0",
49
49
  "@aws-sdk/util-utf8-browser": "3.52.0",
50
50
  "@aws-sdk/util-utf8-node": "3.52.0",
51
51
  "tslib": "^2.3.0"