@aws-sdk/client-cost-and-usage-report-service 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-cost-and-usage-report-service
package/dist-cjs/index.js CHANGED
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CostAndUsageReportServiceServiceException = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  tslib_1.__exportStar(require("./CostAndUsageReportService"), exports);
5
6
  tslib_1.__exportStar(require("./CostAndUsageReportServiceClient"), exports);
6
7
  tslib_1.__exportStar(require("./commands"), exports);
7
8
  tslib_1.__exportStar(require("./models"), exports);
8
9
  tslib_1.__exportStar(require("./pagination"), exports);
10
+ var CostAndUsageReportServiceServiceException_1 = require("./models/CostAndUsageReportServiceServiceException");
11
+ Object.defineProperty(exports, "CostAndUsageReportServiceServiceException", { enumerable: true, get: function () { return CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException; } });
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CostAndUsageReportServiceServiceException = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
5
+ class CostAndUsageReportServiceServiceException extends smithy_client_1.ServiceException {
6
+ constructor(options) {
7
+ super(options);
8
+ Object.setPrototypeOf(this, CostAndUsageReportServiceServiceException.prototype);
9
+ }
10
+ }
11
+ exports.CostAndUsageReportServiceServiceException = CostAndUsageReportServiceServiceException;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PutReportDefinitionResponse = exports.PutReportDefinitionRequest = exports.ModifyReportDefinitionResponse = exports.ModifyReportDefinitionRequest = exports.DescribeReportDefinitionsResponse = exports.ReportDefinition = exports.TimeUnit = exports.AWSRegion = exports.ReportVersioning = exports.ReportFormat = exports.CompressionFormat = exports.SchemaElement = exports.DescribeReportDefinitionsRequest = exports.DeleteReportDefinitionResponse = exports.DeleteReportDefinitionRequest = exports.AdditionalArtifact = void 0;
3
+ exports.ReportLimitReachedException = exports.PutReportDefinitionResponse = exports.PutReportDefinitionRequest = exports.DuplicateReportNameException = exports.ModifyReportDefinitionResponse = exports.ModifyReportDefinitionRequest = exports.DescribeReportDefinitionsResponse = exports.ReportDefinition = exports.TimeUnit = exports.AWSRegion = exports.ReportVersioning = exports.ReportFormat = exports.CompressionFormat = exports.SchemaElement = exports.DescribeReportDefinitionsRequest = exports.ValidationException = exports.InternalErrorException = exports.DeleteReportDefinitionResponse = exports.DeleteReportDefinitionRequest = exports.AdditionalArtifact = void 0;
4
+ const CostAndUsageReportServiceServiceException_1 = require("./CostAndUsageReportServiceServiceException");
4
5
  var AdditionalArtifact;
5
6
  (function (AdditionalArtifact) {
6
7
  AdditionalArtifact["ATHENA"] = "ATHENA";
@@ -19,6 +20,34 @@ var DeleteReportDefinitionResponse;
19
20
  ...obj,
20
21
  });
21
22
  })(DeleteReportDefinitionResponse = exports.DeleteReportDefinitionResponse || (exports.DeleteReportDefinitionResponse = {}));
23
+ class InternalErrorException extends CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException {
24
+ constructor(opts) {
25
+ super({
26
+ name: "InternalErrorException",
27
+ $fault: "server",
28
+ ...opts,
29
+ });
30
+ this.name = "InternalErrorException";
31
+ this.$fault = "server";
32
+ Object.setPrototypeOf(this, InternalErrorException.prototype);
33
+ this.Message = opts.Message;
34
+ }
35
+ }
36
+ exports.InternalErrorException = InternalErrorException;
37
+ class ValidationException extends CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException {
38
+ constructor(opts) {
39
+ super({
40
+ name: "ValidationException",
41
+ $fault: "client",
42
+ ...opts,
43
+ });
44
+ this.name = "ValidationException";
45
+ this.$fault = "client";
46
+ Object.setPrototypeOf(this, ValidationException.prototype);
47
+ this.Message = opts.Message;
48
+ }
49
+ }
50
+ exports.ValidationException = ValidationException;
22
51
  var DescribeReportDefinitionsRequest;
23
52
  (function (DescribeReportDefinitionsRequest) {
24
53
  DescribeReportDefinitionsRequest.filterSensitiveLog = (obj) => ({
@@ -101,6 +130,20 @@ var ModifyReportDefinitionResponse;
101
130
  ...obj,
102
131
  });
103
132
  })(ModifyReportDefinitionResponse = exports.ModifyReportDefinitionResponse || (exports.ModifyReportDefinitionResponse = {}));
133
+ class DuplicateReportNameException extends CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException {
134
+ constructor(opts) {
135
+ super({
136
+ name: "DuplicateReportNameException",
137
+ $fault: "client",
138
+ ...opts,
139
+ });
140
+ this.name = "DuplicateReportNameException";
141
+ this.$fault = "client";
142
+ Object.setPrototypeOf(this, DuplicateReportNameException.prototype);
143
+ this.Message = opts.Message;
144
+ }
145
+ }
146
+ exports.DuplicateReportNameException = DuplicateReportNameException;
104
147
  var PutReportDefinitionRequest;
105
148
  (function (PutReportDefinitionRequest) {
106
149
  PutReportDefinitionRequest.filterSensitiveLog = (obj) => ({
@@ -113,3 +156,17 @@ var PutReportDefinitionResponse;
113
156
  ...obj,
114
157
  });
115
158
  })(PutReportDefinitionResponse = exports.PutReportDefinitionResponse || (exports.PutReportDefinitionResponse = {}));
