@aws-sdk/client-secrets-manager 3.47.2 → 3.51.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/CHANGELOG.md +35 -0
- package/README.md +0 -27
- package/dist-cjs/endpoints.js +9 -0
- package/dist-cjs/protocols/Aws_json1_1.js +31 -0
- package/dist-es/endpoints.js +9 -0
- package/dist-es/protocols/Aws_json1_1.js +183 -155
- package/dist-types/SecretsManager.d.ts +148 -45
- package/dist-types/SecretsManagerClient.d.ts +8 -28
- package/dist-types/commands/CancelRotateSecretCommand.d.ts +6 -0
- package/dist-types/commands/CreateSecretCommand.d.ts +6 -0
- package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +6 -0
- package/dist-types/commands/DeleteSecretCommand.d.ts +6 -0
- package/dist-types/commands/DescribeSecretCommand.d.ts +6 -0
- package/dist-types/commands/GetRandomPasswordCommand.d.ts +6 -0
- package/dist-types/commands/GetResourcePolicyCommand.d.ts +6 -0
- package/dist-types/commands/GetSecretValueCommand.d.ts +11 -3
- package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +5 -5
- package/dist-types/commands/ListSecretsCommand.d.ts +5 -4
- package/dist-types/commands/PutResourcePolicyCommand.d.ts +6 -0
- package/dist-types/commands/PutSecretValueCommand.d.ts +6 -0
- package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +6 -0
- package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +6 -0
- package/dist-types/commands/RestoreSecretCommand.d.ts +6 -0
- package/dist-types/commands/RotateSecretCommand.d.ts +8 -2
- package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +6 -0
- package/dist-types/commands/TagResourceCommand.d.ts +6 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +6 -0
- package/dist-types/commands/UpdateSecretCommand.d.ts +9 -3
- package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +6 -0
- package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +6 -0
- package/dist-types/models/models_0.d.ts +69 -20
- package/dist-types/ts3.4/models/models_0.d.ts +12 -6
- package/package.json +39 -33
|
@@ -343,100 +343,108 @@ export var deserializeAws_json1_1CreateSecretCommand = function (output, context
|
|
|
343
343
|
});
|
|
344
344
|
}); };
|
|
345
345
|
var deserializeAws_json1_1CreateSecretCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
346
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, parsedBody, message;
|
|
347
|
-
var
|
|
348
|
-
return __generator(this, function (
|
|
349
|
-
switch (
|
|
346
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, parsedBody, message;
|
|
347
|
+
var _o;
|
|
348
|
+
return __generator(this, function (_p) {
|
|
349
|
+
switch (_p.label) {
|
|
350
350
|
case 0:
|
|
351
351
|
_a = [__assign({}, output)];
|
|
352
|
-
|
|
352
|
+
_o = {};
|
|
353
353
|
return [4, parseBody(output.body, context)];
|
|
354
354
|
case 1:
|
|
355
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
355
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_o.body = _p.sent(), _o)]));
|
|
356
356
|
errorCode = "UnknownError";
|
|
357
357
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
358
358
|
_b = errorCode;
|
|
359
359
|
switch (_b) {
|
|
360
|
-
case "
|
|
361
|
-
case "com.amazonaws.secretsmanager#
|
|
362
|
-
case "
|
|
363
|
-
case "com.amazonaws.secretsmanager#
|
|
364
|
-
case "
|
|
365
|
-
case "com.amazonaws.secretsmanager#
|
|
366
|
-
case "
|
|
367
|
-
case "com.amazonaws.secretsmanager#
|
|
368
|
-
case "
|
|
369
|
-
case "com.amazonaws.secretsmanager#
|
|
370
|
-
case "
|
|
371
|
-
case "com.amazonaws.secretsmanager#
|
|
372
|
-
case "
|
|
373
|
-
case "com.amazonaws.secretsmanager#
|
|
374
|
-
case "
|
|
375
|
-
case "com.amazonaws.secretsmanager#
|
|
376
|
-
case "
|
|
377
|
-
case "com.amazonaws.secretsmanager#
|
|
360
|
+
case "DecryptionFailure": return [3, 2];
|
|
361
|
+
case "com.amazonaws.secretsmanager#DecryptionFailure": return [3, 2];
|
|
362
|
+
case "EncryptionFailure": return [3, 4];
|
|
363
|
+
case "com.amazonaws.secretsmanager#EncryptionFailure": return [3, 4];
|
|
364
|
+
case "InternalServiceError": return [3, 6];
|
|
365
|
+
case "com.amazonaws.secretsmanager#InternalServiceError": return [3, 6];
|
|
366
|
+
case "InvalidParameterException": return [3, 8];
|
|
367
|
+
case "com.amazonaws.secretsmanager#InvalidParameterException": return [3, 8];
|
|
368
|
+
case "InvalidRequestException": return [3, 10];
|
|
369
|
+
case "com.amazonaws.secretsmanager#InvalidRequestException": return [3, 10];
|
|
370
|
+
case "LimitExceededException": return [3, 12];
|
|
371
|
+
case "com.amazonaws.secretsmanager#LimitExceededException": return [3, 12];
|
|
372
|
+
case "MalformedPolicyDocumentException": return [3, 14];
|
|
373
|
+
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException": return [3, 14];
|
|
374
|
+
case "PreconditionNotMetException": return [3, 16];
|
|
375
|
+
case "com.amazonaws.secretsmanager#PreconditionNotMetException": return [3, 16];
|
|
376
|
+
case "ResourceExistsException": return [3, 18];
|
|
377
|
+
case "com.amazonaws.secretsmanager#ResourceExistsException": return [3, 18];
|
|
378
|
+
case "ResourceNotFoundException": return [3, 20];
|
|
379
|
+
case "com.amazonaws.secretsmanager#ResourceNotFoundException": return [3, 20];
|
|
378
380
|
}
|
|
379
|
-
return [3,
|
|
381
|
+
return [3, 22];
|
|
380
382
|
case 2:
|
|
381
383
|
_c = [{}];
|
|
382
|
-
return [4,
|
|
384
|
+
return [4, deserializeAws_json1_1DecryptionFailureResponse(parsedOutput, context)];
|
|
383
385
|
case 3:
|
|
384
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
385
|
-
return [3,
|
|
386
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
387
|
+
return [3, 23];
|
|
386
388
|
case 4:
|
|
387
389
|
_d = [{}];
|
|
388
|
-
return [4,
|
|
390
|
+
return [4, deserializeAws_json1_1EncryptionFailureResponse(parsedOutput, context)];
|
|
389
391
|
case 5:
|
|
390
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
391
|
-
return [3,
|
|
392
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
393
|
+
return [3, 23];
|
|
392
394
|
case 6:
|
|
393
395
|
_e = [{}];
|
|
394
|
-
return [4,
|
|
396
|
+
return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
395
397
|
case 7:
|
|
396
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
397
|
-
return [3,
|
|
398
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
399
|
+
return [3, 23];
|
|
398
400
|
case 8:
|
|
399
401
|
_f = [{}];
|
|
400
|
-
return [4,
|
|
402
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
401
403
|
case 9:
|
|
402
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
403
|
-
return [3,
|
|
404
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
405
|
+
return [3, 23];
|
|
404
406
|
case 10:
|
|
405
407
|
_g = [{}];
|
|
406
|
-
return [4,
|
|
408
|
+
return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
407
409
|
case 11:
|
|
408
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
409
|
-
return [3,
|
|
410
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
411
|
+
return [3, 23];
|
|
410
412
|
case 12:
|
|
411
413
|
_h = [{}];
|
|
412
|
-
return [4,
|
|
414
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
413
415
|
case 13:
|
|
414
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(
|
|
415
|
-
return [3,
|
|
416
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
417
|
+
return [3, 23];
|
|
416
418
|
case 14:
|
|
417
419
|
_j = [{}];
|
|
418
|
-
return [4,
|
|
420
|
+
return [4, deserializeAws_json1_1MalformedPolicyDocumentExceptionResponse(parsedOutput, context)];
|
|
419
421
|
case 15:
|
|
420
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(
|
|
421
|
-
return [3,
|
|
422
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
423
|
+
return [3, 23];
|
|
422
424
|
case 16:
|
|
423
425
|
_k = [{}];
|
|
424
|
-
return [4,
|
|
426
|
+
return [4, deserializeAws_json1_1PreconditionNotMetExceptionResponse(parsedOutput, context)];
|
|
425
427
|
case 17:
|
|
426
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(
|
|
427
|
-
return [3,
|
|
428
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
429
|
+
return [3, 23];
|
|
428
430
|
case 18:
|
|
429
431
|
_l = [{}];
|
|
430
|
-
return [4,
|
|
432
|
+
return [4, deserializeAws_json1_1ResourceExistsExceptionResponse(parsedOutput, context)];
|
|
431
433
|
case 19:
|
|
432
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(
|
|
433
|
-
return [3,
|
|
434
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
435
|
+
return [3, 23];
|
|
434
436
|
case 20:
|
|
437
|
+
_m = [{}];
|
|
438
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
439
|
+
case 21:
|
|
440
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
441
|
+
return [3, 23];
|
|
442
|
+
case 22:
|
|
435
443
|
parsedBody = parsedOutput.body;
|
|
436
444
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
437
445
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
438
|
-
|
|
439
|
-
case
|
|
446
|
+
_p.label = 23;
|
|
447
|
+
case 23:
|
|
440
448
|
message = response.message || response.Message || errorCode;
|
|
441
449
|
response.message = message;
|
|
442
450
|
delete response.Message;
|
|
@@ -1183,84 +1191,92 @@ export var deserializeAws_json1_1PutSecretValueCommand = function (output, conte
|
|
|
1183
1191
|
});
|
|
1184
1192
|
}); };
|
|
1185
1193
|
var deserializeAws_json1_1PutSecretValueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1186
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
1187
|
-
var
|
|
1188
|
-
return __generator(this, function (
|
|
1189
|
-
switch (
|
|
1194
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;
|
|
1195
|
+
var _l;
|
|
1196
|
+
return __generator(this, function (_m) {
|
|
1197
|
+
switch (_m.label) {
|
|
1190
1198
|
case 0:
|
|
1191
1199
|
_a = [__assign({}, output)];
|
|
1192
|
-
|
|
1200
|
+
_l = {};
|
|
1193
1201
|
return [4, parseBody(output.body, context)];
|
|
1194
1202
|
case 1:
|
|
1195
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
1203
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
1196
1204
|
errorCode = "UnknownError";
|
|
1197
1205
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1198
1206
|
_b = errorCode;
|
|
1199
1207
|
switch (_b) {
|
|
1200
|
-
case "
|
|
1201
|
-
case "com.amazonaws.secretsmanager#
|
|
1202
|
-
case "
|
|
1203
|
-
case "com.amazonaws.secretsmanager#
|
|
1204
|
-
case "
|
|
1205
|
-
case "com.amazonaws.secretsmanager#
|
|
1206
|
-
case "
|
|
1207
|
-
case "com.amazonaws.secretsmanager#
|
|
1208
|
-
case "
|
|
1209
|
-
case "com.amazonaws.secretsmanager#
|
|
1210
|
-
case "
|
|
1211
|
-
case "com.amazonaws.secretsmanager#
|
|
1212
|
-
case "
|
|
1213
|
-
case "com.amazonaws.secretsmanager#
|
|
1208
|
+
case "DecryptionFailure": return [3, 2];
|
|
1209
|
+
case "com.amazonaws.secretsmanager#DecryptionFailure": return [3, 2];
|
|
1210
|
+
case "EncryptionFailure": return [3, 4];
|
|
1211
|
+
case "com.amazonaws.secretsmanager#EncryptionFailure": return [3, 4];
|
|
1212
|
+
case "InternalServiceError": return [3, 6];
|
|
1213
|
+
case "com.amazonaws.secretsmanager#InternalServiceError": return [3, 6];
|
|
1214
|
+
case "InvalidParameterException": return [3, 8];
|
|
1215
|
+
case "com.amazonaws.secretsmanager#InvalidParameterException": return [3, 8];
|
|
1216
|
+
case "InvalidRequestException": return [3, 10];
|
|
1217
|
+
case "com.amazonaws.secretsmanager#InvalidRequestException": return [3, 10];
|
|
1218
|
+
case "LimitExceededException": return [3, 12];
|
|
1219
|
+
case "com.amazonaws.secretsmanager#LimitExceededException": return [3, 12];
|
|
1220
|
+
case "ResourceExistsException": return [3, 14];
|
|
1221
|
+
case "com.amazonaws.secretsmanager#ResourceExistsException": return [3, 14];
|
|
1222
|
+
case "ResourceNotFoundException": return [3, 16];
|
|
1223
|
+
case "com.amazonaws.secretsmanager#ResourceNotFoundException": return [3, 16];
|
|
1214
1224
|
}
|
|
1215
|
-
return [3,
|
|
1225
|
+
return [3, 18];
|
|
1216
1226
|
case 2:
|
|
1217
1227
|
_c = [{}];
|
|
1218
|
-
return [4,
|
|
1228
|
+
return [4, deserializeAws_json1_1DecryptionFailureResponse(parsedOutput, context)];
|
|
1219
1229
|
case 3:
|
|
1220
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
1221
|
-
return [3,
|
|
1230
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1231
|
+
return [3, 19];
|
|
1222
1232
|
case 4:
|
|
1223
1233
|
_d = [{}];
|
|
1224
|
-
return [4,
|
|
1234
|
+
return [4, deserializeAws_json1_1EncryptionFailureResponse(parsedOutput, context)];
|
|
1225
1235
|
case 5:
|
|
1226
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
1227
|
-
return [3,
|
|
1236
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1237
|
+
return [3, 19];
|
|
1228
1238
|
case 6:
|
|
1229
1239
|
_e = [{}];
|
|
1230
|
-
return [4,
|
|
1240
|
+
return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
1231
1241
|
case 7:
|
|
1232
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
1233
|
-
return [3,
|
|
1242
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1243
|
+
return [3, 19];
|
|
1234
1244
|
case 8:
|
|
1235
1245
|
_f = [{}];
|
|
1236
|
-
return [4,
|
|
1246
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1237
1247
|
case 9:
|
|
1238
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
1239
|
-
return [3,
|
|
1248
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1249
|
+
return [3, 19];
|
|
1240
1250
|
case 10:
|
|
1241
1251
|
_g = [{}];
|
|
1242
|
-
return [4,
|
|
1252
|
+
return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1243
1253
|
case 11:
|
|
1244
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
1245
|
-
return [3,
|
|
1254
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1255
|
+
return [3, 19];
|
|
1246
1256
|
case 12:
|
|
1247
1257
|
_h = [{}];
|
|
1248
|
-
return [4,
|
|
1258
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
1249
1259
|
case 13:
|
|
1250
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(
|
|
1251
|
-
return [3,
|
|
1260
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1261
|
+
return [3, 19];
|
|
1252
1262
|
case 14:
|
|
1253
1263
|
_j = [{}];
|
|
1254
|
-
return [4,
|
|
1264
|
+
return [4, deserializeAws_json1_1ResourceExistsExceptionResponse(parsedOutput, context)];
|
|
1255
1265
|
case 15:
|
|
1256
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(
|
|
1257
|
-
return [3,
|
|
1266
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1267
|
+
return [3, 19];
|
|
1258
1268
|
case 16:
|
|
1269
|
+
_k = [{}];
|
|
1270
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1271
|
+
case 17:
|
|
1272
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1273
|
+
return [3, 19];
|
|
1274
|
+
case 18:
|
|
1259
1275
|
parsedBody = parsedOutput.body;
|
|
1260
1276
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1261
1277
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1262
|
-
|
|
1263
|
-
case
|
|
1278
|
+
_m.label = 19;
|
|
1279
|
+
case 19:
|
|
1264
1280
|
message = response.message || response.Message || errorCode;
|
|
1265
1281
|
response.message = message;
|
|
1266
1282
|
delete response.Message;
|
|
@@ -1847,100 +1863,108 @@ export var deserializeAws_json1_1UpdateSecretCommand = function (output, context
|
|
|
1847
1863
|
});
|
|
1848
1864
|
}); };
|
|
1849
1865
|
var deserializeAws_json1_1UpdateSecretCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1850
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, parsedBody, message;
|
|
1851
|
-
var
|
|
1852
|
-
return __generator(this, function (
|
|
1853
|
-
switch (
|
|
1866
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, parsedBody, message;
|
|
1867
|
+
var _o;
|
|
1868
|
+
return __generator(this, function (_p) {
|
|
1869
|
+
switch (_p.label) {
|
|
1854
1870
|
case 0:
|
|
1855
1871
|
_a = [__assign({}, output)];
|
|
1856
|
-
|
|
1872
|
+
_o = {};
|
|
1857
1873
|
return [4, parseBody(output.body, context)];
|
|
1858
1874
|
case 1:
|
|
1859
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
1875
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_o.body = _p.sent(), _o)]));
|
|
1860
1876
|
errorCode = "UnknownError";
|
|
1861
1877
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1862
1878
|
_b = errorCode;
|
|
1863
1879
|
switch (_b) {
|
|
1864
|
-
case "
|
|
1865
|
-
case "com.amazonaws.secretsmanager#
|
|
1866
|
-
case "
|
|
1867
|
-
case "com.amazonaws.secretsmanager#
|
|
1868
|
-
case "
|
|
1869
|
-
case "com.amazonaws.secretsmanager#
|
|
1870
|
-
case "
|
|
1871
|
-
case "com.amazonaws.secretsmanager#
|
|
1872
|
-
case "
|
|
1873
|
-
case "com.amazonaws.secretsmanager#
|
|
1874
|
-
case "
|
|
1875
|
-
case "com.amazonaws.secretsmanager#
|
|
1876
|
-
case "
|
|
1877
|
-
case "com.amazonaws.secretsmanager#
|
|
1878
|
-
case "
|
|
1879
|
-
case "com.amazonaws.secretsmanager#
|
|
1880
|
-
case "
|
|
1881
|
-
case "com.amazonaws.secretsmanager#
|
|
1880
|
+
case "DecryptionFailure": return [3, 2];
|
|
1881
|
+
case "com.amazonaws.secretsmanager#DecryptionFailure": return [3, 2];
|
|
1882
|
+
case "EncryptionFailure": return [3, 4];
|
|
1883
|
+
case "com.amazonaws.secretsmanager#EncryptionFailure": return [3, 4];
|
|
1884
|
+
case "InternalServiceError": return [3, 6];
|
|
1885
|
+
case "com.amazonaws.secretsmanager#InternalServiceError": return [3, 6];
|
|
1886
|
+
case "InvalidParameterException": return [3, 8];
|
|
1887
|
+
case "com.amazonaws.secretsmanager#InvalidParameterException": return [3, 8];
|
|
1888
|
+
case "InvalidRequestException": return [3, 10];
|
|
1889
|
+
case "com.amazonaws.secretsmanager#InvalidRequestException": return [3, 10];
|
|
1890
|
+
case "LimitExceededException": return [3, 12];
|
|
1891
|
+
case "com.amazonaws.secretsmanager#LimitExceededException": return [3, 12];
|
|
1892
|
+
case "MalformedPolicyDocumentException": return [3, 14];
|
|
1893
|
+
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException": return [3, 14];
|
|
1894
|
+
case "PreconditionNotMetException": return [3, 16];
|
|
1895
|
+
case "com.amazonaws.secretsmanager#PreconditionNotMetException": return [3, 16];
|
|
1896
|
+
case "ResourceExistsException": return [3, 18];
|
|
1897
|
+
case "com.amazonaws.secretsmanager#ResourceExistsException": return [3, 18];
|
|
1898
|
+
case "ResourceNotFoundException": return [3, 20];
|
|
1899
|
+
case "com.amazonaws.secretsmanager#ResourceNotFoundException": return [3, 20];
|
|
1882
1900
|
}
|
|
1883
|
-
return [3,
|
|
1901
|
+
return [3, 22];
|
|
1884
1902
|
case 2:
|
|
1885
1903
|
_c = [{}];
|
|
1886
|
-
return [4,
|
|
1904
|
+
return [4, deserializeAws_json1_1DecryptionFailureResponse(parsedOutput, context)];
|
|
1887
1905
|
case 3:
|
|
1888
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
1889
|
-
return [3,
|
|
1906
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1907
|
+
return [3, 23];
|
|
1890
1908
|
case 4:
|
|
1891
1909
|
_d = [{}];
|
|
1892
|
-
return [4,
|
|
1910
|
+
return [4, deserializeAws_json1_1EncryptionFailureResponse(parsedOutput, context)];
|
|
1893
1911
|
case 5:
|
|
1894
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
1895
|
-
return [3,
|
|
1912
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1913
|
+
return [3, 23];
|
|
1896
1914
|
case 6:
|
|
1897
1915
|
_e = [{}];
|
|
1898
|
-
return [4,
|
|
1916
|
+
return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
1899
1917
|
case 7:
|
|
1900
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
1901
|
-
return [3,
|
|
1918
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1919
|
+
return [3, 23];
|
|
1902
1920
|
case 8:
|
|
1903
1921
|
_f = [{}];
|
|
1904
|
-
return [4,
|
|
1922
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1905
1923
|
case 9:
|
|
1906
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
1907
|
-
return [3,
|
|
1924
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1925
|
+
return [3, 23];
|
|
1908
1926
|
case 10:
|
|
1909
1927
|
_g = [{}];
|
|
1910
|
-
return [4,
|
|
1928
|
+
return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1911
1929
|
case 11:
|
|
1912
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
1913
|
-
return [3,
|
|
1930
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1931
|
+
return [3, 23];
|
|
1914
1932
|
case 12:
|
|
1915
1933
|
_h = [{}];
|
|
1916
|
-
return [4,
|
|
1934
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
1917
1935
|
case 13:
|
|
1918
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(
|
|
1919
|
-
return [3,
|
|
1936
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1937
|
+
return [3, 23];
|
|
1920
1938
|
case 14:
|
|
1921
1939
|
_j = [{}];
|
|
1922
|
-
return [4,
|
|
1940
|
+
return [4, deserializeAws_json1_1MalformedPolicyDocumentExceptionResponse(parsedOutput, context)];
|
|
1923
1941
|
case 15:
|
|
1924
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(
|
|
1925
|
-
return [3,
|
|
1942
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1943
|
+
return [3, 23];
|
|
1926
1944
|
case 16:
|
|
1927
1945
|
_k = [{}];
|
|
1928
|
-
return [4,
|
|
1946
|
+
return [4, deserializeAws_json1_1PreconditionNotMetExceptionResponse(parsedOutput, context)];
|
|
1929
1947
|
case 17:
|
|
1930
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(
|
|
1931
|
-
return [3,
|
|
1948
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1949
|
+
return [3, 23];
|
|
1932
1950
|
case 18:
|
|
1933
1951
|
_l = [{}];
|
|
1934
|
-
return [4,
|
|
1952
|
+
return [4, deserializeAws_json1_1ResourceExistsExceptionResponse(parsedOutput, context)];
|
|
1935
1953
|
case 19:
|
|
1936
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(
|
|
1937
|
-
return [3,
|
|
1954
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1955
|
+
return [3, 23];
|
|
1938
1956
|
case 20:
|
|
1957
|
+
_m = [{}];
|
|
1958
|
+
return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1959
|
+
case 21:
|
|
1960
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1961
|
+
return [3, 23];
|
|
1962
|
+
case 22:
|
|
1939
1963
|
parsedBody = parsedOutput.body;
|
|
1940
1964
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1941
1965
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1942
|
-
|
|
1943
|
-
case
|
|
1966
|
+
_p.label = 23;
|
|
1967
|
+
case 23:
|
|
1944
1968
|
message = response.message || response.Message || errorCode;
|
|
1945
1969
|
response.message = message;
|
|
1946
1970
|
delete response.Message;
|
|
@@ -2358,15 +2382,17 @@ var serializeAws_json1_1RestoreSecretRequest = function (input, context) {
|
|
|
2358
2382
|
};
|
|
2359
2383
|
var serializeAws_json1_1RotateSecretRequest = function (input, context) {
|
|
2360
2384
|
var _a;
|
|
2361
|
-
return __assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.
|
|
2385
|
+
return __assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.RotateImmediately !== undefined &&
|
|
2386
|
+
input.RotateImmediately !== null && { RotateImmediately: input.RotateImmediately })), (input.RotationLambdaARN !== undefined &&
|
|
2362
2387
|
input.RotationLambdaARN !== null && { RotationLambdaARN: input.RotationLambdaARN })), (input.RotationRules !== undefined &&
|
|
2363
2388
|
input.RotationRules !== null && {
|
|
2364
2389
|
RotationRules: serializeAws_json1_1RotationRulesType(input.RotationRules, context),
|
|
2365
2390
|
})), (input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }));
|
|
2366
2391
|
};
|
|
2367
2392
|
var serializeAws_json1_1RotationRulesType = function (input, context) {
|
|
2368
|
-
return __assign({}, (input.AutomaticallyAfterDays !== undefined &&
|
|
2369
|
-
input.AutomaticallyAfterDays !== null && { AutomaticallyAfterDays: input.AutomaticallyAfterDays }))
|
|
2393
|
+
return __assign(__assign(__assign({}, (input.AutomaticallyAfterDays !== undefined &&
|
|
2394
|
+
input.AutomaticallyAfterDays !== null && { AutomaticallyAfterDays: input.AutomaticallyAfterDays })), (input.Duration !== undefined && input.Duration !== null && { Duration: input.Duration })), (input.ScheduleExpression !== undefined &&
|
|
2395
|
+
input.ScheduleExpression !== null && { ScheduleExpression: input.ScheduleExpression }));
|
|
2370
2396
|
};
|
|
2371
2397
|
var serializeAws_json1_1SecretVersionStagesType = function (input, context) {
|
|
2372
2398
|
return input
|
|
@@ -2683,6 +2709,8 @@ var deserializeAws_json1_1RotateSecretResponse = function (output, context) {
|
|
|
2683
2709
|
var deserializeAws_json1_1RotationRulesType = function (output, context) {
|
|
2684
2710
|
return {
|
|
2685
2711
|
AutomaticallyAfterDays: __expectLong(output.AutomaticallyAfterDays),
|
|
2712
|
+
Duration: __expectString(output.Duration),
|
|
2713
|
+
ScheduleExpression: __expectString(output.ScheduleExpression),
|
|
2686
2714
|
};
|
|
2687
2715
|
};
|
|
2688
2716
|
var deserializeAws_json1_1SecretListEntry = function (output, context) {
|