@aws-sdk/client-applicationcostprofiler 3.51.0 → 3.54.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 +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/ApplicationCostProfilerServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +67 -1
- package/dist-cjs/protocols/Aws_restJson1.js +83 -246
- package/dist-es/index.js +1 -0
- package/dist-es/models/ApplicationCostProfilerServiceException.js +12 -0
- package/dist-es/models/models_0.js +62 -1
- package/dist-es/protocols/Aws_restJson1.js +147 -276
- package/dist-types/ApplicationCostProfilerClient.d.ts +2 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/ApplicationCostProfilerServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +37 -21
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/ApplicationCostProfilerClient.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/ApplicationCostProfilerServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +27 -21
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +33 -33
|
@@ -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, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { ApplicationCostProfilerServiceException as __BaseException } from "../models/ApplicationCostProfilerServiceException";
|
|
5
|
+
import { AccessDeniedException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
4
6
|
export var serializeAws_restJson1DeleteReportDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
7
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
6
8
|
return __generator(this, function (_c) {
|
|
@@ -206,16 +208,16 @@ export var deserializeAws_restJson1DeleteReportDefinitionCommand = function (out
|
|
|
206
208
|
});
|
|
207
209
|
}); };
|
|
208
210
|
var deserializeAws_restJson1DeleteReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
209
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
210
|
-
var
|
|
211
|
-
return __generator(this, function (
|
|
212
|
-
switch (
|
|
211
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
212
|
+
var _c;
|
|
213
|
+
return __generator(this, function (_d) {
|
|
214
|
+
switch (_d.label) {
|
|
213
215
|
case 0:
|
|
214
216
|
_a = [__assign({}, output)];
|
|
215
|
-
|
|
217
|
+
_c = {};
|
|
216
218
|
return [4, parseBody(output.body, context)];
|
|
217
219
|
case 1:
|
|
218
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
220
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
219
221
|
errorCode = "UnknownError";
|
|
220
222
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
221
223
|
_b = errorCode;
|
|
@@ -230,40 +232,22 @@ var deserializeAws_restJson1DeleteReportDefinitionCommandError = function (outpu
|
|
|
230
232
|
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 8];
|
|
231
233
|
}
|
|
232
234
|
return [3, 10];
|
|
233
|
-
case 2:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
case
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
case 4
|
|
240
|
-
|
|
241
|
-
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
242
|
-
case 5:
|
|
243
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
244
|
-
return [3, 11];
|
|
245
|
-
case 6:
|
|
246
|
-
_e = [{}];
|
|
247
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
248
|
-
case 7:
|
|
249
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
250
|
-
return [3, 11];
|
|
251
|
-
case 8:
|
|
252
|
-
_f = [{}];
|
|
253
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
254
|
-
case 9:
|
|
255
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
256
|
-
return [3, 11];
|
|
235
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
236
|
+
case 3: throw _d.sent();
|
|
237
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
238
|
+
case 5: throw _d.sent();
|
|
239
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
240
|
+
case 7: throw _d.sent();
|
|
241
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
242
|
+
case 9: throw _d.sent();
|
|
257
243
|
case 10:
|
|
258
244
|
parsedBody = parsedOutput.body;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
response
|
|
265
|
-
delete response.Message;
|
|
266
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
245
|
+
response = new __BaseException({
|
|
246
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
247
|
+
$fault: "client",
|
|
248
|
+
$metadata: deserializeMetadata(output),
|
|
249
|
+
});
|
|
250
|
+
throw __decorateServiceException(response, parsedBody);
|
|
267
251
|
}
|
|
268
252
|
});
|
|
269
253
|
}); };
|
|
@@ -316,16 +300,16 @@ export var deserializeAws_restJson1GetReportDefinitionCommand = function (output
|
|
|
316
300
|
});
|
|
317
301
|
}); };
|
|
318
302
|
var deserializeAws_restJson1GetReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
319
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
320
|
-
var
|
|
321
|
-
return __generator(this, function (
|
|
322
|
-
switch (
|
|
303
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
304
|
+
var _c;
|
|
305
|
+
return __generator(this, function (_d) {
|
|
306
|
+
switch (_d.label) {
|
|
323
307
|
case 0:
|
|
324
308
|
_a = [__assign({}, output)];
|
|
325
|
-
|
|
309
|
+
_c = {};
|
|
326
310
|
return [4, parseBody(output.body, context)];
|
|
327
311
|
case 1:
|
|
328
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
312
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
329
313
|
errorCode = "UnknownError";
|
|
330
314
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
331
315
|
_b = errorCode;
|
|
@@ -340,40 +324,22 @@ var deserializeAws_restJson1GetReportDefinitionCommandError = function (output,
|
|
|
340
324
|
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 8];
|
|
341
325
|
}
|
|
342
326
|
return [3, 10];
|
|
343
|
-
case 2:
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
case
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
case 4
|
|
350
|
-
|
|
351
|
-
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
352
|
-
case 5:
|
|
353
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
354
|
-
return [3, 11];
|
|
355
|
-
case 6:
|
|
356
|
-
_e = [{}];
|
|
357
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
358
|
-
case 7:
|
|
359
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
360
|
-
return [3, 11];
|
|
361
|
-
case 8:
|
|
362
|
-
_f = [{}];
|
|
363
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
364
|
-
case 9:
|
|
365
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
366
|
-
return [3, 11];
|
|
327
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
328
|
+
case 3: throw _d.sent();
|
|
329
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
330
|
+
case 5: throw _d.sent();
|
|
331
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
332
|
+
case 7: throw _d.sent();
|
|
333
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
334
|
+
case 9: throw _d.sent();
|
|
367
335
|
case 10:
|
|
368
336
|
parsedBody = parsedOutput.body;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
response
|
|
375
|
-
delete response.Message;
|
|
376
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
337
|
+
response = new __BaseException({
|
|
338
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
339
|
+
$fault: "client",
|
|
340
|
+
$metadata: deserializeMetadata(output),
|
|
341
|
+
});
|
|
342
|
+
throw __decorateServiceException(response, parsedBody);
|
|
377
343
|
}
|
|
378
344
|
});
|
|
379
345
|
}); };
|
|
@@ -402,16 +368,16 @@ export var deserializeAws_restJson1ImportApplicationUsageCommand = function (out
|
|
|
402
368
|
});
|
|
403
369
|
}); };
|
|
404
370
|
var deserializeAws_restJson1ImportApplicationUsageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
405
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
406
|
-
var
|
|
407
|
-
return __generator(this, function (
|
|
408
|
-
switch (
|
|
371
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
372
|
+
var _c;
|
|
373
|
+
return __generator(this, function (_d) {
|
|
374
|
+
switch (_d.label) {
|
|
409
375
|
case 0:
|
|
410
376
|
_a = [__assign({}, output)];
|
|
411
|
-
|
|
377
|
+
_c = {};
|
|
412
378
|
return [4, parseBody(output.body, context)];
|
|
413
379
|
case 1:
|
|
414
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
380
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
415
381
|
errorCode = "UnknownError";
|
|
416
382
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
417
383
|
_b = errorCode;
|
|
@@ -426,40 +392,22 @@ var deserializeAws_restJson1ImportApplicationUsageCommandError = function (outpu
|
|
|
426
392
|
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 8];
|
|
427
393
|
}
|
|
428
394
|
return [3, 10];
|
|
429
|
-
case 2:
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
case
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
case 4
|
|
436
|
-
|
|
437
|
-
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
438
|
-
case 5:
|
|
439
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
440
|
-
return [3, 11];
|
|
441
|
-
case 6:
|
|
442
|
-
_e = [{}];
|
|
443
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
444
|
-
case 7:
|
|
445
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
446
|
-
return [3, 11];
|
|
447
|
-
case 8:
|
|
448
|
-
_f = [{}];
|
|
449
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
450
|
-
case 9:
|
|
451
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
452
|
-
return [3, 11];
|
|
395
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
396
|
+
case 3: throw _d.sent();
|
|
397
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
398
|
+
case 5: throw _d.sent();
|
|
399
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
400
|
+
case 7: throw _d.sent();
|
|
401
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
402
|
+
case 9: throw _d.sent();
|
|
453
403
|
case 10:
|
|
454
404
|
parsedBody = parsedOutput.body;
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
response
|
|
461
|
-
delete response.Message;
|
|
462
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
405
|
+
response = new __BaseException({
|
|
406
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
407
|
+
$fault: "client",
|
|
408
|
+
$metadata: deserializeMetadata(output),
|
|
409
|
+
});
|
|
410
|
+
throw __decorateServiceException(response, parsedBody);
|
|
463
411
|
}
|
|
464
412
|
});
|
|
465
413
|
}); };
|
|
@@ -492,16 +440,16 @@ export var deserializeAws_restJson1ListReportDefinitionsCommand = function (outp
|
|
|
492
440
|
});
|
|
493
441
|
}); };
|
|
494
442
|
var deserializeAws_restJson1ListReportDefinitionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
495
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
496
|
-
var
|
|
497
|
-
return __generator(this, function (
|
|
498
|
-
switch (
|
|
443
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
444
|
+
var _c;
|
|
445
|
+
return __generator(this, function (_d) {
|
|
446
|
+
switch (_d.label) {
|
|
499
447
|
case 0:
|
|
500
448
|
_a = [__assign({}, output)];
|
|
501
|
-
|
|
449
|
+
_c = {};
|
|
502
450
|
return [4, parseBody(output.body, context)];
|
|
503
451
|
case 1:
|
|
504
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
452
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
505
453
|
errorCode = "UnknownError";
|
|
506
454
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
507
455
|
_b = errorCode;
|
|
@@ -516,40 +464,22 @@ var deserializeAws_restJson1ListReportDefinitionsCommandError = function (output
|
|
|
516
464
|
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 8];
|
|
517
465
|
}
|
|
518
466
|
return [3, 10];
|
|
519
|
-
case 2:
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
case
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
case 4
|
|
526
|
-
|
|
527
|
-
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
528
|
-
case 5:
|
|
529
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
530
|
-
return [3, 11];
|
|
531
|
-
case 6:
|
|
532
|
-
_e = [{}];
|
|
533
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
534
|
-
case 7:
|
|
535
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
536
|
-
return [3, 11];
|
|
537
|
-
case 8:
|
|
538
|
-
_f = [{}];
|
|
539
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
540
|
-
case 9:
|
|
541
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
542
|
-
return [3, 11];
|
|
467
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
468
|
+
case 3: throw _d.sent();
|
|
469
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
470
|
+
case 5: throw _d.sent();
|
|
471
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
472
|
+
case 7: throw _d.sent();
|
|
473
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
474
|
+
case 9: throw _d.sent();
|
|
543
475
|
case 10:
|
|
544
476
|
parsedBody = parsedOutput.body;
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
response
|
|
551
|
-
delete response.Message;
|
|
552
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
477
|
+
response = new __BaseException({
|
|
478
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
479
|
+
$fault: "client",
|
|
480
|
+
$metadata: deserializeMetadata(output),
|
|
481
|
+
});
|
|
482
|
+
throw __decorateServiceException(response, parsedBody);
|
|
553
483
|
}
|
|
554
484
|
});
|
|
555
485
|
}); };
|
|
@@ -578,16 +508,16 @@ export var deserializeAws_restJson1PutReportDefinitionCommand = function (output
|
|
|
578
508
|
});
|
|
579
509
|
}); };
|
|
580
510
|
var deserializeAws_restJson1PutReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
581
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
582
|
-
var
|
|
583
|
-
return __generator(this, function (
|
|
584
|
-
switch (
|
|
511
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
512
|
+
var _c;
|
|
513
|
+
return __generator(this, function (_d) {
|
|
514
|
+
switch (_d.label) {
|
|
585
515
|
case 0:
|
|
586
516
|
_a = [__assign({}, output)];
|
|
587
|
-
|
|
517
|
+
_c = {};
|
|
588
518
|
return [4, parseBody(output.body, context)];
|
|
589
519
|
case 1:
|
|
590
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
520
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
591
521
|
errorCode = "UnknownError";
|
|
592
522
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
593
523
|
_b = errorCode;
|
|
@@ -604,46 +534,24 @@ var deserializeAws_restJson1PutReportDefinitionCommandError = function (output,
|
|
|
604
534
|
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 10];
|
|
605
535
|
}
|
|
606
536
|
return [3, 12];
|
|
607
|
-
case 2:
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
case
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
case 4
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
case
|
|
617
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
618
|
-
return [3, 13];
|
|
619
|
-
case 6:
|
|
620
|
-
_e = [{}];
|
|
621
|
-
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
622
|
-
case 7:
|
|
623
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
624
|
-
return [3, 13];
|
|
625
|
-
case 8:
|
|
626
|
-
_f = [{}];
|
|
627
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
628
|
-
case 9:
|
|
629
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
630
|
-
return [3, 13];
|
|
631
|
-
case 10:
|
|
632
|
-
_g = [{}];
|
|
633
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
634
|
-
case 11:
|
|
635
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
636
|
-
return [3, 13];
|
|
537
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
538
|
+
case 3: throw _d.sent();
|
|
539
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
540
|
+
case 5: throw _d.sent();
|
|
541
|
+
case 6: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
542
|
+
case 7: throw _d.sent();
|
|
543
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
544
|
+
case 9: throw _d.sent();
|
|
545
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
546
|
+
case 11: throw _d.sent();
|
|
637
547
|
case 12:
|
|
638
548
|
parsedBody = parsedOutput.body;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
response
|
|
645
|
-
delete response.Message;
|
|
646
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
549
|
+
response = new __BaseException({
|
|
550
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
551
|
+
$fault: "client",
|
|
552
|
+
$metadata: deserializeMetadata(output),
|
|
553
|
+
});
|
|
554
|
+
throw __decorateServiceException(response, parsedBody);
|
|
647
555
|
}
|
|
648
556
|
});
|
|
649
557
|
}); };
|
|
@@ -672,16 +580,16 @@ export var deserializeAws_restJson1UpdateReportDefinitionCommand = function (out
|
|
|
672
580
|
});
|
|
673
581
|
}); };
|
|
674
582
|
var deserializeAws_restJson1UpdateReportDefinitionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
675
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
676
|
-
var
|
|
677
|
-
return __generator(this, function (
|
|
678
|
-
switch (
|
|
583
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
584
|
+
var _c;
|
|
585
|
+
return __generator(this, function (_d) {
|
|
586
|
+
switch (_d.label) {
|
|
679
587
|
case 0:
|
|
680
588
|
_a = [__assign({}, output)];
|
|
681
|
-
|
|
589
|
+
_c = {};
|
|
682
590
|
return [4, parseBody(output.body, context)];
|
|
683
591
|
case 1:
|
|
684
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
592
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
685
593
|
errorCode = "UnknownError";
|
|
686
594
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
687
595
|
_b = errorCode;
|
|
@@ -696,121 +604,83 @@ var deserializeAws_restJson1UpdateReportDefinitionCommandError = function (outpu
|
|
|
696
604
|
case "com.amazonaws.applicationcostprofiler#ValidationException": return [3, 8];
|
|
697
605
|
}
|
|
698
606
|
return [3, 10];
|
|
699
|
-
case 2:
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
case
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
case 4
|
|
706
|
-
|
|
707
|
-
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
708
|
-
case 5:
|
|
709
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
710
|
-
return [3, 11];
|
|
711
|
-
case 6:
|
|
712
|
-
_e = [{}];
|
|
713
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
714
|
-
case 7:
|
|
715
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
716
|
-
return [3, 11];
|
|
717
|
-
case 8:
|
|
718
|
-
_f = [{}];
|
|
719
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
720
|
-
case 9:
|
|
721
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
722
|
-
return [3, 11];
|
|
607
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
608
|
+
case 3: throw _d.sent();
|
|
609
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
610
|
+
case 5: throw _d.sent();
|
|
611
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
612
|
+
case 7: throw _d.sent();
|
|
613
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
614
|
+
case 9: throw _d.sent();
|
|
723
615
|
case 10:
|
|
724
616
|
parsedBody = parsedOutput.body;
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
response
|
|
731
|
-
delete response.Message;
|
|
732
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
617
|
+
response = new __BaseException({
|
|
618
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
619
|
+
$fault: "client",
|
|
620
|
+
$metadata: deserializeMetadata(output),
|
|
621
|
+
});
|
|
622
|
+
throw __decorateServiceException(response, parsedBody);
|
|
733
623
|
}
|
|
734
624
|
});
|
|
735
625
|
}); };
|
|
736
626
|
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
737
|
-
var contents, data;
|
|
627
|
+
var contents, data, exception;
|
|
738
628
|
return __generator(this, function (_a) {
|
|
739
|
-
contents = {
|
|
740
|
-
name: "AccessDeniedException",
|
|
741
|
-
$fault: "client",
|
|
742
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
743
|
-
message: undefined,
|
|
744
|
-
};
|
|
629
|
+
contents = {};
|
|
745
630
|
data = parsedOutput.body;
|
|
746
631
|
if (data.message !== undefined && data.message !== null) {
|
|
747
632
|
contents.message = __expectString(data.message);
|
|
748
633
|
}
|
|
749
|
-
|
|
634
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
635
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
750
636
|
});
|
|
751
637
|
}); };
|
|
752
638
|
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
753
|
-
var contents, data;
|
|
639
|
+
var contents, data, exception;
|
|
754
640
|
return __generator(this, function (_a) {
|
|
755
|
-
contents = {
|
|
756
|
-
name: "InternalServerException",
|
|
757
|
-
$fault: "server",
|
|
758
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
759
|
-
message: undefined,
|
|
760
|
-
};
|
|
641
|
+
contents = {};
|
|
761
642
|
data = parsedOutput.body;
|
|
762
643
|
if (data.message !== undefined && data.message !== null) {
|
|
763
644
|
contents.message = __expectString(data.message);
|
|
764
645
|
}
|
|
765
|
-
|
|
646
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
647
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
766
648
|
});
|
|
767
649
|
}); };
|
|
768
650
|
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
769
|
-
var contents, data;
|
|
651
|
+
var contents, data, exception;
|
|
770
652
|
return __generator(this, function (_a) {
|
|
771
|
-
contents = {
|
|
772
|
-
name: "ServiceQuotaExceededException",
|
|
773
|
-
$fault: "client",
|
|
774
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
775
|
-
message: undefined,
|
|
776
|
-
};
|
|
653
|
+
contents = {};
|
|
777
654
|
data = parsedOutput.body;
|
|
778
655
|
if (data.message !== undefined && data.message !== null) {
|
|
779
656
|
contents.message = __expectString(data.message);
|
|
780
657
|
}
|
|
781
|
-
|
|
658
|
+
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
659
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
782
660
|
});
|
|
783
661
|
}); };
|
|
784
662
|
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
785
|
-
var contents, data;
|
|
663
|
+
var contents, data, exception;
|
|
786
664
|
return __generator(this, function (_a) {
|
|
787
|
-
contents = {
|
|
788
|
-
name: "ThrottlingException",
|
|
789
|
-
$fault: "client",
|
|
790
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
791
|
-
message: undefined,
|
|
792
|
-
};
|
|
665
|
+
contents = {};
|
|
793
666
|
data = parsedOutput.body;
|
|
794
667
|
if (data.message !== undefined && data.message !== null) {
|
|
795
668
|
contents.message = __expectString(data.message);
|
|
796
669
|
}
|
|
797
|
-
|
|
670
|
+
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
671
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
798
672
|
});
|
|
799
673
|
}); };
|
|
800
674
|
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
801
|
-
var contents, data;
|
|
675
|
+
var contents, data, exception;
|
|
802
676
|
return __generator(this, function (_a) {
|
|
803
|
-
contents = {
|
|
804
|
-
name: "ValidationException",
|
|
805
|
-
$fault: "client",
|
|
806
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
807
|
-
message: undefined,
|
|
808
|
-
};
|
|
677
|
+
contents = {};
|
|
809
678
|
data = parsedOutput.body;
|
|
810
679
|
if (data.message !== undefined && data.message !== null) {
|
|
811
680
|
contents.message = __expectString(data.message);
|
|
812
681
|
}
|
|
813
|
-
|
|
682
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
683
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
814
684
|
});
|
|
815
685
|
}); };
|
|
816
686
|
var serializeAws_restJson1S3Location = function (input, context) {
|
|
@@ -837,7 +707,7 @@ var deserializeAws_restJson1ReportDefinition = function (output, context) {
|
|
|
837
707
|
};
|
|
838
708
|
};
|
|
839
709
|
var deserializeAws_restJson1ReportDefinitionList = function (output, context) {
|
|
840
|
-
|
|
710
|
+
var retVal = (output || [])
|
|
841
711
|
.filter(function (e) { return e != null; })
|
|
842
712
|
.map(function (entry) {
|
|
843
713
|
if (entry === null) {
|
|
@@ -845,6 +715,7 @@ var deserializeAws_restJson1ReportDefinitionList = function (output, context) {
|
|
|
845
715
|
}
|
|
846
716
|
return deserializeAws_restJson1ReportDefinition(entry, context);
|
|
847
717
|
});
|
|
718
|
+
return retVal;
|
|
848
719
|
};
|
|
849
720
|
var deserializeAws_restJson1S3Location = function (output, context) {
|
|
850
721
|
return {
|
|
@@ -5,7 +5,7 @@ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-s
|
|
|
5
5
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
6
6
|
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
7
7
|
import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
8
|
-
import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
8
|
+
import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
9
|
import { DeleteReportDefinitionCommandInput, DeleteReportDefinitionCommandOutput } from "./commands/DeleteReportDefinitionCommand";
|
|
10
10
|
import { GetReportDefinitionCommandInput, GetReportDefinitionCommandOutput } from "./commands/GetReportDefinitionCommand";
|
|
11
11
|
import { ImportApplicationUsageCommandInput, ImportApplicationUsageCommandOutput } from "./commands/ImportApplicationUsageCommand";
|
|
@@ -34,7 +34,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
34
34
|
* A function that can calculate the length of a request body.
|
|
35
35
|
* @internal
|
|
36
36
|
*/
|
|
37
|
-
bodyLengthChecker?:
|
|
37
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
38
38
|
/**
|
|
39
39
|
* A function that converts a stream into an array of bytes.
|
|
40
40
|
* @internal
|
package/dist-types/index.d.ts
CHANGED
|
@@ -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 ApplicationCostProfiler service.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ApplicationCostProfilerServiceException extends __ServiceException {
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
constructor(options: __ServiceExceptionOptions);
|
|
10
|
+
}
|