@aws-sdk/client-redshift-data 3.490.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.
- package/dist-cjs/RedshiftData.js +1 -31
- package/dist-cjs/RedshiftDataClient.js +1 -43
- package/dist-cjs/commands/BatchExecuteStatementCommand.js +1 -28
- package/dist-cjs/commands/CancelStatementCommand.js +1 -28
- package/dist-cjs/commands/DescribeStatementCommand.js +1 -28
- package/dist-cjs/commands/DescribeTableCommand.js +1 -28
- package/dist-cjs/commands/ExecuteStatementCommand.js +1 -28
- package/dist-cjs/commands/GetStatementResultCommand.js +1 -28
- package/dist-cjs/commands/ListDatabasesCommand.js +1 -28
- package/dist-cjs/commands/ListSchemasCommand.js +1 -28
- package/dist-cjs/commands/ListStatementsCommand.js +1 -28
- package/dist-cjs/commands/ListTablesCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -13
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1319 -11
- package/dist-cjs/models/RedshiftDataServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -140
- package/dist-cjs/pagination/DescribeTablePaginator.js +1 -7
- package/dist-cjs/pagination/GetStatementResultPaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListDatabasesPaginator.js +1 -7
- package/dist-cjs/pagination/ListSchemasPaginator.js +1 -7
- package/dist-cjs/pagination/ListStatementsPaginator.js +1 -7
- package/dist-cjs/pagination/ListTablesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -10
- package/dist-cjs/protocols/Aws_json1_1.js +1 -774
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,774 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_ListTablesCommand = exports.de_ListStatementsCommand = exports.de_ListSchemasCommand = exports.de_ListDatabasesCommand = exports.de_GetStatementResultCommand = exports.de_ExecuteStatementCommand = exports.de_DescribeTableCommand = exports.de_DescribeStatementCommand = exports.de_CancelStatementCommand = exports.de_BatchExecuteStatementCommand = exports.se_ListTablesCommand = exports.se_ListStatementsCommand = exports.se_ListSchemasCommand = exports.se_ListDatabasesCommand = exports.se_GetStatementResultCommand = exports.se_ExecuteStatementCommand = exports.se_DescribeTableCommand = exports.se_DescribeStatementCommand = exports.se_CancelStatementCommand = exports.se_BatchExecuteStatementCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const uuid_1 = require("uuid");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const RedshiftDataServiceException_1 = require("../models/RedshiftDataServiceException");
|
|
10
|
-
const se_BatchExecuteStatementCommand = async (input, context) => {
|
|
11
|
-
const headers = sharedHeaders("BatchExecuteStatement");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(se_BatchExecuteStatementInput(input, context));
|
|
14
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
15
|
-
};
|
|
16
|
-
exports.se_BatchExecuteStatementCommand = se_BatchExecuteStatementCommand;
|
|
17
|
-
const se_CancelStatementCommand = async (input, context) => {
|
|
18
|
-
const headers = sharedHeaders("CancelStatement");
|
|
19
|
-
let body;
|
|
20
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
21
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
-
};
|
|
23
|
-
exports.se_CancelStatementCommand = se_CancelStatementCommand;
|
|
24
|
-
const se_DescribeStatementCommand = async (input, context) => {
|
|
25
|
-
const headers = sharedHeaders("DescribeStatement");
|
|
26
|
-
let body;
|
|
27
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
28
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
-
};
|
|
30
|
-
exports.se_DescribeStatementCommand = se_DescribeStatementCommand;
|
|
31
|
-
const se_DescribeTableCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("DescribeTable");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
exports.se_DescribeTableCommand = se_DescribeTableCommand;
|
|
38
|
-
const se_ExecuteStatementCommand = async (input, context) => {
|
|
39
|
-
const headers = sharedHeaders("ExecuteStatement");
|
|
40
|
-
let body;
|
|
41
|
-
body = JSON.stringify(se_ExecuteStatementInput(input, context));
|
|
42
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
43
|
-
};
|
|
44
|
-
exports.se_ExecuteStatementCommand = se_ExecuteStatementCommand;
|
|
45
|
-
const se_GetStatementResultCommand = async (input, context) => {
|
|
46
|
-
const headers = sharedHeaders("GetStatementResult");
|
|
47
|
-
let body;
|
|
48
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
49
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
|
-
};
|
|
51
|
-
exports.se_GetStatementResultCommand = se_GetStatementResultCommand;
|
|
52
|
-
const se_ListDatabasesCommand = async (input, context) => {
|
|
53
|
-
const headers = sharedHeaders("ListDatabases");
|
|
54
|
-
let body;
|
|
55
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
56
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
|
-
};
|
|
58
|
-
exports.se_ListDatabasesCommand = se_ListDatabasesCommand;
|
|
59
|
-
const se_ListSchemasCommand = async (input, context) => {
|
|
60
|
-
const headers = sharedHeaders("ListSchemas");
|
|
61
|
-
let body;
|
|
62
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
63
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
64
|
-
};
|
|
65
|
-
exports.se_ListSchemasCommand = se_ListSchemasCommand;
|
|
66
|
-
const se_ListStatementsCommand = async (input, context) => {
|
|
67
|
-
const headers = sharedHeaders("ListStatements");
|
|
68
|
-
let body;
|
|
69
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
70
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
71
|
-
};
|
|
72
|
-
exports.se_ListStatementsCommand = se_ListStatementsCommand;
|
|
73
|
-
const se_ListTablesCommand = async (input, context) => {
|
|
74
|
-
const headers = sharedHeaders("ListTables");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
77
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
-
};
|
|
79
|
-
exports.se_ListTablesCommand = se_ListTablesCommand;
|
|
80
|
-
const de_BatchExecuteStatementCommand = async (output, context) => {
|
|
81
|
-
if (output.statusCode >= 300) {
|
|
82
|
-
return de_BatchExecuteStatementCommandError(output, context);
|
|
83
|
-
}
|
|
84
|
-
const data = await parseBody(output.body, context);
|
|
85
|
-
let contents = {};
|
|
86
|
-
contents = de_BatchExecuteStatementOutput(data, context);
|
|
87
|
-
const response = {
|
|
88
|
-
$metadata: deserializeMetadata(output),
|
|
89
|
-
...contents,
|
|
90
|
-
};
|
|
91
|
-
return response;
|
|
92
|
-
};
|
|
93
|
-
exports.de_BatchExecuteStatementCommand = de_BatchExecuteStatementCommand;
|
|
94
|
-
const de_BatchExecuteStatementCommandError = async (output, context) => {
|
|
95
|
-
const parsedOutput = {
|
|
96
|
-
...output,
|
|
97
|
-
body: await parseErrorBody(output.body, context),
|
|
98
|
-
};
|
|
99
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
100
|
-
switch (errorCode) {
|
|
101
|
-
case "ActiveStatementsExceededException":
|
|
102
|
-
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
103
|
-
throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
|
|
104
|
-
case "BatchExecuteStatementException":
|
|
105
|
-
case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
|
|
106
|
-
throw await de_BatchExecuteStatementExceptionRes(parsedOutput, context);
|
|
107
|
-
case "ValidationException":
|
|
108
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
109
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
110
|
-
default:
|
|
111
|
-
const parsedBody = parsedOutput.body;
|
|
112
|
-
return throwDefaultError({
|
|
113
|
-
output,
|
|
114
|
-
parsedBody,
|
|
115
|
-
errorCode,
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
const de_CancelStatementCommand = async (output, context) => {
|
|
120
|
-
if (output.statusCode >= 300) {
|
|
121
|
-
return de_CancelStatementCommandError(output, context);
|
|
122
|
-
}
|
|
123
|
-
const data = await parseBody(output.body, context);
|
|
124
|
-
let contents = {};
|
|
125
|
-
contents = (0, smithy_client_1._json)(data);
|
|
126
|
-
const response = {
|
|
127
|
-
$metadata: deserializeMetadata(output),
|
|
128
|
-
...contents,
|
|
129
|
-
};
|
|
130
|
-
return response;
|
|
131
|
-
};
|
|
132
|
-
exports.de_CancelStatementCommand = de_CancelStatementCommand;
|
|
133
|
-
const de_CancelStatementCommandError = async (output, context) => {
|
|
134
|
-
const parsedOutput = {
|
|
135
|
-
...output,
|
|
136
|
-
body: await parseErrorBody(output.body, context),
|
|
137
|
-
};
|
|
138
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
139
|
-
switch (errorCode) {
|
|
140
|
-
case "DatabaseConnectionException":
|
|
141
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
142
|
-
throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
|
|
143
|
-
case "InternalServerException":
|
|
144
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
145
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
146
|
-
case "ResourceNotFoundException":
|
|
147
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
148
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
149
|
-
case "ValidationException":
|
|
150
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
151
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
152
|
-
default:
|
|
153
|
-
const parsedBody = parsedOutput.body;
|
|
154
|
-
return throwDefaultError({
|
|
155
|
-
output,
|
|
156
|
-
parsedBody,
|
|
157
|
-
errorCode,
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
const de_DescribeStatementCommand = async (output, context) => {
|
|
162
|
-
if (output.statusCode >= 300) {
|
|
163
|
-
return de_DescribeStatementCommandError(output, context);
|
|
164
|
-
}
|
|
165
|
-
const data = await parseBody(output.body, context);
|
|
166
|
-
let contents = {};
|
|
167
|
-
contents = de_DescribeStatementResponse(data, context);
|
|
168
|
-
const response = {
|
|
169
|
-
$metadata: deserializeMetadata(output),
|
|
170
|
-
...contents,
|
|
171
|
-
};
|
|
172
|
-
return response;
|
|
173
|
-
};
|
|
174
|
-
exports.de_DescribeStatementCommand = de_DescribeStatementCommand;
|
|
175
|
-
const de_DescribeStatementCommandError = async (output, context) => {
|
|
176
|
-
const parsedOutput = {
|
|
177
|
-
...output,
|
|
178
|
-
body: await parseErrorBody(output.body, context),
|
|
179
|
-
};
|
|
180
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
181
|
-
switch (errorCode) {
|
|
182
|
-
case "InternalServerException":
|
|
183
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
184
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
185
|
-
case "ResourceNotFoundException":
|
|
186
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
187
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
188
|
-
case "ValidationException":
|
|
189
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
190
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
191
|
-
default:
|
|
192
|
-
const parsedBody = parsedOutput.body;
|
|
193
|
-
return throwDefaultError({
|
|
194
|
-
output,
|
|
195
|
-
parsedBody,
|
|
196
|
-
errorCode,
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
const de_DescribeTableCommand = async (output, context) => {
|
|
201
|
-
if (output.statusCode >= 300) {
|
|
202
|
-
return de_DescribeTableCommandError(output, context);
|
|
203
|
-
}
|
|
204
|
-
const data = await parseBody(output.body, context);
|
|
205
|
-
let contents = {};
|
|
206
|
-
contents = (0, smithy_client_1._json)(data);
|
|
207
|
-
const response = {
|
|
208
|
-
$metadata: deserializeMetadata(output),
|
|
209
|
-
...contents,
|
|
210
|
-
};
|
|
211
|
-
return response;
|
|
212
|
-
};
|
|
213
|
-
exports.de_DescribeTableCommand = de_DescribeTableCommand;
|
|
214
|
-
const de_DescribeTableCommandError = async (output, context) => {
|
|
215
|
-
const parsedOutput = {
|
|
216
|
-
...output,
|
|
217
|
-
body: await parseErrorBody(output.body, context),
|
|
218
|
-
};
|
|
219
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
220
|
-
switch (errorCode) {
|
|
221
|
-
case "DatabaseConnectionException":
|
|
222
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
223
|
-
throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
|
|
224
|
-
case "InternalServerException":
|
|
225
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
226
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
227
|
-
case "ValidationException":
|
|
228
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
229
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
230
|
-
default:
|
|
231
|
-
const parsedBody = parsedOutput.body;
|
|
232
|
-
return throwDefaultError({
|
|
233
|
-
output,
|
|
234
|
-
parsedBody,
|
|
235
|
-
errorCode,
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
const de_ExecuteStatementCommand = async (output, context) => {
|
|
240
|
-
if (output.statusCode >= 300) {
|
|
241
|
-
return de_ExecuteStatementCommandError(output, context);
|
|
242
|
-
}
|
|
243
|
-
const data = await parseBody(output.body, context);
|
|
244
|
-
let contents = {};
|
|
245
|
-
contents = de_ExecuteStatementOutput(data, context);
|
|
246
|
-
const response = {
|
|
247
|
-
$metadata: deserializeMetadata(output),
|
|
248
|
-
...contents,
|
|
249
|
-
};
|
|
250
|
-
return response;
|
|
251
|
-
};
|
|
252
|
-
exports.de_ExecuteStatementCommand = de_ExecuteStatementCommand;
|
|
253
|
-
const de_ExecuteStatementCommandError = async (output, context) => {
|
|
254
|
-
const parsedOutput = {
|
|
255
|
-
...output,
|
|
256
|
-
body: await parseErrorBody(output.body, context),
|
|
257
|
-
};
|
|
258
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
259
|
-
switch (errorCode) {
|
|
260
|
-
case "ActiveStatementsExceededException":
|
|
261
|
-
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
262
|
-
throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
|
|
263
|
-
case "ExecuteStatementException":
|
|
264
|
-
case "com.amazonaws.redshiftdata#ExecuteStatementException":
|
|
265
|
-
throw await de_ExecuteStatementExceptionRes(parsedOutput, context);
|
|
266
|
-
case "ValidationException":
|
|
267
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
268
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
269
|
-
default:
|
|
270
|
-
const parsedBody = parsedOutput.body;
|
|
271
|
-
return throwDefaultError({
|
|
272
|
-
output,
|
|
273
|
-
parsedBody,
|
|
274
|
-
errorCode,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
const de_GetStatementResultCommand = async (output, context) => {
|
|
279
|
-
if (output.statusCode >= 300) {
|
|
280
|
-
return de_GetStatementResultCommandError(output, context);
|
|
281
|
-
}
|
|
282
|
-
const data = await parseBody(output.body, context);
|
|
283
|
-
let contents = {};
|
|
284
|
-
contents = de_GetStatementResultResponse(data, context);
|
|
285
|
-
const response = {
|
|
286
|
-
$metadata: deserializeMetadata(output),
|
|
287
|
-
...contents,
|
|
288
|
-
};
|
|
289
|
-
return response;
|
|
290
|
-
};
|
|
291
|
-
exports.de_GetStatementResultCommand = de_GetStatementResultCommand;
|
|
292
|
-
const de_GetStatementResultCommandError = async (output, context) => {
|
|
293
|
-
const parsedOutput = {
|
|
294
|
-
...output,
|
|
295
|
-
body: await parseErrorBody(output.body, context),
|
|
296
|
-
};
|
|
297
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
298
|
-
switch (errorCode) {
|
|
299
|
-
case "InternalServerException":
|
|
300
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
301
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
302
|
-
case "ResourceNotFoundException":
|
|
303
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
304
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
305
|
-
case "ValidationException":
|
|
306
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
307
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
308
|
-
default:
|
|
309
|
-
const parsedBody = parsedOutput.body;
|
|
310
|
-
return throwDefaultError({
|
|
311
|
-
output,
|
|
312
|
-
parsedBody,
|
|
313
|
-
errorCode,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
const de_ListDatabasesCommand = async (output, context) => {
|
|
318
|
-
if (output.statusCode >= 300) {
|
|
319
|
-
return de_ListDatabasesCommandError(output, context);
|
|
320
|
-
}
|
|
321
|
-
const data = await parseBody(output.body, context);
|
|
322
|
-
let contents = {};
|
|
323
|
-
contents = (0, smithy_client_1._json)(data);
|
|
324
|
-
const response = {
|
|
325
|
-
$metadata: deserializeMetadata(output),
|
|
326
|
-
...contents,
|
|
327
|
-
};
|
|
328
|
-
return response;
|
|
329
|
-
};
|
|
330
|
-
exports.de_ListDatabasesCommand = de_ListDatabasesCommand;
|
|
331
|
-
const de_ListDatabasesCommandError = async (output, context) => {
|
|
332
|
-
const parsedOutput = {
|
|
333
|
-
...output,
|
|
334
|
-
body: await parseErrorBody(output.body, context),
|
|
335
|
-
};
|
|
336
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
337
|
-
switch (errorCode) {
|
|
338
|
-
case "DatabaseConnectionException":
|
|
339
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
340
|
-
throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
|
|
341
|
-
case "InternalServerException":
|
|
342
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
343
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
344
|
-
case "ValidationException":
|
|
345
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
346
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
347
|
-
default:
|
|
348
|
-
const parsedBody = parsedOutput.body;
|
|
349
|
-
return throwDefaultError({
|
|
350
|
-
output,
|
|
351
|
-
parsedBody,
|
|
352
|
-
errorCode,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
const de_ListSchemasCommand = async (output, context) => {
|
|
357
|
-
if (output.statusCode >= 300) {
|
|
358
|
-
return de_ListSchemasCommandError(output, context);
|
|
359
|
-
}
|
|
360
|
-
const data = await parseBody(output.body, context);
|
|
361
|
-
let contents = {};
|
|
362
|
-
contents = (0, smithy_client_1._json)(data);
|
|
363
|
-
const response = {
|
|
364
|
-
$metadata: deserializeMetadata(output),
|
|
365
|
-
...contents,
|
|
366
|
-
};
|
|
367
|
-
return response;
|
|
368
|
-
};
|
|
369
|
-
exports.de_ListSchemasCommand = de_ListSchemasCommand;
|
|
370
|
-
const de_ListSchemasCommandError = async (output, context) => {
|
|
371
|
-
const parsedOutput = {
|
|
372
|
-
...output,
|
|
373
|
-
body: await parseErrorBody(output.body, context),
|
|
374
|
-
};
|
|
375
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
376
|
-
switch (errorCode) {
|
|
377
|
-
case "DatabaseConnectionException":
|
|
378
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
379
|
-
throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
|
|
380
|
-
case "InternalServerException":
|
|
381
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
382
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
383
|
-
case "ValidationException":
|
|
384
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
385
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
386
|
-
default:
|
|
387
|
-
const parsedBody = parsedOutput.body;
|
|
388
|
-
return throwDefaultError({
|
|
389
|
-
output,
|
|
390
|
-
parsedBody,
|
|
391
|
-
errorCode,
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
const de_ListStatementsCommand = async (output, context) => {
|
|
396
|
-
if (output.statusCode >= 300) {
|
|
397
|
-
return de_ListStatementsCommandError(output, context);
|
|
398
|
-
}
|
|
399
|
-
const data = await parseBody(output.body, context);
|
|
400
|
-
let contents = {};
|
|
401
|
-
contents = de_ListStatementsResponse(data, context);
|
|
402
|
-
const response = {
|
|
403
|
-
$metadata: deserializeMetadata(output),
|
|
404
|
-
...contents,
|
|
405
|
-
};
|
|
406
|
-
return response;
|
|
407
|
-
};
|
|
408
|
-
exports.de_ListStatementsCommand = de_ListStatementsCommand;
|
|
409
|
-
const de_ListStatementsCommandError = async (output, context) => {
|
|
410
|
-
const parsedOutput = {
|
|
411
|
-
...output,
|
|
412
|
-
body: await parseErrorBody(output.body, context),
|
|
413
|
-
};
|
|
414
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
415
|
-
switch (errorCode) {
|
|
416
|
-
case "InternalServerException":
|
|
417
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
418
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
419
|
-
case "ValidationException":
|
|
420
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
421
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
422
|
-
default:
|
|
423
|
-
const parsedBody = parsedOutput.body;
|
|
424
|
-
return throwDefaultError({
|
|
425
|
-
output,
|
|
426
|
-
parsedBody,
|
|
427
|
-
errorCode,
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
const de_ListTablesCommand = async (output, context) => {
|
|
432
|
-
if (output.statusCode >= 300) {
|
|
433
|
-
return de_ListTablesCommandError(output, context);
|
|
434
|
-
}
|
|
435
|
-
const data = await parseBody(output.body, context);
|
|
436
|
-
let contents = {};
|
|
437
|
-
contents = (0, smithy_client_1._json)(data);
|
|
438
|
-
const response = {
|
|
439
|
-
$metadata: deserializeMetadata(output),
|
|
440
|
-
...contents,
|
|
441
|
-
};
|
|
442
|
-
return response;
|
|
443
|
-
};
|
|
444
|
-
exports.de_ListTablesCommand = de_ListTablesCommand;
|
|
445
|
-
const de_ListTablesCommandError = async (output, context) => {
|
|
446
|
-
const parsedOutput = {
|
|
447
|
-
...output,
|
|
448
|
-
body: await parseErrorBody(output.body, context),
|
|
449
|
-
};
|
|
450
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
451
|
-
switch (errorCode) {
|
|
452
|
-
case "DatabaseConnectionException":
|
|
453
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
454
|
-
throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
|
|
455
|
-
case "InternalServerException":
|
|
456
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
457
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
458
|
-
case "ValidationException":
|
|
459
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
460
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
461
|
-
default:
|
|
462
|
-
const parsedBody = parsedOutput.body;
|
|
463
|
-
return throwDefaultError({
|
|
464
|
-
output,
|
|
465
|
-
parsedBody,
|
|
466
|
-
errorCode,
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
const de_ActiveStatementsExceededExceptionRes = async (parsedOutput, context) => {
|
|
471
|
-
const body = parsedOutput.body;
|
|
472
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
473
|
-
const exception = new models_0_1.ActiveStatementsExceededException({
|
|
474
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
475
|
-
...deserialized,
|
|
476
|
-
});
|
|
477
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
478
|
-
};
|
|
479
|
-
const de_BatchExecuteStatementExceptionRes = async (parsedOutput, context) => {
|
|
480
|
-
const body = parsedOutput.body;
|
|
481
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
482
|
-
const exception = new models_0_1.BatchExecuteStatementException({
|
|
483
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
484
|
-
...deserialized,
|
|
485
|
-
});
|
|
486
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
487
|
-
};
|
|
488
|
-
const de_DatabaseConnectionExceptionRes = async (parsedOutput, context) => {
|
|
489
|
-
const body = parsedOutput.body;
|
|
490
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
491
|
-
const exception = new models_0_1.DatabaseConnectionException({
|
|
492
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
493
|
-
...deserialized,
|
|
494
|
-
});
|
|
495
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
496
|
-
};
|
|
497
|
-
const de_ExecuteStatementExceptionRes = async (parsedOutput, context) => {
|
|
498
|
-
const body = parsedOutput.body;
|
|
499
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
500
|
-
const exception = new models_0_1.ExecuteStatementException({
|
|
501
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
502
|
-
...deserialized,
|
|
503
|
-
});
|
|
504
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
505
|
-
};
|
|
506
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
507
|
-
const body = parsedOutput.body;
|
|
508
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
509
|
-
const exception = new models_0_1.InternalServerException({
|
|
510
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
511
|
-
...deserialized,
|
|
512
|
-
});
|
|
513
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
514
|
-
};
|
|
515
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
516
|
-
const body = parsedOutput.body;
|
|
517
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
518
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
519
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
520
|
-
...deserialized,
|
|
521
|
-
});
|
|
522
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
523
|
-
};
|
|
524
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
525
|
-
const body = parsedOutput.body;
|
|
526
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
527
|
-
const exception = new models_0_1.ValidationException({
|
|
528
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
529
|
-
...deserialized,
|
|
530
|
-
});
|
|
531
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
532
|
-
};
|
|
533
|
-
const se_BatchExecuteStatementInput = (input, context) => {
|
|
534
|
-
return (0, smithy_client_1.take)(input, {
|
|
535
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
536
|
-
ClusterIdentifier: [],
|
|
537
|
-
Database: [],
|
|
538
|
-
DbUser: [],
|
|
539
|
-
SecretArn: [],
|
|
540
|
-
Sqls: smithy_client_1._json,
|
|
541
|
-
StatementName: [],
|
|
542
|
-
WithEvent: [],
|
|
543
|
-
WorkgroupName: [],
|
|
544
|
-
});
|
|
545
|
-
};
|
|
546
|
-
const se_ExecuteStatementInput = (input, context) => {
|
|
547
|
-
return (0, smithy_client_1.take)(input, {
|
|
548
|
-
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
549
|
-
ClusterIdentifier: [],
|
|
550
|
-
Database: [],
|
|
551
|
-
DbUser: [],
|
|
552
|
-
Parameters: smithy_client_1._json,
|
|
553
|
-
SecretArn: [],
|
|
554
|
-
Sql: [],
|
|
555
|
-
StatementName: [],
|
|
556
|
-
WithEvent: [],
|
|
557
|
-
WorkgroupName: [],
|
|
558
|
-
});
|
|
559
|
-
};
|
|
560
|
-
const de_BatchExecuteStatementOutput = (output, context) => {
|
|
561
|
-
return (0, smithy_client_1.take)(output, {
|
|
562
|
-
ClusterIdentifier: smithy_client_1.expectString,
|
|
563
|
-
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
564
|
-
Database: smithy_client_1.expectString,
|
|
565
|
-
DbUser: smithy_client_1.expectString,
|
|
566
|
-
Id: smithy_client_1.expectString,
|
|
567
|
-
SecretArn: smithy_client_1.expectString,
|
|
568
|
-
WorkgroupName: smithy_client_1.expectString,
|
|
569
|
-
});
|
|
570
|
-
};
|
|
571
|
-
const de_DescribeStatementResponse = (output, context) => {
|
|
572
|
-
return (0, smithy_client_1.take)(output, {
|
|
573
|
-
ClusterIdentifier: smithy_client_1.expectString,
|
|
574
|
-
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
575
|
-
Database: smithy_client_1.expectString,
|
|
576
|
-
DbUser: smithy_client_1.expectString,
|
|
577
|
-
Duration: smithy_client_1.expectLong,
|
|
578
|
-
Error: smithy_client_1.expectString,
|
|
579
|
-
HasResultSet: smithy_client_1.expectBoolean,
|
|
580
|
-
Id: smithy_client_1.expectString,
|
|
581
|
-
QueryParameters: smithy_client_1._json,
|
|
582
|
-
QueryString: smithy_client_1.expectString,
|
|
583
|
-
RedshiftPid: smithy_client_1.expectLong,
|
|
584
|
-
RedshiftQueryId: smithy_client_1.expectLong,
|
|
585
|
-
ResultRows: smithy_client_1.expectLong,
|
|
586
|
-
ResultSize: smithy_client_1.expectLong,
|
|
587
|
-
SecretArn: smithy_client_1.expectString,
|
|
588
|
-
Status: smithy_client_1.expectString,
|
|
589
|
-
SubStatements: (_) => de_SubStatementList(_, context),
|
|
590
|
-
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
591
|
-
WorkgroupName: smithy_client_1.expectString,
|
|
592
|
-
});
|
|
593
|
-
};
|
|
594
|
-
const de_ExecuteStatementOutput = (output, context) => {
|
|
595
|
-
return (0, smithy_client_1.take)(output, {
|
|
596
|
-
ClusterIdentifier: smithy_client_1.expectString,
|
|
597
|
-
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
598
|
-
Database: smithy_client_1.expectString,
|
|
599
|
-
DbUser: smithy_client_1.expectString,
|
|
600
|
-
Id: smithy_client_1.expectString,
|
|
601
|
-
SecretArn: smithy_client_1.expectString,
|
|
602
|
-
WorkgroupName: smithy_client_1.expectString,
|
|
603
|
-
});
|
|
604
|
-
};
|
|
605
|
-
const de_Field = (output, context) => {
|
|
606
|
-
if (output.blobValue != null) {
|
|
607
|
-
return {
|
|
608
|
-
blobValue: context.base64Decoder(output.blobValue),
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
if ((0, smithy_client_1.expectBoolean)(output.booleanValue) !== undefined) {
|
|
612
|
-
return { booleanValue: (0, smithy_client_1.expectBoolean)(output.booleanValue) };
|
|
613
|
-
}
|
|
614
|
-
if ((0, smithy_client_1.limitedParseDouble)(output.doubleValue) !== undefined) {
|
|
615
|
-
return { doubleValue: (0, smithy_client_1.limitedParseDouble)(output.doubleValue) };
|
|
616
|
-
}
|
|
617
|
-
if ((0, smithy_client_1.expectBoolean)(output.isNull) !== undefined) {
|
|
618
|
-
return { isNull: (0, smithy_client_1.expectBoolean)(output.isNull) };
|
|
619
|
-
}
|
|
620
|
-
if ((0, smithy_client_1.expectLong)(output.longValue) !== undefined) {
|
|
621
|
-
return { longValue: (0, smithy_client_1.expectLong)(output.longValue) };
|
|
622
|
-
}
|
|
623
|
-
if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
|
|
624
|
-
return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
|
|
625
|
-
}
|
|
626
|
-
return { $unknown: Object.entries(output)[0] };
|
|
627
|
-
};
|
|
628
|
-
const de_FieldList = (output, context) => {
|
|
629
|
-
const retVal = (output || [])
|
|
630
|
-
.filter((e) => e != null)
|
|
631
|
-
.map((entry) => {
|
|
632
|
-
return de_Field((0, core_1.awsExpectUnion)(entry), context);
|
|
633
|
-
});
|
|
634
|
-
return retVal;
|
|
635
|
-
};
|
|
636
|
-
const de_GetStatementResultResponse = (output, context) => {
|
|
637
|
-
return (0, smithy_client_1.take)(output, {
|
|
638
|
-
ColumnMetadata: smithy_client_1._json,
|
|
639
|
-
NextToken: smithy_client_1.expectString,
|
|
640
|
-
Records: (_) => de_SqlRecords(_, context),
|
|
641
|
-
TotalNumRows: smithy_client_1.expectLong,
|
|
642
|
-
});
|
|
643
|
-
};
|
|
644
|
-
const de_ListStatementsResponse = (output, context) => {
|
|
645
|
-
return (0, smithy_client_1.take)(output, {
|
|
646
|
-
NextToken: smithy_client_1.expectString,
|
|
647
|
-
Statements: (_) => de_StatementList(_, context),
|
|
648
|
-
});
|
|
649
|
-
};
|
|
650
|
-
const de_SqlRecords = (output, context) => {
|
|
651
|
-
const retVal = (output || [])
|
|
652
|
-
.filter((e) => e != null)
|
|
653
|
-
.map((entry) => {
|
|
654
|
-
return de_FieldList(entry, context);
|
|
655
|
-
});
|
|
656
|
-
return retVal;
|
|
657
|
-
};
|
|
658
|
-
const de_StatementData = (output, context) => {
|
|
659
|
-
return (0, smithy_client_1.take)(output, {
|
|
660
|
-
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
661
|
-
Id: smithy_client_1.expectString,
|
|
662
|
-
IsBatchStatement: smithy_client_1.expectBoolean,
|
|
663
|
-
QueryParameters: smithy_client_1._json,
|
|
664
|
-
QueryString: smithy_client_1.expectString,
|
|
665
|
-
QueryStrings: smithy_client_1._json,
|
|
666
|
-
SecretArn: smithy_client_1.expectString,
|
|
667
|
-
StatementName: smithy_client_1.expectString,
|
|
668
|
-
Status: smithy_client_1.expectString,
|
|
669
|
-
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
670
|
-
});
|
|
671
|
-
};
|
|
672
|
-
const de_StatementList = (output, context) => {
|
|
673
|
-
const retVal = (output || [])
|
|
674
|
-
.filter((e) => e != null)
|
|
675
|
-
.map((entry) => {
|
|
676
|
-
return de_StatementData(entry, context);
|
|
677
|
-
});
|
|
678
|
-
return retVal;
|
|
679
|
-
};
|
|
680
|
-
const de_SubStatementData = (output, context) => {
|
|
681
|
-
return (0, smithy_client_1.take)(output, {
|
|
682
|
-
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
683
|
-
Duration: smithy_client_1.expectLong,
|
|
684
|
-
Error: smithy_client_1.expectString,
|
|
685
|
-
HasResultSet: smithy_client_1.expectBoolean,
|
|
686
|
-
Id: smithy_client_1.expectString,
|
|
687
|
-
QueryString: smithy_client_1.expectString,
|
|
688
|
-
RedshiftQueryId: smithy_client_1.expectLong,
|
|
689
|
-
ResultRows: smithy_client_1.expectLong,
|
|
690
|
-
ResultSize: smithy_client_1.expectLong,
|
|
691
|
-
Status: smithy_client_1.expectString,
|
|
692
|
-
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
693
|
-
});
|
|
694
|
-
};
|
|
695
|
-
const de_SubStatementList = (output, context) => {
|
|
696
|
-
const retVal = (output || [])
|
|
697
|
-
.filter((e) => e != null)
|
|
698
|
-
.map((entry) => {
|
|
699
|
-
return de_SubStatementData(entry, context);
|
|
700
|
-
});
|
|
701
|
-
return retVal;
|
|
702
|
-
};
|
|
703
|
-
const deserializeMetadata = (output) => ({
|
|
704
|
-
httpStatusCode: output.statusCode,
|
|
705
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
706
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
707
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
708
|
-
});
|
|
709
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
710
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(RedshiftDataServiceException_1.RedshiftDataServiceException);
|
|
711
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
712
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
713
|
-
const contents = {
|
|
714
|
-
protocol,
|
|
715
|
-
hostname,
|
|
716
|
-
port,
|
|
717
|
-
method: "POST",
|
|
718
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
719
|
-
headers,
|
|
720
|
-
};
|
|
721
|
-
if (resolvedHostname !== undefined) {
|
|
722
|
-
contents.hostname = resolvedHostname;
|
|
723
|
-
}
|
|
724
|
-
if (body !== undefined) {
|
|
725
|
-
contents.body = body;
|
|
726
|
-
}
|
|
727
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
728
|
-
};
|
|
729
|
-
function sharedHeaders(operation) {
|
|
730
|
-
return {
|
|
731
|
-
"content-type": "application/x-amz-json-1.1",
|
|
732
|
-
"x-amz-target": `RedshiftData.${operation}`,
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
736
|
-
if (encoded.length) {
|
|
737
|
-
return JSON.parse(encoded);
|
|
738
|
-
}
|
|
739
|
-
return {};
|
|
740
|
-
});
|
|
741
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
742
|
-
const value = await parseBody(errorBody, context);
|
|
743
|
-
value.message = value.message ?? value.Message;
|
|
744
|
-
return value;
|
|
745
|
-
};
|
|
746
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
747
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
748
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
749
|
-
let cleanValue = rawValue;
|
|
750
|
-
if (typeof cleanValue === "number") {
|
|
751
|
-
cleanValue = cleanValue.toString();
|
|
752
|
-
}
|
|
753
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
754
|
-
cleanValue = cleanValue.split(",")[0];
|
|
755
|
-
}
|
|
756
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
757
|
-
cleanValue = cleanValue.split(":")[0];
|
|
758
|
-
}
|
|
759
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
760
|
-
cleanValue = cleanValue.split("#")[1];
|
|
761
|
-
}
|
|
762
|
-
return cleanValue;
|
|
763
|
-
};
|
|
764
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
765
|
-
if (headerKey !== undefined) {
|
|
766
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
767
|
-
}
|
|
768
|
-
if (data.code !== undefined) {
|
|
769
|
-
return sanitizeErrorCode(data.code);
|
|
770
|
-
}
|
|
771
|
-
if (data["__type"] !== undefined) {
|
|
772
|
-
return sanitizeErrorCode(data["__type"]);
|
|
773
|
-
}
|
|
774
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|