159
+ class ReportLimitReachedException extends CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException {
160
+ constructor(opts) {
161
+ super({
162
+ name: "ReportLimitReachedException",
163
+ $fault: "client",
164
+ ...opts,
165
+ });
166
+ this.name = "ReportLimitReachedException";
167
+ this.$fault = "client";
168
+ Object.setPrototypeOf(this, ReportLimitReachedException.prototype);
169
+ this.Message = opts.Message;
170
+ }
171
+ }
172
+ exports.ReportLimitReachedException = ReportLimitReachedException;
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deserializeAws_json1_1PutReportDefinitionCommand = exports.deserializeAws_json1_1ModifyReportDefinitionCommand = exports.deserializeAws_json1_1DescribeReportDefinitionsCommand = exports.deserializeAws_json1_1DeleteReportDefinitionCommand = exports.serializeAws_json1_1PutReportDefinitionCommand = exports.serializeAws_json1_1ModifyReportDefinitionCommand = exports.serializeAws_json1_1DescribeReportDefinitionsCommand = exports.serializeAws_json1_1DeleteReportDefinitionCommand = 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 CostAndUsageReportServiceServiceException_1 = require("../models/CostAndUsageReportServiceServiceException");
7
+ const models_0_1 = require("../models/models_0");
6
8
  const serializeAws_json1_1DeleteReportDefinitionCommand = async (input, context) => {
7
9
  const headers = {
8
10
  "content-type": "application/x-amz-json-1.1",
@@ -68,35 +70,19 @@ const deserializeAws_json1_1DeleteReportDefinitionCommandError = async (output,
68
70
  switch (errorCode) {
69
71
  case "InternalErrorException":
70
72
  case "com.amazonaws.costandusagereportservice#InternalErrorException":
71
- response = {
72
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
73
- name: errorCode,
74
- $metadata: deserializeMetadata(output),
75
- };
76
- break;
73
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
77
74
  case "ValidationException":
78
75
  case "com.amazonaws.costandusagereportservice#ValidationException":
79
- response = {
80
- ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
81
- name: errorCode,
82
- $metadata: deserializeMetadata(output),
83
- };
84
- break;
76
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
85
77
  default:
86
78
  const parsedBody = parsedOutput.body;
87
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
88
- response = {
89
- ...parsedBody,
90
- name: `${errorCode}`,
91
- message: parsedBody.message || parsedBody.Message || errorCode,
79
+ response = new CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException({
80
+ name: parsedBody.code || parsedBody.Code || errorCode,
92
81
  $fault: "client",
93
82
  $metadata: deserializeMetadata(output),
94
- };
83
+ });
84
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
95
85
  }
96
- const message = response.message || response.Message || errorCode;
97
- response.message = message;
98
- delete response.Message;
99
- return Promise.reject(Object.assign(new Error(message), response));
100
86
  };
101
87
  const deserializeAws_json1_1DescribeReportDefinitionsCommand = async (output, context) => {
102
88
  if (output.statusCode >= 300) {
@@ -123,27 +109,16 @@ const deserializeAws_json1_1DescribeReportDefinitionsCommandError = async (outpu
123
109
  switch (errorCode) {
124
110
  case "InternalErrorException":
125
111
  case "com.amazonaws.costandusagereportservice#InternalErrorException":
126
- response = {
127
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
128
- name: errorCode,
129
- $metadata: deserializeMetadata(output),
130
- };
131
- break;
112
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
132
113
  default:
133
114
  const parsedBody = parsedOutput.body;
134
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
135
- response = {
136
- ...parsedBody,
137
- name: `${errorCode}`,
138
- message: parsedBody.message || parsedBody.Message || errorCode,
115
+ response = new CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException({
116
+ name: parsedBody.code || parsedBody.Code || errorCode,
139
117
  $fault: "client",
140
118
  $metadata: deserializeMetadata(output),
141
- };
119
+ });
120
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
142
121
  }
143
- const message = response.message || response.Message || errorCode;
144
- response.message = message;
145
- delete response.Message;
146
- return Promise.reject(Object.assign(new Error(message), response));
147
122
  };
148
123
  const deserializeAws_json1_1ModifyReportDefinitionCommand = async (output, context) => {
149
124
  if (output.statusCode >= 300) {
@@ -170,35 +145,19 @@ const deserializeAws_json1_1ModifyReportDefinitionCommandError = async (output,
170
145
  switch (errorCode) {
171
146
  case "InternalErrorException":
172
147
  case "com.amazonaws.costandusagereportservice#InternalErrorException":
173
- response = {
174
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
175
- name: errorCode,
176
- $metadata: deserializeMetadata(output),
177
- };
178
- break;
148
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
179
149
  case "ValidationException":
180
150
  case "com.amazonaws.costandusagereportservice#ValidationException":
181
- response = {
182
- ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
183
- name: errorCode,
184
- $metadata: deserializeMetadata(output),
185
- };
186
- break;
151
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
187
152
  default:
188
153
  const parsedBody = parsedOutput.body;
189
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
190
- response = {
191
- ...parsedBody,
192
- name: `${errorCode}`,
193
- message: parsedBody.message || parsedBody.Message || errorCode,
154
+ response = new CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException({
155
+ name: parsedBody.code || parsedBody.Code || errorCode,
194
156
  $fault: "client",
195
157
  $metadata: deserializeMetadata(output),
196
- };
158
+ });
159
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
197
160
  }
198
- const message = response.message || response.Message || errorCode;
199
- response.message = message;
200
- delete response.Message;
201
- return Promise.reject(Object.assign(new Error(message), response));
202
161
  };
203
162
  const deserializeAws_json1_1PutReportDefinitionCommand = async (output, context) => {
204
163
  if (output.statusCode >= 300) {
@@ -225,95 +184,61 @@ const deserializeAws_json1_1PutReportDefinitionCommandError = async (output, con
225
184
  switch (errorCode) {
226
185
  case "DuplicateReportNameException":
227
186
  case "com.amazonaws.costandusagereportservice#DuplicateReportNameException":
228
- response = {
229
- ...(await deserializeAws_json1_1DuplicateReportNameExceptionResponse(parsedOutput, context)),
230
- name: errorCode,
231
- $metadata: deserializeMetadata(output),
232
- };
233
- break;
187
+ throw await deserializeAws_json1_1DuplicateReportNameExceptionResponse(parsedOutput, context);
234
188
  case "InternalErrorException":
235
189
  case "com.amazonaws.costandusagereportservice#InternalErrorException":
236
- response = {
237
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
238
- name: errorCode,
239
- $metadata: deserializeMetadata(output),
240
- };
241
- break;
190
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
242
191
  case "ReportLimitReachedException":
243
192
  case "com.amazonaws.costandusagereportservice#ReportLimitReachedException":
244
- response = {
245
- ...(await deserializeAws_json1_1ReportLimitReachedExceptionResponse(parsedOutput, context)),
246
- name: errorCode,
247
- $metadata: deserializeMetadata(output),
248
- };
249
- break;
193
+ throw await deserializeAws_json1_1ReportLimitReachedExceptionResponse(parsedOutput, context);
250
194
  case "ValidationException":
251
195
  case "com.amazonaws.costandusagereportservice#ValidationException":
252
- response = {
253
- ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
254
- name: errorCode,
255
- $metadata: deserializeMetadata(output),
256
- };
257
- break;
196
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
258
197
  default:
259
198
  const parsedBody = parsedOutput.body;
260
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
261
- response = {
262
- ...parsedBody,
263
- name: `${errorCode}`,
264
- message: parsedBody.message || parsedBody.Message || errorCode,
199
+ response = new CostAndUsageReportServiceServiceException_1.CostAndUsageReportServiceServiceException({
200
+ name: parsedBody.code || parsedBody.Code || errorCode,
265
201
  $fault: "client",
266
202
  $metadata: deserializeMetadata(output),
267
- };
203
+ });
204
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
268
205
  }
269
- const message = response.message || response.Message || errorCode;
270
- response.message = message;
271
- delete response.Message;
272
- return Promise.reject(Object.assign(new Error(message), response));
273
206
  };
274
207
  const deserializeAws_json1_1DuplicateReportNameExceptionResponse = async (parsedOutput, context) => {
275
208
  const body = parsedOutput.body;
276
209
  const deserialized = deserializeAws_json1_1DuplicateReportNameException(body, context);
277
- const contents = {
278
- name: "DuplicateReportNameException",
279
- $fault: "client",
210
+ const exception = new models_0_1.DuplicateReportNameException({
280
211
  $metadata: deserializeMetadata(parsedOutput),
281
212
  ...deserialized,
282
- };
283
- return contents;
213
+ });
214
+ return smithy_client_1.decorateServiceException(exception, body);
284
215
  };
285
216
  const deserializeAws_json1_1InternalErrorExceptionResponse = async (parsedOutput, context) => {
286
217
  const body = parsedOutput.body;
287
218
  const deserialized = deserializeAws_json1_1InternalErrorException(body, context);
288
- const contents = {
289
- name: "InternalErrorException",
290
- $fault: "server",
219
+ const exception = new models_0_1.InternalErrorException({
291
220
  $metadata: deserializeMetadata(parsedOutput),
292
221
  ...deserialized,
293
- };
294
- return contents;
222
+ });
223
+ return smithy_client_1.decorateServiceException(exception, body);
295
224
  };
296
225
  const deserializeAws_json1_1ReportLimitReachedExceptionResponse = async (parsedOutput, context) => {
297
226
  const body = parsedOutput.body;
298
227
  const deserialized = deserializeAws_json1_1ReportLimitReachedException(body, context);
299
- const contents = {
300
- name: "ReportLimitReachedException",
301
- $fault: "client",
228
+ const exception = new models_0_1.ReportLimitReachedException({
302
229
  $metadata: deserializeMetadata(parsedOutput),
303
230
  ...deserialized,
304
- };
305
- return contents;
231
+ });
232
+ return smithy_client_1.decorateServiceException(exception, body);
306
233
  };
307
234
  const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
308
235
  const body = parsedOutput.body;
309
236
  const deserialized = deserializeAws_json1_1ValidationException(body, context);
310
- const contents = {
311
- name: "ValidationException",
312
- $fault: "client",
237
+ const exception = new models_0_1.ValidationException({
313
238
  $metadata: deserializeMetadata(parsedOutput),
314
239
  ...deserialized,
315
- };
316
- return contents;
240
+ });
241
+ return smithy_client_1.decorateServiceException(exception, body);
317
242
  };
318
243
  const serializeAws_json1_1AdditionalArtifactList = (input, context) => {
319
244
  return input
@@ -389,7 +314,7 @@ const serializeAws_json1_1SchemaElementList = (input, context) => {
389
314
  });
390
315
  };
391
316
  const deserializeAws_json1_1AdditionalArtifactList = (output, context) => {
392
- return (output || [])
317
+ const retVal = (output || [])
393
318
  .filter((e) => e != null)
394
319
  .map((entry) => {
395
320
  if (entry === null) {
@@ -397,6 +322,7 @@ const deserializeAws_json1_1AdditionalArtifactList = (output, context) => {
397
322
  }
398
323
  return smithy_client_1.expectString(entry);
399
324
  });
325
+ return retVal;
400
326
  };
401
327
  const deserializeAws_json1_1DeleteReportDefinitionResponse = (output, context) => {
402
328
  return {
@@ -448,7 +374,7 @@ const deserializeAws_json1_1ReportDefinition = (output, context) => {
448
374
  };
449
375
  };
450
376
  const deserializeAws_json1_1ReportDefinitionList = (output, context) => {
451
- return (output || [])
377
+ const retVal = (output || [])
452
378
  .filter((e) => e != null)
453
379
  .map((entry) => {
454
380
  if (entry === null) {
@@ -456,6 +382,7 @@ const deserializeAws_json1_1ReportDefinitionList = (output, context) => {
456
382
  }
457
383
  return deserializeAws_json1_1ReportDefinition(entry, context);
458
384
  });
385
+ return retVal;
459
386
  };
460
387
  const deserializeAws_json1_1ReportLimitReachedException = (output, context) => {
461
388
  return {
@@ -463,7 +390,7 @@ const deserializeAws_json1_1ReportLimitReachedException = (output, context) => {
463
390
  };
464
391
  };
465
392
  const deserializeAws_json1_1SchemaElementList = (output, context) => {
466
- return (output || [])
393
+ const retVal = (output || [])
467
394
  .filter((e) => e != null)
468
395
  .map((entry) => {
469
396
  if (entry === null) {
@@ -471,6 +398,7 @@ const deserializeAws_json1_1SchemaElementList = (output, context) => {
471
398
  }
472
399
  return smithy_client_1.expectString(entry);
473
400
  });
401
+ return retVal;
474
402
  };
475
403
  const deserializeAws_json1_1ValidationException = (output, context) => {
476
404
  return {
package/dist-es/index.js CHANGED
@@ -3,3 +3,4 @@ export * from "./CostAndUsageReportServiceClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
5
  export * from "./pagination";
6
+ export { CostAndUsageReportServiceServiceException } from "./models/CostAndUsageReportServiceServiceException";
@@ -0,0 +1,12 @@
1
+ import { __extends } from "tslib";
2
+ import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
+ var CostAndUsageReportServiceServiceException = (function (_super) {
4
+ __extends(CostAndUsageReportServiceServiceException, _super);
5
+ function CostAndUsageReportServiceServiceException(options) {
6
+ var _this = _super.call(this, options) || this;
7
+ Object.setPrototypeOf(_this, CostAndUsageReportServiceServiceException.prototype);
8
+ return _this;
9
+ }
10
+ return CostAndUsageReportServiceServiceException;
11
+ }(__ServiceException));
12
+ export { CostAndUsageReportServiceServiceException };
@@ -1,4 +1,5 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __extends } from "tslib";
2
+ import { CostAndUsageReportServiceServiceException as __BaseException } from "./CostAndUsageReportServiceServiceException";
2
3
  export var AdditionalArtifact;
3
4
  (function (AdditionalArtifact) {
4
5
  AdditionalArtifact["ATHENA"] = "ATHENA";
@@ -13,6 +14,32 @@ export var DeleteReportDefinitionResponse;
13
14
  (function (DeleteReportDefinitionResponse) {
14
15
  DeleteReportDefinitionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
15
16
  })(DeleteReportDefinitionResponse || (DeleteReportDefinitionResponse = {}));
17
+ var InternalErrorException = (function (_super) {
18
+ __extends(InternalErrorException, _super);
19
+ function InternalErrorException(opts) {
20
+ var _this = _super.call(this, __assign({ name: "InternalErrorException", $fault: "server" }, opts)) || this;
21
+ _this.name = "InternalErrorException";
22
+ _this.$fault = "server";
23
+ Object.setPrototypeOf(_this, InternalErrorException.prototype);
24
+ _this.Message = opts.Message;
25
+ return _this;
26
+ }
27
+ return InternalErrorException;
28
+ }(__BaseException));
29
+ export { InternalErrorException };
30
+ var ValidationException = (function (_super) {
31
+ __extends(ValidationException, _super);
32
+ function ValidationException(opts) {
33
+ var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
34
+ _this.name = "ValidationException";
35
+ _this.$fault = "client";
36
+ Object.setPrototypeOf(_this, ValidationException.prototype);
37
+ _this.Message = opts.Message;
38
+ return _this;
39
+ }
40
+ return ValidationException;
41
+ }(__BaseException));
42
+ export { ValidationException };
16
43
  export var DescribeReportDefinitionsRequest;
17
44
  (function (DescribeReportDefinitionsRequest) {
18
45
  DescribeReportDefinitionsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -85,6 +112,19 @@ export var ModifyReportDefinitionResponse;
85
112
  (function (ModifyReportDefinitionResponse) {
86
113
  ModifyReportDefinitionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
87
114
  })(ModifyReportDefinitionResponse || (ModifyReportDefinitionResponse = {}));
115
+ var DuplicateReportNameException = (function (_super) {
116
+ __extends(DuplicateReportNameException, _super);
117
+ function DuplicateReportNameException(opts) {
118
+ var _this = _super.call(this, __assign({ name: "DuplicateReportNameException", $fault: "client" }, opts)) || this;
119
+ _this.name = "DuplicateReportNameException";
120
+ _this.$fault = "client";
121
+ Object.setPrototypeOf(_this, DuplicateReportNameException.prototype);
122
+ _this.Message = opts.Message;
123
+ return _this;
124
+ }
125
+ return DuplicateReportNameException;
126
+ }(__BaseException));
127
+ export { DuplicateReportNameException };
88
128
  export var PutReportDefinitionRequest;
89
129
  (function (PutReportDefinitionRequest) {
90
130
  PutReportDefinitionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -93,3 +133,16 @@ export var PutReportDefinitionResponse;
93
133
  (function (PutReportDefinitionResponse) {
94
134
  PutReportDefinitionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
95
135
  })(PutReportDefinitionResponse || (PutReportDefinitionResponse = {}));
136
+ var ReportLimitReachedException = (function (_super) {
137
+ __extends(ReportLimitReachedException, _super);
138
+ function ReportLimitReachedException(opts) {
139
+ var _this = _super.call(this, __assign({ name: "ReportLimitReachedException", $fault: "client" }, opts)) || this;
140
+ _this.name = "ReportLimitReachedException";
141
+ _this.$fault = "client";
142
+ Object.setPrototypeOf(_this, ReportLimitReachedException.prototype);
143
+ _this.Message = opts.Message;
144
+ return _this;
145
+ }
146
+ return ReportLimitReachedException;
147
+ }(__BaseException));
148
+ export { ReportLimitReachedException };
@@ -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 { expectBoolean as __expectBoolean, expectString as __expectString } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectString as __expectString, } from "@aws-sdk/smithy-client";
4
+ import { CostAndUsageReportServiceServiceException as __BaseException } from "../models/CostAndUsageReportServiceServiceException";
5
+ import { DuplicateReportNameException, InternalErrorException, ReportLimitReachedException, ValidationException, } from "../models/models_0";
4
6
  export var serializeAws_json1_1DeleteReportDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
5
7
  var headers, body;
6
8
  return __generator(this, function (_a) {
@@ -64,16 +66,16 @@ export var deserializeAws_json1_1DeleteReportDefinitionCommand = function (outpu
64
66
  });
65
67
  }); };
66
68
  var deserializeAws_json1_1DeleteReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
67
- var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
68
- var _e;
69
- return __generator(this, function (_f) {
70
- switch (_f.label) {
69
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
70
+ var _c;
71
+ return __generator(this, function (_d) {
72
+ switch (_d.label) {
71
73
  case 0:
72
74
  _a = [__assign({}, output)];
73
- _e = {};
75
+ _c = {};
74
76
  return [4, parseBody(output.body, context)];
75
77
  case 1:
76
- parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
78
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
77
79
  errorCode = "UnknownError";
78
80
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
79
81
  _b = errorCode;
@@ -84,28 +86,18 @@ var deserializeAws_json1_1DeleteReportDefinitionCommandError = function (output,
84
86
  case "com.amazonaws.costandusagereportservice#ValidationException": return [3, 4];
85
87
  }
86
88
  return [3, 6];
87
- case 2:
88
- _c = [{}];
89
- return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
90
- case 3:
91
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
92
- return [3, 7];
93
- case 4:
94
- _d = [{}];
95
- return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
96
- case 5:
97
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
98
- return [3, 7];
89
+ case 2: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
90
+ case 3: throw _d.sent();
91
+ case 4: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
92
+ case 5: throw _d.sent();
99
93
  case 6:
100
94
  parsedBody = parsedOutput.body;
101
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
102
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
103
- _f.label = 7;
104
- case 7:
105
- message = response.message || response.Message || errorCode;
106
- response.message = message;
107
- delete response.Message;
108
- return [2, Promise.reject(Object.assign(new Error(message), response))];
95
+ response = new __BaseException({
96
+ name: parsedBody.code || parsedBody.Code || errorCode,
97
+ $fault: "client",
98
+ $metadata: deserializeMetadata(output),
99
+ });
100
+ throw __decorateServiceException(response, parsedBody);
109
101
  }
110
102
  });
111
103
  }); };
@@ -128,16 +120,16 @@ export var deserializeAws_json1_1DescribeReportDefinitionsCommand = function (ou
128
120
  });
129
121
  }); };
130
122
  var deserializeAws_json1_1DescribeReportDefinitionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
131
- var parsedOutput, _a, response, errorCode, _b, _c, parsedBody, message;
132
- var _d;
133
- return __generator(this, function (_e) {
134
- switch (_e.label) {
123
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
124
+ var _c;
125
+ return __generator(this, function (_d) {
126
+ switch (_d.label) {
135
127
  case 0:
136
128
  _a = [__assign({}, output)];
137
- _d = {};
129
+ _c = {};
138
130
  return [4, parseBody(output.body, context)];
139
131
  case 1:
140
- parsedOutput = __assign.apply(void 0, _a.concat([(_d.body = _e.sent(), _d)]));
132
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
141
133
  errorCode = "UnknownError";
142
134
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
143
135
  _b = errorCode;
@@ -146,22 +138,16 @@ var deserializeAws_json1_1DescribeReportDefinitionsCommandError = function (outp
146
138
  case "com.amazonaws.costandusagereportservice#InternalErrorException": return [3, 2];
147
139
  }
148
140
  return [3, 4];
149
- case 2:
150
- _c = [{}];
151
- return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
152
- case 3:
153
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_e.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
154
- return [3, 5];
141
+ case 2: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
142
+ case 3: throw _d.sent();
155
143
  case 4:
156
144
  parsedBody = parsedOutput.body;
157
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
158
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
159
- _e.label = 5;
160
- case 5:
161
- message = response.message || response.Message || errorCode;
162
- response.message = message;
163
- delete response.Message;
164
- return [2, Promise.reject(Object.assign(new Error(message), response))];
145
+ response = new __BaseException({
146
+ name: parsedBody.code || parsedBody.Code || errorCode,
147
+ $fault: "client",
148
+ $metadata: deserializeMetadata(output),
149
+ });
150
+ throw __decorateServiceException(response, parsedBody);
165
151
  }
166
152
  });
167
153
  }); };
@@ -184,16 +170,16 @@ export var deserializeAws_json1_1ModifyReportDefinitionCommand = function (outpu
184
170
  });
185
171
  }); };
186
172
  var deserializeAws_json1_1ModifyReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
187
- var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
188
- var _e;
189
- return __generator(this, function (_f) {
190
- switch (_f.label) {
173
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
174
+ var _c;
175
+ return __generator(this, function (_d) {
176
+ switch (_d.label) {
191
177
  case 0:
192
178
  _a = [__assign({}, output)];
193
- _e = {};
179
+ _c = {};
194
180
  return [4, parseBody(output.body, context)];
195
181
  case 1:
196
- parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
182
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
197
183
  errorCode = "UnknownError";
198
184
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
199
185
  _b = errorCode;
@@ -204,28 +190,18 @@ var deserializeAws_json1_1ModifyReportDefinitionCommandError = function (output,
204
190
  case "com.amazonaws.costandusagereportservice#ValidationException": return [3, 4];
205
191
  }
206
192
  return [3, 6];
207
- case 2:
208
- _c = [{}];
209
- return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
210
- case 3:
211
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
212
- return [3, 7];
213
- case 4:
214
- _d = [{}];
215
- return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
216
- case 5:
217
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
218
- return [3, 7];
193
+ case 2: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
194
+ case 3: throw _d.sent();
195
+ case 4: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
196
+ case 5: throw _d.sent();
219
197
  case 6:
220
198
  parsedBody = parsedOutput.body;
221
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
222
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
223
- _f.label = 7;
224
- case 7:
225
- message = response.message || response.Message || errorCode;
226
- response.message = message;
227
- delete response.Message;
228
- return [2, Promise.reject(Object.assign(new Error(message), response))];
199
+ response = new __BaseException({
200
+ name: parsedBody.code || parsedBody.Code || errorCode,
201
+ $fault: "client",
202
+ $metadata: deserializeMetadata(output),
203
+ });
204
+ throw __decorateServiceException(response, parsedBody);
229
205
  }
230
206
  });
231
207
  }); };
@@ -248,16 +224,16 @@ export var deserializeAws_json1_1PutReportDefinitionCommand = function (output,
248
224
  });
249
225
  }); };
250
226
  var deserializeAws_json1_1PutReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
251
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
252
- var _g;
253
- return __generator(this, function (_h) {
254
- switch (_h.label) {
227
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
228
+ var _c;
229
+ return __generator(this, function (_d) {
230
+ switch (_d.label) {
255
231
  case 0:
256
232
  _a = [__assign({}, output)];
257
- _g = {};
233
+ _c = {};
258
234
  return [4, parseBody(output.body, context)];
259
235
  case 1:
260
- parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
236
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
261
237
  errorCode = "UnknownError";
262
238
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
263
239
  _b = errorCode;
@@ -272,77 +248,59 @@ var deserializeAws_json1_1PutReportDefinitionCommandError = function (output, co
272
248
  case "com.amazonaws.costandusagereportservice#ValidationException": return [3, 8];
273
249
  }
274
250
  return [3, 10];
275
- case 2:
276
- _c = [{}];
277
- return [4, deserializeAws_json1_1DuplicateReportNameExceptionResponse(parsedOutput, context)];
278
- case 3:
279
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
280
- return [3, 11];
281
- case 4:
282
- _d = [{}];
283
- return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
284
- case 5:
285
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
286
- return [3, 11];
287
- case 6:
288
- _e = [{}];
289
- return [4, deserializeAws_json1_1ReportLimitReachedExceptionResponse(parsedOutput, context)];
290
- case 7:
291
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
292
- return [3, 11];
293
- case 8:
294
- _f = [{}];
295
- return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
296
- case 9:
297
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
298
- return [3, 11];
251
+ case 2: return [4, deserializeAws_json1_1DuplicateReportNameExceptionResponse(parsedOutput, context)];
252
+ case 3: throw _d.sent();
253
+ case 4: return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
254
+ case 5: throw _d.sent();
255
+ case 6: return [4, deserializeAws_json1_1ReportLimitReachedExceptionResponse(parsedOutput, context)];
256
+ case 7: throw _d.sent();
257
+ case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
258
+ case 9: throw _d.sent();
299
259
  case 10:
300
260
  parsedBody = parsedOutput.body;
301
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
302
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
303
- _h.label = 11;
304
- case 11:
305
- message = response.message || response.Message || errorCode;
306
- response.message = message;
307
- delete response.Message;
308
- return [2, Promise.reject(Object.assign(new Error(message), response))];
261
+ response = new __BaseException({
262
+ name: parsedBody.code || parsedBody.Code || errorCode,
263
+ $fault: "client",
264
+ $metadata: deserializeMetadata(output),
265
+ });
266
+ throw __decorateServiceException(response, parsedBody);
309
267
  }
310
268
  });
311
269
  }); };
312
270
  var deserializeAws_json1_1DuplicateReportNameExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
313
- var body, deserialized, contents;
271
+ var body, deserialized, exception;
314
272
  return __generator(this, function (_a) {
315
273
  body = parsedOutput.body;
316
274
  deserialized = deserializeAws_json1_1DuplicateReportNameException(body, context);
317
- contents = __assign({ name: "DuplicateReportNameException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
318
- return [2, contents];
275
+ exception = new DuplicateReportNameException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
276
+ return [2, __decorateServiceException(exception, body)];
319
277
  });
320
278
  }); };
321
279
  var deserializeAws_json1_1InternalErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
322
- var body, deserialized, contents;
280
+ var body, deserialized, exception;
323
281
  return __generator(this, function (_a) {
324
282
  body = parsedOutput.body;
325
283
  deserialized = deserializeAws_json1_1InternalErrorException(body, context);
326
- contents = __assign({ name: "InternalErrorException", $fault: "server", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
327
- return [2, contents];
284
+ exception = new InternalErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
285
+ return [2, __decorateServiceException(exception, body)];
328
286
  });
329
287
  }); };
330
288
  var deserializeAws_json1_1ReportLimitReachedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
331
- var body, deserialized, contents;
289
+ var body, deserialized, exception;
332
290
  return __generator(this, function (_a) {
333
291
  body = parsedOutput.body;
334
292
  deserialized = deserializeAws_json1_1ReportLimitReachedException(body, context);
335
- contents = __assign({ name: "ReportLimitReachedException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
336
- return [2, contents];
293
+ exception = new ReportLimitReachedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
294
+ return [2, __decorateServiceException(exception, body)];
337
295
  });
338
296
  }); };
