@aws-sdk/client-data-pipeline 3.489.0 → 3.495.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 (36) hide show
  1. package/dist-cjs/DataPipeline.js +1 -49
  2. package/dist-cjs/DataPipelineClient.js +1 -43
  3. package/dist-cjs/commands/ActivatePipelineCommand.js +1 -28
  4. package/dist-cjs/commands/AddTagsCommand.js +1 -28
  5. package/dist-cjs/commands/CreatePipelineCommand.js +1 -28
  6. package/dist-cjs/commands/DeactivatePipelineCommand.js +1 -28
  7. package/dist-cjs/commands/DeletePipelineCommand.js +1 -28
  8. package/dist-cjs/commands/DescribeObjectsCommand.js +1 -28
  9. package/dist-cjs/commands/DescribePipelinesCommand.js +1 -28
  10. package/dist-cjs/commands/EvaluateExpressionCommand.js +1 -28
  11. package/dist-cjs/commands/GetPipelineDefinitionCommand.js +1 -28
  12. package/dist-cjs/commands/ListPipelinesCommand.js +1 -28
  13. package/dist-cjs/commands/PollForTaskCommand.js +1 -28
  14. package/dist-cjs/commands/PutPipelineDefinitionCommand.js +1 -28
  15. package/dist-cjs/commands/QueryObjectsCommand.js +1 -28
  16. package/dist-cjs/commands/RemoveTagsCommand.js +1 -28
  17. package/dist-cjs/commands/ReportTaskProgressCommand.js +1 -28
  18. package/dist-cjs/commands/ReportTaskRunnerHeartbeatCommand.js +1 -28
  19. package/dist-cjs/commands/SetStatusCommand.js +1 -28
  20. package/dist-cjs/commands/SetTaskStatusCommand.js +1 -28
  21. package/dist-cjs/commands/ValidatePipelineDefinitionCommand.js +1 -28
  22. package/dist-cjs/commands/index.js +1 -22
  23. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  24. package/dist-cjs/extensionConfiguration.js +1 -2
  25. package/dist-cjs/index.js +1665 -11
  26. package/dist-cjs/models/DataPipelineServiceException.js +1 -12
  27. package/dist-cjs/models/index.js +1 -4
  28. package/dist-cjs/models/models_0.js +1 -81
  29. package/dist-cjs/pagination/DescribeObjectsPaginator.js +1 -7
  30. package/dist-cjs/pagination/Interfaces.js +1 -2
  31. package/dist-cjs/pagination/ListPipelinesPaginator.js +1 -7
  32. package/dist-cjs/pagination/QueryObjectsPaginator.js +1 -7
  33. package/dist-cjs/pagination/index.js +1 -7
  34. package/dist-cjs/protocols/Aws_json1_1.js +1 -1041
  35. package/dist-cjs/runtimeExtensions.js +1 -22
  36. package/package.json +40 -40
