@aws-sdk/client-rds-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/RDSData.js +1 -23
- package/dist-cjs/RDSDataClient.js +1 -43
- package/dist-cjs/commands/BatchExecuteStatementCommand.js +1 -28
- package/dist-cjs/commands/BeginTransactionCommand.js +1 -28
- package/dist-cjs/commands/CommitTransactionCommand.js +1 -28
- package/dist-cjs/commands/ExecuteSqlCommand.js +1 -28
- package/dist-cjs/commands/ExecuteStatementCommand.js +1 -28
- package/dist-cjs/commands/RollbackTransactionCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -9
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1645 -10
- package/dist-cjs/models/RDSDataServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -282
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1022
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1022 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_RollbackTransactionCommand = exports.de_ExecuteStatementCommand = exports.de_ExecuteSqlCommand = exports.de_CommitTransactionCommand = exports.de_BeginTransactionCommand = exports.de_BatchExecuteStatementCommand = exports.se_RollbackTransactionCommand = exports.se_ExecuteStatementCommand = exports.se_ExecuteSqlCommand = exports.se_CommitTransactionCommand = exports.se_BeginTransactionCommand = exports.se_BatchExecuteStatementCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const core_2 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const RDSDataServiceException_1 = require("../models/RDSDataServiceException");
|
|
9
|
-
const se_BatchExecuteStatementCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/BatchExecute");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
database: [],
|
|
18
|
-
parameterSets: (_) => se_SqlParameterSets(_, context),
|
|
19
|
-
resourceArn: [],
|
|
20
|
-
schema: [],
|
|
21
|
-
secretArn: [],
|
|
22
|
-
sql: [],
|
|
23
|
-
transactionId: [],
|
|
24
|
-
}));
|
|
25
|
-
b.m("POST").h(headers).b(body);
|
|
26
|
-
return b.build();
|
|
27
|
-
};
|
|
28
|
-
exports.se_BatchExecuteStatementCommand = se_BatchExecuteStatementCommand;
|
|
29
|
-
const se_BeginTransactionCommand = async (input, context) => {
|
|
30
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
31
|
-
const headers = {
|
|
32
|
-
"content-type": "application/json",
|
|
33
|
-
};
|
|
34
|
-
b.bp("/BeginTransaction");
|
|
35
|
-
let body;
|
|
36
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
37
|
-
database: [],
|
|
38
|
-
resourceArn: [],
|
|
39
|
-
schema: [],
|
|
40
|
-
secretArn: [],
|
|
41
|
-
}));
|
|
42
|
-
b.m("POST").h(headers).b(body);
|
|
43
|
-
return b.build();
|
|
44
|
-
};
|
|
45
|
-
exports.se_BeginTransactionCommand = se_BeginTransactionCommand;
|
|
46
|
-
const se_CommitTransactionCommand = async (input, context) => {
|
|
47
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
48
|
-
const headers = {
|
|
49
|
-
"content-type": "application/json",
|
|
50
|
-
};
|
|
51
|
-
b.bp("/CommitTransaction");
|
|
52
|
-
let body;
|
|
53
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
54
|
-
resourceArn: [],
|
|
55
|
-
secretArn: [],
|
|
56
|
-
transactionId: [],
|
|
57
|
-
}));
|
|
58
|
-
b.m("POST").h(headers).b(body);
|
|
59
|
-
return b.build();
|
|
60
|
-
};
|
|
61
|
-
exports.se_CommitTransactionCommand = se_CommitTransactionCommand;
|
|
62
|
-
const se_ExecuteSqlCommand = async (input, context) => {
|
|
63
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
64
|
-
const headers = {
|
|
65
|
-
"content-type": "application/json",
|
|
66
|
-
};
|
|
67
|
-
b.bp("/ExecuteSql");
|
|
68
|
-
let body;
|
|
69
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
70
|
-
awsSecretStoreArn: [],
|
|
71
|
-
database: [],
|
|
72
|
-
dbClusterOrInstanceArn: [],
|
|
73
|
-
schema: [],
|
|
74
|
-
sqlStatements: [],
|
|
75
|
-
}));
|
|
76
|
-
b.m("POST").h(headers).b(body);
|
|
77
|
-
return b.build();
|
|
78
|
-
};
|
|
79
|
-
exports.se_ExecuteSqlCommand = se_ExecuteSqlCommand;
|
|
80
|
-
const se_ExecuteStatementCommand = async (input, context) => {
|
|
81
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
82
|
-
const headers = {
|
|
83
|
-
"content-type": "application/json",
|
|
84
|
-
};
|
|
85
|
-
b.bp("/Execute");
|
|
86
|
-
let body;
|
|
87
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
88
|
-
continueAfterTimeout: [],
|
|
89
|
-
database: [],
|
|
90
|
-
formatRecordsAs: [],
|
|
91
|
-
includeResultMetadata: [],
|
|
92
|
-
parameters: (_) => se_SqlParametersList(_, context),
|
|
93
|
-
resourceArn: [],
|
|
94
|
-
resultSetOptions: (_) => (0, smithy_client_1._json)(_),
|
|
95
|
-
schema: [],
|
|
96
|
-
secretArn: [],
|
|
97
|
-
sql: [],
|
|
98
|
-
transactionId: [],
|
|
99
|
-
}));
|
|
100
|
-
b.m("POST").h(headers).b(body);
|
|
101
|
-
return b.build();
|
|
102
|
-
};
|
|
103
|
-
exports.se_ExecuteStatementCommand = se_ExecuteStatementCommand;
|
|
104
|
-
const se_RollbackTransactionCommand = async (input, context) => {
|
|
105
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
106
|
-
const headers = {
|
|
107
|
-
"content-type": "application/json",
|
|
108
|
-
};
|
|
109
|
-
b.bp("/RollbackTransaction");
|
|
110
|
-
let body;
|
|
111
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
112
|
-
resourceArn: [],
|
|
113
|
-
secretArn: [],
|
|
114
|
-
transactionId: [],
|
|
115
|
-
}));
|
|
116
|
-
b.m("POST").h(headers).b(body);
|
|
117
|
-
return b.build();
|
|
118
|
-
};
|
|
119
|
-
exports.se_RollbackTransactionCommand = se_RollbackTransactionCommand;
|
|
120
|
-
const de_BatchExecuteStatementCommand = async (output, context) => {
|
|
121
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
122
|
-
return de_BatchExecuteStatementCommandError(output, context);
|
|
123
|
-
}
|
|
124
|
-
const contents = (0, smithy_client_1.map)({
|
|
125
|
-
$metadata: deserializeMetadata(output),
|
|
126
|
-
});
|
|
127
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
128
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
129
|
-
updateResults: (_) => de_UpdateResults(_, context),
|
|
130
|
-
});
|
|
131
|
-
Object.assign(contents, doc);
|
|
132
|
-
return contents;
|
|
133
|
-
};
|
|
134
|
-
exports.de_BatchExecuteStatementCommand = de_BatchExecuteStatementCommand;
|
|
135
|
-
const de_BatchExecuteStatementCommandError = async (output, context) => {
|
|
136
|
-
const parsedOutput = {
|
|
137
|
-
...output,
|
|
138
|
-
body: await parseErrorBody(output.body, context),
|
|
139
|
-
};
|
|
140
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
141
|
-
switch (errorCode) {
|
|
142
|
-
case "AccessDeniedException":
|
|
143
|
-
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
144
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
145
|
-
case "BadRequestException":
|
|
146
|
-
case "com.amazonaws.rdsdata#BadRequestException":
|
|
147
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
148
|
-
case "DatabaseErrorException":
|
|
149
|
-
case "com.amazonaws.rdsdata#DatabaseErrorException":
|
|
150
|
-
throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
|
|
151
|
-
case "DatabaseNotFoundException":
|
|
152
|
-
case "com.amazonaws.rdsdata#DatabaseNotFoundException":
|
|
153
|
-
throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
|
|
154
|
-
case "DatabaseUnavailableException":
|
|
155
|
-
case "com.amazonaws.rdsdata#DatabaseUnavailableException":
|
|
156
|
-
throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
|
|
157
|
-
case "ForbiddenException":
|
|
158
|
-
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
159
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
160
|
-
case "HttpEndpointNotEnabledException":
|
|
161
|
-
case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
|
|
162
|
-
throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
|
|
163
|
-
case "InternalServerErrorException":
|
|
164
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
165
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
166
|
-
case "InvalidSecretException":
|
|
167
|
-
case "com.amazonaws.rdsdata#InvalidSecretException":
|
|
168
|
-
throw await de_InvalidSecretExceptionRes(parsedOutput, context);
|
|
169
|
-
case "SecretsErrorException":
|
|
170
|
-
case "com.amazonaws.rdsdata#SecretsErrorException":
|
|
171
|
-
throw await de_SecretsErrorExceptionRes(parsedOutput, context);
|
|
172
|
-
case "ServiceUnavailableError":
|
|
173
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
174
|
-
throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
|
|
175
|
-
case "StatementTimeoutException":
|
|
176
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
177
|
-
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
178
|
-
case "TransactionNotFoundException":
|
|
179
|
-
case "com.amazonaws.rdsdata#TransactionNotFoundException":
|
|
180
|
-
throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
|
|
181
|
-
default:
|
|
182
|
-
const parsedBody = parsedOutput.body;
|
|
183
|
-
return throwDefaultError({
|
|
184
|
-
output,
|
|
185
|
-
parsedBody,
|
|
186
|
-
errorCode,
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
const de_BeginTransactionCommand = async (output, context) => {
|
|
191
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
192
|
-
return de_BeginTransactionCommandError(output, context);
|
|
193
|
-
}
|
|
194
|
-
const contents = (0, smithy_client_1.map)({
|
|
195
|
-
$metadata: deserializeMetadata(output),
|
|
196
|
-
});
|
|
197
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
198
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
199
|
-
transactionId: smithy_client_1.expectString,
|
|
200
|
-
});
|
|
201
|
-
Object.assign(contents, doc);
|
|
202
|
-
return contents;
|
|
203
|
-
};
|
|
204
|
-
exports.de_BeginTransactionCommand = de_BeginTransactionCommand;
|
|
205
|
-
const de_BeginTransactionCommandError = async (output, context) => {
|
|
206
|
-
const parsedOutput = {
|
|
207
|
-
...output,
|
|
208
|
-
body: await parseErrorBody(output.body, context),
|
|
209
|
-
};
|
|
210
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
211
|
-
switch (errorCode) {
|
|
212
|
-
case "AccessDeniedException":
|
|
213
|
-
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
214
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
215
|
-
case "BadRequestException":
|
|
216
|
-
case "com.amazonaws.rdsdata#BadRequestException":
|
|
217
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
218
|
-
case "DatabaseErrorException":
|
|
219
|
-
case "com.amazonaws.rdsdata#DatabaseErrorException":
|
|
220
|
-
throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
|
|
221
|
-
case "DatabaseNotFoundException":
|
|
222
|
-
case "com.amazonaws.rdsdata#DatabaseNotFoundException":
|
|
223
|
-
throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
|
|
224
|
-
case "DatabaseUnavailableException":
|
|
225
|
-
case "com.amazonaws.rdsdata#DatabaseUnavailableException":
|
|
226
|
-
throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
|
|
227
|
-
case "ForbiddenException":
|
|
228
|
-
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
229
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
230
|
-
case "HttpEndpointNotEnabledException":
|
|
231
|
-
case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
|
|
232
|
-
throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
|
|
233
|
-
case "InternalServerErrorException":
|
|
234
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
235
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
236
|
-
case "InvalidSecretException":
|
|
237
|
-
case "com.amazonaws.rdsdata#InvalidSecretException":
|
|
238
|
-
throw await de_InvalidSecretExceptionRes(parsedOutput, context);
|
|
239
|
-
case "SecretsErrorException":
|
|
240
|
-
case "com.amazonaws.rdsdata#SecretsErrorException":
|
|
241
|
-
throw await de_SecretsErrorExceptionRes(parsedOutput, context);
|
|
242
|
-
case "ServiceUnavailableError":
|
|
243
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
244
|
-
throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
|
|
245
|
-
case "StatementTimeoutException":
|
|
246
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
247
|
-
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
248
|
-
case "TransactionNotFoundException":
|
|
249
|
-
case "com.amazonaws.rdsdata#TransactionNotFoundException":
|
|
250
|
-
throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
|
|
251
|
-
default:
|
|
252
|
-
const parsedBody = parsedOutput.body;
|
|
253
|
-
return throwDefaultError({
|
|
254
|
-
output,
|
|
255
|
-
parsedBody,
|
|
256
|
-
errorCode,
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
const de_CommitTransactionCommand = async (output, context) => {
|
|
261
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
262
|
-
return de_CommitTransactionCommandError(output, context);
|
|
263
|
-
}
|
|
264
|
-
const contents = (0, smithy_client_1.map)({
|
|
265
|
-
$metadata: deserializeMetadata(output),
|
|
266
|
-
});
|
|
267
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
268
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
269
|
-
transactionStatus: smithy_client_1.expectString,
|
|
270
|
-
});
|
|
271
|
-
Object.assign(contents, doc);
|
|
272
|
-
return contents;
|
|
273
|
-
};
|
|
274
|
-
exports.de_CommitTransactionCommand = de_CommitTransactionCommand;
|
|
275
|
-
const de_CommitTransactionCommandError = 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 "AccessDeniedException":
|
|
283
|
-
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
284
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
285
|
-
case "BadRequestException":
|
|
286
|
-
case "com.amazonaws.rdsdata#BadRequestException":
|
|
287
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
288
|
-
case "DatabaseErrorException":
|
|
289
|
-
case "com.amazonaws.rdsdata#DatabaseErrorException":
|
|
290
|
-
throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
|
|
291
|
-
case "DatabaseNotFoundException":
|
|
292
|
-
case "com.amazonaws.rdsdata#DatabaseNotFoundException":
|
|
293
|
-
throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
|
|
294
|
-
case "DatabaseUnavailableException":
|
|
295
|
-
case "com.amazonaws.rdsdata#DatabaseUnavailableException":
|
|
296
|
-
throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
|
|
297
|
-
case "ForbiddenException":
|
|
298
|
-
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
299
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
300
|
-
case "HttpEndpointNotEnabledException":
|
|
301
|
-
case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
|
|
302
|
-
throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
|
|
303
|
-
case "InternalServerErrorException":
|
|
304
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
305
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
306
|
-
case "InvalidSecretException":
|
|
307
|
-
case "com.amazonaws.rdsdata#InvalidSecretException":
|
|
308
|
-
throw await de_InvalidSecretExceptionRes(parsedOutput, context);
|
|
309
|
-
case "NotFoundException":
|
|
310
|
-
case "com.amazonaws.rdsdata#NotFoundException":
|
|
311
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
312
|
-
case "SecretsErrorException":
|
|
313
|
-
case "com.amazonaws.rdsdata#SecretsErrorException":
|
|
314
|
-
throw await de_SecretsErrorExceptionRes(parsedOutput, context);
|
|
315
|
-
case "ServiceUnavailableError":
|
|
316
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
317
|
-
throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
|
|
318
|
-
case "StatementTimeoutException":
|
|
319
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
320
|
-
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
321
|
-
case "TransactionNotFoundException":
|
|
322
|
-
case "com.amazonaws.rdsdata#TransactionNotFoundException":
|
|
323
|
-
throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
|
|
324
|
-
default:
|
|
325
|
-
const parsedBody = parsedOutput.body;
|
|
326
|
-
return throwDefaultError({
|
|
327
|
-
output,
|
|
328
|
-
parsedBody,
|
|
329
|
-
errorCode,
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
const de_ExecuteSqlCommand = async (output, context) => {
|
|
334
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
335
|
-
return de_ExecuteSqlCommandError(output, context);
|
|
336
|
-
}
|
|
337
|
-
const contents = (0, smithy_client_1.map)({
|
|
338
|
-
$metadata: deserializeMetadata(output),
|
|
339
|
-
});
|
|
340
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
341
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
342
|
-
sqlStatementResults: (_) => de_SqlStatementResults(_, context),
|
|
343
|
-
});
|
|
344
|
-
Object.assign(contents, doc);
|
|
345
|
-
return contents;
|
|
346
|
-
};
|
|
347
|
-
exports.de_ExecuteSqlCommand = de_ExecuteSqlCommand;
|
|
348
|
-
const de_ExecuteSqlCommandError = async (output, context) => {
|
|
349
|
-
const parsedOutput = {
|
|
350
|
-
...output,
|
|
351
|
-
body: await parseErrorBody(output.body, context),
|
|
352
|
-
};
|
|
353
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
354
|
-
switch (errorCode) {
|
|
355
|
-
case "AccessDeniedException":
|
|
356
|
-
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
357
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
358
|
-
case "BadRequestException":
|
|
359
|
-
case "com.amazonaws.rdsdata#BadRequestException":
|
|
360
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
361
|
-
case "ForbiddenException":
|
|
362
|
-
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
363
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
364
|
-
case "InternalServerErrorException":
|
|
365
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
366
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
367
|
-
case "ServiceUnavailableError":
|
|
368
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
369
|
-
throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
|
|
370
|
-
default:
|
|
371
|
-
const parsedBody = parsedOutput.body;
|
|
372
|
-
return throwDefaultError({
|
|
373
|
-
output,
|
|
374
|
-
parsedBody,
|
|
375
|
-
errorCode,
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
const de_ExecuteStatementCommand = async (output, context) => {
|
|
380
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
381
|
-
return de_ExecuteStatementCommandError(output, context);
|
|
382
|
-
}
|
|
383
|
-
const contents = (0, smithy_client_1.map)({
|
|
384
|
-
$metadata: deserializeMetadata(output),
|
|
385
|
-
});
|
|
386
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
387
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
388
|
-
columnMetadata: smithy_client_1._json,
|
|
389
|
-
formattedRecords: smithy_client_1.expectString,
|
|
390
|
-
generatedFields: (_) => de_FieldList(_, context),
|
|
391
|
-
numberOfRecordsUpdated: smithy_client_1.expectLong,
|
|
392
|
-
records: (_) => de_SqlRecords(_, context),
|
|
393
|
-
});
|
|
394
|
-
Object.assign(contents, doc);
|
|
395
|
-
return contents;
|
|
396
|
-
};
|
|
397
|
-
exports.de_ExecuteStatementCommand = de_ExecuteStatementCommand;
|
|
398
|
-
const de_ExecuteStatementCommandError = async (output, context) => {
|
|
399
|
-
const parsedOutput = {
|
|
400
|
-
...output,
|
|
401
|
-
body: await parseErrorBody(output.body, context),
|
|
402
|
-
};
|
|
403
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
404
|
-
switch (errorCode) {
|
|
405
|
-
case "AccessDeniedException":
|
|
406
|
-
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
407
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
408
|
-
case "BadRequestException":
|
|
409
|
-
case "com.amazonaws.rdsdata#BadRequestException":
|
|
410
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
411
|
-
case "DatabaseErrorException":
|
|
412
|
-
case "com.amazonaws.rdsdata#DatabaseErrorException":
|
|
413
|
-
throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
|
|
414
|
-
case "DatabaseNotFoundException":
|
|
415
|
-
case "com.amazonaws.rdsdata#DatabaseNotFoundException":
|
|
416
|
-
throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
|
|
417
|
-
case "DatabaseUnavailableException":
|
|
418
|
-
case "com.amazonaws.rdsdata#DatabaseUnavailableException":
|
|
419
|
-
throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
|
|
420
|
-
case "ForbiddenException":
|
|
421
|
-
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
422
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
423
|
-
case "HttpEndpointNotEnabledException":
|
|
424
|
-
case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
|
|
425
|
-
throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
|
|
426
|
-
case "InternalServerErrorException":
|
|
427
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
428
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
429
|
-
case "InvalidSecretException":
|
|
430
|
-
case "com.amazonaws.rdsdata#InvalidSecretException":
|
|
431
|
-
throw await de_InvalidSecretExceptionRes(parsedOutput, context);
|
|
432
|
-
case "SecretsErrorException":
|
|
433
|
-
case "com.amazonaws.rdsdata#SecretsErrorException":
|
|
434
|
-
throw await de_SecretsErrorExceptionRes(parsedOutput, context);
|
|
435
|
-
case "ServiceUnavailableError":
|
|
436
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
437
|
-
throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
|
|
438
|
-
case "StatementTimeoutException":
|
|
439
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
440
|
-
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
441
|
-
case "TransactionNotFoundException":
|
|
442
|
-
case "com.amazonaws.rdsdata#TransactionNotFoundException":
|
|
443
|
-
throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
|
|
444
|
-
case "UnsupportedResultException":
|
|
445
|
-
case "com.amazonaws.rdsdata#UnsupportedResultException":
|
|
446
|
-
throw await de_UnsupportedResultExceptionRes(parsedOutput, context);
|
|
447
|
-
default:
|
|
448
|
-
const parsedBody = parsedOutput.body;
|
|
449
|
-
return throwDefaultError({
|
|
450
|
-
output,
|
|
451
|
-
parsedBody,
|
|
452
|
-
errorCode,
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
const de_RollbackTransactionCommand = async (output, context) => {
|
|
457
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
458
|
-
return de_RollbackTransactionCommandError(output, context);
|
|
459
|
-
}
|
|
460
|
-
const contents = (0, smithy_client_1.map)({
|
|
461
|
-
$metadata: deserializeMetadata(output),
|
|
462
|
-
});
|
|
463
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
464
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
465
|
-
transactionStatus: smithy_client_1.expectString,
|
|
466
|
-
});
|
|
467
|
-
Object.assign(contents, doc);
|
|
468
|
-
return contents;
|
|
469
|
-
};
|
|
470
|
-
exports.de_RollbackTransactionCommand = de_RollbackTransactionCommand;
|
|
471
|
-
const de_RollbackTransactionCommandError = async (output, context) => {
|
|
472
|
-
const parsedOutput = {
|
|
473
|
-
...output,
|
|
474
|
-
body: await parseErrorBody(output.body, context),
|
|
475
|
-
};
|
|
476
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
477
|
-
switch (errorCode) {
|
|
478
|
-
case "AccessDeniedException":
|
|
479
|
-
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
480
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
481
|
-
case "BadRequestException":
|
|
482
|
-
case "com.amazonaws.rdsdata#BadRequestException":
|
|
483
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
484
|
-
case "DatabaseErrorException":
|
|
485
|
-
case "com.amazonaws.rdsdata#DatabaseErrorException":
|
|
486
|
-
throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
|
|
487
|
-
case "DatabaseNotFoundException":
|
|
488
|
-
case "com.amazonaws.rdsdata#DatabaseNotFoundException":
|
|
489
|
-
throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
|
|
490
|
-
case "DatabaseUnavailableException":
|
|
491
|
-
case "com.amazonaws.rdsdata#DatabaseUnavailableException":
|
|
492
|
-
throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
|
|
493
|
-
case "ForbiddenException":
|
|
494
|
-
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
495
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
496
|
-
case "HttpEndpointNotEnabledException":
|
|
497
|
-
case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
|
|
498
|
-
throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
|
|
499
|
-
case "InternalServerErrorException":
|
|
500
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
501
|
-
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
502
|
-
case "InvalidSecretException":
|
|
503
|
-
case "com.amazonaws.rdsdata#InvalidSecretException":
|
|
504
|
-
throw await de_InvalidSecretExceptionRes(parsedOutput, context);
|
|
505
|
-
case "NotFoundException":
|
|
506
|
-
case "com.amazonaws.rdsdata#NotFoundException":
|
|
507
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
508
|
-
case "SecretsErrorException":
|
|
509
|
-
case "com.amazonaws.rdsdata#SecretsErrorException":
|
|
510
|
-
throw await de_SecretsErrorExceptionRes(parsedOutput, context);
|
|
511
|
-
case "ServiceUnavailableError":
|
|
512
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
513
|
-
throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
|
|
514
|
-
case "StatementTimeoutException":
|
|
515
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
516
|
-
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
517
|
-
case "TransactionNotFoundException":
|
|
518
|
-
case "com.amazonaws.rdsdata#TransactionNotFoundException":
|
|
519
|
-
throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
|
|
520
|
-
default:
|
|
521
|
-
const parsedBody = parsedOutput.body;
|
|
522
|
-
return throwDefaultError({
|
|
523
|
-
output,
|
|
524
|
-
parsedBody,
|
|
525
|
-
errorCode,
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
};
|
|
529
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(RDSDataServiceException_1.RDSDataServiceException);
|
|
530
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
531
|
-
const contents = (0, smithy_client_1.map)({});
|
|
532
|
-
const data = parsedOutput.body;
|
|
533
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
534
|
-
message: smithy_client_1.expectString,
|
|
535
|
-
});
|
|
536
|
-
Object.assign(contents, doc);
|
|
537
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
538
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
539
|
-
...contents,
|
|
540
|
-
});
|
|
541
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
542
|
-
};
|
|
543
|
-
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
544
|
-
const contents = (0, smithy_client_1.map)({});
|
|
545
|
-
const data = parsedOutput.body;
|
|
546
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
547
|
-
message: smithy_client_1.expectString,
|
|
548
|
-
});
|
|
549
|
-
Object.assign(contents, doc);
|
|
550
|
-
const exception = new models_0_1.BadRequestException({
|
|
551
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
552
|
-
...contents,
|
|
553
|
-
});
|
|
554
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
555
|
-
};
|
|
556
|
-
const de_DatabaseErrorExceptionRes = async (parsedOutput, context) => {
|
|
557
|
-
const contents = (0, smithy_client_1.map)({});
|
|
558
|
-
const data = parsedOutput.body;
|
|
559
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
560
|
-
message: smithy_client_1.expectString,
|
|
561
|
-
});
|
|
562
|
-
Object.assign(contents, doc);
|
|
563
|
-
const exception = new models_0_1.DatabaseErrorException({
|
|
564
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
565
|
-
...contents,
|
|
566
|
-
});
|
|
567
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
568
|
-
};
|
|
569
|
-
const de_DatabaseNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
570
|
-
const contents = (0, smithy_client_1.map)({});
|
|
571
|
-
const data = parsedOutput.body;
|
|
572
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
573
|
-
message: smithy_client_1.expectString,
|
|
574
|
-
});
|
|
575
|
-
Object.assign(contents, doc);
|
|
576
|
-
const exception = new models_0_1.DatabaseNotFoundException({
|
|
577
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
578
|
-
...contents,
|
|
579
|
-
});
|
|
580
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
581
|
-
};
|
|
582
|
-
const de_DatabaseUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
583
|
-
const contents = (0, smithy_client_1.map)({});
|
|
584
|
-
const data = parsedOutput.body;
|
|
585
|
-
const doc = (0, smithy_client_1.take)(data, {});
|
|
586
|
-
Object.assign(contents, doc);
|
|
587
|
-
const exception = new models_0_1.DatabaseUnavailableException({
|
|
588
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
589
|
-
...contents,
|
|
590
|
-
});
|
|
591
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
592
|
-
};
|
|
593
|
-
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
594
|
-
const contents = (0, smithy_client_1.map)({});
|
|
595
|
-
const data = parsedOutput.body;
|
|
596
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
597
|
-
message: smithy_client_1.expectString,
|
|
598
|
-
});
|
|
599
|
-
Object.assign(contents, doc);
|
|
600
|
-
const exception = new models_0_1.ForbiddenException({
|
|
601
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
602
|
-
...contents,
|
|
603
|
-
});
|
|
604
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
605
|
-
};
|
|
606
|
-
const de_HttpEndpointNotEnabledExceptionRes = async (parsedOutput, context) => {
|
|
607
|
-
const contents = (0, smithy_client_1.map)({});
|
|
608
|
-
const data = parsedOutput.body;
|
|
609
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
610
|
-
message: smithy_client_1.expectString,
|
|
611
|
-
});
|
|
612
|
-
Object.assign(contents, doc);
|
|
613
|
-
const exception = new models_0_1.HttpEndpointNotEnabledException({
|
|
614
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
615
|
-
...contents,
|
|
616
|
-
});
|
|
617
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
618
|
-
};
|
|
619
|
-
const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
|
|
620
|
-
const contents = (0, smithy_client_1.map)({});
|
|
621
|
-
const data = parsedOutput.body;
|
|
622
|
-
const doc = (0, smithy_client_1.take)(data, {});
|
|
623
|
-
Object.assign(contents, doc);
|
|
624
|
-
const exception = new models_0_1.InternalServerErrorException({
|
|
625
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
626
|
-
...contents,
|
|
627
|
-
});
|
|
628
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
629
|
-
};
|
|
630
|
-
const de_InvalidSecretExceptionRes = async (parsedOutput, context) => {
|
|
631
|
-
const contents = (0, smithy_client_1.map)({});
|
|
632
|
-
const data = parsedOutput.body;
|
|
633
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
634
|
-
message: smithy_client_1.expectString,
|
|
635
|
-
});
|
|
636
|
-
Object.assign(contents, doc);
|
|
637
|
-
const exception = new models_0_1.InvalidSecretException({
|
|
638
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
639
|
-
...contents,
|
|
640
|
-
});
|
|
641
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
642
|
-
};
|
|
643
|
-
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
644
|
-
const contents = (0, smithy_client_1.map)({});
|
|
645
|
-
const data = parsedOutput.body;
|
|
646
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
647
|
-
message: smithy_client_1.expectString,
|
|
648
|
-
});
|
|
649
|
-
Object.assign(contents, doc);
|
|
650
|
-
const exception = new models_0_1.NotFoundException({
|
|
651
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
652
|
-
...contents,
|
|
653
|
-
});
|
|
654
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
655
|
-
};
|
|
656
|
-
const de_SecretsErrorExceptionRes = async (parsedOutput, context) => {
|
|
657
|
-
const contents = (0, smithy_client_1.map)({});
|
|
658
|
-
const data = parsedOutput.body;
|
|
659
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
660
|
-
message: smithy_client_1.expectString,
|
|
661
|
-
});
|
|
662
|
-
Object.assign(contents, doc);
|
|
663
|
-
const exception = new models_0_1.SecretsErrorException({
|
|
664
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
665
|
-
...contents,
|
|
666
|
-
});
|
|
667
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
668
|
-
};
|
|
669
|
-
const de_ServiceUnavailableErrorRes = async (parsedOutput, context) => {
|
|
670
|
-
const contents = (0, smithy_client_1.map)({});
|
|
671
|
-
const data = parsedOutput.body;
|
|
672
|
-
const doc = (0, smithy_client_1.take)(data, {});
|
|
673
|
-
Object.assign(contents, doc);
|
|
674
|
-
const exception = new models_0_1.ServiceUnavailableError({
|
|
675
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
676
|
-
...contents,
|
|
677
|
-
});
|
|
678
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
679
|
-
};
|
|
680
|
-
const de_StatementTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
681
|
-
const contents = (0, smithy_client_1.map)({});
|
|
682
|
-
const data = parsedOutput.body;
|
|
683
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
684
|
-
dbConnectionId: smithy_client_1.expectLong,
|
|
685
|
-
message: smithy_client_1.expectString,
|
|
686
|
-
});
|
|
687
|
-
Object.assign(contents, doc);
|
|
688
|
-
const exception = new models_0_1.StatementTimeoutException({
|
|
689
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
690
|
-
...contents,
|
|
691
|
-
});
|
|
692
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
693
|
-
};
|
|
694
|
-
const de_TransactionNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
695
|
-
const contents = (0, smithy_client_1.map)({});
|
|
696
|
-
const data = parsedOutput.body;
|
|
697
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
698
|
-
message: smithy_client_1.expectString,
|
|
699
|
-
});
|
|
700
|
-
Object.assign(contents, doc);
|
|
701
|
-
const exception = new models_0_1.TransactionNotFoundException({
|
|
702
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
703
|
-
...contents,
|
|
704
|
-
});
|
|
705
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
706
|
-
};
|
|
707
|
-
const de_UnsupportedResultExceptionRes = async (parsedOutput, context) => {
|
|
708
|
-
const contents = (0, smithy_client_1.map)({});
|
|
709
|
-
const data = parsedOutput.body;
|
|
710
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
711
|
-
message: smithy_client_1.expectString,
|
|
712
|
-
});
|
|
713
|
-
Object.assign(contents, doc);
|
|
714
|
-
const exception = new models_0_1.UnsupportedResultException({
|
|
715
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
716
|
-
...contents,
|
|
717
|
-
});
|
|
718
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
719
|
-
};
|
|
720
|
-
const se_ArrayOfArray = (input, context) => {
|
|
721
|
-
return input
|
|
722
|
-
.filter((e) => e != null)
|
|
723
|
-
.map((entry) => {
|
|
724
|
-
return se_ArrayValue(entry, context);
|
|
725
|
-
});
|
|
726
|
-
};
|
|
727
|
-
const se_ArrayValue = (input, context) => {
|
|
728
|
-
return models_0_1.ArrayValue.visit(input, {
|
|
729
|
-
arrayValues: (value) => ({ arrayValues: se_ArrayOfArray(value, context) }),
|
|
730
|
-
booleanValues: (value) => ({ booleanValues: (0, smithy_client_1._json)(value) }),
|
|
731
|
-
doubleValues: (value) => ({ doubleValues: se_DoubleArray(value, context) }),
|
|
732
|
-
longValues: (value) => ({ longValues: (0, smithy_client_1._json)(value) }),
|
|
733
|
-
stringValues: (value) => ({ stringValues: (0, smithy_client_1._json)(value) }),
|
|
734
|
-
_: (name, value) => ({ name: value }),
|
|
735
|
-
});
|
|
736
|
-
};
|
|
737
|
-
const se_DoubleArray = (input, context) => {
|
|
738
|
-
return input
|
|
739
|
-
.filter((e) => e != null)
|
|
740
|
-
.map((entry) => {
|
|
741
|
-
return (0, smithy_client_1.serializeFloat)(entry);
|
|
742
|
-
});
|
|
743
|
-
};
|
|
744
|
-
const se_Field = (input, context) => {
|
|
745
|
-
return models_0_1.Field.visit(input, {
|
|
746
|
-
arrayValue: (value) => ({ arrayValue: se_ArrayValue(value, context) }),
|
|
747
|
-
blobValue: (value) => ({ blobValue: context.base64Encoder(value) }),
|
|
748
|
-
booleanValue: (value) => ({ booleanValue: value }),
|
|
749
|
-
doubleValue: (value) => ({ doubleValue: (0, smithy_client_1.serializeFloat)(value) }),
|
|
750
|
-
isNull: (value) => ({ isNull: value }),
|
|
751
|
-
longValue: (value) => ({ longValue: value }),
|
|
752
|
-
stringValue: (value) => ({ stringValue: value }),
|
|
753
|
-
_: (name, value) => ({ name: value }),
|
|
754
|
-
});
|
|
755
|
-
};
|
|
756
|
-
const se_SqlParameter = (input, context) => {
|
|
757
|
-
return (0, smithy_client_1.take)(input, {
|
|
758
|
-
name: [],
|
|
759
|
-
typeHint: [],
|
|
760
|
-
value: (_) => se_Field(_, context),
|
|
761
|
-
});
|
|
762
|
-
};
|
|
763
|
-
const se_SqlParameterSets = (input, context) => {
|
|
764
|
-
return input
|
|
765
|
-
.filter((e) => e != null)
|
|
766
|
-
.map((entry) => {
|
|
767
|
-
return se_SqlParametersList(entry, context);
|
|
768
|
-
});
|
|
769
|
-
};
|
|
770
|
-
const se_SqlParametersList = (input, context) => {
|
|
771
|
-
return input
|
|
772
|
-
.filter((e) => e != null)
|
|
773
|
-
.map((entry) => {
|
|
774
|
-
return se_SqlParameter(entry, context);
|
|
775
|
-
});
|
|
776
|
-
};
|
|
777
|
-
const de_ArrayOfArray = (output, context) => {
|
|
778
|
-
const retVal = (output || [])
|
|
779
|
-
.filter((e) => e != null)
|
|
780
|
-
.map((entry) => {
|
|
781
|
-
return de_ArrayValue((0, core_1.awsExpectUnion)(entry), context);
|
|
782
|
-
});
|
|
783
|
-
return retVal;
|
|
784
|
-
};
|
|
785
|
-
const de_ArrayValue = (output, context) => {
|
|
786
|
-
if (output.arrayValues != null) {
|
|
787
|
-
return {
|
|
788
|
-
arrayValues: de_ArrayOfArray(output.arrayValues, context),
|
|
789
|
-
};
|
|
790
|
-
}
|
|
791
|
-
if (output.booleanValues != null) {
|
|
792
|
-
return {
|
|
793
|
-
booleanValues: (0, smithy_client_1._json)(output.booleanValues),
|
|
794
|
-
};
|
|
795
|
-
}
|
|
796
|
-
if (output.doubleValues != null) {
|
|
797
|
-
return {
|
|
798
|
-
doubleValues: de_DoubleArray(output.doubleValues, context),
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
if (output.longValues != null) {
|
|
802
|
-
return {
|
|
803
|
-
longValues: (0, smithy_client_1._json)(output.longValues),
|
|
804
|
-
};
|
|
805
|
-
}
|
|
806
|
-
if (output.stringValues != null) {
|
|
807
|
-
return {
|
|
808
|
-
stringValues: (0, smithy_client_1._json)(output.stringValues),
|
|
809
|
-
};
|
|
810
|
-
}
|
|
811
|
-
return { $unknown: Object.entries(output)[0] };
|
|
812
|
-
};
|
|
813
|
-
const de_ArrayValueList = (output, context) => {
|
|
814
|
-
const retVal = (output || [])
|
|
815
|
-
.filter((e) => e != null)
|
|
816
|
-
.map((entry) => {
|
|
817
|
-
return de_Value((0, core_1.awsExpectUnion)(entry), context);
|
|
818
|
-
});
|
|
819
|
-
return retVal;
|
|
820
|
-
};
|
|
821
|
-
const de_DoubleArray = (output, context) => {
|
|
822
|
-
const retVal = (output || [])
|
|
823
|
-
.filter((e) => e != null)
|
|
824
|
-
.map((entry) => {
|
|
825
|
-
return (0, smithy_client_1.limitedParseDouble)(entry);
|
|
826
|
-
});
|
|
827
|
-
return retVal;
|
|
828
|
-
};
|
|
829
|
-
const de_Field = (output, context) => {
|
|
830
|
-
if (output.arrayValue != null) {
|
|
831
|
-
return {
|
|
832
|
-
arrayValue: de_ArrayValue((0, core_1.awsExpectUnion)(output.arrayValue), context),
|
|
833
|
-
};
|
|
834
|
-
}
|
|
835
|
-
if (output.blobValue != null) {
|
|
836
|
-
return {
|
|
837
|
-
blobValue: context.base64Decoder(output.blobValue),
|
|
838
|
-
};
|
|
839
|
-
}
|
|
840
|
-
if ((0, smithy_client_1.expectBoolean)(output.booleanValue) !== undefined) {
|
|
841
|
-
return { booleanValue: (0, smithy_client_1.expectBoolean)(output.booleanValue) };
|
|
842
|
-
}
|
|
843
|
-
if ((0, smithy_client_1.limitedParseDouble)(output.doubleValue) !== undefined) {
|
|
844
|
-
return { doubleValue: (0, smithy_client_1.limitedParseDouble)(output.doubleValue) };
|
|
845
|
-
}
|
|
846
|
-
if ((0, smithy_client_1.expectBoolean)(output.isNull) !== undefined) {
|
|
847
|
-
return { isNull: (0, smithy_client_1.expectBoolean)(output.isNull) };
|
|
848
|
-
}
|
|
849
|
-
if ((0, smithy_client_1.expectLong)(output.longValue) !== undefined) {
|
|
850
|
-
return { longValue: (0, smithy_client_1.expectLong)(output.longValue) };
|
|
851
|
-
}
|
|
852
|
-
if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
|
|
853
|
-
return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
|
|
854
|
-
}
|
|
855
|
-
return { $unknown: Object.entries(output)[0] };
|
|
856
|
-
};
|
|
857
|
-
const de_FieldList = (output, context) => {
|
|
858
|
-
const retVal = (output || [])
|
|
859
|
-
.filter((e) => e != null)
|
|
860
|
-
.map((entry) => {
|
|
861
|
-
return de_Field((0, core_1.awsExpectUnion)(entry), context);
|
|
862
|
-
});
|
|
863
|
-
return retVal;
|
|
864
|
-
};
|
|
865
|
-
const de__Record = (output, context) => {
|
|
866
|
-
return (0, smithy_client_1.take)(output, {
|
|
867
|
-
values: (_) => de_Row(_, context),
|
|
868
|
-
});
|
|
869
|
-
};
|
|
870
|
-
const de_Records = (output, context) => {
|
|
871
|
-
const retVal = (output || [])
|
|
872
|
-
.filter((e) => e != null)
|
|
873
|
-
.map((entry) => {
|
|
874
|
-
return de__Record(entry, context);
|
|
875
|
-
});
|
|
876
|
-
return retVal;
|
|
877
|
-
};
|
|
878
|
-
const de_ResultFrame = (output, context) => {
|
|
879
|
-
return (0, smithy_client_1.take)(output, {
|
|
880
|
-
records: (_) => de_Records(_, context),
|
|
881
|
-
resultSetMetadata: smithy_client_1._json,
|
|
882
|
-
});
|
|
883
|
-
};
|
|
884
|
-
const de_Row = (output, context) => {
|
|
885
|
-
const retVal = (output || [])
|
|
886
|
-
.filter((e) => e != null)
|
|
887
|
-
.map((entry) => {
|
|
888
|
-
return de_Value((0, core_1.awsExpectUnion)(entry), context);
|
|
889
|
-
});
|
|
890
|
-
return retVal;
|
|
891
|
-
};
|
|
892
|
-
const de_SqlRecords = (output, context) => {
|
|
893
|
-
const retVal = (output || [])
|
|
894
|
-
.filter((e) => e != null)
|
|
895
|
-
.map((entry) => {
|
|
896
|
-
return de_FieldList(entry, context);
|
|
897
|
-
});
|
|
898
|
-
return retVal;
|
|
899
|
-
};
|
|
900
|
-
const de_SqlStatementResult = (output, context) => {
|
|
901
|
-
return (0, smithy_client_1.take)(output, {
|
|
902
|
-
numberOfRecordsUpdated: smithy_client_1.expectLong,
|
|
903
|
-
resultFrame: (_) => de_ResultFrame(_, context),
|
|
904
|
-
});
|
|
905
|
-
};
|
|
906
|
-
const de_SqlStatementResults = (output, context) => {
|
|
907
|
-
const retVal = (output || [])
|
|
908
|
-
.filter((e) => e != null)
|
|
909
|
-
.map((entry) => {
|
|
910
|
-
return de_SqlStatementResult(entry, context);
|
|
911
|
-
});
|
|
912
|
-
return retVal;
|
|
913
|
-
};
|
|
914
|
-
const de_StructValue = (output, context) => {
|
|
915
|
-
return (0, smithy_client_1.take)(output, {
|
|
916
|
-
attributes: (_) => de_ArrayValueList(_, context),
|
|
917
|
-
});
|
|
918
|
-
};
|
|
919
|
-
const de_UpdateResult = (output, context) => {
|
|
920
|
-
return (0, smithy_client_1.take)(output, {
|
|
921
|
-
generatedFields: (_) => de_FieldList(_, context),
|
|
922
|
-
});
|
|
923
|
-
};
|
|
924
|
-
const de_UpdateResults = (output, context) => {
|
|
925
|
-
const retVal = (output || [])
|
|
926
|
-
.filter((e) => e != null)
|
|
927
|
-
.map((entry) => {
|
|
928
|
-
return de_UpdateResult(entry, context);
|
|
929
|
-
});
|
|
930
|
-
return retVal;
|
|
931
|
-
};
|
|
932
|
-
const de_Value = (output, context) => {
|
|
933
|
-
if (output.arrayValues != null) {
|
|
934
|
-
return {
|
|
935
|
-
arrayValues: de_ArrayValueList(output.arrayValues, context),
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
if ((0, smithy_client_1.expectLong)(output.bigIntValue) !== undefined) {
|
|
939
|
-
return { bigIntValue: (0, smithy_client_1.expectLong)(output.bigIntValue) };
|
|
940
|
-
}
|
|
941
|
-
if ((0, smithy_client_1.expectBoolean)(output.bitValue) !== undefined) {
|
|
942
|
-
return { bitValue: (0, smithy_client_1.expectBoolean)(output.bitValue) };
|
|
943
|
-
}
|
|
944
|
-
if (output.blobValue != null) {
|
|
945
|
-
return {
|
|
946
|
-
blobValue: context.base64Decoder(output.blobValue),
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
if ((0, smithy_client_1.limitedParseDouble)(output.doubleValue) !== undefined) {
|
|
950
|
-
return { doubleValue: (0, smithy_client_1.limitedParseDouble)(output.doubleValue) };
|
|
951
|
-
}
|
|
952
|
-
if ((0, smithy_client_1.expectInt32)(output.intValue) !== undefined) {
|
|
953
|
-
return { intValue: (0, smithy_client_1.expectInt32)(output.intValue) };
|
|
954
|
-
}
|
|
955
|
-
if ((0, smithy_client_1.expectBoolean)(output.isNull) !== undefined) {
|
|
956
|
-
return { isNull: (0, smithy_client_1.expectBoolean)(output.isNull) };
|
|
957
|
-
}
|
|
958
|
-
if ((0, smithy_client_1.limitedParseFloat32)(output.realValue) !== undefined) {
|
|
959
|
-
return { realValue: (0, smithy_client_1.limitedParseFloat32)(output.realValue) };
|
|
960
|
-
}
|
|
961
|
-
if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
|
|
962
|
-
return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
|
|
963
|
-
}
|
|
964
|
-
if (output.structValue != null) {
|
|
965
|
-
return {
|
|
966
|
-
structValue: de_StructValue(output.structValue, context),
|
|
967
|
-
};
|
|
968
|
-
}
|
|
969
|
-
return { $unknown: Object.entries(output)[0] };
|
|
970
|
-
};
|
|
971
|
-
const deserializeMetadata = (output) => ({
|
|
972
|
-
httpStatusCode: output.statusCode,
|
|
973
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
974
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
975
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
976
|
-
});
|
|
977
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
978
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
979
|
-
value !== null &&
|
|
980
|
-
value !== "" &&
|
|
981
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
982
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
983
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
984
|
-
if (encoded.length) {
|
|
985
|
-
return JSON.parse(encoded);
|
|
986
|
-
}
|
|
987
|
-
return {};
|
|
988
|
-
});
|
|
989
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
990
|
-
const value = await parseBody(errorBody, context);
|
|
991
|
-
value.message = value.message ?? value.Message;
|
|
992
|
-
return value;
|
|
993
|
-
};
|
|
994
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
995
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
996
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
997
|
-
let cleanValue = rawValue;
|
|
998
|
-
if (typeof cleanValue === "number") {
|
|
999
|
-
cleanValue = cleanValue.toString();
|
|
1000
|
-
}
|
|
1001
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1002
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1003
|
-
}
|
|
1004
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1005
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1006
|
-
}
|
|
1007
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1008
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1009
|
-
}
|
|
1010
|
-
return cleanValue;
|
|
1011
|
-
};
|
|
1012
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1013
|
-
if (headerKey !== undefined) {
|
|
1014
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1015
|
-
}
|
|
1016
|
-
if (data.code !== undefined) {
|
|
1017
|
-
return sanitizeErrorCode(data.code);
|
|
1018
|
-
}
|
|
1019
|
-
if (data["__type"] !== undefined) {
|
|
1020
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1021
|
-
}
|
|
1022
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|