@aws-sdk/client-kafkaconnect 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 +30 -0
- package/dist-cjs/KafkaConnect.js +15 -0
- package/dist-cjs/commands/DeleteCustomPluginCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/KafkaConnectServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +133 -2
- package/dist-cjs/protocols/Aws_restJson1.js +283 -651
- package/dist-es/KafkaConnect.js +15 -0
- package/dist-es/commands/DeleteCustomPluginCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/KafkaConnectServiceException.js +12 -0
- package/dist-es/models/models_0.js +118 -6
- package/dist-es/protocols/Aws_restJson1.js +466 -704
- package/dist-types/KafkaConnect.d.ts +10 -1
- package/dist-types/KafkaConnectClient.d.ts +5 -4
- package/dist-types/commands/DeleteCustomPluginCommand.d.ts +35 -0
- package/dist-types/commands/ListConnectorsCommand.d.ts +3 -1
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/KafkaConnectServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +237 -91
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- 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/KafkaConnect.d.ts +5 -0
- package/dist-types/ts3.4/KafkaConnectClient.d.ts +5 -4
- package/dist-types/ts3.4/commands/DeleteCustomPluginCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/KafkaConnectServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +75 -33
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- 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,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_restJson1UpdateConnectorCommand = exports.deserializeAws_restJson1ListWorkerConfigurationsCommand = exports.deserializeAws_restJson1ListCustomPluginsCommand = exports.deserializeAws_restJson1ListConnectorsCommand = exports.deserializeAws_restJson1DescribeWorkerConfigurationCommand = exports.deserializeAws_restJson1DescribeCustomPluginCommand = exports.deserializeAws_restJson1DescribeConnectorCommand = exports.deserializeAws_restJson1DeleteConnectorCommand = exports.deserializeAws_restJson1CreateWorkerConfigurationCommand = exports.deserializeAws_restJson1CreateCustomPluginCommand = exports.deserializeAws_restJson1CreateConnectorCommand = exports.serializeAws_restJson1UpdateConnectorCommand = exports.serializeAws_restJson1ListWorkerConfigurationsCommand = exports.serializeAws_restJson1ListCustomPluginsCommand = exports.serializeAws_restJson1ListConnectorsCommand = exports.serializeAws_restJson1DescribeWorkerConfigurationCommand = exports.serializeAws_restJson1DescribeCustomPluginCommand = exports.serializeAws_restJson1DescribeConnectorCommand = exports.serializeAws_restJson1DeleteConnectorCommand = exports.serializeAws_restJson1CreateWorkerConfigurationCommand = exports.serializeAws_restJson1CreateCustomPluginCommand = exports.serializeAws_restJson1CreateConnectorCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1UpdateConnectorCommand = exports.deserializeAws_restJson1ListWorkerConfigurationsCommand = exports.deserializeAws_restJson1ListCustomPluginsCommand = exports.deserializeAws_restJson1ListConnectorsCommand = exports.deserializeAws_restJson1DescribeWorkerConfigurationCommand = exports.deserializeAws_restJson1DescribeCustomPluginCommand = exports.deserializeAws_restJson1DescribeConnectorCommand = exports.deserializeAws_restJson1DeleteCustomPluginCommand = exports.deserializeAws_restJson1DeleteConnectorCommand = exports.deserializeAws_restJson1CreateWorkerConfigurationCommand = exports.deserializeAws_restJson1CreateCustomPluginCommand = exports.deserializeAws_restJson1CreateConnectorCommand = exports.serializeAws_restJson1UpdateConnectorCommand = exports.serializeAws_restJson1ListWorkerConfigurationsCommand = exports.serializeAws_restJson1ListCustomPluginsCommand = exports.serializeAws_restJson1ListConnectorsCommand = exports.serializeAws_restJson1DescribeWorkerConfigurationCommand = exports.serializeAws_restJson1DescribeCustomPluginCommand = exports.serializeAws_restJson1DescribeConnectorCommand = exports.serializeAws_restJson1DeleteCustomPluginCommand = exports.serializeAws_restJson1DeleteConnectorCommand = exports.serializeAws_restJson1CreateWorkerConfigurationCommand = exports.serializeAws_restJson1CreateCustomPluginCommand = exports.serializeAws_restJson1CreateConnectorCommand = 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 KafkaConnectServiceException_1 = require("../models/KafkaConnectServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
6
8
|
const serializeAws_restJson1CreateConnectorCommand = async (input, context) => {
|
|
7
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
10
|
const headers = {
|
|
@@ -133,6 +135,32 @@ const serializeAws_restJson1DeleteConnectorCommand = async (input, context) => {
|
|
|
133
135
|
});
|
|
134
136
|
};
|
|
135
137
|
exports.serializeAws_restJson1DeleteConnectorCommand = serializeAws_restJson1DeleteConnectorCommand;
|
|
138
|
+
const serializeAws_restJson1DeleteCustomPluginCommand = async (input, context) => {
|
|
139
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
140
|
+
const headers = {};
|
|
141
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins/{customPluginArn}";
|
|
142
|
+
if (input.customPluginArn !== undefined) {
|
|
143
|
+
const labelValue = input.customPluginArn;
|
|
144
|
+
if (labelValue.length <= 0) {
|
|
145
|
+
throw new Error("Empty value provided for input HTTP label: customPluginArn.");
|
|
146
|
+
}
|
|
147
|
+
resolvedPath = resolvedPath.replace("{customPluginArn}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
throw new Error("No value provided for input HTTP label: customPluginArn.");
|
|
151
|
+
}
|
|
152
|
+
let body;
|
|
153
|
+
return new protocol_http_1.HttpRequest({
|
|
154
|
+
protocol,
|
|
155
|
+
hostname,
|
|
156
|
+
port,
|
|
157
|
+
method: "DELETE",
|
|
158
|
+
headers,
|
|
159
|
+
path: resolvedPath,
|
|
160
|
+
body,
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
exports.serializeAws_restJson1DeleteCustomPluginCommand = serializeAws_restJson1DeleteCustomPluginCommand;
|
|
136
164
|
const serializeAws_restJson1DescribeConnectorCommand = async (input, context) => {
|
|
137
165
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
138
166
|
const headers = {};
|
|
@@ -346,83 +374,37 @@ const deserializeAws_restJson1CreateConnectorCommandError = async (output, conte
|
|
|
346
374
|
switch (errorCode) {
|
|
347
375
|
case "BadRequestException":
|
|
348
376
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
349
|
-
|
|
350
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
351
|
-
name: errorCode,
|
|
352
|
-
$metadata: deserializeMetadata(output),
|
|
353
|
-
};
|
|
354
|
-
break;
|
|
377
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
355
378
|
case "ConflictException":
|
|
356
379
|
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
357
|
-
|
|
358
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
359
|
-
name: errorCode,
|
|
360
|
-
$metadata: deserializeMetadata(output),
|
|
361
|
-
};
|
|
362
|
-
break;
|
|
380
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
363
381
|
case "ForbiddenException":
|
|
364
382
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
365
|
-
|
|
366
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
367
|
-
name: errorCode,
|
|
368
|
-
$metadata: deserializeMetadata(output),
|
|
369
|
-
};
|
|
370
|
-
break;
|
|
383
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
371
384
|
case "InternalServerErrorException":
|
|
372
385
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
373
|
-
|
|
374
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
375
|
-
name: errorCode,
|
|
376
|
-
$metadata: deserializeMetadata(output),
|
|
377
|
-
};
|
|
378
|
-
break;
|
|
386
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
379
387
|
case "NotFoundException":
|
|
380
388
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
381
|
-
|
|
382
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
383
|
-
name: errorCode,
|
|
384
|
-
$metadata: deserializeMetadata(output),
|
|
385
|
-
};
|
|
386
|
-
break;
|
|
389
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
387
390
|
case "ServiceUnavailableException":
|
|
388
391
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
389
|
-
|
|
390
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
391
|
-
name: errorCode,
|
|
392
|
-
$metadata: deserializeMetadata(output),
|
|
393
|
-
};
|
|
394
|
-
break;
|
|
392
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
395
393
|
case "TooManyRequestsException":
|
|
396
394
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
397
|
-
|
|
398
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
399
|
-
name: errorCode,
|
|
400
|
-
$metadata: deserializeMetadata(output),
|
|
401
|
-
};
|
|
402
|
-
break;
|
|
395
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
403
396
|
case "UnauthorizedException":
|
|
404
397
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
405
|
-
|
|
406
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
407
|
-
name: errorCode,
|
|
408
|
-
$metadata: deserializeMetadata(output),
|
|
409
|
-
};
|
|
410
|
-
break;
|
|
398
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
411
399
|
default:
|
|
412
400
|
const parsedBody = parsedOutput.body;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
...parsedBody,
|
|
416
|
-
name: `${errorCode}`,
|
|
417
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
401
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
402
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
418
403
|
$fault: "client",
|
|
419
404
|
$metadata: deserializeMetadata(output),
|
|
420
|
-
};
|
|
405
|
+
});
|
|
406
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
421
407
|
}
|
|
422
|
-
const message = response.message || response.Message || errorCode;
|
|
423
|
-
response.message = message;
|
|
424
|
-
delete response.Message;
|
|
425
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
426
408
|
};
|
|
427
409
|
const deserializeAws_restJson1CreateCustomPluginCommand = async (output, context) => {
|
|
428
410
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -462,83 +444,37 @@ const deserializeAws_restJson1CreateCustomPluginCommandError = async (output, co
|
|
|
462
444
|
switch (errorCode) {
|
|
463
445
|
case "BadRequestException":
|
|
464
446
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
465
|
-
|
|
466
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
467
|
-
name: errorCode,
|
|
468
|
-
$metadata: deserializeMetadata(output),
|
|
469
|
-
};
|
|
470
|
-
break;
|
|
447
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
471
448
|
case "ConflictException":
|
|
472
449
|
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
473
|
-
|
|
474
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
475
|
-
name: errorCode,
|
|
476
|
-
$metadata: deserializeMetadata(output),
|
|
477
|
-
};
|
|
478
|
-
break;
|
|
450
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
479
451
|
case "ForbiddenException":
|
|
480
452
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
481
|
-
|
|
482
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
483
|
-
name: errorCode,
|
|
484
|
-
$metadata: deserializeMetadata(output),
|
|
485
|
-
};
|
|
486
|
-
break;
|
|
453
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
487
454
|
case "InternalServerErrorException":
|
|
488
455
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
489
|
-
|
|
490
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
491
|
-
name: errorCode,
|
|
492
|
-
$metadata: deserializeMetadata(output),
|
|
493
|
-
};
|
|
494
|
-
break;
|
|
456
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
495
457
|
case "NotFoundException":
|
|
496
458
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
497
|
-
|
|
498
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
499
|
-
name: errorCode,
|
|
500
|
-
$metadata: deserializeMetadata(output),
|
|
501
|
-
};
|
|
502
|
-
break;
|
|
459
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
503
460
|
case "ServiceUnavailableException":
|
|
504
461
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
505
|
-
|
|
506
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
507
|
-
name: errorCode,
|
|
508
|
-
$metadata: deserializeMetadata(output),
|
|
509
|
-
};
|
|
510
|
-
break;
|
|
462
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
511
463
|
case "TooManyRequestsException":
|
|
512
464
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
513
|
-
|
|
514
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
515
|
-
name: errorCode,
|
|
516
|
-
$metadata: deserializeMetadata(output),
|
|
517
|
-
};
|
|
518
|
-
break;
|
|
465
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
519
466
|
case "UnauthorizedException":
|
|
520
467
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
521
|
-
|
|
522
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
523
|
-
name: errorCode,
|
|
524
|
-
$metadata: deserializeMetadata(output),
|
|
525
|
-
};
|
|
526
|
-
break;
|
|
468
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
527
469
|
default:
|
|
528
470
|
const parsedBody = parsedOutput.body;
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
...parsedBody,
|
|
532
|
-
name: `${errorCode}`,
|
|
533
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
471
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
472
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
534
473
|
$fault: "client",
|
|
535
474
|
$metadata: deserializeMetadata(output),
|
|
536
|
-
};
|
|
475
|
+
});
|
|
476
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
537
477
|
}
|
|
538
|
-
const message = response.message || response.Message || errorCode;
|
|
539
|
-
response.message = message;
|
|
540
|
-
delete response.Message;
|
|
541
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
542
478
|
};
|
|
543
479
|
const deserializeAws_restJson1CreateWorkerConfigurationCommand = async (output, context) => {
|
|
544
480
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -578,83 +514,37 @@ const deserializeAws_restJson1CreateWorkerConfigurationCommandError = async (out
|
|
|
578
514
|
switch (errorCode) {
|
|
579
515
|
case "BadRequestException":
|
|
580
516
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
581
|
-
|
|
582
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
583
|
-
name: errorCode,
|
|
584
|
-
$metadata: deserializeMetadata(output),
|
|
585
|
-
};
|
|
586
|
-
break;
|
|
517
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
587
518
|
case "ConflictException":
|
|
588
519
|
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
589
|
-
|
|
590
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
591
|
-
name: errorCode,
|
|
592
|
-
$metadata: deserializeMetadata(output),
|
|
593
|
-
};
|
|
594
|
-
break;
|
|
520
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
595
521
|
case "ForbiddenException":
|
|
596
522
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
597
|
-
|
|
598
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
599
|
-
name: errorCode,
|
|
600
|
-
$metadata: deserializeMetadata(output),
|
|
601
|
-
};
|
|
602
|
-
break;
|
|
523
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
603
524
|
case "InternalServerErrorException":
|
|
604
525
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
605
|
-
|
|
606
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
607
|
-
name: errorCode,
|
|
608
|
-
$metadata: deserializeMetadata(output),
|
|
609
|
-
};
|
|
610
|
-
break;
|
|
526
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
611
527
|
case "NotFoundException":
|
|
612
528
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
613
|
-
|
|
614
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
615
|
-
name: errorCode,
|
|
616
|
-
$metadata: deserializeMetadata(output),
|
|
617
|
-
};
|
|
618
|
-
break;
|
|
529
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
619
530
|
case "ServiceUnavailableException":
|
|
620
531
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
621
|
-
|
|
622
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
623
|
-
name: errorCode,
|
|
624
|
-
$metadata: deserializeMetadata(output),
|
|
625
|
-
};
|
|
626
|
-
break;
|
|
532
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
627
533
|
case "TooManyRequestsException":
|
|
628
534
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
629
|
-
|
|
630
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
631
|
-
name: errorCode,
|
|
632
|
-
$metadata: deserializeMetadata(output),
|
|
633
|
-
};
|
|
634
|
-
break;
|
|
535
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
635
536
|
case "UnauthorizedException":
|
|
636
537
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
637
|
-
|
|
638
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
639
|
-
name: errorCode,
|
|
640
|
-
$metadata: deserializeMetadata(output),
|
|
641
|
-
};
|
|
642
|
-
break;
|
|
538
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
643
539
|
default:
|
|
644
540
|
const parsedBody = parsedOutput.body;
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
...parsedBody,
|
|
648
|
-
name: `${errorCode}`,
|
|
649
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
541
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
542
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
650
543
|
$fault: "client",
|
|
651
544
|
$metadata: deserializeMetadata(output),
|
|
652
|
-
};
|
|
545
|
+
});
|
|
546
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
653
547
|
}
|
|
654
|
-
const message = response.message || response.Message || errorCode;
|
|
655
|
-
response.message = message;
|
|
656
|
-
delete response.Message;
|
|
657
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
658
548
|
};
|
|
659
549
|
const deserializeAws_restJson1DeleteConnectorCommand = async (output, context) => {
|
|
660
550
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -686,75 +576,93 @@ const deserializeAws_restJson1DeleteConnectorCommandError = async (output, conte
|
|
|
686
576
|
switch (errorCode) {
|
|
687
577
|
case "BadRequestException":
|
|
688
578
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
689
|
-
|
|
690
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
691
|
-
name: errorCode,
|
|
692
|
-
$metadata: deserializeMetadata(output),
|
|
693
|
-
};
|
|
694
|
-
break;
|
|
579
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
695
580
|
case "ForbiddenException":
|
|
696
581
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
697
|
-
|
|
698
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
699
|
-
name: errorCode,
|
|
700
|
-
$metadata: deserializeMetadata(output),
|
|
701
|
-
};
|
|
702
|
-
break;
|
|
582
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
703
583
|
case "InternalServerErrorException":
|
|
704
584
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
705
|
-
|
|
706
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
707
|
-
name: errorCode,
|
|
708
|
-
$metadata: deserializeMetadata(output),
|
|
709
|
-
};
|
|
710
|
-
break;
|
|
585
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
711
586
|
case "NotFoundException":
|
|
712
587
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
713
|
-
|
|
714
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
715
|
-
name: errorCode,
|
|
716
|
-
$metadata: deserializeMetadata(output),
|
|
717
|
-
};
|
|
718
|
-
break;
|
|
588
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
719
589
|
case "ServiceUnavailableException":
|
|
720
590
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
721
|
-
|
|
722
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
723
|
-
name: errorCode,
|
|
724
|
-
$metadata: deserializeMetadata(output),
|
|
725
|
-
};
|
|
726
|
-
break;
|
|
591
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
727
592
|
case "TooManyRequestsException":
|
|
728
593
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
729
|
-
|
|
730
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
731
|
-
name: errorCode,
|
|
732
|
-
$metadata: deserializeMetadata(output),
|
|
733
|
-
};
|
|
734
|
-
break;
|
|
594
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
735
595
|
case "UnauthorizedException":
|
|
736
596
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
597
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
598
|
+
default:
|
|
599
|
+
const parsedBody = parsedOutput.body;
|
|
600
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
601
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
602
|
+
$fault: "client",
|
|
740
603
|
$metadata: deserializeMetadata(output),
|
|
741
|
-
};
|
|
742
|
-
|
|
604
|
+
});
|
|
605
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
const deserializeAws_restJson1DeleteCustomPluginCommand = async (output, context) => {
|
|
609
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
610
|
+
return deserializeAws_restJson1DeleteCustomPluginCommandError(output, context);
|
|
611
|
+
}
|
|
612
|
+
const contents = {
|
|
613
|
+
$metadata: deserializeMetadata(output),
|
|
614
|
+
customPluginArn: undefined,
|
|
615
|
+
customPluginState: undefined,
|
|
616
|
+
};
|
|
617
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
618
|
+
if (data.customPluginArn !== undefined && data.customPluginArn !== null) {
|
|
619
|
+
contents.customPluginArn = smithy_client_1.expectString(data.customPluginArn);
|
|
620
|
+
}
|
|
621
|
+
if (data.customPluginState !== undefined && data.customPluginState !== null) {
|
|
622
|
+
contents.customPluginState = smithy_client_1.expectString(data.customPluginState);
|
|
623
|
+
}
|
|
624
|
+
return Promise.resolve(contents);
|
|
625
|
+
};
|
|
626
|
+
exports.deserializeAws_restJson1DeleteCustomPluginCommand = deserializeAws_restJson1DeleteCustomPluginCommand;
|
|
627
|
+
const deserializeAws_restJson1DeleteCustomPluginCommandError = async (output, context) => {
|
|
628
|
+
const parsedOutput = {
|
|
629
|
+
...output,
|
|
630
|
+
body: await parseBody(output.body, context),
|
|
631
|
+
};
|
|
632
|
+
let response;
|
|
633
|
+
let errorCode = "UnknownError";
|
|
634
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
635
|
+
switch (errorCode) {
|
|
636
|
+
case "BadRequestException":
|
|
637
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
638
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
639
|
+
case "ForbiddenException":
|
|
640
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
641
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
642
|
+
case "InternalServerErrorException":
|
|
643
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
644
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
645
|
+
case "NotFoundException":
|
|
646
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
647
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
648
|
+
case "ServiceUnavailableException":
|
|
649
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
650
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
651
|
+
case "TooManyRequestsException":
|
|
652
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
653
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
654
|
+
case "UnauthorizedException":
|
|
655
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
656
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
743
657
|
default:
|
|
744
658
|
const parsedBody = parsedOutput.body;
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
...parsedBody,
|
|
748
|
-
name: `${errorCode}`,
|
|
749
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
659
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
660
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
750
661
|
$fault: "client",
|
|
751
662
|
$metadata: deserializeMetadata(output),
|
|
752
|
-
};
|
|
663
|
+
});
|
|
664
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
753
665
|
}
|
|
754
|
-
const message = response.message || response.Message || errorCode;
|
|
755
|
-
response.message = message;
|
|
756
|
-
delete response.Message;
|
|
757
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
758
666
|
};
|
|
759
667
|
const deserializeAws_restJson1DescribeConnectorCommand = async (output, context) => {
|
|
760
668
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -777,6 +685,7 @@ const deserializeAws_restJson1DescribeConnectorCommand = async (output, context)
|
|
|
777
685
|
logDelivery: undefined,
|
|
778
686
|
plugins: undefined,
|
|
779
687
|
serviceExecutionRoleArn: undefined,
|
|
688
|
+
stateDescription: undefined,
|
|
780
689
|
workerConfiguration: undefined,
|
|
781
690
|
};
|
|
782
691
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
@@ -825,6 +734,9 @@ const deserializeAws_restJson1DescribeConnectorCommand = async (output, context)
|
|
|
825
734
|
if (data.serviceExecutionRoleArn !== undefined && data.serviceExecutionRoleArn !== null) {
|
|
826
735
|
contents.serviceExecutionRoleArn = smithy_client_1.expectString(data.serviceExecutionRoleArn);
|
|
827
736
|
}
|
|
737
|
+
if (data.stateDescription !== undefined && data.stateDescription !== null) {
|
|
738
|
+
contents.stateDescription = deserializeAws_restJson1StateDescription(data.stateDescription, context);
|
|
739
|
+
}
|
|
828
740
|
if (data.workerConfiguration !== undefined && data.workerConfiguration !== null) {
|
|
829
741
|
contents.workerConfiguration = deserializeAws_restJson1WorkerConfigurationDescription(data.workerConfiguration, context);
|
|
830
742
|
}
|
|
@@ -842,75 +754,34 @@ const deserializeAws_restJson1DescribeConnectorCommandError = async (output, con
|
|
|
842
754
|
switch (errorCode) {
|
|
843
755
|
case "BadRequestException":
|
|
844
756
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
845
|
-
|
|
846
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
847
|
-
name: errorCode,
|
|
848
|
-
$metadata: deserializeMetadata(output),
|
|
849
|
-
};
|
|
850
|
-
break;
|
|
757
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
851
758
|
case "ForbiddenException":
|
|
852
759
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
853
|
-
|
|
854
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
855
|
-
name: errorCode,
|
|
856
|
-
$metadata: deserializeMetadata(output),
|
|
857
|
-
};
|
|
858
|
-
break;
|
|
760
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
859
761
|
case "InternalServerErrorException":
|
|
860
762
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
861
|
-
|
|
862
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
863
|
-
name: errorCode,
|
|
864
|
-
$metadata: deserializeMetadata(output),
|
|
865
|
-
};
|
|
866
|
-
break;
|
|
763
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
867
764
|
case "NotFoundException":
|
|
868
765
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
869
|
-
|
|
870
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
871
|
-
name: errorCode,
|
|
872
|
-
$metadata: deserializeMetadata(output),
|
|
873
|
-
};
|
|
874
|
-
break;
|
|
766
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
875
767
|
case "ServiceUnavailableException":
|
|
876
768
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
877
|
-
|
|
878
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
879
|
-
name: errorCode,
|
|
880
|
-
$metadata: deserializeMetadata(output),
|
|
881
|
-
};
|
|
882
|
-
break;
|
|
769
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
883
770
|
case "TooManyRequestsException":
|
|
884
771
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
885
|
-
|
|
886
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
887
|
-
name: errorCode,
|
|
888
|
-
$metadata: deserializeMetadata(output),
|
|
889
|
-
};
|
|
890
|
-
break;
|
|
772
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
891
773
|
case "UnauthorizedException":
|
|
892
774
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
893
|
-
|
|
894
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
895
|
-
name: errorCode,
|
|
896
|
-
$metadata: deserializeMetadata(output),
|
|
897
|
-
};
|
|
898
|
-
break;
|
|
775
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
899
776
|
default:
|
|
900
777
|
const parsedBody = parsedOutput.body;
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
...parsedBody,
|
|
904
|
-
name: `${errorCode}`,
|
|
905
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
778
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
779
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
906
780
|
$fault: "client",
|
|
907
781
|
$metadata: deserializeMetadata(output),
|
|
908
|
-
};
|
|
782
|
+
});
|
|
783
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
909
784
|
}
|
|
910
|
-
const message = response.message || response.Message || errorCode;
|
|
911
|
-
response.message = message;
|
|
912
|
-
delete response.Message;
|
|
913
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
914
785
|
};
|
|
915
786
|
const deserializeAws_restJson1DescribeCustomPluginCommand = async (output, context) => {
|
|
916
787
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -924,6 +795,7 @@ const deserializeAws_restJson1DescribeCustomPluginCommand = async (output, conte
|
|
|
924
795
|
description: undefined,
|
|
925
796
|
latestRevision: undefined,
|
|
926
797
|
name: undefined,
|
|
798
|
+
stateDescription: undefined,
|
|
927
799
|
};
|
|
928
800
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
929
801
|
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
@@ -944,6 +816,9 @@ const deserializeAws_restJson1DescribeCustomPluginCommand = async (output, conte
|
|
|
944
816
|
if (data.name !== undefined && data.name !== null) {
|
|
945
817
|
contents.name = smithy_client_1.expectString(data.name);
|
|
946
818
|
}
|
|
819
|
+
if (data.stateDescription !== undefined && data.stateDescription !== null) {
|
|
820
|
+
contents.stateDescription = deserializeAws_restJson1StateDescription(data.stateDescription, context);
|
|
821
|
+
}
|
|
947
822
|
return Promise.resolve(contents);
|
|
948
823
|
};
|
|
949
824
|
exports.deserializeAws_restJson1DescribeCustomPluginCommand = deserializeAws_restJson1DescribeCustomPluginCommand;
|
|
@@ -958,75 +833,34 @@ const deserializeAws_restJson1DescribeCustomPluginCommandError = async (output,
|
|
|
958
833
|
switch (errorCode) {
|
|
959
834
|
case "BadRequestException":
|
|
960
835
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
961
|
-
|
|
962
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
963
|
-
name: errorCode,
|
|
964
|
-
$metadata: deserializeMetadata(output),
|
|
965
|
-
};
|
|
966
|
-
break;
|
|
836
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
967
837
|
case "ForbiddenException":
|
|
968
838
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
969
|
-
|
|
970
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
971
|
-
name: errorCode,
|
|
972
|
-
$metadata: deserializeMetadata(output),
|
|
973
|
-
};
|
|
974
|
-
break;
|
|
839
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
975
840
|
case "InternalServerErrorException":
|
|
976
841
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
977
|
-
|
|
978
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
979
|
-
name: errorCode,
|
|
980
|
-
$metadata: deserializeMetadata(output),
|
|
981
|
-
};
|
|
982
|
-
break;
|
|
842
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
983
843
|
case "NotFoundException":
|
|
984
844
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
985
|
-
|
|
986
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
987
|
-
name: errorCode,
|
|
988
|
-
$metadata: deserializeMetadata(output),
|
|
989
|
-
};
|
|
990
|
-
break;
|
|
845
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
991
846
|
case "ServiceUnavailableException":
|
|
992
847
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
993
|
-
|
|
994
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
995
|
-
name: errorCode,
|
|
996
|
-
$metadata: deserializeMetadata(output),
|
|
997
|
-
};
|
|
998
|
-
break;
|
|
848
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
999
849
|
case "TooManyRequestsException":
|
|
1000
850
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1001
|
-
|
|
1002
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1003
|
-
name: errorCode,
|
|
1004
|
-
$metadata: deserializeMetadata(output),
|
|
1005
|
-
};
|
|
1006
|
-
break;
|
|
851
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1007
852
|
case "UnauthorizedException":
|
|
1008
853
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1009
|
-
|
|
1010
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1011
|
-
name: errorCode,
|
|
1012
|
-
$metadata: deserializeMetadata(output),
|
|
1013
|
-
};
|
|
1014
|
-
break;
|
|
854
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1015
855
|
default:
|
|
1016
856
|
const parsedBody = parsedOutput.body;
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
...parsedBody,
|
|
1020
|
-
name: `${errorCode}`,
|
|
1021
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
857
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
858
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1022
859
|
$fault: "client",
|
|
1023
860
|
$metadata: deserializeMetadata(output),
|
|
1024
|
-
};
|
|
861
|
+
});
|
|
862
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1025
863
|
}
|
|
1026
|
-
const message = response.message || response.Message || errorCode;
|
|
1027
|
-
response.message = message;
|
|
1028
|
-
delete response.Message;
|
|
1029
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1030
864
|
};
|
|
1031
865
|
const deserializeAws_restJson1DescribeWorkerConfigurationCommand = async (output, context) => {
|
|
1032
866
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1070,75 +904,34 @@ const deserializeAws_restJson1DescribeWorkerConfigurationCommandError = async (o
|
|
|
1070
904
|
switch (errorCode) {
|
|
1071
905
|
case "BadRequestException":
|
|
1072
906
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1073
|
-
|
|
1074
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1075
|
-
name: errorCode,
|
|
1076
|
-
$metadata: deserializeMetadata(output),
|
|
1077
|
-
};
|
|
1078
|
-
break;
|
|
907
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1079
908
|
case "ForbiddenException":
|
|
1080
909
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1081
|
-
|
|
1082
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1083
|
-
name: errorCode,
|
|
1084
|
-
$metadata: deserializeMetadata(output),
|
|
1085
|
-
};
|
|
1086
|
-
break;
|
|
910
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1087
911
|
case "InternalServerErrorException":
|
|
1088
912
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1089
|
-
|
|
1090
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1091
|
-
name: errorCode,
|
|
1092
|
-
$metadata: deserializeMetadata(output),
|
|
1093
|
-
};
|
|
1094
|
-
break;
|
|
913
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1095
914
|
case "NotFoundException":
|
|
1096
915
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1097
|
-
|
|
1098
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1099
|
-
name: errorCode,
|
|
1100
|
-
$metadata: deserializeMetadata(output),
|
|
1101
|
-
};
|
|
1102
|
-
break;
|
|
916
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1103
917
|
case "ServiceUnavailableException":
|
|
1104
918
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1105
|
-
|
|
1106
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1107
|
-
name: errorCode,
|
|
1108
|
-
$metadata: deserializeMetadata(output),
|
|
1109
|
-
};
|
|
1110
|
-
break;
|
|
919
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1111
920
|
case "TooManyRequestsException":
|
|
1112
921
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1113
|
-
|
|
1114
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1115
|
-
name: errorCode,
|
|
1116
|
-
$metadata: deserializeMetadata(output),
|
|
1117
|
-
};
|
|
1118
|
-
break;
|
|
922
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1119
923
|
case "UnauthorizedException":
|
|
1120
924
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1121
|
-
|
|
1122
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1123
|
-
name: errorCode,
|
|
1124
|
-
$metadata: deserializeMetadata(output),
|
|
1125
|
-
};
|
|
1126
|
-
break;
|
|
925
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1127
926
|
default:
|
|
1128
927
|
const parsedBody = parsedOutput.body;
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
...parsedBody,
|
|
1132
|
-
name: `${errorCode}`,
|
|
1133
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
928
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
929
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1134
930
|
$fault: "client",
|
|
1135
931
|
$metadata: deserializeMetadata(output),
|
|
1136
|
-
};
|
|
932
|
+
});
|
|
933
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1137
934
|
}
|
|
1138
|
-
const message = response.message || response.Message || errorCode;
|
|
1139
|
-
response.message = message;
|
|
1140
|
-
delete response.Message;
|
|
1141
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1142
935
|
};
|
|
1143
936
|
const deserializeAws_restJson1ListConnectorsCommand = async (output, context) => {
|
|
1144
937
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1170,75 +963,34 @@ const deserializeAws_restJson1ListConnectorsCommandError = async (output, contex
|
|
|
1170
963
|
switch (errorCode) {
|
|
1171
964
|
case "BadRequestException":
|
|
1172
965
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1173
|
-
|
|
1174
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1175
|
-
name: errorCode,
|
|
1176
|
-
$metadata: deserializeMetadata(output),
|
|
1177
|
-
};
|
|
1178
|
-
break;
|
|
966
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1179
967
|
case "ForbiddenException":
|
|
1180
968
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1181
|
-
|
|
1182
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1183
|
-
name: errorCode,
|
|
1184
|
-
$metadata: deserializeMetadata(output),
|
|
1185
|
-
};
|
|
1186
|
-
break;
|
|
969
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1187
970
|
case "InternalServerErrorException":
|
|
1188
971
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1189
|
-
|
|
1190
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1191
|
-
name: errorCode,
|
|
1192
|
-
$metadata: deserializeMetadata(output),
|
|
1193
|
-
};
|
|
1194
|
-
break;
|
|
972
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1195
973
|
case "NotFoundException":
|
|
1196
974
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1197
|
-
|
|
1198
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1199
|
-
name: errorCode,
|
|
1200
|
-
$metadata: deserializeMetadata(output),
|
|
1201
|
-
};
|
|
1202
|
-
break;
|
|
975
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1203
976
|
case "ServiceUnavailableException":
|
|
1204
977
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1205
|
-
|
|
1206
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1207
|
-
name: errorCode,
|
|
1208
|
-
$metadata: deserializeMetadata(output),
|
|
1209
|
-
};
|
|
1210
|
-
break;
|
|
978
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1211
979
|
case "TooManyRequestsException":
|
|
1212
980
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1213
|
-
|
|
1214
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1215
|
-
name: errorCode,
|
|
1216
|
-
$metadata: deserializeMetadata(output),
|
|
1217
|
-
};
|
|
1218
|
-
break;
|
|
981
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1219
982
|
case "UnauthorizedException":
|
|
1220
983
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1221
|
-
|
|
1222
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1223
|
-
name: errorCode,
|
|
1224
|
-
$metadata: deserializeMetadata(output),
|
|
1225
|
-
};
|
|
1226
|
-
break;
|
|
984
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1227
985
|
default:
|
|
1228
986
|
const parsedBody = parsedOutput.body;
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
...parsedBody,
|
|
1232
|
-
name: `${errorCode}`,
|
|
1233
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
987
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
988
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1234
989
|
$fault: "client",
|
|
1235
990
|
$metadata: deserializeMetadata(output),
|
|
1236
|
-
};
|
|
991
|
+
});
|
|
992
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1237
993
|
}
|
|
1238
|
-
const message = response.message || response.Message || errorCode;
|
|
1239
|
-
response.message = message;
|
|
1240
|
-
delete response.Message;
|
|
1241
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1242
994
|
};
|
|
1243
995
|
const deserializeAws_restJson1ListCustomPluginsCommand = async (output, context) => {
|
|
1244
996
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1270,75 +1022,34 @@ const deserializeAws_restJson1ListCustomPluginsCommandError = async (output, con
|
|
|
1270
1022
|
switch (errorCode) {
|
|
1271
1023
|
case "BadRequestException":
|
|
1272
1024
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1273
|
-
|
|
1274
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1275
|
-
name: errorCode,
|
|
1276
|
-
$metadata: deserializeMetadata(output),
|
|
1277
|
-
};
|
|
1278
|
-
break;
|
|
1025
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1279
1026
|
case "ForbiddenException":
|
|
1280
1027
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1281
|
-
|
|
1282
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1283
|
-
name: errorCode,
|
|
1284
|
-
$metadata: deserializeMetadata(output),
|
|
1285
|
-
};
|
|
1286
|
-
break;
|
|
1028
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1287
1029
|
case "InternalServerErrorException":
|
|
1288
1030
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1289
|
-
|
|
1290
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1291
|
-
name: errorCode,
|
|
1292
|
-
$metadata: deserializeMetadata(output),
|
|
1293
|
-
};
|
|
1294
|
-
break;
|
|
1031
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1295
1032
|
case "NotFoundException":
|
|
1296
1033
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1297
|
-
|
|
1298
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1299
|
-
name: errorCode,
|
|
1300
|
-
$metadata: deserializeMetadata(output),
|
|
1301
|
-
};
|
|
1302
|
-
break;
|
|
1034
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1303
1035
|
case "ServiceUnavailableException":
|
|
1304
1036
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1305
|
-
|
|
1306
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1307
|
-
name: errorCode,
|
|
1308
|
-
$metadata: deserializeMetadata(output),
|
|
1309
|
-
};
|
|
1310
|
-
break;
|
|
1037
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1311
1038
|
case "TooManyRequestsException":
|
|
1312
1039
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1313
|
-
|
|
1314
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1315
|
-
name: errorCode,
|
|
1316
|
-
$metadata: deserializeMetadata(output),
|
|
1317
|
-
};
|
|
1318
|
-
break;
|
|
1040
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1319
1041
|
case "UnauthorizedException":
|
|
1320
1042
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1321
|
-
|
|
1322
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1323
|
-
name: errorCode,
|
|
1324
|
-
$metadata: deserializeMetadata(output),
|
|
1325
|
-
};
|
|
1326
|
-
break;
|
|
1043
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1327
1044
|
default:
|
|
1328
1045
|
const parsedBody = parsedOutput.body;
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
...parsedBody,
|
|
1332
|
-
name: `${errorCode}`,
|
|
1333
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1046
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
1047
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1334
1048
|
$fault: "client",
|
|
1335
1049
|
$metadata: deserializeMetadata(output),
|
|
1336
|
-
};
|
|
1050
|
+
});
|
|
1051
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1337
1052
|
}
|
|
1338
|
-
const message = response.message || response.Message || errorCode;
|
|
1339
|
-
response.message = message;
|
|
1340
|
-
delete response.Message;
|
|
1341
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1342
1053
|
};
|
|
1343
1054
|
const deserializeAws_restJson1ListWorkerConfigurationsCommand = async (output, context) => {
|
|
1344
1055
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1370,75 +1081,34 @@ const deserializeAws_restJson1ListWorkerConfigurationsCommandError = async (outp
|
|
|
1370
1081
|
switch (errorCode) {
|
|
1371
1082
|
case "BadRequestException":
|
|
1372
1083
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1373
|
-
|
|
1374
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1375
|
-
name: errorCode,
|
|
1376
|
-
$metadata: deserializeMetadata(output),
|
|
1377
|
-
};
|
|
1378
|
-
break;
|
|
1084
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1379
1085
|
case "ForbiddenException":
|
|
1380
1086
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1381
|
-
|
|
1382
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1383
|
-
name: errorCode,
|
|
1384
|
-
$metadata: deserializeMetadata(output),
|
|
1385
|
-
};
|
|
1386
|
-
break;
|
|
1087
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1387
1088
|
case "InternalServerErrorException":
|
|
1388
1089
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1389
|
-
|
|
1390
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1391
|
-
name: errorCode,
|
|
1392
|
-
$metadata: deserializeMetadata(output),
|
|
1393
|
-
};
|
|
1394
|
-
break;
|
|
1090
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1395
1091
|
case "NotFoundException":
|
|
1396
1092
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1397
|
-
|
|
1398
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1399
|
-
name: errorCode,
|
|
1400
|
-
$metadata: deserializeMetadata(output),
|
|
1401
|
-
};
|
|
1402
|
-
break;
|
|
1093
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1403
1094
|
case "ServiceUnavailableException":
|
|
1404
1095
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1405
|
-
|
|
1406
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1407
|
-
name: errorCode,
|
|
1408
|
-
$metadata: deserializeMetadata(output),
|
|
1409
|
-
};
|
|
1410
|
-
break;
|
|
1096
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1411
1097
|
case "TooManyRequestsException":
|
|
1412
1098
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1413
|
-
|
|
1414
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1415
|
-
name: errorCode,
|
|
1416
|
-
$metadata: deserializeMetadata(output),
|
|
1417
|
-
};
|
|
1418
|
-
break;
|
|
1099
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1419
1100
|
case "UnauthorizedException":
|
|
1420
1101
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1421
|
-
|
|
1422
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1423
|
-
name: errorCode,
|
|
1424
|
-
$metadata: deserializeMetadata(output),
|
|
1425
|
-
};
|
|
1426
|
-
break;
|
|
1102
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1427
1103
|
default:
|
|
1428
1104
|
const parsedBody = parsedOutput.body;
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
...parsedBody,
|
|
1432
|
-
name: `${errorCode}`,
|
|
1433
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1105
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
1106
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1434
1107
|
$fault: "client",
|
|
1435
1108
|
$metadata: deserializeMetadata(output),
|
|
1436
|
-
};
|
|
1109
|
+
});
|
|
1110
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1437
1111
|
}
|
|
1438
|
-
const message = response.message || response.Message || errorCode;
|
|
1439
|
-
response.message = message;
|
|
1440
|
-
delete response.Message;
|
|
1441
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1442
1112
|
};
|
|
1443
1113
|
const deserializeAws_restJson1UpdateConnectorCommand = async (output, context) => {
|
|
1444
1114
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1470,179 +1140,130 @@ const deserializeAws_restJson1UpdateConnectorCommandError = async (output, conte
|
|
|
1470
1140
|
switch (errorCode) {
|
|
1471
1141
|
case "BadRequestException":
|
|
1472
1142
|
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1473
|
-
|
|
1474
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1475
|
-
name: errorCode,
|
|
1476
|
-
$metadata: deserializeMetadata(output),
|
|
1477
|
-
};
|
|
1478
|
-
break;
|
|
1143
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1479
1144
|
case "ForbiddenException":
|
|
1480
1145
|
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1481
|
-
|
|
1482
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1483
|
-
name: errorCode,
|
|
1484
|
-
$metadata: deserializeMetadata(output),
|
|
1485
|
-
};
|
|
1486
|
-
break;
|
|
1146
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1487
1147
|
case "InternalServerErrorException":
|
|
1488
1148
|
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1489
|
-
|
|
1490
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1491
|
-
name: errorCode,
|
|
1492
|
-
$metadata: deserializeMetadata(output),
|
|
1493
|
-
};
|
|
1494
|
-
break;
|
|
1149
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1495
1150
|
case "NotFoundException":
|
|
1496
1151
|
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1497
|
-
|
|
1498
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1499
|
-
name: errorCode,
|
|
1500
|
-
$metadata: deserializeMetadata(output),
|
|
1501
|
-
};
|
|
1502
|
-
break;
|
|
1152
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1503
1153
|
case "ServiceUnavailableException":
|
|
1504
1154
|
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1505
|
-
|
|
1506
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1507
|
-
name: errorCode,
|
|
1508
|
-
$metadata: deserializeMetadata(output),
|
|
1509
|
-
};
|
|
1510
|
-
break;
|
|
1155
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1511
1156
|
case "TooManyRequestsException":
|
|
1512
1157
|
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1513
|
-
|
|
1514
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1515
|
-
name: errorCode,
|
|
1516
|
-
$metadata: deserializeMetadata(output),
|
|
1517
|
-
};
|
|
1518
|
-
break;
|
|
1158
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1519
1159
|
case "UnauthorizedException":
|
|
1520
1160
|
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1521
|
-
|
|
1522
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1523
|
-
name: errorCode,
|
|
1524
|
-
$metadata: deserializeMetadata(output),
|
|
1525
|
-
};
|
|
1526
|
-
break;
|
|
1161
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1527
1162
|
default:
|
|
1528
1163
|
const parsedBody = parsedOutput.body;
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
...parsedBody,
|
|
1532
|
-
name: `${errorCode}`,
|
|
1533
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1164
|
+
response = new KafkaConnectServiceException_1.KafkaConnectServiceException({
|
|
1165
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1534
1166
|
$fault: "client",
|
|
1535
1167
|
$metadata: deserializeMetadata(output),
|
|
1536
|
-
};
|
|
1168
|
+
});
|
|
1169
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1537
1170
|
}
|
|
1538
|
-
const message = response.message || response.Message || errorCode;
|
|
1539
|
-
response.message = message;
|
|
1540
|
-
delete response.Message;
|
|
1541
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1542
1171
|
};
|
|
1543
1172
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1544
|
-
const contents = {
|
|
1545
|
-
name: "BadRequestException",
|
|
1546
|
-
$fault: "client",
|
|
1547
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1548
|
-
message: undefined,
|
|
1549
|
-
};
|
|
1173
|
+
const contents = {};
|
|
1550
1174
|
const data = parsedOutput.body;
|
|
1551
1175
|
if (data.message !== undefined && data.message !== null) {
|
|
1552
1176
|
contents.message = smithy_client_1.expectString(data.message);
|
|
1553
1177
|
}
|
|
1554
|
-
|
|
1178
|
+
const exception = new models_0_1.BadRequestException({
|
|
1179
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1180
|
+
...contents,
|
|
1181
|
+
});
|
|
1182
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1555
1183
|
};
|
|
1556
1184
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1557
|
-
const contents = {
|
|
1558
|
-
name: "ConflictException",
|
|
1559
|
-
$fault: "client",
|
|
1560
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1561
|
-
message: undefined,
|
|
1562
|
-
};
|
|
1185
|
+
const contents = {};
|
|
1563
1186
|
const data = parsedOutput.body;
|
|
1564
1187
|
if (data.message !== undefined && data.message !== null) {
|
|
1565
1188
|
contents.message = smithy_client_1.expectString(data.message);
|
|
1566
1189
|
}
|
|
1567
|
-
|
|
1190
|
+
const exception = new models_0_1.ConflictException({
|
|
1191
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1192
|
+
...contents,
|
|
1193
|
+
});
|
|
1194
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1568
1195
|
};
|
|
1569
1196
|
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
1570
|
-
const contents = {
|
|
1571
|
-
name: "ForbiddenException",
|
|
1572
|
-
$fault: "client",
|
|
1573
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1574
|
-
message: undefined,
|
|
1575
|
-
};
|
|
1197
|
+
const contents = {};
|
|
1576
1198
|
const data = parsedOutput.body;
|
|
1577
1199
|
if (data.message !== undefined && data.message !== null) {
|
|
1578
1200
|
contents.message = smithy_client_1.expectString(data.message);
|
|
1579
1201
|
}
|
|
1580
|
-
|
|
1202
|
+
const exception = new models_0_1.ForbiddenException({
|
|
1203
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1204
|
+
...contents,
|
|
1205
|
+
});
|
|
1206
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1581
1207
|
};
|
|
1582
1208
|
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
|
|
1583
|
-
const contents = {
|
|
1584
|
-
name: "InternalServerErrorException",
|
|
1585
|
-
$fault: "server",
|
|
1586
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1587
|
-
message: undefined,
|
|
1588
|
-
};
|
|
1209
|
+
const contents = {};
|
|
1589
1210
|
const data = parsedOutput.body;
|
|
1590
1211
|
if (data.message !== undefined && data.message !== null) {
|
|
1591
1212
|
contents.message = smithy_client_1.expectString(data.message);
|
|
1592
1213
|
}
|
|
1593
|
-
|
|
1214
|
+
const exception = new models_0_1.InternalServerErrorException({
|
|
1215
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1216
|
+
...contents,
|
|
1217
|
+
});
|
|
1218
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1594
1219
|
};
|
|
1595
1220
|
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1596
|
-
const contents = {
|
|
1597
|
-
name: "NotFoundException",
|
|
1598
|
-
$fault: "client",
|
|
1599
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1600
|
-
message: undefined,
|
|
1601
|
-
};
|
|
1221
|
+
const contents = {};
|
|
1602
1222
|
const data = parsedOutput.body;
|
|
1603
1223
|
if (data.message !== undefined && data.message !== null) {
|
|
1604
1224
|
contents.message = smithy_client_1.expectString(data.message);
|
|
1605
1225
|
}
|
|
1606
|
-
|
|
1226
|
+
const exception = new models_0_1.NotFoundException({
|
|
1227
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1228
|
+
...contents,
|
|
1229
|
+
});
|
|
1230
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1607
1231
|
};
|
|
1608
1232
|
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
1609
|
-
const contents = {
|
|
1610
|
-
name: "ServiceUnavailableException",
|
|
1611
|
-
$fault: "server",
|
|
1612
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1613
|
-
message: undefined,
|
|
1614
|
-
};
|
|
1233
|
+
const contents = {};
|
|
1615
1234
|
const data = parsedOutput.body;
|
|
1616
1235
|
if (data.message !== undefined && data.message !== null) {
|
|
1617
1236
|
contents.message = smithy_client_1.expectString(data.message);
|
|
1618
1237
|
}
|
|
1619
|
-
|
|
1238
|
+
const exception = new models_0_1.ServiceUnavailableException({
|
|
1239
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1240
|
+
...contents,
|
|
1241
|
+
});
|
|
1242
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1620
1243
|
};
|
|
1621
1244
|
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
1622
|
-
const contents = {
|
|
1623
|
-
name: "TooManyRequestsException",
|
|
1624
|
-
$fault: "client",
|
|
1625
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1626
|
-
message: undefined,
|
|
1627
|
-
};
|
|
1245
|
+
const contents = {};
|
|
1628
1246
|
const data = parsedOutput.body;
|
|
1629
1247
|
if (data.message !== undefined && data.message !== null) {
|
|
1630
1248
|
contents.message = smithy_client_1.expectString(data.message);
|
|
1631
1249
|
}
|
|
1632
|
-
|
|
1250
|
+
const exception = new models_0_1.TooManyRequestsException({
|
|
1251
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1252
|
+
...contents,
|
|
1253
|
+
});
|
|
1254
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1633
1255
|
};
|
|
1634
1256
|
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
1635
|
-
const contents = {
|
|
1636
|
-
name: "UnauthorizedException",
|
|
1637
|
-
$fault: "client",
|
|
1638
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1639
|
-
message: undefined,
|
|
1640
|
-
};
|
|
1257
|
+
const contents = {};
|
|
1641
1258
|
const data = parsedOutput.body;
|
|
1642
1259
|
if (data.message !== undefined && data.message !== null) {
|
|
1643
1260
|
contents.message = smithy_client_1.expectString(data.message);
|
|
1644
1261
|
}
|
|
1645
|
-
|
|
1262
|
+
const exception = new models_0_1.UnauthorizedException({
|
|
1263
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1264
|
+
...contents,
|
|
1265
|
+
});
|
|
1266
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1646
1267
|
};
|
|
1647
1268
|
const serializeAws_restJson1__listOf__string = (input, context) => {
|
|
1648
1269
|
return input
|
|
@@ -1877,7 +1498,7 @@ const serializeAws_restJson1WorkerLogDelivery = (input, context) => {
|
|
|
1877
1498
|
};
|
|
1878
1499
|
};
|
|
1879
1500
|
const deserializeAws_restJson1__listOf__string = (output, context) => {
|
|
1880
|
-
|
|
1501
|
+
const retVal = (output || [])
|
|
1881
1502
|
.filter((e) => e != null)
|
|
1882
1503
|
.map((entry) => {
|
|
1883
1504
|
if (entry === null) {
|
|
@@ -1885,9 +1506,10 @@ const deserializeAws_restJson1__listOf__string = (output, context) => {
|
|
|
1885
1506
|
}
|
|
1886
1507
|
return smithy_client_1.expectString(entry);
|
|
1887
1508
|
});
|
|
1509
|
+
return retVal;
|
|
1888
1510
|
};
|
|
1889
1511
|
const deserializeAws_restJson1__listOfConnectorSummary = (output, context) => {
|
|
1890
|
-
|
|
1512
|
+
const retVal = (output || [])
|
|
1891
1513
|
.filter((e) => e != null)
|
|
1892
1514
|
.map((entry) => {
|
|
1893
1515
|
if (entry === null) {
|
|
@@ -1895,9 +1517,10 @@ const deserializeAws_restJson1__listOfConnectorSummary = (output, context) => {
|
|
|
1895
1517
|
}
|
|
1896
1518
|
return deserializeAws_restJson1ConnectorSummary(entry, context);
|
|
1897
1519
|
});
|
|
1520
|
+
return retVal;
|
|
1898
1521
|
};
|
|
1899
1522
|
const deserializeAws_restJson1__listOfCustomPluginSummary = (output, context) => {
|
|
1900
|
-
|
|
1523
|
+
const retVal = (output || [])
|
|
1901
1524
|
.filter((e) => e != null)
|
|
1902
1525
|
.map((entry) => {
|
|
1903
1526
|
if (entry === null) {
|
|
@@ -1905,9 +1528,10 @@ const deserializeAws_restJson1__listOfCustomPluginSummary = (output, context) =>
|
|
|
1905
1528
|
}
|
|
1906
1529
|
return deserializeAws_restJson1CustomPluginSummary(entry, context);
|
|
1907
1530
|
});
|
|
1531
|
+
return retVal;
|
|
1908
1532
|
};
|
|
1909
1533
|
const deserializeAws_restJson1__listOfPluginDescription = (output, context) => {
|
|
1910
|
-
|
|
1534
|
+
const retVal = (output || [])
|
|
1911
1535
|
.filter((e) => e != null)
|
|
1912
1536
|
.map((entry) => {
|
|
1913
1537
|
if (entry === null) {
|
|
@@ -1915,9 +1539,10 @@ const deserializeAws_restJson1__listOfPluginDescription = (output, context) => {
|
|
|
1915
1539
|
}
|
|
1916
1540
|
return deserializeAws_restJson1PluginDescription(entry, context);
|
|
1917
1541
|
});
|
|
1542
|
+
return retVal;
|
|
1918
1543
|
};
|
|
1919
1544
|
const deserializeAws_restJson1__listOfWorkerConfigurationSummary = (output, context) => {
|
|
1920
|
-
|
|
1545
|
+
const retVal = (output || [])
|
|
1921
1546
|
.filter((e) => e != null)
|
|
1922
1547
|
.map((entry) => {
|
|
1923
1548
|
if (entry === null) {
|
|
@@ -1925,6 +1550,7 @@ const deserializeAws_restJson1__listOfWorkerConfigurationSummary = (output, cont
|
|
|
1925
1550
|
}
|
|
1926
1551
|
return deserializeAws_restJson1WorkerConfigurationSummary(entry, context);
|
|
1927
1552
|
});
|
|
1553
|
+
return retVal;
|
|
1928
1554
|
};
|
|
1929
1555
|
const deserializeAws_restJson1__mapOf__string = (output, context) => {
|
|
1930
1556
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
@@ -2125,6 +1751,12 @@ const deserializeAws_restJson1ScaleOutPolicyDescription = (output, context) => {
|
|
|
2125
1751
|
cpuUtilizationPercentage: smithy_client_1.expectInt32(output.cpuUtilizationPercentage),
|
|
2126
1752
|
};
|
|
2127
1753
|
};
|
|
1754
|
+
const deserializeAws_restJson1StateDescription = (output, context) => {
|
|
1755
|
+
return {
|
|
1756
|
+
code: smithy_client_1.expectString(output.code),
|
|
1757
|
+
message: smithy_client_1.expectString(output.message),
|
|
1758
|
+
};
|
|
1759
|
+
};
|
|
2128
1760
|
const deserializeAws_restJson1VpcDescription = (output, context) => {
|
|
2129
1761
|
return {
|
|
2130
1762
|
securityGroups: output.securityGroups !== undefined && output.securityGroups !== null
|