@aws-sdk/client-secrets-manager 3.503.1 → 3.507.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/index.js +49 -704
- package/dist-es/protocols/Aws_json1_1.js +67 -722
- package/package.json +3 -3
|
@@ -143,7 +143,7 @@ export const se_ValidateResourcePolicyCommand = async (input, context) => {
|
|
|
143
143
|
};
|
|
144
144
|
export const de_BatchGetSecretValueCommand = async (output, context) => {
|
|
145
145
|
if (output.statusCode >= 300) {
|
|
146
|
-
return
|
|
146
|
+
return de_CommandError(output, context);
|
|
147
147
|
}
|
|
148
148
|
const data = await parseBody(output.body, context);
|
|
149
149
|
let contents = {};
|
|
@@ -154,43 +154,9 @@ export const de_BatchGetSecretValueCommand = async (output, context) => {
|
|
|
154
154
|
};
|
|
155
155
|
return response;
|
|
156
156
|
};
|
|
157
|
-
const de_BatchGetSecretValueCommandError = async (output, context) => {
|
|
158
|
-
const parsedOutput = {
|
|
159
|
-
...output,
|
|
160
|
-
body: await parseErrorBody(output.body, context),
|
|
161
|
-
};
|
|
162
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
163
|
-
switch (errorCode) {
|
|
164
|
-
case "DecryptionFailure":
|
|
165
|
-
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
166
|
-
throw await de_DecryptionFailureRes(parsedOutput, context);
|
|
167
|
-
case "InternalServiceError":
|
|
168
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
169
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
170
|
-
case "InvalidNextTokenException":
|
|
171
|
-
case "com.amazonaws.secretsmanager#InvalidNextTokenException":
|
|
172
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
173
|
-
case "InvalidParameterException":
|
|
174
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
175
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
176
|
-
case "InvalidRequestException":
|
|
177
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
178
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
179
|
-
case "ResourceNotFoundException":
|
|
180
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
181
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
182
|
-
default:
|
|
183
|
-
const parsedBody = parsedOutput.body;
|
|
184
|
-
return throwDefaultError({
|
|
185
|
-
output,
|
|
186
|
-
parsedBody,
|
|
187
|
-
errorCode,
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
157
|
export const de_CancelRotateSecretCommand = async (output, context) => {
|
|
192
158
|
if (output.statusCode >= 300) {
|
|
193
|
-
return
|
|
159
|
+
return de_CommandError(output, context);
|
|
194
160
|
}
|
|
195
161
|
const data = await parseBody(output.body, context);
|
|
196
162
|
let contents = {};
|
|
@@ -201,37 +167,9 @@ export const de_CancelRotateSecretCommand = async (output, context) => {
|
|
|
201
167
|
};
|
|
202
168
|
return response;
|
|
203
169
|
};
|
|
204
|
-
const de_CancelRotateSecretCommandError = async (output, context) => {
|
|
205
|
-
const parsedOutput = {
|
|
206
|
-
...output,
|
|
207
|
-
body: await parseErrorBody(output.body, context),
|
|
208
|
-
};
|
|
209
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
210
|
-
switch (errorCode) {
|
|
211
|
-
case "InternalServiceError":
|
|
212
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
213
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
214
|
-
case "InvalidParameterException":
|
|
215
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
216
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
217
|
-
case "InvalidRequestException":
|
|
218
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
219
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
220
|
-
case "ResourceNotFoundException":
|
|
221
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
222
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
223
|
-
default:
|
|
224
|
-
const parsedBody = parsedOutput.body;
|
|
225
|
-
return throwDefaultError({
|
|
226
|
-
output,
|
|
227
|
-
parsedBody,
|
|
228
|
-
errorCode,
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
170
|
export const de_CreateSecretCommand = async (output, context) => {
|
|
233
171
|
if (output.statusCode >= 300) {
|
|
234
|
-
return
|
|
172
|
+
return de_CommandError(output, context);
|
|
235
173
|
}
|
|
236
174
|
const data = await parseBody(output.body, context);
|
|
237
175
|
let contents = {};
|
|
@@ -242,55 +180,9 @@ export const de_CreateSecretCommand = async (output, context) => {
|
|
|
242
180
|
};
|
|
243
181
|
return response;
|
|
244
182
|
};
|
|
245
|
-
const de_CreateSecretCommandError = async (output, context) => {
|
|
246
|
-
const parsedOutput = {
|
|
247
|
-
...output,
|
|
248
|
-
body: await parseErrorBody(output.body, context),
|
|
249
|
-
};
|
|
250
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
251
|
-
switch (errorCode) {
|
|
252
|
-
case "DecryptionFailure":
|
|
253
|
-
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
254
|
-
throw await de_DecryptionFailureRes(parsedOutput, context);
|
|
255
|
-
case "EncryptionFailure":
|
|
256
|
-
case "com.amazonaws.secretsmanager#EncryptionFailure":
|
|
257
|
-
throw await de_EncryptionFailureRes(parsedOutput, context);
|
|
258
|
-
case "InternalServiceError":
|
|
259
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
260
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
261
|
-
case "InvalidParameterException":
|
|
262
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
263
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
264
|
-
case "InvalidRequestException":
|
|
265
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
266
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
267
|
-
case "LimitExceededException":
|
|
268
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
269
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
270
|
-
case "MalformedPolicyDocumentException":
|
|
271
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
272
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
273
|
-
case "PreconditionNotMetException":
|
|
274
|
-
case "com.amazonaws.secretsmanager#PreconditionNotMetException":
|
|
275
|
-
throw await de_PreconditionNotMetExceptionRes(parsedOutput, context);
|
|
276
|
-
case "ResourceExistsException":
|
|
277
|
-
case "com.amazonaws.secretsmanager#ResourceExistsException":
|
|
278
|
-
throw await de_ResourceExistsExceptionRes(parsedOutput, context);
|
|
279
|
-
case "ResourceNotFoundException":
|
|
280
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
281
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
282
|
-
default:
|
|
283
|
-
const parsedBody = parsedOutput.body;
|
|
284
|
-
return throwDefaultError({
|
|
285
|
-
output,
|
|
286
|
-
parsedBody,
|
|
287
|
-
errorCode,
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
183
|
export const de_DeleteResourcePolicyCommand = async (output, context) => {
|
|
292
184
|
if (output.statusCode >= 300) {
|
|
293
|
-
return
|
|
185
|
+
return de_CommandError(output, context);
|
|
294
186
|
}
|
|
295
187
|
const data = await parseBody(output.body, context);
|
|
296
188
|
let contents = {};
|
|
@@ -301,37 +193,9 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
|
|
|
301
193
|
};
|
|
302
194
|
return response;
|
|
303
195
|
};
|
|
304
|
-
const de_DeleteResourcePolicyCommandError = async (output, context) => {
|
|
305
|
-
const parsedOutput = {
|
|
306
|
-
...output,
|
|
307
|
-
body: await parseErrorBody(output.body, context),
|
|
308
|
-
};
|
|
309
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
310
|
-
switch (errorCode) {
|
|
311
|
-
case "InternalServiceError":
|
|
312
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
313
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
314
|
-
case "InvalidParameterException":
|
|
315
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
316
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
317
|
-
case "InvalidRequestException":
|
|
318
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
319
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
320
|
-
case "ResourceNotFoundException":
|
|
321
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
322
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
323
|
-
default:
|
|
324
|
-
const parsedBody = parsedOutput.body;
|
|
325
|
-
return throwDefaultError({
|
|
326
|
-
output,
|
|
327
|
-
parsedBody,
|
|
328
|
-
errorCode,
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
196
|
export const de_DeleteSecretCommand = async (output, context) => {
|
|
333
197
|
if (output.statusCode >= 300) {
|
|
334
|
-
return
|
|
198
|
+
return de_CommandError(output, context);
|
|
335
199
|
}
|
|
336
200
|
const data = await parseBody(output.body, context);
|
|
337
201
|
let contents = {};
|
|
@@ -342,37 +206,9 @@ export const de_DeleteSecretCommand = async (output, context) => {
|
|
|
342
206
|
};
|
|
343
207
|
return response;
|
|
344
208
|
};
|
|
345
|
-
const de_DeleteSecretCommandError = async (output, context) => {
|
|
346
|
-
const parsedOutput = {
|
|
347
|
-
...output,
|
|
348
|
-
body: await parseErrorBody(output.body, context),
|
|
349
|
-
};
|
|
350
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
351
|
-
switch (errorCode) {
|
|
352
|
-
case "InternalServiceError":
|
|
353
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
354
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
355
|
-
case "InvalidParameterException":
|
|
356
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
357
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
358
|
-
case "InvalidRequestException":
|
|
359
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
360
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
361
|
-
case "ResourceNotFoundException":
|
|
362
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
363
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
364
|
-
default:
|
|
365
|
-
const parsedBody = parsedOutput.body;
|
|
366
|
-
return throwDefaultError({
|
|
367
|
-
output,
|
|
368
|
-
parsedBody,
|
|
369
|
-
errorCode,
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
209
|
export const de_DescribeSecretCommand = async (output, context) => {
|
|
374
210
|
if (output.statusCode >= 300) {
|
|
375
|
-
return
|
|
211
|
+
return de_CommandError(output, context);
|
|
376
212
|
}
|
|
377
213
|
const data = await parseBody(output.body, context);
|
|
378
214
|
let contents = {};
|
|
@@ -383,34 +219,9 @@ export const de_DescribeSecretCommand = async (output, context) => {
|
|
|
383
219
|
};
|
|
384
220
|
return response;
|
|
385
221
|
};
|
|
386
|
-
const de_DescribeSecretCommandError = async (output, context) => {
|
|
387
|
-
const parsedOutput = {
|
|
388
|
-
...output,
|
|
389
|
-
body: await parseErrorBody(output.body, context),
|
|
390
|
-
};
|
|
391
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
392
|
-
switch (errorCode) {
|
|
393
|
-
case "InternalServiceError":
|
|
394
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
395
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
396
|
-
case "InvalidParameterException":
|
|
397
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
398
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
399
|
-
case "ResourceNotFoundException":
|
|
400
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
401
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
402
|
-
default:
|
|
403
|
-
const parsedBody = parsedOutput.body;
|
|
404
|
-
return throwDefaultError({
|
|
405
|
-
output,
|
|
406
|
-
parsedBody,
|
|
407
|
-
errorCode,
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
};
|
|
411
222
|
export const de_GetRandomPasswordCommand = async (output, context) => {
|
|
412
223
|
if (output.statusCode >= 300) {
|
|
413
|
-
return
|
|
224
|
+
return de_CommandError(output, context);
|
|
414
225
|
}
|
|
415
226
|
const data = await parseBody(output.body, context);
|
|
416
227
|
let contents = {};
|
|
@@ -421,34 +232,9 @@ export const de_GetRandomPasswordCommand = async (output, context) => {
|
|
|
421
232
|
};
|
|
422
233
|
return response;
|
|
423
234
|
};
|
|
424
|
-
const de_GetRandomPasswordCommandError = async (output, context) => {
|
|
425
|
-
const parsedOutput = {
|
|
426
|
-
...output,
|
|
427
|
-
body: await parseErrorBody(output.body, context),
|
|
428
|
-
};
|
|
429
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
430
|
-
switch (errorCode) {
|
|
431
|
-
case "InternalServiceError":
|
|
432
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
433
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
434
|
-
case "InvalidParameterException":
|
|
435
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
436
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
437
|
-
case "InvalidRequestException":
|
|
438
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
439
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
440
|
-
default:
|
|
441
|
-
const parsedBody = parsedOutput.body;
|
|
442
|
-
return throwDefaultError({
|
|
443
|
-
output,
|
|
444
|
-
parsedBody,
|
|
445
|
-
errorCode,
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
235
|
export const de_GetResourcePolicyCommand = async (output, context) => {
|
|
450
236
|
if (output.statusCode >= 300) {
|
|
451
|
-
return
|
|
237
|
+
return de_CommandError(output, context);
|
|
452
238
|
}
|
|
453
239
|
const data = await parseBody(output.body, context);
|
|
454
240
|
let contents = {};
|
|
@@ -459,37 +245,9 @@ export const de_GetResourcePolicyCommand = async (output, context) => {
|
|
|
459
245
|
};
|
|
460
246
|
return response;
|
|
461
247
|
};
|
|
462
|
-
const de_GetResourcePolicyCommandError = async (output, context) => {
|
|
463
|
-
const parsedOutput = {
|
|
464
|
-
...output,
|
|
465
|
-
body: await parseErrorBody(output.body, context),
|
|
466
|
-
};
|
|
467
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
468
|
-
switch (errorCode) {
|
|
469
|
-
case "InternalServiceError":
|
|
470
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
471
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
472
|
-
case "InvalidParameterException":
|
|
473
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
474
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
475
|
-
case "InvalidRequestException":
|
|
476
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
477
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
478
|
-
case "ResourceNotFoundException":
|
|
479
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
480
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
481
|
-
default:
|
|
482
|
-
const parsedBody = parsedOutput.body;
|
|
483
|
-
return throwDefaultError({
|
|
484
|
-
output,
|
|
485
|
-
parsedBody,
|
|
486
|
-
errorCode,
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
248
|
export const de_GetSecretValueCommand = async (output, context) => {
|
|
491
249
|
if (output.statusCode >= 300) {
|
|
492
|
-
return
|
|
250
|
+
return de_CommandError(output, context);
|
|
493
251
|
}
|
|
494
252
|
const data = await parseBody(output.body, context);
|
|
495
253
|
let contents = {};
|
|
@@ -500,40 +258,9 @@ export const de_GetSecretValueCommand = async (output, context) => {
|
|
|
500
258
|
};
|
|
501
259
|
return response;
|
|
502
260
|
};
|
|
503
|
-
const de_GetSecretValueCommandError = async (output, context) => {
|
|
504
|
-
const parsedOutput = {
|
|
505
|
-
...output,
|
|
506
|
-
body: await parseErrorBody(output.body, context),
|
|
507
|
-
};
|
|
508
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
509
|
-
switch (errorCode) {
|
|
510
|
-
case "DecryptionFailure":
|
|
511
|
-
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
512
|
-
throw await de_DecryptionFailureRes(parsedOutput, context);
|
|
513
|
-
case "InternalServiceError":
|
|
514
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
515
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
516
|
-
case "InvalidParameterException":
|
|
517
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
518
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
519
|
-
case "InvalidRequestException":
|
|
520
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
521
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
522
|
-
case "ResourceNotFoundException":
|
|
523
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
524
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
525
|
-
default:
|
|
526
|
-
const parsedBody = parsedOutput.body;
|
|
527
|
-
return throwDefaultError({
|
|
528
|
-
output,
|
|
529
|
-
parsedBody,
|
|
530
|
-
errorCode,
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
261
|
export const de_ListSecretsCommand = async (output, context) => {
|
|
535
262
|
if (output.statusCode >= 300) {
|
|
536
|
-
return
|
|
263
|
+
return de_CommandError(output, context);
|
|
537
264
|
}
|
|
538
265
|
const data = await parseBody(output.body, context);
|
|
539
266
|
let contents = {};
|
|
@@ -544,37 +271,9 @@ export const de_ListSecretsCommand = async (output, context) => {
|
|
|
544
271
|
};
|
|
545
272
|
return response;
|
|
546
273
|
};
|
|
547
|
-
const de_ListSecretsCommandError = async (output, context) => {
|
|
548
|
-
const parsedOutput = {
|
|
549
|
-
...output,
|
|
550
|
-
body: await parseErrorBody(output.body, context),
|
|
551
|
-
};
|
|
552
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
553
|
-
switch (errorCode) {
|
|
554
|
-
case "InternalServiceError":
|
|
555
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
556
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
557
|
-
case "InvalidNextTokenException":
|
|
558
|
-
case "com.amazonaws.secretsmanager#InvalidNextTokenException":
|
|
559
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
560
|
-
case "InvalidParameterException":
|
|
561
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
562
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
563
|
-
case "InvalidRequestException":
|
|
564
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
565
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
566
|
-
default:
|
|
567
|
-
const parsedBody = parsedOutput.body;
|
|
568
|
-
return throwDefaultError({
|
|
569
|
-
output,
|
|
570
|
-
parsedBody,
|
|
571
|
-
errorCode,
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
274
|
export const de_ListSecretVersionIdsCommand = async (output, context) => {
|
|
576
275
|
if (output.statusCode >= 300) {
|
|
577
|
-
return
|
|
276
|
+
return de_CommandError(output, context);
|
|
578
277
|
}
|
|
579
278
|
const data = await parseBody(output.body, context);
|
|
580
279
|
let contents = {};
|
|
@@ -585,37 +284,9 @@ export const de_ListSecretVersionIdsCommand = async (output, context) => {
|
|
|
585
284
|
};
|
|
586
285
|
return response;
|
|
587
286
|
};
|
|
588
|
-
const de_ListSecretVersionIdsCommandError = async (output, context) => {
|
|
589
|
-
const parsedOutput = {
|
|
590
|
-
...output,
|
|
591
|
-
body: await parseErrorBody(output.body, context),
|
|
592
|
-
};
|
|
593
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
594
|
-
switch (errorCode) {
|
|
595
|
-
case "InternalServiceError":
|
|
596
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
597
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
598
|
-
case "InvalidNextTokenException":
|
|
599
|
-
case "com.amazonaws.secretsmanager#InvalidNextTokenException":
|
|
600
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
601
|
-
case "InvalidParameterException":
|
|
602
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
603
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
604
|
-
case "ResourceNotFoundException":
|
|
605
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
606
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
607
|
-
default:
|
|
608
|
-
const parsedBody = parsedOutput.body;
|
|
609
|
-
return throwDefaultError({
|
|
610
|
-
output,
|
|
611
|
-
parsedBody,
|
|
612
|
-
errorCode,
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
287
|
export const de_PutResourcePolicyCommand = async (output, context) => {
|
|
617
288
|
if (output.statusCode >= 300) {
|
|
618
|
-
return
|
|
289
|
+
return de_CommandError(output, context);
|
|
619
290
|
}
|
|
620
291
|
const data = await parseBody(output.body, context);
|
|
621
292
|
let contents = {};
|
|
@@ -626,43 +297,9 @@ export const de_PutResourcePolicyCommand = async (output, context) => {
|
|
|
626
297
|
};
|
|
627
298
|
return response;
|
|
628
299
|
};
|
|
629
|
-
const de_PutResourcePolicyCommandError = async (output, context) => {
|
|
630
|
-
const parsedOutput = {
|
|
631
|
-
...output,
|
|
632
|
-
body: await parseErrorBody(output.body, context),
|
|
633
|
-
};
|
|
634
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
635
|
-
switch (errorCode) {
|
|
636
|
-
case "InternalServiceError":
|
|
637
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
638
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
639
|
-
case "InvalidParameterException":
|
|
640
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
641
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
642
|
-
case "InvalidRequestException":
|
|
643
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
644
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
645
|
-
case "MalformedPolicyDocumentException":
|
|
646
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
647
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
648
|
-
case "PublicPolicyException":
|
|
649
|
-
case "com.amazonaws.secretsmanager#PublicPolicyException":
|
|
650
|
-
throw await de_PublicPolicyExceptionRes(parsedOutput, context);
|
|
651
|
-
case "ResourceNotFoundException":
|
|
652
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
653
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
654
|
-
default:
|
|
655
|
-
const parsedBody = parsedOutput.body;
|
|
656
|
-
return throwDefaultError({
|
|
657
|
-
output,
|
|
658
|
-
parsedBody,
|
|
659
|
-
errorCode,
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
};
|
|
663
300
|
export const de_PutSecretValueCommand = async (output, context) => {
|
|
664
301
|
if (output.statusCode >= 300) {
|
|
665
|
-
return
|
|
302
|
+
return de_CommandError(output, context);
|
|
666
303
|
}
|
|
667
304
|
const data = await parseBody(output.body, context);
|
|
668
305
|
let contents = {};
|
|
@@ -673,131 +310,35 @@ export const de_PutSecretValueCommand = async (output, context) => {
|
|
|
673
310
|
};
|
|
674
311
|
return response;
|
|
675
312
|
};
|
|
676
|
-
const de_PutSecretValueCommandError = async (output, context) => {
|
|
677
|
-
const parsedOutput = {
|
|
678
|
-
...output,
|
|
679
|
-
body: await parseErrorBody(output.body, context),
|
|
680
|
-
};
|
|
681
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
682
|
-
switch (errorCode) {
|
|
683
|
-
case "DecryptionFailure":
|
|
684
|
-
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
685
|
-
throw await de_DecryptionFailureRes(parsedOutput, context);
|
|
686
|
-
case "EncryptionFailure":
|
|
687
|
-
case "com.amazonaws.secretsmanager#EncryptionFailure":
|
|
688
|
-
throw await de_EncryptionFailureRes(parsedOutput, context);
|
|
689
|
-
case "InternalServiceError":
|
|
690
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
691
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
692
|
-
case "InvalidParameterException":
|
|
693
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
694
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
695
|
-
case "InvalidRequestException":
|
|
696
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
697
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
698
|
-
case "LimitExceededException":
|
|
699
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
700
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
701
|
-
case "ResourceExistsException":
|
|
702
|
-
case "com.amazonaws.secretsmanager#ResourceExistsException":
|
|
703
|
-
throw await de_ResourceExistsExceptionRes(parsedOutput, context);
|
|
704
|
-
case "ResourceNotFoundException":
|
|
705
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
706
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
707
|
-
default:
|
|
708
|
-
const parsedBody = parsedOutput.body;
|
|
709
|
-
return throwDefaultError({
|
|
710
|
-
output,
|
|
711
|
-
parsedBody,
|
|
712
|
-
errorCode,
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
};
|
|
716
313
|
export const de_RemoveRegionsFromReplicationCommand = async (output, context) => {
|
|
717
314
|
if (output.statusCode >= 300) {
|
|
718
|
-
return
|
|
315
|
+
return de_CommandError(output, context);
|
|
719
316
|
}
|
|
720
|
-
const data = await parseBody(output.body, context);
|
|
721
|
-
let contents = {};
|
|
722
|
-
contents = de_RemoveRegionsFromReplicationResponse(data, context);
|
|
723
|
-
const response = {
|
|
724
|
-
$metadata: deserializeMetadata(output),
|
|
725
|
-
...contents,
|
|
726
|
-
};
|
|
727
|
-
return response;
|
|
728
|
-
};
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
body: await parseErrorBody(output.body, context),
|
|
733
|
-
};
|
|
734
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
735
|
-
switch (errorCode) {
|
|
736
|
-
case "InternalServiceError":
|
|
737
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
738
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
739
|
-
case "InvalidParameterException":
|
|
740
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
741
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
742
|
-
case "InvalidRequestException":
|
|
743
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
744
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
745
|
-
case "ResourceNotFoundException":
|
|
746
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
747
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
748
|
-
default:
|
|
749
|
-
const parsedBody = parsedOutput.body;
|
|
750
|
-
return throwDefaultError({
|
|
751
|
-
output,
|
|
752
|
-
parsedBody,
|
|
753
|
-
errorCode,
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
};
|
|
757
|
-
export const de_ReplicateSecretToRegionsCommand = async (output, context) => {
|
|
758
|
-
if (output.statusCode >= 300) {
|
|
759
|
-
return de_ReplicateSecretToRegionsCommandError(output, context);
|
|
760
|
-
}
|
|
761
|
-
const data = await parseBody(output.body, context);
|
|
762
|
-
let contents = {};
|
|
763
|
-
contents = de_ReplicateSecretToRegionsResponse(data, context);
|
|
764
|
-
const response = {
|
|
765
|
-
$metadata: deserializeMetadata(output),
|
|
766
|
-
...contents,
|
|
767
|
-
};
|
|
768
|
-
return response;
|
|
769
|
-
};
|
|
770
|
-
const de_ReplicateSecretToRegionsCommandError = 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.secretsmanager#InternalServiceError":
|
|
779
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
780
|
-
case "InvalidParameterException":
|
|
781
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
782
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
783
|
-
case "InvalidRequestException":
|
|
784
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
785
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
786
|
-
case "ResourceNotFoundException":
|
|
787
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
788
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
789
|
-
default:
|
|
790
|
-
const parsedBody = parsedOutput.body;
|
|
791
|
-
return throwDefaultError({
|
|
792
|
-
output,
|
|
793
|
-
parsedBody,
|
|
794
|
-
errorCode,
|
|
795
|
-
});
|
|
317
|
+
const data = await parseBody(output.body, context);
|
|
318
|
+
let contents = {};
|
|
319
|
+
contents = de_RemoveRegionsFromReplicationResponse(data, context);
|
|
320
|
+
const response = {
|
|
321
|
+
$metadata: deserializeMetadata(output),
|
|
322
|
+
...contents,
|
|
323
|
+
};
|
|
324
|
+
return response;
|
|
325
|
+
};
|
|
326
|
+
export const de_ReplicateSecretToRegionsCommand = async (output, context) => {
|
|
327
|
+
if (output.statusCode >= 300) {
|
|
328
|
+
return de_CommandError(output, context);
|
|
796
329
|
}
|
|
330
|
+
const data = await parseBody(output.body, context);
|
|
331
|
+
let contents = {};
|
|
332
|
+
contents = de_ReplicateSecretToRegionsResponse(data, context);
|
|
333
|
+
const response = {
|
|
334
|
+
$metadata: deserializeMetadata(output),
|
|
335
|
+
...contents,
|
|
336
|
+
};
|
|
337
|
+
return response;
|
|
797
338
|
};
|
|
798
339
|
export const de_RestoreSecretCommand = async (output, context) => {
|
|
799
340
|
if (output.statusCode >= 300) {
|
|
800
|
-
return
|
|
341
|
+
return de_CommandError(output, context);
|
|
801
342
|
}
|
|
802
343
|
const data = await parseBody(output.body, context);
|
|
803
344
|
let contents = {};
|
|
@@ -808,37 +349,9 @@ export const de_RestoreSecretCommand = async (output, context) => {
|
|
|
808
349
|
};
|
|
809
350
|
return response;
|
|
810
351
|
};
|
|
811
|
-
const de_RestoreSecretCommandError = async (output, context) => {
|
|
812
|
-
const parsedOutput = {
|
|
813
|
-
...output,
|
|
814
|
-
body: await parseErrorBody(output.body, context),
|
|
815
|
-
};
|
|
816
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
817
|
-
switch (errorCode) {
|
|
818
|
-
case "InternalServiceError":
|
|
819
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
820
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
821
|
-
case "InvalidParameterException":
|
|
822
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
823
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
824
|
-
case "InvalidRequestException":
|
|
825
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
826
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
827
|
-
case "ResourceNotFoundException":
|
|
828
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
829
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
830
|
-
default:
|
|
831
|
-
const parsedBody = parsedOutput.body;
|
|
832
|
-
return throwDefaultError({
|
|
833
|
-
output,
|
|
834
|
-
parsedBody,
|
|
835
|
-
errorCode,
|
|
836
|
-
});
|
|
837
|
-
}
|
|
838
|
-
};
|
|
839
352
|
export const de_RotateSecretCommand = async (output, context) => {
|
|
840
353
|
if (output.statusCode >= 300) {
|
|
841
|
-
return
|
|
354
|
+
return de_CommandError(output, context);
|
|
842
355
|
}
|
|
843
356
|
const data = await parseBody(output.body, context);
|
|
844
357
|
let contents = {};
|
|
@@ -849,37 +362,9 @@ export const de_RotateSecretCommand = async (output, context) => {
|
|
|
849
362
|
};
|
|
850
363
|
return response;
|
|
851
364
|
};
|
|
852
|
-
const de_RotateSecretCommandError = async (output, context) => {
|
|
853
|
-
const parsedOutput = {
|
|
854
|
-
...output,
|
|
855
|
-
body: await parseErrorBody(output.body, context),
|
|
856
|
-
};
|
|
857
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
858
|
-
switch (errorCode) {
|
|
859
|
-
case "InternalServiceError":
|
|
860
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
861
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
862
|
-
case "InvalidParameterException":
|
|
863
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
864
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
865
|
-
case "InvalidRequestException":
|
|
866
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
867
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
868
|
-
case "ResourceNotFoundException":
|
|
869
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
870
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
871
|
-
default:
|
|
872
|
-
const parsedBody = parsedOutput.body;
|
|
873
|
-
return throwDefaultError({
|
|
874
|
-
output,
|
|
875
|
-
parsedBody,
|
|
876
|
-
errorCode,
|
|
877
|
-
});
|
|
878
|
-
}
|
|
879
|
-
};
|
|
880
365
|
export const de_StopReplicationToReplicaCommand = async (output, context) => {
|
|
881
366
|
if (output.statusCode >= 300) {
|
|
882
|
-
return
|
|
367
|
+
return de_CommandError(output, context);
|
|
883
368
|
}
|
|
884
369
|
const data = await parseBody(output.body, context);
|
|
885
370
|
let contents = {};
|
|
@@ -890,37 +375,9 @@ export const de_StopReplicationToReplicaCommand = async (output, context) => {
|
|
|
890
375
|
};
|
|
891
376
|
return response;
|
|
892
377
|
};
|
|
893
|
-
const de_StopReplicationToReplicaCommandError = async (output, context) => {
|
|
894
|
-
const parsedOutput = {
|
|
895
|
-
...output,
|
|
896
|
-
body: await parseErrorBody(output.body, context),
|
|
897
|
-
};
|
|
898
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
899
|
-
switch (errorCode) {
|
|
900
|
-
case "InternalServiceError":
|
|
901
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
902
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
903
|
-
case "InvalidParameterException":
|
|
904
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
905
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
906
|
-
case "InvalidRequestException":
|
|
907
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
908
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
909
|
-
case "ResourceNotFoundException":
|
|
910
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
911
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
912
|
-
default:
|
|
913
|
-
const parsedBody = parsedOutput.body;
|
|
914
|
-
return throwDefaultError({
|
|
915
|
-
output,
|
|
916
|
-
parsedBody,
|
|
917
|
-
errorCode,
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
378
|
export const de_TagResourceCommand = async (output, context) => {
|
|
922
379
|
if (output.statusCode >= 300) {
|
|
923
|
-
return
|
|
380
|
+
return de_CommandError(output, context);
|
|
924
381
|
}
|
|
925
382
|
await collectBody(output.body, context);
|
|
926
383
|
const response = {
|
|
@@ -928,37 +385,9 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
928
385
|
};
|
|
929
386
|
return response;
|
|
930
387
|
};
|
|
931
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
932
|
-
const parsedOutput = {
|
|
933
|
-
...output,
|
|
934
|
-
body: await parseErrorBody(output.body, context),
|
|
935
|
-
};
|
|
936
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
937
|
-
switch (errorCode) {
|
|
938
|
-
case "InternalServiceError":
|
|
939
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
940
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
941
|
-
case "InvalidParameterException":
|
|
942
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
943
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
944
|
-
case "InvalidRequestException":
|
|
945
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
946
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
947
|
-
case "ResourceNotFoundException":
|
|
948
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
949
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
950
|
-
default:
|
|
951
|
-
const parsedBody = parsedOutput.body;
|
|
952
|
-
return throwDefaultError({
|
|
953
|
-
output,
|
|
954
|
-
parsedBody,
|
|
955
|
-
errorCode,
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
388
|
export const de_UntagResourceCommand = async (output, context) => {
|
|
960
389
|
if (output.statusCode >= 300) {
|
|
961
|
-
return
|
|
390
|
+
return de_CommandError(output, context);
|
|
962
391
|
}
|
|
963
392
|
await collectBody(output.body, context);
|
|
964
393
|
const response = {
|
|
@@ -966,37 +395,9 @@ export const de_UntagResourceCommand = async (output, context) => {
|
|
|
966
395
|
};
|
|
967
396
|
return response;
|
|
968
397
|
};
|
|
969
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
970
|
-
const parsedOutput = {
|
|
971
|
-
...output,
|
|
972
|
-
body: await parseErrorBody(output.body, context),
|
|
973
|
-
};
|
|
974
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
975
|
-
switch (errorCode) {
|
|
976
|
-
case "InternalServiceError":
|
|
977
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
978
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
979
|
-
case "InvalidParameterException":
|
|
980
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
981
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
982
|
-
case "InvalidRequestException":
|
|
983
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
984
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
985
|
-
case "ResourceNotFoundException":
|
|
986
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
987
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
988
|
-
default:
|
|
989
|
-
const parsedBody = parsedOutput.body;
|
|
990
|
-
return throwDefaultError({
|
|
991
|
-
output,
|
|
992
|
-
parsedBody,
|
|
993
|
-
errorCode,
|
|
994
|
-
});
|
|
995
|
-
}
|
|
996
|
-
};
|
|
997
398
|
export const de_UpdateSecretCommand = async (output, context) => {
|
|
998
399
|
if (output.statusCode >= 300) {
|
|
999
|
-
return
|
|
400
|
+
return de_CommandError(output, context);
|
|
1000
401
|
}
|
|
1001
402
|
const data = await parseBody(output.body, context);
|
|
1002
403
|
let contents = {};
|
|
@@ -1007,55 +408,9 @@ export const de_UpdateSecretCommand = async (output, context) => {
|
|
|
1007
408
|
};
|
|
1008
409
|
return response;
|
|
1009
410
|
};
|
|
1010
|
-
const de_UpdateSecretCommandError = async (output, context) => {
|
|
1011
|
-
const parsedOutput = {
|
|
1012
|
-
...output,
|
|
1013
|
-
body: await parseErrorBody(output.body, context),
|
|
1014
|
-
};
|
|
1015
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1016
|
-
switch (errorCode) {
|
|
1017
|
-
case "DecryptionFailure":
|
|
1018
|
-
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
1019
|
-
throw await de_DecryptionFailureRes(parsedOutput, context);
|
|
1020
|
-
case "EncryptionFailure":
|
|
1021
|
-
case "com.amazonaws.secretsmanager#EncryptionFailure":
|
|
1022
|
-
throw await de_EncryptionFailureRes(parsedOutput, context);
|
|
1023
|
-
case "InternalServiceError":
|
|
1024
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1025
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
1026
|
-
case "InvalidParameterException":
|
|
1027
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1028
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1029
|
-
case "InvalidRequestException":
|
|
1030
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1031
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1032
|
-
case "LimitExceededException":
|
|
1033
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
1034
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1035
|
-
case "MalformedPolicyDocumentException":
|
|
1036
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
1037
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
1038
|
-
case "PreconditionNotMetException":
|
|
1039
|
-
case "com.amazonaws.secretsmanager#PreconditionNotMetException":
|
|
1040
|
-
throw await de_PreconditionNotMetExceptionRes(parsedOutput, context);
|
|
1041
|
-
case "ResourceExistsException":
|
|
1042
|
-
case "com.amazonaws.secretsmanager#ResourceExistsException":
|
|
1043
|
-
throw await de_ResourceExistsExceptionRes(parsedOutput, context);
|
|
1044
|
-
case "ResourceNotFoundException":
|
|
1045
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1046
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1047
|
-
default:
|
|
1048
|
-
const parsedBody = parsedOutput.body;
|
|
1049
|
-
return throwDefaultError({
|
|
1050
|
-
output,
|
|
1051
|
-
parsedBody,
|
|
1052
|
-
errorCode,
|
|
1053
|
-
});
|
|
1054
|
-
}
|
|
1055
|
-
};
|
|
1056
411
|
export const de_UpdateSecretVersionStageCommand = async (output, context) => {
|
|
1057
412
|
if (output.statusCode >= 300) {
|
|
1058
|
-
return
|
|
413
|
+
return de_CommandError(output, context);
|
|
1059
414
|
}
|
|
1060
415
|
const data = await parseBody(output.body, context);
|
|
1061
416
|
let contents = {};
|
|
@@ -1066,40 +421,9 @@ export const de_UpdateSecretVersionStageCommand = async (output, context) => {
|
|
|
1066
421
|
};
|
|
1067
422
|
return response;
|
|
1068
423
|
};
|
|
1069
|
-
const de_UpdateSecretVersionStageCommandError = async (output, context) => {
|
|
1070
|
-
const parsedOutput = {
|
|
1071
|
-
...output,
|
|
1072
|
-
body: await parseErrorBody(output.body, context),
|
|
1073
|
-
};
|
|
1074
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1075
|
-
switch (errorCode) {
|
|
1076
|
-
case "InternalServiceError":
|
|
1077
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1078
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
1079
|
-
case "InvalidParameterException":
|
|
1080
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1081
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1082
|
-
case "InvalidRequestException":
|
|
1083
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1084
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1085
|
-
case "LimitExceededException":
|
|
1086
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
1087
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1088
|
-
case "ResourceNotFoundException":
|
|
1089
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1090
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1091
|
-
default:
|
|
1092
|
-
const parsedBody = parsedOutput.body;
|
|
1093
|
-
return throwDefaultError({
|
|
1094
|
-
output,
|
|
1095
|
-
parsedBody,
|
|
1096
|
-
errorCode,
|
|
1097
|
-
});
|
|
1098
|
-
}
|
|
1099
|
-
};
|
|
1100
424
|
export const de_ValidateResourcePolicyCommand = async (output, context) => {
|
|
1101
425
|
if (output.statusCode >= 300) {
|
|
1102
|
-
return
|
|
426
|
+
return de_CommandError(output, context);
|
|
1103
427
|
}
|
|
1104
428
|
const data = await parseBody(output.body, context);
|
|
1105
429
|
let contents = {};
|
|
@@ -1110,28 +434,49 @@ export const de_ValidateResourcePolicyCommand = async (output, context) => {
|
|
|
1110
434
|
};
|
|
1111
435
|
return response;
|
|
1112
436
|
};
|
|
1113
|
-
const
|
|
437
|
+
const de_CommandError = async (output, context) => {
|
|
1114
438
|
const parsedOutput = {
|
|
1115
439
|
...output,
|
|
1116
440
|
body: await parseErrorBody(output.body, context),
|
|
1117
441
|
};
|
|
1118
442
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1119
443
|
switch (errorCode) {
|
|
444
|
+
case "DecryptionFailure":
|
|
445
|
+
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
446
|
+
throw await de_DecryptionFailureRes(parsedOutput, context);
|
|
1120
447
|
case "InternalServiceError":
|
|
1121
448
|
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1122
449
|
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
450
|
+
case "InvalidNextTokenException":
|
|
451
|
+
case "com.amazonaws.secretsmanager#InvalidNextTokenException":
|
|
452
|
+
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
1123
453
|
case "InvalidParameterException":
|
|
1124
454
|
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1125
455
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1126
456
|
case "InvalidRequestException":
|
|
1127
457
|
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1128
458
|
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1129
|
-
case "MalformedPolicyDocumentException":
|
|
1130
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
1131
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
1132
459
|
case "ResourceNotFoundException":
|
|
1133
460
|
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1134
461
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
462
|
+
case "EncryptionFailure":
|
|
463
|
+
case "com.amazonaws.secretsmanager#EncryptionFailure":
|
|
464
|
+
throw await de_EncryptionFailureRes(parsedOutput, context);
|
|
465
|
+
case "LimitExceededException":
|
|
466
|
+
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
467
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
468
|
+
case "MalformedPolicyDocumentException":
|
|
469
|
+
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
470
|
+
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
471
|
+
case "PreconditionNotMetException":
|
|
472
|
+
case "com.amazonaws.secretsmanager#PreconditionNotMetException":
|
|
473
|
+
throw await de_PreconditionNotMetExceptionRes(parsedOutput, context);
|
|
474
|
+
case "ResourceExistsException":
|
|
475
|
+
case "com.amazonaws.secretsmanager#ResourceExistsException":
|
|
476
|
+
throw await de_ResourceExistsExceptionRes(parsedOutput, context);
|
|
477
|
+
case "PublicPolicyException":
|
|
478
|
+
case "com.amazonaws.secretsmanager#PublicPolicyException":
|
|
479
|
+
throw await de_PublicPolicyExceptionRes(parsedOutput, context);
|
|
1135
480
|
default:
|
|
1136
481
|
const parsedBody = parsedOutput.body;
|
|
1137
482
|
return throwDefaultError({
|