@@ -1,1041 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ValidatePipelineDefinitionCommand = exports.de_SetTaskStatusCommand = exports.de_SetStatusCommand = exports.de_ReportTaskRunnerHeartbeatCommand = exports.de_ReportTaskProgressCommand = exports.de_RemoveTagsCommand = exports.de_QueryObjectsCommand = exports.de_PutPipelineDefinitionCommand = exports.de_PollForTaskCommand = exports.de_ListPipelinesCommand = exports.de_GetPipelineDefinitionCommand = exports.de_EvaluateExpressionCommand = exports.de_DescribePipelinesCommand = exports.de_DescribeObjectsCommand = exports.de_DeletePipelineCommand = exports.de_DeactivatePipelineCommand = exports.de_CreatePipelineCommand = exports.de_AddTagsCommand = exports.de_ActivatePipelineCommand = exports.se_ValidatePipelineDefinitionCommand = exports.se_SetTaskStatusCommand = exports.se_SetStatusCommand = exports.se_ReportTaskRunnerHeartbeatCommand = exports.se_ReportTaskProgressCommand = exports.se_RemoveTagsCommand = exports.se_QueryObjectsCommand = exports.se_PutPipelineDefinitionCommand = exports.se_PollForTaskCommand = exports.se_ListPipelinesCommand = exports.se_GetPipelineDefinitionCommand = exports.se_EvaluateExpressionCommand = exports.se_DescribePipelinesCommand = exports.se_DescribeObjectsCommand = exports.se_DeletePipelineCommand = exports.se_DeactivatePipelineCommand = exports.se_CreatePipelineCommand = exports.se_AddTagsCommand = exports.se_ActivatePipelineCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const DataPipelineServiceException_1 = require("../models/DataPipelineServiceException");
7
- const models_0_1 = require("../models/models_0");
8
- const se_ActivatePipelineCommand = async (input, context) => {
9
- const headers = sharedHeaders("ActivatePipeline");
10
- let body;
11
- body = JSON.stringify(se_ActivatePipelineInput(input, context));
12
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
- };
14
- exports.se_ActivatePipelineCommand = se_ActivatePipelineCommand;
15
- const se_AddTagsCommand = async (input, context) => {
16
- const headers = sharedHeaders("AddTags");
17
- let body;
18
- body = JSON.stringify((0, smithy_client_1._json)(input));
19
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
- };
21
- exports.se_AddTagsCommand = se_AddTagsCommand;
22
- const se_CreatePipelineCommand = async (input, context) => {
23
- const headers = sharedHeaders("CreatePipeline");
24
- let body;
25
- body = JSON.stringify((0, smithy_client_1._json)(input));
26
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
- };
28
- exports.se_CreatePipelineCommand = se_CreatePipelineCommand;
29
- const se_DeactivatePipelineCommand = async (input, context) => {
30
- const headers = sharedHeaders("DeactivatePipeline");
31
- let body;
32
- body = JSON.stringify((0, smithy_client_1._json)(input));
33
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
- };
35
- exports.se_DeactivatePipelineCommand = se_DeactivatePipelineCommand;
36
- const se_DeletePipelineCommand = async (input, context) => {
37
- const headers = sharedHeaders("DeletePipeline");
38
- let body;
39
- body = JSON.stringify((0, smithy_client_1._json)(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- exports.se_DeletePipelineCommand = se_DeletePipelineCommand;
43
- const se_DescribeObjectsCommand = async (input, context) => {
44
- const headers = sharedHeaders("DescribeObjects");
45
- let body;
46
- body = JSON.stringify((0, smithy_client_1._json)(input));
47
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
- };
49
- exports.se_DescribeObjectsCommand = se_DescribeObjectsCommand;
50
- const se_DescribePipelinesCommand = async (input, context) => {
51
- const headers = sharedHeaders("DescribePipelines");
52
- let body;
53
- body = JSON.stringify((0, smithy_client_1._json)(input));
54
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
55
- };
56
- exports.se_DescribePipelinesCommand = se_DescribePipelinesCommand;
57
- const se_EvaluateExpressionCommand = async (input, context) => {
58
- const headers = sharedHeaders("EvaluateExpression");
59
- let body;
60
- body = JSON.stringify((0, smithy_client_1._json)(input));
61
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
62
- };
63
- exports.se_EvaluateExpressionCommand = se_EvaluateExpressionCommand;
64
- const se_GetPipelineDefinitionCommand = async (input, context) => {
65
- const headers = sharedHeaders("GetPipelineDefinition");
66
- let body;
67
- body = JSON.stringify((0, smithy_client_1._json)(input));
68
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
69
- };
70
- exports.se_GetPipelineDefinitionCommand = se_GetPipelineDefinitionCommand;
71
- const se_ListPipelinesCommand = async (input, context) => {
72
- const headers = sharedHeaders("ListPipelines");
73
- let body;
74
- body = JSON.stringify((0, smithy_client_1._json)(input));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- exports.se_ListPipelinesCommand = se_ListPipelinesCommand;
78
- const se_PollForTaskCommand = async (input, context) => {
79
- const headers = sharedHeaders("PollForTask");
80
- let body;
81
- body = JSON.stringify((0, smithy_client_1._json)(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- exports.se_PollForTaskCommand = se_PollForTaskCommand;
85
- const se_PutPipelineDefinitionCommand = async (input, context) => {
86
- const headers = sharedHeaders("PutPipelineDefinition");
87
- let body;
88
- body = JSON.stringify((0, smithy_client_1._json)(input));
89
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
- };
91
- exports.se_PutPipelineDefinitionCommand = se_PutPipelineDefinitionCommand;
92
- const se_QueryObjectsCommand = async (input, context) => {
93
- const headers = sharedHeaders("QueryObjects");
94
- let body;
95
- body = JSON.stringify((0, smithy_client_1._json)(input));
96
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
- };
98
- exports.se_QueryObjectsCommand = se_QueryObjectsCommand;
99
- const se_RemoveTagsCommand = async (input, context) => {
100
- const headers = sharedHeaders("RemoveTags");
101
- let body;
102
- body = JSON.stringify((0, smithy_client_1._json)(input));
103
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
- };
105
- exports.se_RemoveTagsCommand = se_RemoveTagsCommand;
106
- const se_ReportTaskProgressCommand = async (input, context) => {
107
- const headers = sharedHeaders("ReportTaskProgress");
108
- let body;
109
- body = JSON.stringify((0, smithy_client_1._json)(input));
110
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
111
- };
112
- exports.se_ReportTaskProgressCommand = se_ReportTaskProgressCommand;
113
- const se_ReportTaskRunnerHeartbeatCommand = async (input, context) => {
114
- const headers = sharedHeaders("ReportTaskRunnerHeartbeat");
115
- let body;
116
- body = JSON.stringify((0, smithy_client_1._json)(input));
117
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
- };
119
- exports.se_ReportTaskRunnerHeartbeatCommand = se_ReportTaskRunnerHeartbeatCommand;
120
- const se_SetStatusCommand = async (input, context) => {
121
- const headers = sharedHeaders("SetStatus");
122
- let body;
123
- body = JSON.stringify((0, smithy_client_1._json)(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- exports.se_SetStatusCommand = se_SetStatusCommand;
127
- const se_SetTaskStatusCommand = async (input, context) => {
128
- const headers = sharedHeaders("SetTaskStatus");
129
- let body;
130
- body = JSON.stringify((0, smithy_client_1._json)(input));
131
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
132
- };
133
- exports.se_SetTaskStatusCommand = se_SetTaskStatusCommand;
134
- const se_ValidatePipelineDefinitionCommand = async (input, context) => {
135
- const headers = sharedHeaders("ValidatePipelineDefinition");
136
- let body;
137
- body = JSON.stringify((0, smithy_client_1._json)(input));
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- exports.se_ValidatePipelineDefinitionCommand = se_ValidatePipelineDefinitionCommand;
141
- const de_ActivatePipelineCommand = async (output, context) => {
142
- if (output.statusCode >= 300) {
143
- return de_ActivatePipelineCommandError(output, context);
144
- }
145
- const data = await parseBody(output.body, context);
146
- let contents = {};
147
- contents = (0, smithy_client_1._json)(data);
148
- const response = {
149
- $metadata: deserializeMetadata(output),
150
- ...contents,
151
- };
152
- return response;
153
- };
154
- exports.de_ActivatePipelineCommand = de_ActivatePipelineCommand;
155
- const de_ActivatePipelineCommandError = async (output, context) => {
156
- const parsedOutput = {
157
- ...output,
158
- body: await parseErrorBody(output.body, context),
159
- };
160
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
161
- switch (errorCode) {
162
- case "InternalServiceError":
163
- case "com.amazonaws.datapipeline#InternalServiceError":
164
- throw await de_InternalServiceErrorRes(parsedOutput, context);
165
- case "InvalidRequestException":
166
- case "com.amazonaws.datapipeline#InvalidRequestException":
167
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
168
- case "PipelineDeletedException":
169
- case "com.amazonaws.datapipeline#PipelineDeletedException":
170
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
171
- case "PipelineNotFoundException":
172
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
173
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
174
- default:
175
- const parsedBody = parsedOutput.body;
176
- return throwDefaultError({
177
- output,
178
- parsedBody,
179
- errorCode,
180
- });
181
- }
182
- };
183
- const de_AddTagsCommand = async (output, context) => {
184
- if (output.statusCode >= 300) {
185
- return de_AddTagsCommandError(output, context);
186
- }
187
- const data = await parseBody(output.body, context);
188
- let contents = {};
189
- contents = (0, smithy_client_1._json)(data);
190
- const response = {
191
- $metadata: deserializeMetadata(output),
192
- ...contents,
193
- };
194
- return response;
195
- };
196
- exports.de_AddTagsCommand = de_AddTagsCommand;
197
- const de_AddTagsCommandError = async (output, context) => {
198
- const parsedOutput = {
199
- ...output,
200
- body: await parseErrorBody(output.body, context),
201
- };
202
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
203
- switch (errorCode) {
204
- case "InternalServiceError":
205
- case "com.amazonaws.datapipeline#InternalServiceError":
206
- throw await de_InternalServiceErrorRes(parsedOutput, context);
207
- case "InvalidRequestException":
208
- case "com.amazonaws.datapipeline#InvalidRequestException":
209
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
210
- case "PipelineDeletedException":
211
- case "com.amazonaws.datapipeline#PipelineDeletedException":
212
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
213
- case "PipelineNotFoundException":
214
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
215
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
216
- default:
217
- const parsedBody = parsedOutput.body;
218
- return throwDefaultError({
219
- output,
220
- parsedBody,
221
- errorCode,
222
- });
223
- }
224
- };
225
- const de_CreatePipelineCommand = async (output, context) => {
226
- if (output.statusCode >= 300) {
227
- return de_CreatePipelineCommandError(output, context);
228
- }
229
- const data = await parseBody(output.body, context);
230
- let contents = {};
231
- contents = (0, smithy_client_1._json)(data);
232
- const response = {
233
- $metadata: deserializeMetadata(output),
234
- ...contents,
235
- };
236
- return response;
237
- };
238
- exports.de_CreatePipelineCommand = de_CreatePipelineCommand;
239
- const de_CreatePipelineCommandError = async (output, context) => {
240
- const parsedOutput = {
241
- ...output,
242
- body: await parseErrorBody(output.body, context),
243
- };
244
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
245
- switch (errorCode) {
246
- case "InternalServiceError":
247
- case "com.amazonaws.datapipeline#InternalServiceError":
248
- throw await de_InternalServiceErrorRes(parsedOutput, context);
249
- case "InvalidRequestException":
250
- case "com.amazonaws.datapipeline#InvalidRequestException":
251
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
252
- default:
253
- const parsedBody = parsedOutput.body;
254
- return throwDefaultError({
255
- output,
256
- parsedBody,
257
- errorCode,
258
- });
259
- }
260
- };
261
- const de_DeactivatePipelineCommand = async (output, context) => {
262
- if (output.statusCode >= 300) {
263
- return de_DeactivatePipelineCommandError(output, context);
264
- }
265
- const data = await parseBody(output.body, context);
266
- let contents = {};
267
- contents = (0, smithy_client_1._json)(data);
268
- const response = {
269
- $metadata: deserializeMetadata(output),
270
- ...contents,
271
- };
272
- return response;
273
- };
274
- exports.de_DeactivatePipelineCommand = de_DeactivatePipelineCommand;
275
- const de_DeactivatePipelineCommandError = async (output, context) => {
276
- const parsedOutput = {
277
- ...output,
278
- body: await parseErrorBody(output.body, context),
279
- };
280
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
281
- switch (errorCode) {
282
- case "InternalServiceError":
283
- case "com.amazonaws.datapipeline#InternalServiceError":
284
- throw await de_InternalServiceErrorRes(parsedOutput, context);
285
- case "InvalidRequestException":
286
- case "com.amazonaws.datapipeline#InvalidRequestException":
287
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
288
- case "PipelineDeletedException":
289
- case "com.amazonaws.datapipeline#PipelineDeletedException":
290
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
291
- case "PipelineNotFoundException":
292
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
293
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
294
- default:
295
- const parsedBody = parsedOutput.body;
296
- return throwDefaultError({
297
- output,
298
- parsedBody,
299
- errorCode,
300
- });
301
- }
302
- };
303
- const de_DeletePipelineCommand = async (output, context) => {
304
- if (output.statusCode >= 300) {
305
- return de_DeletePipelineCommandError(output, context);
306
- }
307
- await (0, smithy_client_1.collectBody)(output.body, context);
308
- const response = {
309
- $metadata: deserializeMetadata(output),
310
- };
311
- return response;
312
- };
313
- exports.de_DeletePipelineCommand = de_DeletePipelineCommand;
314
- const de_DeletePipelineCommandError = async (output, context) => {
315
- const parsedOutput = {
316
- ...output,
317
- body: await parseErrorBody(output.body, context),
318
- };
319
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
320
- switch (errorCode) {
321
- case "InternalServiceError":
322
- case "com.amazonaws.datapipeline#InternalServiceError":
323
- throw await de_InternalServiceErrorRes(parsedOutput, context);
324
- case "InvalidRequestException":
325
- case "com.amazonaws.datapipeline#InvalidRequestException":
326
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
327
- case "PipelineNotFoundException":
328
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
329
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
330
- default:
331
- const parsedBody = parsedOutput.body;
332
- return throwDefaultError({
333
- output,
334
- parsedBody,
335
- errorCode,
336
- });
337
- }
338
- };
339
- const de_DescribeObjectsCommand = async (output, context) => {
340
- if (output.statusCode >= 300) {
341
- return de_DescribeObjectsCommandError(output, context);
342
- }
343
- const data = await parseBody(output.body, context);
344
- let contents = {};
345
- contents = (0, smithy_client_1._json)(data);
346
- const response = {
347
- $metadata: deserializeMetadata(output),
348
- ...contents,
349
- };
350
- return response;
351
- };
352
- exports.de_DescribeObjectsCommand = de_DescribeObjectsCommand;
353
- const de_DescribeObjectsCommandError = async (output, context) => {
354
- const parsedOutput = {
355
- ...output,
356
- body: await parseErrorBody(output.body, context),
357
- };
358
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
359
- switch (errorCode) {
360
- case "InternalServiceError":
361
- case "com.amazonaws.datapipeline#InternalServiceError":
362
- throw await de_InternalServiceErrorRes(parsedOutput, context);
363
- case "InvalidRequestException":
364
- case "com.amazonaws.datapipeline#InvalidRequestException":
365
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
366
- case "PipelineDeletedException":
367
- case "com.amazonaws.datapipeline#PipelineDeletedException":
368
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
369
- case "PipelineNotFoundException":
370
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
371
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
372
- default:
373
- const parsedBody = parsedOutput.body;
374
- return throwDefaultError({
375
- output,
376
- parsedBody,
377
- errorCode,
378
- });
379
- }
380
- };
381
- const de_DescribePipelinesCommand = async (output, context) => {
382
- if (output.statusCode >= 300) {
383
- return de_DescribePipelinesCommandError(output, context);
384
- }
385
- const data = await parseBody(output.body, context);
386
- let contents = {};
387
- contents = (0, smithy_client_1._json)(data);
388
- const response = {
389
- $metadata: deserializeMetadata(output),
390
- ...contents,
391
- };
392
- return response;
393
- };
394
- exports.de_DescribePipelinesCommand = de_DescribePipelinesCommand;
395
- const de_DescribePipelinesCommandError = async (output, context) => {
396
- const parsedOutput = {
397
- ...output,
398
- body: await parseErrorBody(output.body, context),
399
- };
400
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
401
- switch (errorCode) {
402
- case "InternalServiceError":
403
- case "com.amazonaws.datapipeline#InternalServiceError":
404
- throw await de_InternalServiceErrorRes(parsedOutput, context);
405
- case "InvalidRequestException":
406
- case "com.amazonaws.datapipeline#InvalidRequestException":
407
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
408
- case "PipelineDeletedException":
409
- case "com.amazonaws.datapipeline#PipelineDeletedException":
410
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
411
- case "PipelineNotFoundException":
412
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
413
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
414
- default:
415
- const parsedBody = parsedOutput.body;
416
- return throwDefaultError({
417
- output,
418
- parsedBody,
419
- errorCode,
420
- });
421
- }
422
- };
423
- const de_EvaluateExpressionCommand = async (output, context) => {
424
- if (output.statusCode >= 300) {
425
- return de_EvaluateExpressionCommandError(output, context);
426
- }
427
- const data = await parseBody(output.body, context);
428
- let contents = {};
429
- contents = (0, smithy_client_1._json)(data);
430
- const response = {
431
- $metadata: deserializeMetadata(output),
432
- ...contents,
433
- };
434
- return response;
435
- };
436
- exports.de_EvaluateExpressionCommand = de_EvaluateExpressionCommand;
437
- const de_EvaluateExpressionCommandError = async (output, context) => {
438
- const parsedOutput = {
439
- ...output,
440
- body: await parseErrorBody(output.body, context),
441
- };
442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
443
- switch (errorCode) {
444
- case "InternalServiceError":
445
- case "com.amazonaws.datapipeline#InternalServiceError":
446
- throw await de_InternalServiceErrorRes(parsedOutput, context);
447
- case "InvalidRequestException":
448
- case "com.amazonaws.datapipeline#InvalidRequestException":
449
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
450
- case "PipelineDeletedException":
451
- case "com.amazonaws.datapipeline#PipelineDeletedException":
452
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
453
- case "PipelineNotFoundException":
454
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
455
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
456
- case "TaskNotFoundException":
457
- case "com.amazonaws.datapipeline#TaskNotFoundException":
458
- throw await de_TaskNotFoundExceptionRes(parsedOutput, context);
459
- default:
460
- const parsedBody = parsedOutput.body;
461
- return throwDefaultError({
462
- output,
463
- parsedBody,
464
- errorCode,
465
- });
466
- }
467
- };
468
- const de_GetPipelineDefinitionCommand = async (output, context) => {
469
- if (output.statusCode >= 300) {
470
- return de_GetPipelineDefinitionCommandError(output, context);
471
- }
472
- const data = await parseBody(output.body, context);
473
- let contents = {};
474
- contents = (0, smithy_client_1._json)(data);
475
- const response = {
476
- $metadata: deserializeMetadata(output),
477
- ...contents,
478
- };
479
- return response;
480
- };
481
- exports.de_GetPipelineDefinitionCommand = de_GetPipelineDefinitionCommand;
482
- const de_GetPipelineDefinitionCommandError = async (output, context) => {
483
- const parsedOutput = {
484
- ...output,
485
- body: await parseErrorBody(output.body, context),
486
- };
487
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
488
- switch (errorCode) {
489
- case "InternalServiceError":
490
- case "com.amazonaws.datapipeline#InternalServiceError":
491
- throw await de_InternalServiceErrorRes(parsedOutput, context);
492
- case "InvalidRequestException":
493
- case "com.amazonaws.datapipeline#InvalidRequestException":
494
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
495
- case "PipelineDeletedException":
496
- case "com.amazonaws.datapipeline#PipelineDeletedException":
497
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
498
- case "PipelineNotFoundException":
499
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
500
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
501
- default:
502
- const parsedBody = parsedOutput.body;
503
- return throwDefaultError({
504
- output,
505
- parsedBody,
506
- errorCode,
507
- });
508
- }
509
- };
510
- const de_ListPipelinesCommand = async (output, context) => {
511
- if (output.statusCode >= 300) {
512
- return de_ListPipelinesCommandError(output, context);
513
- }
514
- const data = await parseBody(output.body, context);
515
- let contents = {};
516
- contents = (0, smithy_client_1._json)(data);
517
- const response = {
518
- $metadata: deserializeMetadata(output),
519
- ...contents,
520
- };
521
- return response;
522
- };
523
- exports.de_ListPipelinesCommand = de_ListPipelinesCommand;
524
- const de_ListPipelinesCommandError = async (output, context) => {
525
- const parsedOutput = {
526
- ...output,
527
- body: await parseErrorBody(output.body, context),
528
- };
529
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
530
- switch (errorCode) {
531
- case "InternalServiceError":
532
- case "com.amazonaws.datapipeline#InternalServiceError":
533
- throw await de_InternalServiceErrorRes(parsedOutput, context);
534
- case "InvalidRequestException":
535
- case "com.amazonaws.datapipeline#InvalidRequestException":
536
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
537
- default:
538
- const parsedBody = parsedOutput.body;
539
- return throwDefaultError({
540
- output,
541
- parsedBody,
542
- errorCode,
543
- });
544
- }
545
- };
546
- const de_PollForTaskCommand = async (output, context) => {
547
- if (output.statusCode >= 300) {
548
- return de_PollForTaskCommandError(output, context);
549
- }
550
- const data = await parseBody(output.body, context);
551
- let contents = {};
552
- contents = (0, smithy_client_1._json)(data);
553
- const response = {
554
- $metadata: deserializeMetadata(output),
555
- ...contents,
556
- };
557
- return response;
558
- };
559
- exports.de_PollForTaskCommand = de_PollForTaskCommand;
560
- const de_PollForTaskCommandError = async (output, context) => {
561
- const parsedOutput = {
562
- ...output,
563
- body: await parseErrorBody(output.body, context),
564
- };
565
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
566
- switch (errorCode) {
567
- case "InternalServiceError":
568
- case "com.amazonaws.datapipeline#InternalServiceError":
569
- throw await de_InternalServiceErrorRes(parsedOutput, context);
570
- case "InvalidRequestException":
571
- case "com.amazonaws.datapipeline#InvalidRequestException":
572
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
573
- case "TaskNotFoundException":
574
- case "com.amazonaws.datapipeline#TaskNotFoundException":
575
- throw await de_TaskNotFoundExceptionRes(parsedOutput, context);
576
- default:
577
- const parsedBody = parsedOutput.body;
578
- return throwDefaultError({
579
- output,
580
- parsedBody,
581
- errorCode,
582
- });
583
- }
584
- };
585
- const de_PutPipelineDefinitionCommand = async (output, context) => {
586
- if (output.statusCode >= 300) {
587
- return de_PutPipelineDefinitionCommandError(output, context);
588
- }
589
- const data = await parseBody(output.body, context);
590
- let contents = {};
591
- contents = (0, smithy_client_1._json)(data);
592
- const response = {
593
- $metadata: deserializeMetadata(output),
594
- ...contents,
595
- };
596
- return response;
597
- };
598
- exports.de_PutPipelineDefinitionCommand = de_PutPipelineDefinitionCommand;
599
- const de_PutPipelineDefinitionCommandError = async (output, context) => {
600
- const parsedOutput = {
601
- ...output,
602
- body: await parseErrorBody(output.body, context),
603
- };
604
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
605
- switch (errorCode) {
606
- case "InternalServiceError":
607
- case "com.amazonaws.datapipeline#InternalServiceError":
608
- throw await de_InternalServiceErrorRes(parsedOutput, context);
609
- case "InvalidRequestException":
610
- case "com.amazonaws.datapipeline#InvalidRequestException":
611
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
612
- case "PipelineDeletedException":
613
- case "com.amazonaws.datapipeline#PipelineDeletedException":
614
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
615
- case "PipelineNotFoundException":
616
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
617
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
618
- default:
619
- const parsedBody = parsedOutput.body;
620
- return throwDefaultError({
621
- output,
622
- parsedBody,
623
- errorCode,
624
- });
625
- }
626
- };
627
- const de_QueryObjectsCommand = async (output, context) => {
628
- if (output.statusCode >= 300) {
629
- return de_QueryObjectsCommandError(output, context);
630
- }
631
- const data = await parseBody(output.body, context);
632
- let contents = {};
633
- contents = (0, smithy_client_1._json)(data);
634
- const response = {
635
- $metadata: deserializeMetadata(output),
636
- ...contents,
637
- };
638
- return response;
639
- };
640
- exports.de_QueryObjectsCommand = de_QueryObjectsCommand;
641
- const de_QueryObjectsCommandError = async (output, context) => {
642
- const parsedOutput = {
643
- ...output,
644
- body: await parseErrorBody(output.body, context),
645
- };
646
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
647
- switch (errorCode) {
648
- case "InternalServiceError":
649
- case "com.amazonaws.datapipeline#InternalServiceError":
650
- throw await de_InternalServiceErrorRes(parsedOutput, context);
651
- case "InvalidRequestException":
652
- case "com.amazonaws.datapipeline#InvalidRequestException":
653
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
654
- case "PipelineDeletedException":
655
- case "com.amazonaws.datapipeline#PipelineDeletedException":
656
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
657
- case "PipelineNotFoundException":
658
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
659
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
660
- default:
661
- const parsedBody = parsedOutput.body;
662
- return throwDefaultError({
663
- output,
664
- parsedBody,
665
- errorCode,
666
- });
667
- }
668
- };
669
- const de_RemoveTagsCommand = async (output, context) => {
670
- if (output.statusCode >= 300) {
671
- return de_RemoveTagsCommandError(output, context);
672
- }
673
- const data = await parseBody(output.body, context);
674
- let contents = {};
675
- contents = (0, smithy_client_1._json)(data);
676
- const response = {
677
- $metadata: deserializeMetadata(output),
678
- ...contents,
679
- };
680
- return response;
681
- };
682
- exports.de_RemoveTagsCommand = de_RemoveTagsCommand;
683
- const de_RemoveTagsCommandError = async (output, context) => {
684
- const parsedOutput = {
685
- ...output,
686
- body: await parseErrorBody(output.body, context),
687
- };
688
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
689
- switch (errorCode) {
690
- case "InternalServiceError":
691
- case "com.amazonaws.datapipeline#InternalServiceError":
692
- throw await de_InternalServiceErrorRes(parsedOutput, context);
693
- case "InvalidRequestException":
694
- case "com.amazonaws.datapipeline#InvalidRequestException":
695
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
696
- case "PipelineDeletedException":
697
- case "com.amazonaws.datapipeline#PipelineDeletedException":
698
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
699
- case "PipelineNotFoundException":
700
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
701
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
702
- default:
703
- const parsedBody = parsedOutput.body;
704
- return throwDefaultError({
705
- output,
706
- parsedBody,
707
- errorCode,
708
- });
709
- }
710
- };
711
- const de_ReportTaskProgressCommand = async (output, context) => {
712
- if (output.statusCode >= 300) {
713
- return de_ReportTaskProgressCommandError(output, context);
714
- }
715
- const data = await parseBody(output.body, context);
716
- let contents = {};
717
- contents = (0, smithy_client_1._json)(data);
718
- const response = {
719
- $metadata: deserializeMetadata(output),
720
- ...contents,
721
- };
722
- return response;
723
- };
724
- exports.de_ReportTaskProgressCommand = de_ReportTaskProgressCommand;
725
- const de_ReportTaskProgressCommandError = async (output, context) => {
726
- const parsedOutput = {
727
- ...output,
728
- body: await parseErrorBody(output.body, context),
729
- };
730
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
731
- switch (errorCode) {
732
- case "InternalServiceError":
733
- case "com.amazonaws.datapipeline#InternalServiceError":
734
- throw await de_InternalServiceErrorRes(parsedOutput, context);
735
- case "InvalidRequestException":
736
- case "com.amazonaws.datapipeline#InvalidRequestException":
737
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
738
- case "PipelineDeletedException":
739
- case "com.amazonaws.datapipeline#PipelineDeletedException":
740
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
741
- case "PipelineNotFoundException":
742
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
743
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
744
- case "TaskNotFoundException":
745
- case "com.amazonaws.datapipeline#TaskNotFoundException":
746
- throw await de_TaskNotFoundExceptionRes(parsedOutput, context);
747
- default:
748
- const parsedBody = parsedOutput.body;
749
- return throwDefaultError({
750
- output,
751
- parsedBody,
752
- errorCode,
753
- });
754
- }
755
- };
756
- const de_ReportTaskRunnerHeartbeatCommand = async (output, context) => {
757
- if (output.statusCode >= 300) {
758
- return de_ReportTaskRunnerHeartbeatCommandError(output, context);
759
- }
760
- const data = await parseBody(output.body, context);
761
- let contents = {};
762
- contents = (0, smithy_client_1._json)(data);
763
- const response = {
764
- $metadata: deserializeMetadata(output),
765
- ...contents,
766
- };
767
- return response;
768
- };
769
- exports.de_ReportTaskRunnerHeartbeatCommand = de_ReportTaskRunnerHeartbeatCommand;
770
- const de_ReportTaskRunnerHeartbeatCommandError = async (output, context) => {
771
- const parsedOutput = {
772
- ...output,
773
- body: await parseErrorBody(output.body, context),
774
- };
775
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
776
- switch (errorCode) {
777
- case "InternalServiceError":
778
- case "com.amazonaws.datapipeline#InternalServiceError":
779
- throw await de_InternalServiceErrorRes(parsedOutput, context);
780
- case "InvalidRequestException":
781
- case "com.amazonaws.datapipeline#InvalidRequestException":
782
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
783
- default:
784
- const parsedBody = parsedOutput.body;
785
- return throwDefaultError({
786
- output,
787
- parsedBody,
788
- errorCode,
789
- });
790
- }
791
- };
792
- const de_SetStatusCommand = async (output, context) => {
793
- if (output.statusCode >= 300) {
794
- return de_SetStatusCommandError(output, context);
795
- }
796
- await (0, smithy_client_1.collectBody)(output.body, context);
797
- const response = {
798
- $metadata: deserializeMetadata(output),
799
- };
800
- return response;
801
- };
802
- exports.de_SetStatusCommand = de_SetStatusCommand;
803
- const de_SetStatusCommandError = async (output, context) => {
804
- const parsedOutput = {
805
- ...output,
806
- body: await parseErrorBody(output.body, context),
807
- };
808
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
809
- switch (errorCode) {
810
- case "InternalServiceError":
811
- case "com.amazonaws.datapipeline#InternalServiceError":
812
- throw await de_InternalServiceErrorRes(parsedOutput, context);
813
- case "InvalidRequestException":
814
- case "com.amazonaws.datapipeline#InvalidRequestException":
815
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
816
- case "PipelineDeletedException":
817
- case "com.amazonaws.datapipeline#PipelineDeletedException":
818
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
819
- case "PipelineNotFoundException":
820
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
821
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
822
- default:
823
- const parsedBody = parsedOutput.body;
824
- return throwDefaultError({
825
- output,
826
- parsedBody,
827
- errorCode,
828
- });
829
- }
830
- };
831
- const de_SetTaskStatusCommand = async (output, context) => {
832
- if (output.statusCode >= 300) {
833
- return de_SetTaskStatusCommandError(output, context);
834
- }
835
- const data = await parseBody(output.body, context);
836
- let contents = {};
837
- contents = (0, smithy_client_1._json)(data);
838
- const response = {
839
- $metadata: deserializeMetadata(output),
840
- ...contents,
841
- };
842
- return response;
843
- };
844
- exports.de_SetTaskStatusCommand = de_SetTaskStatusCommand;
845
- const de_SetTaskStatusCommandError = async (output, context) => {
846
- const parsedOutput = {
847
- ...output,
848
- body: await parseErrorBody(output.body, context),
849
- };
850
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
851
- switch (errorCode) {
852
- case "InternalServiceError":
853
- case "com.amazonaws.datapipeline#InternalServiceError":
854
- throw await de_InternalServiceErrorRes(parsedOutput, context);
855
- case "InvalidRequestException":
856
- case "com.amazonaws.datapipeline#InvalidRequestException":
857
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
858
- case "PipelineDeletedException":
859
- case "com.amazonaws.datapipeline#PipelineDeletedException":
860
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
861
- case "PipelineNotFoundException":
862
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
863
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
864
- case "TaskNotFoundException":
865
- case "com.amazonaws.datapipeline#TaskNotFoundException":
866
- throw await de_TaskNotFoundExceptionRes(parsedOutput, context);
867
- default:
868
- const parsedBody = parsedOutput.body;
869
- return throwDefaultError({
870
- output,
871
- parsedBody,
872
- errorCode,
873
- });
874
- }
875
- };
876
- const de_ValidatePipelineDefinitionCommand = async (output, context) => {
877
- if (output.statusCode >= 300) {
878
- return de_ValidatePipelineDefinitionCommandError(output, context);
879
- }
880
- const data = await parseBody(output.body, context);
881
- let contents = {};
882
- contents = (0, smithy_client_1._json)(data);
883
- const response = {
884
- $metadata: deserializeMetadata(output),
885
- ...contents,
886
- };
887
- return response;
888
- };
889
- exports.de_ValidatePipelineDefinitionCommand = de_ValidatePipelineDefinitionCommand;
890
- const de_ValidatePipelineDefinitionCommandError = async (output, context) => {
891
- const parsedOutput = {
892
- ...output,
893
- body: await parseErrorBody(output.body, context),
894
- };
895
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
896
- switch (errorCode) {
897
- case "InternalServiceError":
898
- case "com.amazonaws.datapipeline#InternalServiceError":
899
- throw await de_InternalServiceErrorRes(parsedOutput, context);
900
- case "InvalidRequestException":
901
- case "com.amazonaws.datapipeline#InvalidRequestException":
902
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
903
- case "PipelineDeletedException":
904
- case "com.amazonaws.datapipeline#PipelineDeletedException":
905
- throw await de_PipelineDeletedExceptionRes(parsedOutput, context);
906
- case "PipelineNotFoundException":
907
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
908
- throw await de_PipelineNotFoundExceptionRes(parsedOutput, context);
909
- default:
910
- const parsedBody = parsedOutput.body;
911
- return throwDefaultError({
912
- output,
913
- parsedBody,
914
- errorCode,
915
- });
916
- }
917
- };
918
- const de_InternalServiceErrorRes = async (parsedOutput, context) => {
919
- const body = parsedOutput.body;
920
- const deserialized = (0, smithy_client_1._json)(body);
921
- const exception = new models_0_1.InternalServiceError({
922
- $metadata: deserializeMetadata(parsedOutput),
923
- ...deserialized,
924
- });
925
- return (0, smithy_client_1.decorateServiceException)(exception, body);
926
- };
927
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
928
- const body = parsedOutput.body;
929
- const deserialized = (0, smithy_client_1._json)(body);
930
- const exception = new models_0_1.InvalidRequestException({
931
- $metadata: deserializeMetadata(parsedOutput),
932
- ...deserialized,
933
- });
934
- return (0, smithy_client_1.decorateServiceException)(exception, body);
935
- };
936
- const de_PipelineDeletedExceptionRes = async (parsedOutput, context) => {
937
- const body = parsedOutput.body;
938
- const deserialized = (0, smithy_client_1._json)(body);
939
- const exception = new models_0_1.PipelineDeletedException({
940
- $metadata: deserializeMetadata(parsedOutput),
941
- ...deserialized,
942
- });
943
- return (0, smithy_client_1.decorateServiceException)(exception, body);
944
- };
945
- const de_PipelineNotFoundExceptionRes = async (parsedOutput, context) => {
946
- const body = parsedOutput.body;
947
- const deserialized = (0, smithy_client_1._json)(body);
948
- const exception = new models_0_1.PipelineNotFoundException({
949
- $metadata: deserializeMetadata(parsedOutput),
950
- ...deserialized,
951
- });
952
- return (0, smithy_client_1.decorateServiceException)(exception, body);
953
- };
954
- const de_TaskNotFoundExceptionRes = async (parsedOutput, context) => {
955
- const body = parsedOutput.body;
956
- const deserialized = (0, smithy_client_1._json)(body);
957
- const exception = new models_0_1.TaskNotFoundException({
958
- $metadata: deserializeMetadata(parsedOutput),
959
- ...deserialized,
960
- });
961
- return (0, smithy_client_1.decorateServiceException)(exception, body);
962
- };
963
- const se_ActivatePipelineInput = (input, context) => {
964
- return (0, smithy_client_1.take)(input, {
965
- parameterValues: smithy_client_1._json,
966
- pipelineId: [],
967
- startTimestamp: (_) => Math.round(_.getTime() / 1000),
968
- });
969
- };
970
- const deserializeMetadata = (output) => ({
971
- httpStatusCode: output.statusCode,
972
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
973
- extendedRequestId: output.headers["x-amz-id-2"],
974
- cfId: output.headers["x-amz-cf-id"],
975
- });
976
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
977
- const throwDefaultError = (0, smithy_client_1.withBaseException)(DataPipelineServiceException_1.DataPipelineServiceException);
978
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
979
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
980
- const contents = {
981
- protocol,
982
- hostname,
983
- port,
984
- method: "POST",
985
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
986
- headers,
987
- };
988
- if (resolvedHostname !== undefined) {
989
- contents.hostname = resolvedHostname;
990
- }
991
- if (body !== undefined) {
992
- contents.body = body;
993
- }
994
- return new protocol_http_1.HttpRequest(contents);
995
- };
996
- function sharedHeaders(operation) {
997
- return {
998
- "content-type": "application/x-amz-json-1.1",
999
- "x-amz-target": `DataPipeline.${operation}`,
1000
- };
1001
- }
1002
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1003
- if (encoded.length) {
1004
- return JSON.parse(encoded);
1005
- }
1006
- return {};
1007
- });
1008
- const parseErrorBody = async (errorBody, context) => {
1009
- const value = await parseBody(errorBody, context);
1010
- value.message = value.message ?? value.Message;
1011
- return value;
1012
- };
1013
- const loadRestJsonErrorCode = (output, data) => {
1014
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1015
- const sanitizeErrorCode = (rawValue) => {
1016
- let cleanValue = rawValue;
1017
- if (typeof cleanValue === "number") {
1018
- cleanValue = cleanValue.toString();
1019
- }
1020
- if (cleanValue.indexOf(",") >= 0) {
1021
- cleanValue = cleanValue.split(",")[0];
1022
- }
1023
- if (cleanValue.indexOf(":") >= 0) {
1024
- cleanValue = cleanValue.split(":")[0];
1025
- }
1026
- if (cleanValue.indexOf("#") >= 0) {
1027
- cleanValue = cleanValue.split("#")[1];
1028
- }
1029
- return cleanValue;
1030
- };
1031
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1032
- if (headerKey !== undefined) {
1033
- return sanitizeErrorCode(output.headers[headerKey]);
1034
- }
1035
- if (data.code !== undefined) {
1036
- return sanitizeErrorCode(data.code);
1037
- }
1038
- if (data["__type"] !== undefined) {
1039
- return sanitizeErrorCode(data["__type"]);
1040
- }
1041
- };
1
+ module.exports = require("../index.js");