@aws-sdk/client-kafkaconnect 3.928.0 → 3.929.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.
Files changed (42) hide show
  1. package/dist-cjs/index.js +1071 -978
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/KafkaConnectClient.js +2 -0
  4. package/dist-es/commands/CreateConnectorCommand.js +3 -10
  5. package/dist-es/commands/CreateCustomPluginCommand.js +3 -9
  6. package/dist-es/commands/CreateWorkerConfigurationCommand.js +3 -10
  7. package/dist-es/commands/DeleteConnectorCommand.js +3 -9
  8. package/dist-es/commands/DeleteCustomPluginCommand.js +3 -9
  9. package/dist-es/commands/DeleteWorkerConfigurationCommand.js +3 -9
  10. package/dist-es/commands/DescribeConnectorCommand.js +3 -10
  11. package/dist-es/commands/DescribeConnectorOperationCommand.js +3 -10
  12. package/dist-es/commands/DescribeCustomPluginCommand.js +3 -9
  13. package/dist-es/commands/DescribeWorkerConfigurationCommand.js +3 -10
  14. package/dist-es/commands/ListConnectorOperationsCommand.js +3 -9
  15. package/dist-es/commands/ListConnectorsCommand.js +3 -9
  16. package/dist-es/commands/ListCustomPluginsCommand.js +3 -9
  17. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  18. package/dist-es/commands/ListWorkerConfigurationsCommand.js +3 -9
  19. package/dist-es/commands/TagResourceCommand.js +3 -9
  20. package/dist-es/commands/UntagResourceCommand.js +3 -9
  21. package/dist-es/commands/UpdateConnectorCommand.js +3 -10
  22. package/dist-es/models/models_0.js +0 -32
  23. package/dist-es/runtimeConfig.shared.js +2 -0
  24. package/dist-es/schemas/schemas_0.js +1018 -0
  25. package/dist-types/KafkaConnectClient.d.ts +10 -1
  26. package/dist-types/models/models_0.d.ts +0 -28
  27. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  28. package/dist-types/runtimeConfig.d.ts +1 -0
  29. package/dist-types/runtimeConfig.native.d.ts +1 -0
  30. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  31. package/dist-types/schemas/schemas_0.d.ts +133 -0
  32. package/dist-types/ts3.4/KafkaConnectClient.d.ts +4 -0
  33. package/dist-types/ts3.4/models/models_0.d.ts +0 -21
  34. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  35. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  36. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  37. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  38. package/dist-types/ts3.4/schemas/schemas_0.d.ts +140 -0
  39. package/package.json +2 -2
  40. package/dist-es/protocols/Aws_restJson1.js +0 -797
  41. package/dist-types/protocols/Aws_restJson1.d.ts +0 -164
  42. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -221