339
297
  var deserializeAws_json1_1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
340
- var body, deserialized, contents;
298
+ var body, deserialized, exception;
341
299
  return __generator(this, function (_a) {
342
300
  body = parsedOutput.body;
343
301
  deserialized = deserializeAws_json1_1ValidationException(body, context);
344
- contents = __assign({ name: "ValidationException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
345
- return [2, contents];
302
+ exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
303
+ return [2, __decorateServiceException(exception, body)];
346
304
  });
347
305
  }); };
348
306
  var serializeAws_json1_1AdditionalArtifactList = function (input, context) {
@@ -396,7 +354,7 @@ var serializeAws_json1_1SchemaElementList = function (input, context) {
396
354
  });
397
355
  };
398
356
  var deserializeAws_json1_1AdditionalArtifactList = function (output, context) {
399
- return (output || [])
357
+ var retVal = (output || [])
400
358
  .filter(function (e) { return e != null; })
401
359
  .map(function (entry) {
402
360
  if (entry === null) {
@@ -404,6 +362,7 @@ var deserializeAws_json1_1AdditionalArtifactList = function (output, context) {
404
362
  }
405
363
  return __expectString(entry);
406
364
  });
365
+ return retVal;
407
366
  };
408
367
  var deserializeAws_json1_1DeleteReportDefinitionResponse = function (output, context) {
409
368
  return {
@@ -455,7 +414,7 @@ var deserializeAws_json1_1ReportDefinition = function (output, context) {
455
414
  };
456
415
  };
457
416
  var deserializeAws_json1_1ReportDefinitionList = function (output, context) {
458
- return (output || [])
417
+ var retVal = (output || [])
459
418
  .filter(function (e) { return e != null; })
460
419
  .map(function (entry) {
461
420
  if (entry === null) {
@@ -463,6 +422,7 @@ var deserializeAws_json1_1ReportDefinitionList = function (output, context) {
463
422
  }
464
423
  return deserializeAws_json1_1ReportDefinition(entry, context);
465
424
  });
425
+ return retVal;
466
426
  };
467
427
  var deserializeAws_json1_1ReportLimitReachedException = function (output, context) {
468
428
  return {
@@ -470,7 +430,7 @@ var deserializeAws_json1_1ReportLimitReachedException = function (output, contex
470
430
  };
471
431
  };
472
432
  var deserializeAws_json1_1SchemaElementList = function (output, context) {
473
- return (output || [])
433
+ var retVal = (output || [])
474
434
  .filter(function (e) { return e != null; })
475
435
  .map(function (entry) {
476
436
  if (entry === null) {
@@ -478,6 +438,7 @@ var deserializeAws_json1_1SchemaElementList = function (output, context) {
478
438
  }
479
439
  return __expectString(entry);
480
440
  });
441
+ return retVal;
481
442
  };
482
443
  var deserializeAws_json1_1ValidationException = function (output, context) {
483
444
  return {
@@ -3,3 +3,4 @@ export * from "./CostAndUsageReportServiceClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
5
  export * from "./pagination";
6
+ export { CostAndUsageReportServiceServiceException } from "./models/CostAndUsageReportServiceServiceException";
@@ -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 CostAndUsageReportService service.
4
+ */
5
+ export declare class CostAndUsageReportServiceServiceException extends __ServiceException {
6
+ /**
7
+ * @internal
8
+ */
9
+ constructor(options: __ServiceExceptionOptions);
10
+ }
@@ -1,4 +1,5 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { CostAndUsageReportServiceServiceException as __BaseException } from "./CostAndUsageReportServiceServiceException";
2
3
  export declare enum AdditionalArtifact {
3
4
  ATHENA = "ATHENA",
4
5
  QUICKSIGHT = "QUICKSIGHT",
@@ -37,24 +38,32 @@ export declare namespace DeleteReportDefinitionResponse {
37
38
  /**
38
39
  * <p>An error on the server occurred during the processing of your request. Try again later.</p>
39
40
  */
40
- export interface InternalErrorException extends __SmithyException, $MetadataBearer {
41
- name: "InternalErrorException";
42
- $fault: "server";
41
+ export declare class InternalErrorException extends __BaseException {
42
+ readonly name: "InternalErrorException";
43
+ readonly $fault: "server";
43
44
  /**
44
45
  * <p>A message to show the detail of the exception.</p>
45
46
  */
46
47
  Message?: string;
48
+ /**
49
+ * @internal
50
+ */
51
+ constructor(opts: __ExceptionOptionType<InternalErrorException, __BaseException>);
47
52
  }
48
53
  /**
49
54
  * <p>The input fails to satisfy the constraints specified by an AWS service.</p>
50
55
  */
51
- export interface ValidationException extends __SmithyException, $MetadataBearer {
52
- name: "ValidationException";
53
- $fault: "client";
56
+ export declare class ValidationException extends __BaseException {
57
+ readonly name: "ValidationException";
58
+ readonly $fault: "client";
54
59
  /**
55
60
  * <p>A message to show the detail of the exception.</p>
56
61
  */
57
62
  Message?: string;
63
+ /**
64
+ * @internal
65
+ */
66
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
58
67
  }
59
68
  /**
60
69
  * <p>Requests a list of AWS Cost and Usage reports owned by the account.</p>
@@ -239,13 +248,17 @@ export declare namespace ModifyReportDefinitionResponse {
239
248
  /**
240
249
  * <p>A report with the specified name already exists in the account. Specify a different report name.</p>
241
250
  */
242
- export interface DuplicateReportNameException extends __SmithyException, $MetadataBearer {
243
- name: "DuplicateReportNameException";
244
- $fault: "client";
251
+ export declare class DuplicateReportNameException extends __BaseException {
252
+ readonly name: "DuplicateReportNameException";
253
+ readonly $fault: "client";
245
254
  /**
246
255
  * <p>A message to show the detail of the exception.</p>
247
256
  */
248
257
  Message?: string;
258
+ /**
259
+ * @internal
260
+ */
261
+ constructor(opts: __ExceptionOptionType<DuplicateReportNameException, __BaseException>);
249
262
  }
250
263
  /**
251
264
  * <p>Creates a Cost and Usage Report.</p>
@@ -277,11 +290,15 @@ export declare namespace PutReportDefinitionResponse {
277
290
  /**
278
291
  * <p>This account already has five reports defined. To define a new report, you must delete an existing report.</p>
279
292
  */
280
- export interface ReportLimitReachedException extends __SmithyException, $MetadataBearer {
281
- name: "ReportLimitReachedException";
282
- $fault: "client";
293
+ export declare class ReportLimitReachedException extends __BaseException {
294
+ readonly name: "ReportLimitReachedException";
295
+ readonly $fault: "client";
283
296
  /**
284
297
  * <p>A message to show the detail of the exception.</p>
285
298
  */
286
299
  Message?: string;
300
+ /**
301
+ * @internal
302
+ */
303
+ constructor(opts: __ExceptionOptionType<ReportLimitReachedException, __BaseException>);
287
304
  }
@@ -3,3 +3,4 @@ export * from "./CostAndUsageReportServiceClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
5
  export * from "./pagination";
6
+ export { CostAndUsageReportServiceServiceException } from "./models/CostAndUsageReportServiceServiceException";
@@ -0,0 +1,6 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+
3
+ export declare class CostAndUsageReportServiceServiceException extends __ServiceException {
4
+
5
+ constructor(options: __ServiceExceptionOptions);
6
+ }
@@ -1,4 +1,5 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { CostAndUsageReportServiceServiceException as __BaseException } from "./CostAndUsageReportServiceServiceException";
2
3
  export declare enum AdditionalArtifact {
3
4
  ATHENA = "ATHENA",
4
5
  QUICKSIGHT = "QUICKSIGHT",
@@ -23,18 +24,22 @@ export declare namespace DeleteReportDefinitionResponse {
23
24
  const filterSensitiveLog: (obj: DeleteReportDefinitionResponse) => any;
24
25
  }
25
26
 
26
- export interface InternalErrorException extends __SmithyException, $MetadataBearer {
27
- name: "InternalErrorException";
28
- $fault: "server";
27
+ export declare class InternalErrorException extends __BaseException {
28
+ readonly name: "InternalErrorException";
29
+ readonly $fault: "server";
29
30
 
30
31
  Message?: string;
32
+
33
+ constructor(opts: __ExceptionOptionType<InternalErrorException, __BaseException>);
31
34
  }
32
35
 
33
- export interface ValidationException extends __SmithyException, $MetadataBearer {
34
- name: "ValidationException";
35
- $fault: "client";
36
+ export declare class ValidationException extends __BaseException {
37
+ readonly name: "ValidationException";
38
+ readonly $fault: "client";
36
39
 
37
40
  Message?: string;
41
+
42
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
38
43
  }
39
44
 
40
45
  export interface DescribeReportDefinitionsRequest {
@@ -152,11 +157,13 @@ export declare namespace ModifyReportDefinitionResponse {
152
157
  const filterSensitiveLog: (obj: ModifyReportDefinitionResponse) => any;
153
158
  }
154
159
 
155
- export interface DuplicateReportNameException extends __SmithyException, $MetadataBearer {
156
- name: "DuplicateReportNameException";
157
- $fault: "client";
160
+ export declare class DuplicateReportNameException extends __BaseException {
161
+ readonly name: "DuplicateReportNameException";
162
+ readonly $fault: "client";
158
163
 
159
164
  Message?: string;
165
+
166
+ constructor(opts: __ExceptionOptionType<DuplicateReportNameException, __BaseException>);
160
167
  }
161
168
 
162
169
  export interface PutReportDefinitionRequest {
@@ -175,9 +182,11 @@ export declare namespace PutReportDefinitionResponse {
175
182
  const filterSensitiveLog: (obj: PutReportDefinitionResponse) => any;
176
183
  }
177
184
 
178
- export interface ReportLimitReachedException extends __SmithyException, $MetadataBearer {
179
- name: "ReportLimitReachedException";
180
- $fault: "client";
185
+ export declare class ReportLimitReachedException extends __BaseException {
186
+ readonly name: "ReportLimitReachedException";
187
+ readonly $fault: "client";
181
188
 
182
189
  Message?: string;
190
+
191
+ constructor(opts: __ExceptionOptionType<ReportLimitReachedException, __BaseException>);
183
192
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cost-and-usage-report-service",
3
3
  "description": "AWS SDK for JavaScript Cost And Usage Report Service 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"