@aws-sdk/client-ram 3.118.1 → 3.121.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 +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +125 -101
- package/dist-es/protocols/Aws_restJson1.js +125 -101
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-ram
|
|
@@ -694,8 +694,7 @@ const deserializeAws_restJson1AcceptResourceShareInvitationCommandError = async
|
|
|
694
694
|
body: await parseBody(output.body, context),
|
|
695
695
|
};
|
|
696
696
|
let response;
|
|
697
|
-
|
|
698
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
697
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
699
698
|
switch (errorCode) {
|
|
700
699
|
case "IdempotentParameterMismatchException":
|
|
701
700
|
case "com.amazonaws.ram#IdempotentParameterMismatchException":
|
|
@@ -729,10 +728,12 @@ const deserializeAws_restJson1AcceptResourceShareInvitationCommandError = async
|
|
|
729
728
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
730
729
|
default:
|
|
731
730
|
const parsedBody = parsedOutput.body;
|
|
731
|
+
const $metadata = deserializeMetadata(output);
|
|
732
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
732
733
|
response = new RAMServiceException_1.RAMServiceException({
|
|
733
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
734
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
734
735
|
$fault: "client",
|
|
735
|
-
$metadata
|
|
736
|
+
$metadata,
|
|
736
737
|
});
|
|
737
738
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
738
739
|
}
|
|
@@ -762,8 +763,7 @@ const deserializeAws_restJson1AssociateResourceShareCommandError = async (output
|
|
|
762
763
|
body: await parseBody(output.body, context),
|
|
763
764
|
};
|
|
764
765
|
let response;
|
|
765
|
-
|
|
766
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
766
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
767
767
|
switch (errorCode) {
|
|
768
768
|
case "IdempotentParameterMismatchException":
|
|
769
769
|
case "com.amazonaws.ram#IdempotentParameterMismatchException":
|
|
@@ -800,10 +800,12 @@ const deserializeAws_restJson1AssociateResourceShareCommandError = async (output
|
|
|
800
800
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
801
801
|
default:
|
|
802
802
|
const parsedBody = parsedOutput.body;
|
|
803
|
+
const $metadata = deserializeMetadata(output);
|
|
804
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
803
805
|
response = new RAMServiceException_1.RAMServiceException({
|
|
804
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
806
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
805
807
|
$fault: "client",
|
|
806
|
-
$metadata
|
|
808
|
+
$metadata,
|
|
807
809
|
});
|
|
808
810
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
809
811
|
}
|
|
@@ -833,8 +835,7 @@ const deserializeAws_restJson1AssociateResourceSharePermissionCommandError = asy
|
|
|
833
835
|
body: await parseBody(output.body, context),
|
|
834
836
|
};
|
|
835
837
|
let response;
|
|
836
|
-
|
|
837
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
838
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
838
839
|
switch (errorCode) {
|
|
839
840
|
case "InvalidClientTokenException":
|
|
840
841
|
case "com.amazonaws.ram#InvalidClientTokenException":
|
|
@@ -859,10 +860,12 @@ const deserializeAws_restJson1AssociateResourceSharePermissionCommandError = asy
|
|
|
859
860
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
860
861
|
default:
|
|
861
862
|
const parsedBody = parsedOutput.body;
|
|
863
|
+
const $metadata = deserializeMetadata(output);
|
|
864
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
862
865
|
response = new RAMServiceException_1.RAMServiceException({
|
|
863
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
866
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
864
867
|
$fault: "client",
|
|
865
|
-
$metadata
|
|
868
|
+
$metadata,
|
|
866
869
|
});
|
|
867
870
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
868
871
|
}
|
|
@@ -892,8 +895,7 @@ const deserializeAws_restJson1CreateResourceShareCommandError = async (output, c
|
|
|
892
895
|
body: await parseBody(output.body, context),
|
|
893
896
|
};
|
|
894
897
|
let response;
|
|
895
|
-
|
|
896
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
898
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
897
899
|
switch (errorCode) {
|
|
898
900
|
case "IdempotentParameterMismatchException":
|
|
899
901
|
case "com.amazonaws.ram#IdempotentParameterMismatchException":
|
|
@@ -930,10 +932,12 @@ const deserializeAws_restJson1CreateResourceShareCommandError = async (output, c
|
|
|
930
932
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
931
933
|
default:
|
|
932
934
|
const parsedBody = parsedOutput.body;
|
|
935
|
+
const $metadata = deserializeMetadata(output);
|
|
936
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
933
937
|
response = new RAMServiceException_1.RAMServiceException({
|
|
934
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
938
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
935
939
|
$fault: "client",
|
|
936
|
-
$metadata
|
|
940
|
+
$metadata,
|
|
937
941
|
});
|
|
938
942
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
939
943
|
}
|
|
@@ -963,8 +967,7 @@ const deserializeAws_restJson1DeleteResourceShareCommandError = async (output, c
|
|
|
963
967
|
body: await parseBody(output.body, context),
|
|
964
968
|
};
|
|
965
969
|
let response;
|
|
966
|
-
|
|
967
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
970
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
968
971
|
switch (errorCode) {
|
|
969
972
|
case "IdempotentParameterMismatchException":
|
|
970
973
|
case "com.amazonaws.ram#IdempotentParameterMismatchException":
|
|
@@ -995,10 +998,12 @@ const deserializeAws_restJson1DeleteResourceShareCommandError = async (output, c
|
|
|
995
998
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
996
999
|
default:
|
|
997
1000
|
const parsedBody = parsedOutput.body;
|
|
1001
|
+
const $metadata = deserializeMetadata(output);
|
|
1002
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
998
1003
|
response = new RAMServiceException_1.RAMServiceException({
|
|
999
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1004
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1000
1005
|
$fault: "client",
|
|
1001
|
-
$metadata
|
|
1006
|
+
$metadata,
|
|
1002
1007
|
});
|
|
1003
1008
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1004
1009
|
}
|
|
@@ -1028,8 +1033,7 @@ const deserializeAws_restJson1DisassociateResourceShareCommandError = async (out
|
|
|
1028
1033
|
body: await parseBody(output.body, context),
|
|
1029
1034
|
};
|
|
1030
1035
|
let response;
|
|
1031
|
-
|
|
1032
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1036
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1033
1037
|
switch (errorCode) {
|
|
1034
1038
|
case "IdempotentParameterMismatchException":
|
|
1035
1039
|
case "com.amazonaws.ram#IdempotentParameterMismatchException":
|
|
@@ -1063,10 +1067,12 @@ const deserializeAws_restJson1DisassociateResourceShareCommandError = async (out
|
|
|
1063
1067
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1064
1068
|
default:
|
|
1065
1069
|
const parsedBody = parsedOutput.body;
|
|
1070
|
+
const $metadata = deserializeMetadata(output);
|
|
1071
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1066
1072
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1067
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1073
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1068
1074
|
$fault: "client",
|
|
1069
|
-
$metadata
|
|
1075
|
+
$metadata,
|
|
1070
1076
|
});
|
|
1071
1077
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1072
1078
|
}
|
|
@@ -1096,8 +1102,7 @@ const deserializeAws_restJson1DisassociateResourceSharePermissionCommandError =
|
|
|
1096
1102
|
body: await parseBody(output.body, context),
|
|
1097
1103
|
};
|
|
1098
1104
|
let response;
|
|
1099
|
-
|
|
1100
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1105
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1101
1106
|
switch (errorCode) {
|
|
1102
1107
|
case "InvalidClientTokenException":
|
|
1103
1108
|
case "com.amazonaws.ram#InvalidClientTokenException":
|
|
@@ -1125,10 +1130,12 @@ const deserializeAws_restJson1DisassociateResourceSharePermissionCommandError =
|
|
|
1125
1130
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1126
1131
|
default:
|
|
1127
1132
|
const parsedBody = parsedOutput.body;
|
|
1133
|
+
const $metadata = deserializeMetadata(output);
|
|
1134
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1128
1135
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1129
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1136
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1130
1137
|
$fault: "client",
|
|
1131
|
-
$metadata
|
|
1138
|
+
$metadata,
|
|
1132
1139
|
});
|
|
1133
1140
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1134
1141
|
}
|
|
@@ -1154,8 +1161,7 @@ const deserializeAws_restJson1EnableSharingWithAwsOrganizationCommandError = asy
|
|
|
1154
1161
|
body: await parseBody(output.body, context),
|
|
1155
1162
|
};
|
|
1156
1163
|
let response;
|
|
1157
|
-
|
|
1158
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1164
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1159
1165
|
switch (errorCode) {
|
|
1160
1166
|
case "OperationNotPermittedException":
|
|
1161
1167
|
case "com.amazonaws.ram#OperationNotPermittedException":
|
|
@@ -1168,10 +1174,12 @@ const deserializeAws_restJson1EnableSharingWithAwsOrganizationCommandError = asy
|
|
|
1168
1174
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1169
1175
|
default:
|
|
1170
1176
|
const parsedBody = parsedOutput.body;
|
|
1177
|
+
const $metadata = deserializeMetadata(output);
|
|
1178
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1171
1179
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1172
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1180
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1173
1181
|
$fault: "client",
|
|
1174
|
-
$metadata
|
|
1182
|
+
$metadata,
|
|
1175
1183
|
});
|
|
1176
1184
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1177
1185
|
}
|
|
@@ -1197,8 +1205,7 @@ const deserializeAws_restJson1GetPermissionCommandError = async (output, context
|
|
|
1197
1205
|
body: await parseBody(output.body, context),
|
|
1198
1206
|
};
|
|
1199
1207
|
let response;
|
|
1200
|
-
|
|
1201
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1208
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1202
1209
|
switch (errorCode) {
|
|
1203
1210
|
case "InvalidParameterException":
|
|
1204
1211
|
case "com.amazonaws.ram#InvalidParameterException":
|
|
@@ -1220,10 +1227,12 @@ const deserializeAws_restJson1GetPermissionCommandError = async (output, context
|
|
|
1220
1227
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1221
1228
|
default:
|
|
1222
1229
|
const parsedBody = parsedOutput.body;
|
|
1230
|
+
const $metadata = deserializeMetadata(output);
|
|
1231
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1223
1232
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1224
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1233
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1225
1234
|
$fault: "client",
|
|
1226
|
-
$metadata
|
|
1235
|
+
$metadata,
|
|
1227
1236
|
});
|
|
1228
1237
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1229
1238
|
}
|
|
@@ -1253,8 +1262,7 @@ const deserializeAws_restJson1GetResourcePoliciesCommandError = async (output, c
|
|
|
1253
1262
|
body: await parseBody(output.body, context),
|
|
1254
1263
|
};
|
|
1255
1264
|
let response;
|
|
1256
|
-
|
|
1257
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1265
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1258
1266
|
switch (errorCode) {
|
|
1259
1267
|
case "InvalidNextTokenException":
|
|
1260
1268
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1276,10 +1284,12 @@ const deserializeAws_restJson1GetResourcePoliciesCommandError = async (output, c
|
|
|
1276
1284
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1277
1285
|
default:
|
|
1278
1286
|
const parsedBody = parsedOutput.body;
|
|
1287
|
+
const $metadata = deserializeMetadata(output);
|
|
1288
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1279
1289
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1280
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1290
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1281
1291
|
$fault: "client",
|
|
1282
|
-
$metadata
|
|
1292
|
+
$metadata,
|
|
1283
1293
|
});
|
|
1284
1294
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1285
1295
|
}
|
|
@@ -1309,8 +1319,7 @@ const deserializeAws_restJson1GetResourceShareAssociationsCommandError = async (
|
|
|
1309
1319
|
body: await parseBody(output.body, context),
|
|
1310
1320
|
};
|
|
1311
1321
|
let response;
|
|
1312
|
-
|
|
1313
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1322
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1314
1323
|
switch (errorCode) {
|
|
1315
1324
|
case "InvalidNextTokenException":
|
|
1316
1325
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1335,10 +1344,12 @@ const deserializeAws_restJson1GetResourceShareAssociationsCommandError = async (
|
|
|
1335
1344
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1336
1345
|
default:
|
|
1337
1346
|
const parsedBody = parsedOutput.body;
|
|
1347
|
+
const $metadata = deserializeMetadata(output);
|
|
1348
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1338
1349
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1339
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1350
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1340
1351
|
$fault: "client",
|
|
1341
|
-
$metadata
|
|
1352
|
+
$metadata,
|
|
1342
1353
|
});
|
|
1343
1354
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1344
1355
|
}
|
|
@@ -1368,8 +1379,7 @@ const deserializeAws_restJson1GetResourceShareInvitationsCommandError = async (o
|
|
|
1368
1379
|
body: await parseBody(output.body, context),
|
|
1369
1380
|
};
|
|
1370
1381
|
let response;
|
|
1371
|
-
|
|
1372
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1382
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1373
1383
|
switch (errorCode) {
|
|
1374
1384
|
case "InvalidMaxResultsException":
|
|
1375
1385
|
case "com.amazonaws.ram#InvalidMaxResultsException":
|
|
@@ -1397,10 +1407,12 @@ const deserializeAws_restJson1GetResourceShareInvitationsCommandError = async (o
|
|
|
1397
1407
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1398
1408
|
default:
|
|
1399
1409
|
const parsedBody = parsedOutput.body;
|
|
1410
|
+
const $metadata = deserializeMetadata(output);
|
|
1411
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1400
1412
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1401
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1413
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1402
1414
|
$fault: "client",
|
|
1403
|
-
$metadata
|
|
1415
|
+
$metadata,
|
|
1404
1416
|
});
|
|
1405
1417
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1406
1418
|
}
|
|
@@ -1430,8 +1442,7 @@ const deserializeAws_restJson1GetResourceSharesCommandError = async (output, con
|
|
|
1430
1442
|
body: await parseBody(output.body, context),
|
|
1431
1443
|
};
|
|
1432
1444
|
let response;
|
|
1433
|
-
|
|
1434
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1445
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1435
1446
|
switch (errorCode) {
|
|
1436
1447
|
case "InvalidNextTokenException":
|
|
1437
1448
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1453,10 +1464,12 @@ const deserializeAws_restJson1GetResourceSharesCommandError = async (output, con
|
|
|
1453
1464
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1454
1465
|
default:
|
|
1455
1466
|
const parsedBody = parsedOutput.body;
|
|
1467
|
+
const $metadata = deserializeMetadata(output);
|
|
1468
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1456
1469
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1457
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1470
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1458
1471
|
$fault: "client",
|
|
1459
|
-
$metadata
|
|
1472
|
+
$metadata,
|
|
1460
1473
|
});
|
|
1461
1474
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1462
1475
|
}
|
|
@@ -1486,8 +1499,7 @@ const deserializeAws_restJson1ListPendingInvitationResourcesCommandError = async
|
|
|
1486
1499
|
body: await parseBody(output.body, context),
|
|
1487
1500
|
};
|
|
1488
1501
|
let response;
|
|
1489
|
-
|
|
1490
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1502
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1491
1503
|
switch (errorCode) {
|
|
1492
1504
|
case "InvalidNextTokenException":
|
|
1493
1505
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1518,10 +1530,12 @@ const deserializeAws_restJson1ListPendingInvitationResourcesCommandError = async
|
|
|
1518
1530
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1519
1531
|
default:
|
|
1520
1532
|
const parsedBody = parsedOutput.body;
|
|
1533
|
+
const $metadata = deserializeMetadata(output);
|
|
1534
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1521
1535
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1522
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1536
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1523
1537
|
$fault: "client",
|
|
1524
|
-
$metadata
|
|
1538
|
+
$metadata,
|
|
1525
1539
|
});
|
|
1526
1540
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1527
1541
|
}
|
|
@@ -1551,8 +1565,7 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
|
|
|
1551
1565
|
body: await parseBody(output.body, context),
|
|
1552
1566
|
};
|
|
1553
1567
|
let response;
|
|
1554
|
-
|
|
1555
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1568
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1556
1569
|
switch (errorCode) {
|
|
1557
1570
|
case "InvalidNextTokenException":
|
|
1558
1571
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1571,10 +1584,12 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
|
|
|
1571
1584
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1572
1585
|
default:
|
|
1573
1586
|
const parsedBody = parsedOutput.body;
|
|
1587
|
+
const $metadata = deserializeMetadata(output);
|
|
1588
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1574
1589
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1575
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1590
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1576
1591
|
$fault: "client",
|
|
1577
|
-
$metadata
|
|
1592
|
+
$metadata,
|
|
1578
1593
|
});
|
|
1579
1594
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1580
1595
|
}
|
|
@@ -1604,8 +1619,7 @@ const deserializeAws_restJson1ListPermissionVersionsCommandError = async (output
|
|
|
1604
1619
|
body: await parseBody(output.body, context),
|
|
1605
1620
|
};
|
|
1606
1621
|
let response;
|
|
1607
|
-
|
|
1608
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1622
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1609
1623
|
switch (errorCode) {
|
|
1610
1624
|
case "InvalidNextTokenException":
|
|
1611
1625
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1630,10 +1644,12 @@ const deserializeAws_restJson1ListPermissionVersionsCommandError = async (output
|
|
|
1630
1644
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1631
1645
|
default:
|
|
1632
1646
|
const parsedBody = parsedOutput.body;
|
|
1647
|
+
const $metadata = deserializeMetadata(output);
|
|
1648
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1633
1649
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1634
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1650
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1635
1651
|
$fault: "client",
|
|
1636
|
-
$metadata
|
|
1652
|
+
$metadata,
|
|
1637
1653
|
});
|
|
1638
1654
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1639
1655
|
}
|
|
@@ -1663,8 +1679,7 @@ const deserializeAws_restJson1ListPrincipalsCommandError = async (output, contex
|
|
|
1663
1679
|
body: await parseBody(output.body, context),
|
|
1664
1680
|
};
|
|
1665
1681
|
let response;
|
|
1666
|
-
|
|
1667
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1682
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1668
1683
|
switch (errorCode) {
|
|
1669
1684
|
case "InvalidNextTokenException":
|
|
1670
1685
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1686,10 +1701,12 @@ const deserializeAws_restJson1ListPrincipalsCommandError = async (output, contex
|
|
|
1686
1701
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1687
1702
|
default:
|
|
1688
1703
|
const parsedBody = parsedOutput.body;
|
|
1704
|
+
const $metadata = deserializeMetadata(output);
|
|
1705
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1689
1706
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1690
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1707
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1691
1708
|
$fault: "client",
|
|
1692
|
-
$metadata
|
|
1709
|
+
$metadata,
|
|
1693
1710
|
});
|
|
1694
1711
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1695
1712
|
}
|
|
@@ -1719,8 +1736,7 @@ const deserializeAws_restJson1ListResourcesCommandError = async (output, context
|
|
|
1719
1736
|
body: await parseBody(output.body, context),
|
|
1720
1737
|
};
|
|
1721
1738
|
let response;
|
|
1722
|
-
|
|
1723
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1739
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1724
1740
|
switch (errorCode) {
|
|
1725
1741
|
case "InvalidNextTokenException":
|
|
1726
1742
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1745,10 +1761,12 @@ const deserializeAws_restJson1ListResourcesCommandError = async (output, context
|
|
|
1745
1761
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1746
1762
|
default:
|
|
1747
1763
|
const parsedBody = parsedOutput.body;
|
|
1764
|
+
const $metadata = deserializeMetadata(output);
|
|
1765
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1748
1766
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1749
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1767
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1750
1768
|
$fault: "client",
|
|
1751
|
-
$metadata
|
|
1769
|
+
$metadata,
|
|
1752
1770
|
});
|
|
1753
1771
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1754
1772
|
}
|
|
@@ -1778,8 +1796,7 @@ const deserializeAws_restJson1ListResourceSharePermissionsCommandError = async (
|
|
|
1778
1796
|
body: await parseBody(output.body, context),
|
|
1779
1797
|
};
|
|
1780
1798
|
let response;
|
|
1781
|
-
|
|
1782
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1799
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1783
1800
|
switch (errorCode) {
|
|
1784
1801
|
case "InvalidNextTokenException":
|
|
1785
1802
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1804,10 +1821,12 @@ const deserializeAws_restJson1ListResourceSharePermissionsCommandError = async (
|
|
|
1804
1821
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1805
1822
|
default:
|
|
1806
1823
|
const parsedBody = parsedOutput.body;
|
|
1824
|
+
const $metadata = deserializeMetadata(output);
|
|
1825
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1807
1826
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1808
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1827
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1809
1828
|
$fault: "client",
|
|
1810
|
-
$metadata
|
|
1829
|
+
$metadata,
|
|
1811
1830
|
});
|
|
1812
1831
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1813
1832
|
}
|
|
@@ -1837,8 +1856,7 @@ const deserializeAws_restJson1ListResourceTypesCommandError = async (output, con
|
|
|
1837
1856
|
body: await parseBody(output.body, context),
|
|
1838
1857
|
};
|
|
1839
1858
|
let response;
|
|
1840
|
-
|
|
1841
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1859
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1842
1860
|
switch (errorCode) {
|
|
1843
1861
|
case "InvalidNextTokenException":
|
|
1844
1862
|
case "com.amazonaws.ram#InvalidNextTokenException":
|
|
@@ -1854,10 +1872,12 @@ const deserializeAws_restJson1ListResourceTypesCommandError = async (output, con
|
|
|
1854
1872
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1855
1873
|
default:
|
|
1856
1874
|
const parsedBody = parsedOutput.body;
|
|
1875
|
+
const $metadata = deserializeMetadata(output);
|
|
1876
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1857
1877
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1858
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1878
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1859
1879
|
$fault: "client",
|
|
1860
|
-
$metadata
|
|
1880
|
+
$metadata,
|
|
1861
1881
|
});
|
|
1862
1882
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1863
1883
|
}
|
|
@@ -1883,8 +1903,7 @@ const deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommandError
|
|
|
1883
1903
|
body: await parseBody(output.body, context),
|
|
1884
1904
|
};
|
|
1885
1905
|
let response;
|
|
1886
|
-
|
|
1887
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1906
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1888
1907
|
switch (errorCode) {
|
|
1889
1908
|
case "InvalidParameterException":
|
|
1890
1909
|
case "com.amazonaws.ram#InvalidParameterException":
|
|
@@ -1912,10 +1931,12 @@ const deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommandError
|
|
|
1912
1931
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
1913
1932
|
default:
|
|
1914
1933
|
const parsedBody = parsedOutput.body;
|
|
1934
|
+
const $metadata = deserializeMetadata(output);
|
|
1935
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1915
1936
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1916
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1937
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1917
1938
|
$fault: "client",
|
|
1918
|
-
$metadata
|
|
1939
|
+
$metadata,
|
|
1919
1940
|
});
|
|
1920
1941
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1921
1942
|
}
|
|
@@ -1945,8 +1966,7 @@ const deserializeAws_restJson1RejectResourceShareInvitationCommandError = async
|
|
|
1945
1966
|
body: await parseBody(output.body, context),
|
|
1946
1967
|
};
|
|
1947
1968
|
let response;
|
|
1948
|
-
|
|
1949
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1969
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1950
1970
|
switch (errorCode) {
|
|
1951
1971
|
case "IdempotentParameterMismatchException":
|
|
1952
1972
|
case "com.amazonaws.ram#IdempotentParameterMismatchException":
|
|
@@ -1980,10 +2000,12 @@ const deserializeAws_restJson1RejectResourceShareInvitationCommandError = async
|
|
|
1980
2000
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1981
2001
|
default:
|
|
1982
2002
|
const parsedBody = parsedOutput.body;
|
|
2003
|
+
const $metadata = deserializeMetadata(output);
|
|
2004
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1983
2005
|
response = new RAMServiceException_1.RAMServiceException({
|
|
1984
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2006
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1985
2007
|
$fault: "client",
|
|
1986
|
-
$metadata
|
|
2008
|
+
$metadata,
|
|
1987
2009
|
});
|
|
1988
2010
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1989
2011
|
}
|
|
@@ -2005,8 +2027,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2005
2027
|
body: await parseBody(output.body, context),
|
|
2006
2028
|
};
|
|
2007
2029
|
let response;
|
|
2008
|
-
|
|
2009
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2030
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2010
2031
|
switch (errorCode) {
|
|
2011
2032
|
case "InvalidParameterException":
|
|
2012
2033
|
case "com.amazonaws.ram#InvalidParameterException":
|
|
@@ -2034,10 +2055,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2034
2055
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
2035
2056
|
default:
|
|
2036
2057
|
const parsedBody = parsedOutput.body;
|
|
2058
|
+
const $metadata = deserializeMetadata(output);
|
|
2059
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2037
2060
|
response = new RAMServiceException_1.RAMServiceException({
|
|
2038
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2061
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2039
2062
|
$fault: "client",
|
|
2040
|
-
$metadata
|
|
2063
|
+
$metadata,
|
|
2041
2064
|
});
|
|
2042
2065
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2043
2066
|
}
|
|
@@ -2059,8 +2082,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2059
2082
|
body: await parseBody(output.body, context),
|
|
2060
2083
|
};
|
|
2061
2084
|
let response;
|
|
2062
|
-
|
|
2063
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2085
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2064
2086
|
switch (errorCode) {
|
|
2065
2087
|
case "InvalidParameterException":
|
|
2066
2088
|
case "com.amazonaws.ram#InvalidParameterException":
|
|
@@ -2073,10 +2095,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2073
2095
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2074
2096
|
default:
|
|
2075
2097
|
const parsedBody = parsedOutput.body;
|
|
2098
|
+
const $metadata = deserializeMetadata(output);
|
|
2099
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2076
2100
|
response = new RAMServiceException_1.RAMServiceException({
|
|
2077
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2101
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2078
2102
|
$fault: "client",
|
|
2079
|
-
$metadata
|
|
2103
|
+
$metadata,
|
|
2080
2104
|
});
|
|
2081
2105
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2082
2106
|
}
|
|
@@ -2106,8 +2130,7 @@ const deserializeAws_restJson1UpdateResourceShareCommandError = async (output, c
|
|
|
2106
2130
|
body: await parseBody(output.body, context),
|
|
2107
2131
|
};
|
|
2108
2132
|
let response;
|
|
2109
|
-
|
|
2110
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2133
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2111
2134
|
switch (errorCode) {
|
|
2112
2135
|
case "IdempotentParameterMismatchException":
|
|
2113
2136
|
case "com.amazonaws.ram#IdempotentParameterMismatchException":
|
|
@@ -2138,10 +2161,12 @@ const deserializeAws_restJson1UpdateResourceShareCommandError = async (output, c
|
|
|
2138
2161
|
throw await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context);
|
|
2139
2162
|
default:
|
|
2140
2163
|
const parsedBody = parsedOutput.body;
|
|
2164
|
+
const $metadata = deserializeMetadata(output);
|
|
2165
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2141
2166
|
response = new RAMServiceException_1.RAMServiceException({
|
|
2142
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2167
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2143
2168
|
$fault: "client",
|
|
2144
|
-
$metadata
|
|
2169
|
+
$metadata,
|
|
2145
2170
|
});
|
|
2146
2171
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2147
2172
|
}
|
|
@@ -2792,5 +2817,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
2792
2817
|
if (data["__type"] !== undefined) {
|
|
2793
2818
|
return sanitizeErrorCode(data["__type"]);
|
|
2794
2819
|
}
|
|
2795
|
-
return "";
|
|
2796
2820
|
};
|