@aws-sdk/client-rbin 3.52.0 → 3.54.1
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/RbinServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +61 -1
- package/dist-cjs/protocols/Aws_restJson1.js +88 -258
- package/dist-es/index.js +1 -0
- package/dist-es/models/RbinServiceException.js +12 -0
- package/dist-es/models/models_0.js +57 -1
- package/dist-es/protocols/Aws_restJson1.js +169 -295
- package/dist-types/RbinClient.d.ts +2 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/RbinServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +30 -13
- 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/RbinClient.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/RbinServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +22 -13
- 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 +27 -27
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_restJson1UpdateRuleCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRulesCommand = exports.deserializeAws_restJson1GetRuleCommand = exports.deserializeAws_restJson1DeleteRuleCommand = exports.deserializeAws_restJson1CreateRuleCommand = exports.serializeAws_restJson1UpdateRuleCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRulesCommand = exports.serializeAws_restJson1GetRuleCommand = exports.serializeAws_restJson1DeleteRuleCommand = exports.serializeAws_restJson1CreateRuleCommand = 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 models_0_1 = require("../models/models_0");
|
|
7
|
+
const RbinServiceException_1 = require("../models/RbinServiceException");
|
|
6
8
|
const serializeAws_restJson1CreateRuleCommand = async (input, context) => {
|
|
7
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
10
|
const headers = {
|
|
@@ -286,43 +288,22 @@ const deserializeAws_restJson1CreateRuleCommandError = async (output, context) =
|
|
|
286
288
|
switch (errorCode) {
|
|
287
289
|
case "InternalServerException":
|
|
288
290
|
case "com.amazonaws.rbin#InternalServerException":
|
|
289
|
-
|
|
290
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
291
|
-
name: errorCode,
|
|
292
|
-
$metadata: deserializeMetadata(output),
|
|
293
|
-
};
|
|
294
|
-
break;
|
|
291
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
295
292
|
case "ServiceQuotaExceededException":
|
|
296
293
|
case "com.amazonaws.rbin#ServiceQuotaExceededException":
|
|
297
|
-
|
|
298
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
299
|
-
name: errorCode,
|
|
300
|
-
$metadata: deserializeMetadata(output),
|
|
301
|
-
};
|
|
302
|
-
break;
|
|
294
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
303
295
|
case "ValidationException":
|
|
304
296
|
case "com.amazonaws.rbin#ValidationException":
|
|
305
|
-
|
|
306
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
307
|
-
name: errorCode,
|
|
308
|
-
$metadata: deserializeMetadata(output),
|
|
309
|
-
};
|
|
310
|
-
break;
|
|
297
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
311
298
|
default:
|
|
312
299
|
const parsedBody = parsedOutput.body;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
...parsedBody,
|
|
316
|
-
name: `${errorCode}`,
|
|
317
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
300
|
+
response = new RbinServiceException_1.RbinServiceException({
|
|
301
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
318
302
|
$fault: "client",
|
|
319
303
|
$metadata: deserializeMetadata(output),
|
|
320
|
-
};
|
|
304
|
+
});
|
|
305
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
321
306
|
}
|
|
322
|
-
const message = response.message || response.Message || errorCode;
|
|
323
|
-
response.message = message;
|
|
324
|
-
delete response.Message;
|
|
325
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
326
307
|
};
|
|
327
308
|
const deserializeAws_restJson1DeleteRuleCommand = async (output, context) => {
|
|
328
309
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -346,43 +327,22 @@ const deserializeAws_restJson1DeleteRuleCommandError = async (output, context) =
|
|
|
346
327
|
switch (errorCode) {
|
|
347
328
|
case "InternalServerException":
|
|
348
329
|
case "com.amazonaws.rbin#InternalServerException":
|
|
349
|
-
|
|
350
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
351
|
-
name: errorCode,
|
|
352
|
-
$metadata: deserializeMetadata(output),
|
|
353
|
-
};
|
|
354
|
-
break;
|
|
330
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
355
331
|
case "ResourceNotFoundException":
|
|
356
332
|
case "com.amazonaws.rbin#ResourceNotFoundException":
|
|
357
|
-
|
|
358
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
359
|
-
name: errorCode,
|
|
360
|
-
$metadata: deserializeMetadata(output),
|
|
361
|
-
};
|
|
362
|
-
break;
|
|
333
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
363
334
|
case "ValidationException":
|
|
364
335
|
case "com.amazonaws.rbin#ValidationException":
|
|
365
|
-
|
|
366
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
367
|
-
name: errorCode,
|
|
368
|
-
$metadata: deserializeMetadata(output),
|
|
369
|
-
};
|
|
370
|
-
break;
|
|
336
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
371
337
|
default:
|
|
372
338
|
const parsedBody = parsedOutput.body;
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
...parsedBody,
|
|
376
|
-
name: `${errorCode}`,
|
|
377
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
339
|
+
response = new RbinServiceException_1.RbinServiceException({
|
|
340
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
378
341
|
$fault: "client",
|
|
379
342
|
$metadata: deserializeMetadata(output),
|
|
380
|
-
};
|
|
343
|
+
});
|
|
344
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
381
345
|
}
|
|
382
|
-
const message = response.message || response.Message || errorCode;
|
|
383
|
-
response.message = message;
|
|
384
|
-
delete response.Message;
|
|
385
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
386
346
|
};
|
|
387
347
|
const deserializeAws_restJson1GetRuleCommand = async (output, context) => {
|
|
388
348
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -430,43 +390,22 @@ const deserializeAws_restJson1GetRuleCommandError = async (output, context) => {
|
|
|
430
390
|
switch (errorCode) {
|
|
431
391
|
case "InternalServerException":
|
|
432
392
|
case "com.amazonaws.rbin#InternalServerException":
|
|
433
|
-
|
|
434
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
435
|
-
name: errorCode,
|
|
436
|
-
$metadata: deserializeMetadata(output),
|
|
437
|
-
};
|
|
438
|
-
break;
|
|
393
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
439
394
|
case "ResourceNotFoundException":
|
|
440
395
|
case "com.amazonaws.rbin#ResourceNotFoundException":
|
|
441
|
-
|
|
442
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
443
|
-
name: errorCode,
|
|
444
|
-
$metadata: deserializeMetadata(output),
|
|
445
|
-
};
|
|
446
|
-
break;
|
|
396
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
447
397
|
case "ValidationException":
|
|
448
398
|
case "com.amazonaws.rbin#ValidationException":
|
|
449
|
-
|
|
450
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
451
|
-
name: errorCode,
|
|
452
|
-
$metadata: deserializeMetadata(output),
|
|
453
|
-
};
|
|
454
|
-
break;
|
|
399
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
455
400
|
default:
|
|
456
401
|
const parsedBody = parsedOutput.body;
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
...parsedBody,
|
|
460
|
-
name: `${errorCode}`,
|
|
461
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
402
|
+
response = new RbinServiceException_1.RbinServiceException({
|
|
403
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
462
404
|
$fault: "client",
|
|
463
405
|
$metadata: deserializeMetadata(output),
|
|
464
|
-
};
|
|
406
|
+
});
|
|
407
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
465
408
|
}
|
|
466
|
-
const message = response.message || response.Message || errorCode;
|
|
467
|
-
response.message = message;
|
|
468
|
-
delete response.Message;
|
|
469
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
470
409
|
};
|
|
471
410
|
const deserializeAws_restJson1ListRulesCommand = async (output, context) => {
|
|
472
411
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -498,35 +437,19 @@ const deserializeAws_restJson1ListRulesCommandError = async (output, context) =>
|
|
|
498
437
|
switch (errorCode) {
|
|
499
438
|
case "InternalServerException":
|
|
500
439
|
case "com.amazonaws.rbin#InternalServerException":
|
|
501
|
-
|
|
502
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
503
|
-
name: errorCode,
|
|
504
|
-
$metadata: deserializeMetadata(output),
|
|
505
|
-
};
|
|
506
|
-
break;
|
|
440
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
507
441
|
case "ValidationException":
|
|
508
442
|
case "com.amazonaws.rbin#ValidationException":
|
|
509
|
-
|
|
510
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
511
|
-
name: errorCode,
|
|
512
|
-
$metadata: deserializeMetadata(output),
|
|
513
|
-
};
|
|
514
|
-
break;
|
|
443
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
515
444
|
default:
|
|
516
445
|
const parsedBody = parsedOutput.body;
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
...parsedBody,
|
|
520
|
-
name: `${errorCode}`,
|
|
521
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
446
|
+
response = new RbinServiceException_1.RbinServiceException({
|
|
447
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
522
448
|
$fault: "client",
|
|
523
449
|
$metadata: deserializeMetadata(output),
|
|
524
|
-
};
|
|
450
|
+
});
|
|
451
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
525
452
|
}
|
|
526
|
-
const message = response.message || response.Message || errorCode;
|
|
527
|
-
response.message = message;
|
|
528
|
-
delete response.Message;
|
|
529
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
530
453
|
};
|
|
531
454
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
532
455
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -554,43 +477,22 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
554
477
|
switch (errorCode) {
|
|
555
478
|
case "InternalServerException":
|
|
556
479
|
case "com.amazonaws.rbin#InternalServerException":
|
|
557
|
-
|
|
558
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
559
|
-
name: errorCode,
|
|
560
|
-
$metadata: deserializeMetadata(output),
|
|
561
|
-
};
|
|
562
|
-
break;
|
|
480
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
563
481
|
case "ResourceNotFoundException":
|
|
564
482
|
case "com.amazonaws.rbin#ResourceNotFoundException":
|
|
565
|
-
|
|
566
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
567
|
-
name: errorCode,
|
|
568
|
-
$metadata: deserializeMetadata(output),
|
|
569
|
-
};
|
|
570
|
-
break;
|
|
483
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
571
484
|
case "ValidationException":
|
|
572
485
|
case "com.amazonaws.rbin#ValidationException":
|
|
573
|
-
|
|
574
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
575
|
-
name: errorCode,
|
|
576
|
-
$metadata: deserializeMetadata(output),
|
|
577
|
-
};
|
|
578
|
-
break;
|
|
486
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
579
487
|
default:
|
|
580
488
|
const parsedBody = parsedOutput.body;
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
...parsedBody,
|
|
584
|
-
name: `${errorCode}`,
|
|
585
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
489
|
+
response = new RbinServiceException_1.RbinServiceException({
|
|
490
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
586
491
|
$fault: "client",
|
|
587
492
|
$metadata: deserializeMetadata(output),
|
|
588
|
-
};
|
|
493
|
+
});
|
|
494
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
589
495
|
}
|
|
590
|
-
const message = response.message || response.Message || errorCode;
|
|
591
|
-
response.message = message;
|
|
592
|
-
delete response.Message;
|
|
593
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
594
496
|
};
|
|
595
497
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
596
498
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
@@ -614,51 +516,25 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
614
516
|
switch (errorCode) {
|
|
615
517
|
case "InternalServerException":
|
|
616
518
|
case "com.amazonaws.rbin#InternalServerException":
|
|
617
|
-
|
|
618
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
619
|
-
name: errorCode,
|
|
620
|
-
$metadata: deserializeMetadata(output),
|
|
621
|
-
};
|
|
622
|
-
break;
|
|
519
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
623
520
|
case "ResourceNotFoundException":
|
|
624
521
|
case "com.amazonaws.rbin#ResourceNotFoundException":
|
|
625
|
-
|
|
626
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
627
|
-
name: errorCode,
|
|
628
|
-
$metadata: deserializeMetadata(output),
|
|
629
|
-
};
|
|
630
|
-
break;
|
|
522
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
631
523
|
case "ServiceQuotaExceededException":
|
|
632
524
|
case "com.amazonaws.rbin#ServiceQuotaExceededException":
|
|
633
|
-
|
|
634
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
635
|
-
name: errorCode,
|
|
636
|
-
$metadata: deserializeMetadata(output),
|
|
637
|
-
};
|
|
638
|
-
break;
|
|
525
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
639
526
|
case "ValidationException":
|
|
640
527
|
case "com.amazonaws.rbin#ValidationException":
|
|
641
|
-
|
|
642
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
643
|
-
name: errorCode,
|
|
644
|
-
$metadata: deserializeMetadata(output),
|
|
645
|
-
};
|
|
646
|
-
break;
|
|
528
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
647
529
|
default:
|
|
648
530
|
const parsedBody = parsedOutput.body;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
...parsedBody,
|
|
652
|
-
name: `${errorCode}`,
|
|
653
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
531
|
+
response = new RbinServiceException_1.RbinServiceException({
|
|
532
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
654
533
|
$fault: "client",
|
|
655
534
|
$metadata: deserializeMetadata(output),
|
|
656
|
-
};
|
|
535
|
+
});
|
|
536
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
657
537
|
}
|
|
658
|
-
const message = response.message || response.Message || errorCode;
|
|
659
|
-
response.message = message;
|
|
660
|
-
delete response.Message;
|
|
661
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
662
538
|
};
|
|
663
539
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
664
540
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -682,43 +558,22 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
682
558
|
switch (errorCode) {
|
|
683
559
|
case "InternalServerException":
|
|
684
560
|
case "com.amazonaws.rbin#InternalServerException":
|
|
685
|
-
|
|
686
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
687
|
-
name: errorCode,
|
|
688
|
-
$metadata: deserializeMetadata(output),
|
|
689
|
-
};
|
|
690
|
-
break;
|
|
561
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
691
562
|
case "ResourceNotFoundException":
|
|
692
563
|
case "com.amazonaws.rbin#ResourceNotFoundException":
|
|
693
|
-
|
|
694
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
695
|
-
name: errorCode,
|
|
696
|
-
$metadata: deserializeMetadata(output),
|
|
697
|
-
};
|
|
698
|
-
break;
|
|
564
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
699
565
|
case "ValidationException":
|
|
700
566
|
case "com.amazonaws.rbin#ValidationException":
|
|
701
|
-
|
|
702
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
703
|
-
name: errorCode,
|
|
704
|
-
$metadata: deserializeMetadata(output),
|
|
705
|
-
};
|
|
706
|
-
break;
|
|
567
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
707
568
|
default:
|
|
708
569
|
const parsedBody = parsedOutput.body;
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
...parsedBody,
|
|
712
|
-
name: `${errorCode}`,
|
|
713
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
570
|
+
response = new RbinServiceException_1.RbinServiceException({
|
|
571
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
714
572
|
$fault: "client",
|
|
715
573
|
$metadata: deserializeMetadata(output),
|
|
716
|
-
};
|
|
574
|
+
});
|
|
575
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
717
576
|
}
|
|
718
|
-
const message = response.message || response.Message || errorCode;
|
|
719
|
-
response.message = message;
|
|
720
|
-
delete response.Message;
|
|
721
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
722
577
|
};
|
|
723
578
|
const deserializeAws_restJson1UpdateRuleCommand = async (output, context) => {
|
|
724
579
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -766,65 +621,37 @@ const deserializeAws_restJson1UpdateRuleCommandError = async (output, context) =
|
|
|
766
621
|
switch (errorCode) {
|
|
767
622
|
case "InternalServerException":
|
|
768
623
|
case "com.amazonaws.rbin#InternalServerException":
|
|
769
|
-
|
|
770
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
771
|
-
name: errorCode,
|
|
772
|
-
$metadata: deserializeMetadata(output),
|
|
773
|
-
};
|
|
774
|
-
break;
|
|
624
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
775
625
|
case "ResourceNotFoundException":
|
|
776
626
|
case "com.amazonaws.rbin#ResourceNotFoundException":
|
|
777
|
-
|
|
778
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
779
|
-
name: errorCode,
|
|
780
|
-
$metadata: deserializeMetadata(output),
|
|
781
|
-
};
|
|
782
|
-
break;
|
|
627
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
783
628
|
case "ValidationException":
|
|
784
629
|
case "com.amazonaws.rbin#ValidationException":
|
|
785
|
-
|
|
786
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
787
|
-
name: errorCode,
|
|
788
|
-
$metadata: deserializeMetadata(output),
|
|
789
|
-
};
|
|
790
|
-
break;
|
|
630
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
791
631
|
default:
|
|
792
632
|
const parsedBody = parsedOutput.body;
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
...parsedBody,
|
|
796
|
-
name: `${errorCode}`,
|
|
797
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
633
|
+
response = new RbinServiceException_1.RbinServiceException({
|
|
634
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
798
635
|
$fault: "client",
|
|
799
636
|
$metadata: deserializeMetadata(output),
|
|
800
|
-
};
|
|
637
|
+
});
|
|
638
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
801
639
|
}
|
|
802
|
-
const message = response.message || response.Message || errorCode;
|
|
803
|
-
response.message = message;
|
|
804
|
-
delete response.Message;
|
|
805
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
806
640
|
};
|
|
807
641
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
808
|
-
const contents = {
|
|
809
|
-
name: "InternalServerException",
|
|
810
|
-
$fault: "server",
|
|
811
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
812
|
-
Message: undefined,
|
|
813
|
-
};
|
|
642
|
+
const contents = {};
|
|
814
643
|
const data = parsedOutput.body;
|
|
815
644
|
if (data.Message !== undefined && data.Message !== null) {
|
|
816
645
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
817
646
|
}
|
|
818
|
-
|
|
647
|
+
const exception = new models_0_1.InternalServerException({
|
|
648
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
649
|
+
...contents,
|
|
650
|
+
});
|
|
651
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
819
652
|
};
|
|
820
653
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
821
|
-
const contents = {
|
|
822
|
-
name: "ResourceNotFoundException",
|
|
823
|
-
$fault: "client",
|
|
824
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
825
|
-
Message: undefined,
|
|
826
|
-
Reason: undefined,
|
|
827
|
-
};
|
|
654
|
+
const contents = {};
|
|
828
655
|
const data = parsedOutput.body;
|
|
829
656
|
if (data.Message !== undefined && data.Message !== null) {
|
|
830
657
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
@@ -832,16 +659,14 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
832
659
|
if (data.Reason !== undefined && data.Reason !== null) {
|
|
833
660
|
contents.Reason = smithy_client_1.expectString(data.Reason);
|
|
834
661
|
}
|
|
835
|
-
|
|
662
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
663
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
664
|
+
...contents,
|
|
665
|
+
});
|
|
666
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
836
667
|
};
|
|
837
668
|
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
838
|
-
const contents = {
|
|
839
|
-
name: "ServiceQuotaExceededException",
|
|
840
|
-
$fault: "client",
|
|
841
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
842
|
-
Message: undefined,
|
|
843
|
-
Reason: undefined,
|
|
844
|
-
};
|
|
669
|
+
const contents = {};
|
|
845
670
|
const data = parsedOutput.body;
|
|
846
671
|
if (data.Message !== undefined && data.Message !== null) {
|
|
847
672
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
@@ -849,16 +674,14 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
849
674
|
if (data.Reason !== undefined && data.Reason !== null) {
|
|
850
675
|
contents.Reason = smithy_client_1.expectString(data.Reason);
|
|
851
676
|
}
|
|
852
|
-
|
|
677
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
678
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
679
|
+
...contents,
|
|
680
|
+
});
|
|
681
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
853
682
|
};
|
|
854
683
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
855
|
-
const contents = {
|
|
856
|
-
name: "ValidationException",
|
|
857
|
-
$fault: "client",
|
|
858
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
859
|
-
Message: undefined,
|
|
860
|
-
Reason: undefined,
|
|
861
|
-
};
|
|
684
|
+
const contents = {};
|
|
862
685
|
const data = parsedOutput.body;
|
|
863
686
|
if (data.Message !== undefined && data.Message !== null) {
|
|
864
687
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
@@ -866,7 +689,11 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
866
689
|
if (data.Reason !== undefined && data.Reason !== null) {
|
|
867
690
|
contents.Reason = smithy_client_1.expectString(data.Reason);
|
|
868
691
|
}
|
|
869
|
-
|
|
692
|
+
const exception = new models_0_1.ValidationException({
|
|
693
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
694
|
+
...contents,
|
|
695
|
+
});
|
|
696
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
870
697
|
};
|
|
871
698
|
const serializeAws_restJson1ResourceTag = (input, context) => {
|
|
872
699
|
return {
|
|
@@ -917,7 +744,7 @@ const deserializeAws_restJson1ResourceTag = (output, context) => {
|
|
|
917
744
|
};
|
|
918
745
|
};
|
|
919
746
|
const deserializeAws_restJson1ResourceTags = (output, context) => {
|
|
920
|
-
|
|
747
|
+
const retVal = (output || [])
|
|
921
748
|
.filter((e) => e != null)
|
|
922
749
|
.map((entry) => {
|
|
923
750
|
if (entry === null) {
|
|
@@ -925,6 +752,7 @@ const deserializeAws_restJson1ResourceTags = (output, context) => {
|
|
|
925
752
|
}
|
|
926
753
|
return deserializeAws_restJson1ResourceTag(entry, context);
|
|
927
754
|
});
|
|
755
|
+
return retVal;
|
|
928
756
|
};
|
|
929
757
|
const deserializeAws_restJson1RetentionPeriod = (output, context) => {
|
|
930
758
|
return {
|
|
@@ -942,7 +770,7 @@ const deserializeAws_restJson1RuleSummary = (output, context) => {
|
|
|
942
770
|
};
|
|
943
771
|
};
|
|
944
772
|
const deserializeAws_restJson1RuleSummaryList = (output, context) => {
|
|
945
|
-
|
|
773
|
+
const retVal = (output || [])
|
|
946
774
|
.filter((e) => e != null)
|
|
947
775
|
.map((entry) => {
|
|
948
776
|
if (entry === null) {
|
|
@@ -950,6 +778,7 @@ const deserializeAws_restJson1RuleSummaryList = (output, context) => {
|
|
|
950
778
|
}
|
|
951
779
|
return deserializeAws_restJson1RuleSummary(entry, context);
|
|
952
780
|
});
|
|
781
|
+
return retVal;
|
|
953
782
|
};
|
|
954
783
|
const deserializeAws_restJson1Tag = (output, context) => {
|
|
955
784
|
return {
|
|
@@ -958,7 +787,7 @@ const deserializeAws_restJson1Tag = (output, context) => {
|
|
|
958
787
|
};
|
|
959
788
|
};
|
|
960
789
|
const deserializeAws_restJson1TagList = (output, context) => {
|
|
961
|
-
|
|
790
|
+
const retVal = (output || [])
|
|
962
791
|
.filter((e) => e != null)
|
|
963
792
|
.map((entry) => {
|
|
964
793
|
if (entry === null) {
|
|
@@ -966,6 +795,7 @@ const deserializeAws_restJson1TagList = (output, context) => {
|
|
|
966
795
|
}
|
|
967
796
|
return deserializeAws_restJson1Tag(entry, context);
|
|
968
797
|
});
|
|
798
|
+
return retVal;
|
|
969
799
|
};
|
|
970
800
|
const deserializeMetadata = (output) => {
|
|
971
801
|
var _a;
|
package/dist-es/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
+
var RbinServiceException = (function (_super) {
|
|
4
|
+
__extends(RbinServiceException, _super);
|
|
5
|
+
function RbinServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, RbinServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return RbinServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { RbinServiceException };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
2
|
+
import { RbinServiceException as __BaseException } from "./RbinServiceException";
|
|
2
3
|
export var ResourceTag;
|
|
3
4
|
(function (ResourceTag) {
|
|
4
5
|
ResourceTag.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -33,15 +34,56 @@ export var CreateRuleResponse;
|
|
|
33
34
|
(function (CreateRuleResponse) {
|
|
34
35
|
CreateRuleResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
35
36
|
})(CreateRuleResponse || (CreateRuleResponse = {}));
|
|
37
|
+
var InternalServerException = (function (_super) {
|
|
38
|
+
__extends(InternalServerException, _super);
|
|
39
|
+
function InternalServerException(opts) {
|
|
40
|
+
var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
|
|
41
|
+
_this.name = "InternalServerException";
|
|
42
|
+
_this.$fault = "server";
|
|
43
|
+
Object.setPrototypeOf(_this, InternalServerException.prototype);
|
|
44
|
+
_this.Message = opts.Message;
|
|
45
|
+
return _this;
|
|
46
|
+
}
|
|
47
|
+
return InternalServerException;
|
|
48
|
+
}(__BaseException));
|
|
49
|
+
export { InternalServerException };
|
|
36
50
|
export var ServiceQuotaExceededExceptionReason;
|
|
37
51
|
(function (ServiceQuotaExceededExceptionReason) {
|
|
38
52
|
ServiceQuotaExceededExceptionReason["SERVICE_QUOTA_EXCEEDED"] = "SERVICE_QUOTA_EXCEEDED";
|
|
39
53
|
})(ServiceQuotaExceededExceptionReason || (ServiceQuotaExceededExceptionReason = {}));
|
|
54
|
+
var ServiceQuotaExceededException = (function (_super) {
|
|
55
|
+
__extends(ServiceQuotaExceededException, _super);
|
|
56
|
+
function ServiceQuotaExceededException(opts) {
|
|
57
|
+
var _this = _super.call(this, __assign({ name: "ServiceQuotaExceededException", $fault: "client" }, opts)) || this;
|
|
58
|
+
_this.name = "ServiceQuotaExceededException";
|
|
59
|
+
_this.$fault = "client";
|
|
60
|
+
Object.setPrototypeOf(_this, ServiceQuotaExceededException.prototype);
|
|
61
|
+
_this.Message = opts.Message;
|
|
62
|
+
_this.Reason = opts.Reason;
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
return ServiceQuotaExceededException;
|
|
66
|
+
}(__BaseException));
|
|
67
|
+
export { ServiceQuotaExceededException };
|
|
40
68
|
export var ValidationExceptionReason;
|
|
41
69
|
(function (ValidationExceptionReason) {
|
|
42
70
|
ValidationExceptionReason["INVALID_PAGE_TOKEN"] = "INVALID_PAGE_TOKEN";
|
|
43
71
|
ValidationExceptionReason["INVALID_PARAMETER_VALUE"] = "INVALID_PARAMETER_VALUE";
|
|
44
72
|
})(ValidationExceptionReason || (ValidationExceptionReason = {}));
|
|
73
|
+
var ValidationException = (function (_super) {
|
|
74
|
+
__extends(ValidationException, _super);
|
|
75
|
+
function ValidationException(opts) {
|
|
76
|
+
var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
|
|
77
|
+
_this.name = "ValidationException";
|
|
78
|
+
_this.$fault = "client";
|
|
79
|
+
Object.setPrototypeOf(_this, ValidationException.prototype);
|
|
80
|
+
_this.Message = opts.Message;
|
|
81
|
+
_this.Reason = opts.Reason;
|
|
82
|
+
return _this;
|
|
83
|
+
}
|
|
84
|
+
return ValidationException;
|
|
85
|
+
}(__BaseException));
|
|
86
|
+
export { ValidationException };
|
|
45
87
|
export var DeleteRuleRequest;
|
|
46
88
|
(function (DeleteRuleRequest) {
|
|
47
89
|
DeleteRuleRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -54,6 +96,20 @@ export var ResourceNotFoundExceptionReason;
|
|
|
54
96
|
(function (ResourceNotFoundExceptionReason) {
|
|
55
97
|
ResourceNotFoundExceptionReason["RULE_NOT_FOUND"] = "RULE_NOT_FOUND";
|
|
56
98
|
})(ResourceNotFoundExceptionReason || (ResourceNotFoundExceptionReason = {}));
|
|
99
|
+
var ResourceNotFoundException = (function (_super) {
|
|
100
|
+
__extends(ResourceNotFoundException, _super);
|
|
101
|
+
function ResourceNotFoundException(opts) {
|
|
102
|
+
var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
|
|
103
|
+
_this.name = "ResourceNotFoundException";
|
|
104
|
+
_this.$fault = "client";
|
|
105
|
+
Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
|
|
106
|
+
_this.Message = opts.Message;
|
|
107
|
+
_this.Reason = opts.Reason;
|
|
108
|
+
return _this;
|
|
109
|
+
}
|
|
110
|
+
return ResourceNotFoundException;
|
|
111
|
+
}(__BaseException));
|
|
112
|
+
export { ResourceNotFoundException };
|
|
57
113
|
export var GetRuleRequest;
|
|
58
114
|
(function (GetRuleRequest) {
|
|
59
115
|
GetRuleRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|