@@ -1,797 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
4
- import { KafkaConnectServiceException as __BaseException } from "../models/KafkaConnectServiceException";
5
- import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
6
- export const se_CreateConnectorCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/v1/connectors");
12
- let body;
13
- body = JSON.stringify(take(input, {
14
- capacity: (_) => _json(_),
15
- connectorConfiguration: (_) => _json(_),
16
- connectorDescription: [],
17
- connectorName: [],
18
- kafkaCluster: (_) => _json(_),
19
- kafkaClusterClientAuthentication: (_) => _json(_),
20
- kafkaClusterEncryptionInTransit: (_) => _json(_),
21
- kafkaConnectVersion: [],
22
- logDelivery: (_) => _json(_),
23
- plugins: (_) => _json(_),
24
- serviceExecutionRoleArn: [],
25
- tags: (_) => _json(_),
26
- workerConfiguration: (_) => _json(_),
27
- }));
28
- b.m("POST").h(headers).b(body);
29
- return b.build();
30
- };
31
- export const se_CreateCustomPluginCommand = async (input, context) => {
32
- const b = rb(input, context);
33
- const headers = {
34
- "content-type": "application/json",
35
- };
36
- b.bp("/v1/custom-plugins");
37
- let body;
38
- body = JSON.stringify(take(input, {
39
- contentType: [],
40
- description: [],
41
- location: (_) => _json(_),
42
- name: [],
43
- tags: (_) => _json(_),
44
- }));
45
- b.m("POST").h(headers).b(body);
46
- return b.build();
47
- };
48
- export const se_CreateWorkerConfigurationCommand = async (input, context) => {
49
- const b = rb(input, context);
50
- const headers = {
51
- "content-type": "application/json",
52
- };
53
- b.bp("/v1/worker-configurations");
54
- let body;
55
- body = JSON.stringify(take(input, {
56
- description: [],
57
- name: [],
58
- propertiesFileContent: [],
59
- tags: (_) => _json(_),
60
- }));
61
- b.m("POST").h(headers).b(body);
62
- return b.build();
63
- };
64
- export const se_DeleteConnectorCommand = async (input, context) => {
65
- const b = rb(input, context);
66
- const headers = {};
67
- b.bp("/v1/connectors/{connectorArn}");
68
- b.p("connectorArn", () => input.connectorArn, "{connectorArn}", false);
69
- const query = map({
70
- [_cV]: [, input[_cV]],
71
- });
72
- let body;
73
- b.m("DELETE").h(headers).q(query).b(body);
74
- return b.build();
75
- };
76
- export const se_DeleteCustomPluginCommand = async (input, context) => {
77
- const b = rb(input, context);
78
- const headers = {};
79
- b.bp("/v1/custom-plugins/{customPluginArn}");
80
- b.p("customPluginArn", () => input.customPluginArn, "{customPluginArn}", false);
81
- let body;
82
- b.m("DELETE").h(headers).b(body);
83
- return b.build();
84
- };
85
- export const se_DeleteWorkerConfigurationCommand = async (input, context) => {
86
- const b = rb(input, context);
87
- const headers = {};
88
- b.bp("/v1/worker-configurations/{workerConfigurationArn}");
89
- b.p("workerConfigurationArn", () => input.workerConfigurationArn, "{workerConfigurationArn}", false);
90
- let body;
91
- b.m("DELETE").h(headers).b(body);
92
- return b.build();
93
- };
94
- export const se_DescribeConnectorCommand = async (input, context) => {
95
- const b = rb(input, context);
96
- const headers = {};
97
- b.bp("/v1/connectors/{connectorArn}");
98
- b.p("connectorArn", () => input.connectorArn, "{connectorArn}", false);
99
- let body;
100
- b.m("GET").h(headers).b(body);
101
- return b.build();
102
- };
103
- export const se_DescribeConnectorOperationCommand = async (input, context) => {
104
- const b = rb(input, context);
105
- const headers = {};
106
- b.bp("/v1/connectorOperations/{connectorOperationArn}");
107
- b.p("connectorOperationArn", () => input.connectorOperationArn, "{connectorOperationArn}", false);
108
- let body;
109
- b.m("GET").h(headers).b(body);
110
- return b.build();
111
- };
112
- export const se_DescribeCustomPluginCommand = async (input, context) => {
113
- const b = rb(input, context);
114
- const headers = {};
115
- b.bp("/v1/custom-plugins/{customPluginArn}");
116
- b.p("customPluginArn", () => input.customPluginArn, "{customPluginArn}", false);
117
- let body;
118
- b.m("GET").h(headers).b(body);
119
- return b.build();
120
- };
121
- export const se_DescribeWorkerConfigurationCommand = async (input, context) => {
122
- const b = rb(input, context);
123
- const headers = {};
124
- b.bp("/v1/worker-configurations/{workerConfigurationArn}");
125
- b.p("workerConfigurationArn", () => input.workerConfigurationArn, "{workerConfigurationArn}", false);
126
- let body;
127
- b.m("GET").h(headers).b(body);
128
- return b.build();
129
- };
130
- export const se_ListConnectorOperationsCommand = async (input, context) => {
131
- const b = rb(input, context);
132
- const headers = {};
133
- b.bp("/v1/connectors/{connectorArn}/operations");
134
- b.p("connectorArn", () => input.connectorArn, "{connectorArn}", false);
135
- const query = map({
136
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
137
- [_nT]: [, input[_nT]],
138
- });
139
- let body;
140
- b.m("GET").h(headers).q(query).b(body);
141
- return b.build();
142
- };
143
- export const se_ListConnectorsCommand = async (input, context) => {
144
- const b = rb(input, context);
145
- const headers = {};
146
- b.bp("/v1/connectors");
147
- const query = map({
148
- [_cNP]: [, input[_cNP]],
149
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
150
- [_nT]: [, input[_nT]],
151
- });
152
- let body;
153
- b.m("GET").h(headers).q(query).b(body);
154
- return b.build();
155
- };
156
- export const se_ListCustomPluginsCommand = async (input, context) => {
157
- const b = rb(input, context);
158
- const headers = {};
159
- b.bp("/v1/custom-plugins");
160
- const query = map({
161
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
162
- [_nT]: [, input[_nT]],
163
- [_nP]: [, input[_nP]],
164
- });
165
- let body;
166
- b.m("GET").h(headers).q(query).b(body);
167
- return b.build();
168
- };
169
- export const se_ListTagsForResourceCommand = async (input, context) => {
170
- const b = rb(input, context);
171
- const headers = {};
172
- b.bp("/v1/tags/{resourceArn}");
173
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
174
- let body;
175
- b.m("GET").h(headers).b(body);
176
- return b.build();
177
- };
178
- export const se_ListWorkerConfigurationsCommand = async (input, context) => {
179
- const b = rb(input, context);
180
- const headers = {};
181
- b.bp("/v1/worker-configurations");
182
- const query = map({
183
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
184
- [_nT]: [, input[_nT]],
185
- [_nP]: [, input[_nP]],
186
- });
187
- let body;
188
- b.m("GET").h(headers).q(query).b(body);
189
- return b.build();
190
- };
191
- export const se_TagResourceCommand = async (input, context) => {
192
- const b = rb(input, context);
193
- const headers = {
194
- "content-type": "application/json",
195
- };
196
- b.bp("/v1/tags/{resourceArn}");
197
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
198
- let body;
199
- body = JSON.stringify(take(input, {
200
- tags: (_) => _json(_),
201
- }));
202
- b.m("POST").h(headers).b(body);
203
- return b.build();
204
- };
205
- export const se_UntagResourceCommand = async (input, context) => {
206
- const b = rb(input, context);
207
- const headers = {};
208
- b.bp("/v1/tags/{resourceArn}");
209
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
210
- const query = map({
211
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
212
- });
213
- let body;
214
- b.m("DELETE").h(headers).q(query).b(body);
215
- return b.build();
216
- };
217
- export const se_UpdateConnectorCommand = async (input, context) => {
218
- const b = rb(input, context);
219
- const headers = {
220
- "content-type": "application/json",
221
- };
222
- b.bp("/v1/connectors/{connectorArn}");
223
- b.p("connectorArn", () => input.connectorArn, "{connectorArn}", false);
224
- const query = map({
225
- [_cV]: [, __expectNonNull(input[_cV], `currentVersion`)],
226
- });
227
- let body;
228
- body = JSON.stringify(take(input, {
229
- capacity: (_) => _json(_),
230
- connectorConfiguration: (_) => _json(_),
231
- }));
232
- b.m("PUT").h(headers).q(query).b(body);
233
- return b.build();
234
- };
235
- export const de_CreateConnectorCommand = async (output, context) => {
236
- if (output.statusCode !== 200 && output.statusCode >= 300) {
237
- return de_CommandError(output, context);
238
- }
239
- const contents = map({
240
- $metadata: deserializeMetadata(output),
241
- });
242
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
243
- const doc = take(data, {
244
- connectorArn: __expectString,
245
- connectorName: __expectString,
246
- connectorState: __expectString,
247
- });
248
- Object.assign(contents, doc);
249
- return contents;
250
- };
251
- export const de_CreateCustomPluginCommand = async (output, context) => {
252
- if (output.statusCode !== 200 && output.statusCode >= 300) {
253
- return de_CommandError(output, context);
254
- }
255
- const contents = map({
256
- $metadata: deserializeMetadata(output),
257
- });
258
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
259
- const doc = take(data, {
260
- customPluginArn: __expectString,
261
- customPluginState: __expectString,
262
- name: __expectString,
263
- revision: __expectLong,
264
- });
265
- Object.assign(contents, doc);
266
- return contents;
267
- };
268
- export const de_CreateWorkerConfigurationCommand = async (output, context) => {
269
- if (output.statusCode !== 200 && output.statusCode >= 300) {
270
- return de_CommandError(output, context);
271
- }
272
- const contents = map({
273
- $metadata: deserializeMetadata(output),
274
- });
275
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
276
- const doc = take(data, {
277
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
278
- latestRevision: (_) => de_WorkerConfigurationRevisionSummary(_, context),
279
- name: __expectString,
280
- workerConfigurationArn: __expectString,
281
- workerConfigurationState: __expectString,
282
- });
283
- Object.assign(contents, doc);
284
- return contents;
285
- };
286
- export const de_DeleteConnectorCommand = async (output, context) => {
287
- if (output.statusCode !== 200 && output.statusCode >= 300) {
288
- return de_CommandError(output, context);
289
- }
290
- const contents = map({
291
- $metadata: deserializeMetadata(output),
292
- });
293
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
294
- const doc = take(data, {
295
- connectorArn: __expectString,
296
- connectorState: __expectString,
297
- });
298
- Object.assign(contents, doc);
299
- return contents;
300
- };
301
- export const de_DeleteCustomPluginCommand = async (output, context) => {
302
- if (output.statusCode !== 200 && output.statusCode >= 300) {
303
- return de_CommandError(output, context);
304
- }
305
- const contents = map({
306
- $metadata: deserializeMetadata(output),
307
- });
308
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
309
- const doc = take(data, {
310
- customPluginArn: __expectString,
311
- customPluginState: __expectString,
312
- });
313
- Object.assign(contents, doc);
314
- return contents;
315
- };
316
- export const de_DeleteWorkerConfigurationCommand = async (output, context) => {
317
- if (output.statusCode !== 200 && output.statusCode >= 300) {
318
- return de_CommandError(output, context);
319
- }
320
- const contents = map({
321
- $metadata: deserializeMetadata(output),
322
- });
323
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
324
- const doc = take(data, {
325
- workerConfigurationArn: __expectString,
326
- workerConfigurationState: __expectString,
327
- });
328
- Object.assign(contents, doc);
329
- return contents;
330
- };
331
- export const de_DescribeConnectorCommand = async (output, context) => {
332
- if (output.statusCode !== 200 && output.statusCode >= 300) {
333
- return de_CommandError(output, context);
334
- }
335
- const contents = map({
336
- $metadata: deserializeMetadata(output),
337
- });
338
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
339
- const doc = take(data, {
340
- capacity: _json,
341
- connectorArn: __expectString,
342
- connectorConfiguration: _json,
343
- connectorDescription: __expectString,
344
- connectorName: __expectString,
345
- connectorState: __expectString,
346
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
347
- currentVersion: __expectString,
348
- kafkaCluster: _json,
349
- kafkaClusterClientAuthentication: _json,
350
- kafkaClusterEncryptionInTransit: _json,
351
- kafkaConnectVersion: __expectString,
352
- logDelivery: _json,
353
- plugins: _json,
354
- serviceExecutionRoleArn: __expectString,
355
- stateDescription: _json,
356
- workerConfiguration: _json,
357
- });
358
- Object.assign(contents, doc);
359
- return contents;
360
- };
361
- export const de_DescribeConnectorOperationCommand = async (output, context) => {
362
- if (output.statusCode !== 200 && output.statusCode >= 300) {
363
- return de_CommandError(output, context);
364
- }
365
- const contents = map({
366
- $metadata: deserializeMetadata(output),
367
- });
368
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
369
- const doc = take(data, {
370
- connectorArn: __expectString,
371
- connectorOperationArn: __expectString,
372
- connectorOperationState: __expectString,
373
- connectorOperationType: __expectString,
374
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
375
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
376
- errorInfo: _json,
377
- operationSteps: _json,
378
- originConnectorConfiguration: _json,
379
- originWorkerSetting: _json,
380
- targetConnectorConfiguration: _json,
381
- targetWorkerSetting: _json,
382
- });
383
- Object.assign(contents, doc);
384
- return contents;
385
- };
386
- export const de_DescribeCustomPluginCommand = async (output, context) => {
387
- if (output.statusCode !== 200 && output.statusCode >= 300) {
388
- return de_CommandError(output, context);
389
- }
390
- const contents = map({
391
- $metadata: deserializeMetadata(output),
392
- });
393
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
394
- const doc = take(data, {
395
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
396
- customPluginArn: __expectString,
397
- customPluginState: __expectString,
398
- description: __expectString,
399
- latestRevision: (_) => de_CustomPluginRevisionSummary(_, context),
400
- name: __expectString,
401
- stateDescription: _json,
402
- });
403
- Object.assign(contents, doc);
404
- return contents;
405
- };
406
- export const de_DescribeWorkerConfigurationCommand = async (output, context) => {
407
- if (output.statusCode !== 200 && output.statusCode >= 300) {
408
- return de_CommandError(output, context);
409
- }
410
- const contents = map({
411
- $metadata: deserializeMetadata(output),
412
- });
413
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
414
- const doc = take(data, {
415
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
416
- description: __expectString,
417
- latestRevision: (_) => de_WorkerConfigurationRevisionDescription(_, context),
418
- name: __expectString,
419
- workerConfigurationArn: __expectString,
420
- workerConfigurationState: __expectString,
421
- });
422
- Object.assign(contents, doc);
423
- return contents;
424
- };
425
- export const de_ListConnectorOperationsCommand = async (output, context) => {
426
- if (output.statusCode !== 200 && output.statusCode >= 300) {
427
- return de_CommandError(output, context);
428
- }
429
- const contents = map({
430
- $metadata: deserializeMetadata(output),
431
- });
432
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
433
- const doc = take(data, {
434
- connectorOperations: (_) => de___listOfConnectorOperationSummary(_, context),
435
- nextToken: __expectString,
436
- });
437
- Object.assign(contents, doc);
438
- return contents;
439
- };
440
- export const de_ListConnectorsCommand = async (output, context) => {
441
- if (output.statusCode !== 200 && output.statusCode >= 300) {
442
- return de_CommandError(output, context);
443
- }
444
- const contents = map({
445
- $metadata: deserializeMetadata(output),
446
- });
447
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
448
- const doc = take(data, {
449
- connectors: (_) => de___listOfConnectorSummary(_, context),
450
- nextToken: __expectString,
451
- });
452
- Object.assign(contents, doc);
453
- return contents;
454
- };
455
- export const de_ListCustomPluginsCommand = async (output, context) => {
456
- if (output.statusCode !== 200 && output.statusCode >= 300) {
457
- return de_CommandError(output, context);
458
- }
459
- const contents = map({
460
- $metadata: deserializeMetadata(output),
461
- });
462
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
463
- const doc = take(data, {
464
- customPlugins: (_) => de___listOfCustomPluginSummary(_, context),
465
- nextToken: __expectString,
466
- });
467
- Object.assign(contents, doc);
468
- return contents;
469
- };
470
- export const de_ListTagsForResourceCommand = async (output, context) => {
471
- if (output.statusCode !== 200 && output.statusCode >= 300) {
472
- return de_CommandError(output, context);
473
- }
474
- const contents = map({
475
- $metadata: deserializeMetadata(output),
476
- });
477
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
478
- const doc = take(data, {
479
- tags: _json,
480
- });
481
- Object.assign(contents, doc);
482
- return contents;
483
- };
484
- export const de_ListWorkerConfigurationsCommand = async (output, context) => {
485
- if (output.statusCode !== 200 && output.statusCode >= 300) {
486
- return de_CommandError(output, context);
487
- }
488
- const contents = map({
489
- $metadata: deserializeMetadata(output),
490
- });
491
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
492
- const doc = take(data, {
493
- nextToken: __expectString,
494
- workerConfigurations: (_) => de___listOfWorkerConfigurationSummary(_, context),
495
- });
496
- Object.assign(contents, doc);
497
- return contents;
498
- };
499
- export const de_TagResourceCommand = async (output, context) => {
500
- if (output.statusCode !== 200 && output.statusCode >= 300) {
501
- return de_CommandError(output, context);
502
- }
503
- const contents = map({
504
- $metadata: deserializeMetadata(output),
505
- });
506
- await collectBody(output.body, context);
507
- return contents;
508
- };
509
- export const de_UntagResourceCommand = async (output, context) => {
510
- if (output.statusCode !== 200 && output.statusCode >= 300) {
511
- return de_CommandError(output, context);
512
- }
513
- const contents = map({
514
- $metadata: deserializeMetadata(output),
515
- });
516
- await collectBody(output.body, context);
517
- return contents;
518
- };
519
- export const de_UpdateConnectorCommand = async (output, context) => {
520
- if (output.statusCode !== 200 && output.statusCode >= 300) {
521
- return de_CommandError(output, context);
522
- }
523
- const contents = map({
524
- $metadata: deserializeMetadata(output),
525
- });
526
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
527
- const doc = take(data, {
528
- connectorArn: __expectString,
529
- connectorOperationArn: __expectString,
530
- connectorState: __expectString,
531
- });
532
- Object.assign(contents, doc);
533
- return contents;
534
- };
535
- const de_CommandError = async (output, context) => {
536
- const parsedOutput = {
537
- ...output,
538
- body: await parseErrorBody(output.body, context),
539
- };
540
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
541
- switch (errorCode) {
542
- case "BadRequestException":
543
- case "com.amazonaws.kafkaconnect#BadRequestException":
544
- throw await de_BadRequestExceptionRes(parsedOutput, context);
545
- case "ConflictException":
546
- case "com.amazonaws.kafkaconnect#ConflictException":
547
- throw await de_ConflictExceptionRes(parsedOutput, context);
548
- case "ForbiddenException":
549
- case "com.amazonaws.kafkaconnect#ForbiddenException":
550
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
551
- case "InternalServerErrorException":
552
- case "com.amazonaws.kafkaconnect#InternalServerErrorException":
553
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
554
- case "NotFoundException":
555
- case "com.amazonaws.kafkaconnect#NotFoundException":
556
- throw await de_NotFoundExceptionRes(parsedOutput, context);
557
- case "ServiceUnavailableException":
558
- case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
559
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
560
- case "TooManyRequestsException":
561
- case "com.amazonaws.kafkaconnect#TooManyRequestsException":
562
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
563
- case "UnauthorizedException":
564
- case "com.amazonaws.kafkaconnect#UnauthorizedException":
565
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
566
- default:
567
- const parsedBody = parsedOutput.body;
568
- return throwDefaultError({
569
- output,
570
- parsedBody,
571
- errorCode,
572
- });
573
- }
574
- };
575
- const throwDefaultError = withBaseException(__BaseException);
576
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
577
- const contents = map({});
578
- const data = parsedOutput.body;
579
- const doc = take(data, {
580
- message: __expectString,
581
- });
582
- Object.assign(contents, doc);
583
- const exception = new BadRequestException({
584
- $metadata: deserializeMetadata(parsedOutput),
585
- ...contents,
586
- });
587
- return __decorateServiceException(exception, parsedOutput.body);
588
- };
589
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
590
- const contents = map({});
591
- const data = parsedOutput.body;
592
- const doc = take(data, {
593
- message: __expectString,
594
- });
595
- Object.assign(contents, doc);
596
- const exception = new ConflictException({
597
- $metadata: deserializeMetadata(parsedOutput),
598
- ...contents,
599
- });
600
- return __decorateServiceException(exception, parsedOutput.body);
601
- };
602
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
603
- const contents = map({});
604
- const data = parsedOutput.body;
605
- const doc = take(data, {
606
- message: __expectString,
607
- });
608
- Object.assign(contents, doc);
609
- const exception = new ForbiddenException({
610
- $metadata: deserializeMetadata(parsedOutput),
611
- ...contents,
612
- });
613
- return __decorateServiceException(exception, parsedOutput.body);
614
- };
615
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
616
- const contents = map({});
617
- const data = parsedOutput.body;
618
- const doc = take(data, {
619
- message: __expectString,
620
- });
621
- Object.assign(contents, doc);
622
- const exception = new InternalServerErrorException({
623
- $metadata: deserializeMetadata(parsedOutput),
624
- ...contents,
625
- });
626
- return __decorateServiceException(exception, parsedOutput.body);
627
- };
628
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
629
- const contents = map({});
630
- const data = parsedOutput.body;
631
- const doc = take(data, {
632
- message: __expectString,
633
- });
634
- Object.assign(contents, doc);
635
- const exception = new NotFoundException({
636
- $metadata: deserializeMetadata(parsedOutput),
637
- ...contents,
638
- });
639
- return __decorateServiceException(exception, parsedOutput.body);
640
- };
641
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
642
- const contents = map({});
643
- const data = parsedOutput.body;
644
- const doc = take(data, {
645
- message: __expectString,
646
- });
647
- Object.assign(contents, doc);
648
- const exception = new ServiceUnavailableException({
649
- $metadata: deserializeMetadata(parsedOutput),
650
- ...contents,
651
- });
652
- return __decorateServiceException(exception, parsedOutput.body);
653
- };
654
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
655
- const contents = map({});
656
- const data = parsedOutput.body;
657
- const doc = take(data, {
658
- message: __expectString,
659
- });
660
- Object.assign(contents, doc);
661
- const exception = new TooManyRequestsException({
662
- $metadata: deserializeMetadata(parsedOutput),
663
- ...contents,
664
- });
665
- return __decorateServiceException(exception, parsedOutput.body);
666
- };
667
- const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
668
- const contents = map({});
669
- const data = parsedOutput.body;
670
- const doc = take(data, {
671
- message: __expectString,
672
- });
673
- Object.assign(contents, doc);
674
- const exception = new UnauthorizedException({
675
- $metadata: deserializeMetadata(parsedOutput),
676
- ...contents,
677
- });
678
- return __decorateServiceException(exception, parsedOutput.body);
679
- };
680
- const de___listOfConnectorOperationSummary = (output, context) => {
681
- const retVal = (output || [])
682
- .filter((e) => e != null)
683
- .map((entry) => {
684
- return de_ConnectorOperationSummary(entry, context);
685
- });
686
- return retVal;
687
- };
688
- const de___listOfConnectorSummary = (output, context) => {
689
- const retVal = (output || [])
690
- .filter((e) => e != null)
691
- .map((entry) => {
692
- return de_ConnectorSummary(entry, context);
693
- });
694
- return retVal;
695
- };
696
- const de___listOfCustomPluginSummary = (output, context) => {
697
- const retVal = (output || [])
698
- .filter((e) => e != null)
699
- .map((entry) => {
700
- return de_CustomPluginSummary(entry, context);
701
- });
702
- return retVal;
703
- };
704
- const de___listOfWorkerConfigurationSummary = (output, context) => {
705
- const retVal = (output || [])
706
- .filter((e) => e != null)
707
- .map((entry) => {
708
- return de_WorkerConfigurationSummary(entry, context);
709
- });
710
- return retVal;
711
- };
712
- const de_ConnectorOperationSummary = (output, context) => {
713
- return take(output, {
714
- connectorOperationArn: __expectString,
715
- connectorOperationState: __expectString,
716
- connectorOperationType: __expectString,
717
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
718
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
719
- });
720
- };
721
- const de_ConnectorSummary = (output, context) => {
722
- return take(output, {
723
- capacity: _json,
724
- connectorArn: __expectString,
725
- connectorDescription: __expectString,
726
- connectorName: __expectString,
727
- connectorState: __expectString,
728
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
729
- currentVersion: __expectString,
730
- kafkaCluster: _json,
731
- kafkaClusterClientAuthentication: _json,
732
- kafkaClusterEncryptionInTransit: _json,
733
- kafkaConnectVersion: __expectString,
734
- logDelivery: _json,
735
- plugins: _json,
736
- serviceExecutionRoleArn: __expectString,
737
- workerConfiguration: _json,
738
- });
739
- };
740
- const de_CustomPluginRevisionSummary = (output, context) => {
741
- return take(output, {
742
- contentType: __expectString,
743
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
744
- description: __expectString,
745
- fileDescription: _json,
746
- location: _json,
747
- revision: __expectLong,
748
- });
749
- };
750
- const de_CustomPluginSummary = (output, context) => {
751
- return take(output, {
752
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
753
- customPluginArn: __expectString,
754
- customPluginState: __expectString,
755
- description: __expectString,
756
- latestRevision: (_) => de_CustomPluginRevisionSummary(_, context),
757
- name: __expectString,
758
- });
759
- };
760
- const de_WorkerConfigurationRevisionDescription = (output, context) => {
761
- return take(output, {
762
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
763
- description: __expectString,
764
- propertiesFileContent: __expectString,
765
- revision: __expectLong,
766
- });
767
- };
768
- const de_WorkerConfigurationRevisionSummary = (output, context) => {
769
- return take(output, {
770
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
771
- description: __expectString,
772
- revision: __expectLong,
773
- });
774
- };
775
- const de_WorkerConfigurationSummary = (output, context) => {
776
- return take(output, {
777
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
778
- description: __expectString,
779
- latestRevision: (_) => de_WorkerConfigurationRevisionSummary(_, context),
780
- name: __expectString,
781
- workerConfigurationArn: __expectString,
782
- workerConfigurationState: __expectString,
783
- });
784
- };
785
- const deserializeMetadata = (output) => ({
786
- httpStatusCode: output.statusCode,
787
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
788
- extendedRequestId: output.headers["x-amz-id-2"],
789
- cfId: output.headers["x-amz-cf-id"],
790
- });
791
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
792
- const _cNP = "connectorNamePrefix";
793
- const _cV = "currentVersion";
794
- const _mR = "maxResults";
795
- const _nP = "namePrefix";
796
- const _nT = "nextToken";
797
- const _tK = "tagKeys";