@aws-sdk/client-sts 3.52.0 → 3.53.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/index.js +3 -0
- package/dist-cjs/models/STSServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +106 -1
- package/dist-cjs/protocols/Aws_query.js +80 -252
- package/dist-es/index.js +1 -0
- package/dist-es/models/STSServiceException.js +12 -0
- package/dist-es/models/models_0.js +98 -1
- package/dist-es/protocols/Aws_query.js +159 -255
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/STSServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +58 -33
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/STSServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +42 -33
- package/package.json +25 -25
|
@@ -5,6 +5,8 @@ const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const entities_1 = require("entities");
|
|
7
7
|
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
8
|
+
const models_0_1 = require("../models/models_0");
|
|
9
|
+
const STSServiceException_1 = require("../models/STSServiceException");
|
|
8
10
|
const serializeAws_queryAssumeRoleCommand = async (input, context) => {
|
|
9
11
|
const headers = {
|
|
10
12
|
"content-type": "application/x-www-form-urlencoded",
|
|
@@ -134,51 +136,25 @@ const deserializeAws_queryAssumeRoleCommandError = async (output, context) => {
|
|
|
134
136
|
switch (errorCode) {
|
|
135
137
|
case "ExpiredTokenException":
|
|
136
138
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
137
|
-
|
|
138
|
-
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
|
|
139
|
-
name: errorCode,
|
|
140
|
-
$metadata: deserializeMetadata(output),
|
|
141
|
-
};
|
|
142
|
-
break;
|
|
139
|
+
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
143
140
|
case "MalformedPolicyDocumentException":
|
|
144
141
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
145
|
-
|
|
146
|
-
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
147
|
-
name: errorCode,
|
|
148
|
-
$metadata: deserializeMetadata(output),
|
|
149
|
-
};
|
|
150
|
-
break;
|
|
142
|
+
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
151
143
|
case "PackedPolicyTooLargeException":
|
|
152
144
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
153
|
-
|
|
154
|
-
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
|
|
155
|
-
name: errorCode,
|
|
156
|
-
$metadata: deserializeMetadata(output),
|
|
157
|
-
};
|
|
158
|
-
break;
|
|
145
|
+
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
159
146
|
case "RegionDisabledException":
|
|
160
147
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
161
|
-
|
|
162
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
163
|
-
name: errorCode,
|
|
164
|
-
$metadata: deserializeMetadata(output),
|
|
165
|
-
};
|
|
166
|
-
break;
|
|
148
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
167
149
|
default:
|
|
168
150
|
const parsedBody = parsedOutput.body;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
...parsedBody.Error,
|
|
172
|
-
name: `${errorCode}`,
|
|
173
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
151
|
+
response = new STSServiceException_1.STSServiceException({
|
|
152
|
+
name: parsedBody.Error.code || parsedBody.Error.Code || errorCode,
|
|
174
153
|
$fault: "client",
|
|
175
154
|
$metadata: deserializeMetadata(output),
|
|
176
|
-
};
|
|
155
|
+
});
|
|
156
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody.Error);
|
|
177
157
|
}
|
|
178
|
-
const message = response.message || response.Message || errorCode;
|
|
179
|
-
response.message = message;
|
|
180
|
-
delete response.Message;
|
|
181
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
182
158
|
};
|
|
183
159
|
const deserializeAws_queryAssumeRoleWithSAMLCommand = async (output, context) => {
|
|
184
160
|
if (output.statusCode >= 300) {
|
|
@@ -205,67 +181,31 @@ const deserializeAws_queryAssumeRoleWithSAMLCommandError = async (output, contex
|
|
|
205
181
|
switch (errorCode) {
|
|
206
182
|
case "ExpiredTokenException":
|
|
207
183
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
208
|
-
|
|
209
|
-
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
|
|
210
|
-
name: errorCode,
|
|
211
|
-
$metadata: deserializeMetadata(output),
|
|
212
|
-
};
|
|
213
|
-
break;
|
|
184
|
+
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
214
185
|
case "IDPRejectedClaimException":
|
|
215
186
|
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
216
|
-
|
|
217
|
-
...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)),
|
|
218
|
-
name: errorCode,
|
|
219
|
-
$metadata: deserializeMetadata(output),
|
|
220
|
-
};
|
|
221
|
-
break;
|
|
187
|
+
throw await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context);
|
|
222
188
|
case "InvalidIdentityTokenException":
|
|
223
189
|
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
224
|
-
|
|
225
|
-
...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)),
|
|
226
|
-
name: errorCode,
|
|
227
|
-
$metadata: deserializeMetadata(output),
|
|
228
|
-
};
|
|
229
|
-
break;
|
|
190
|
+
throw await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context);
|
|
230
191
|
case "MalformedPolicyDocumentException":
|
|
231
192
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
232
|
-
|
|
233
|
-
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
234
|
-
name: errorCode,
|
|
235
|
-
$metadata: deserializeMetadata(output),
|
|
236
|
-
};
|
|
237
|
-
break;
|
|
193
|
+
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
238
194
|
case "PackedPolicyTooLargeException":
|
|
239
195
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
240
|
-
|
|
241
|
-
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
|
|
242
|
-
name: errorCode,
|
|
243
|
-
$metadata: deserializeMetadata(output),
|
|
244
|
-
};
|
|
245
|
-
break;
|
|
196
|
+
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
246
197
|
case "RegionDisabledException":
|
|
247
198
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
248
|
-
|
|
249
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
250
|
-
name: errorCode,
|
|
251
|
-
$metadata: deserializeMetadata(output),
|
|
252
|
-
};
|
|
253
|
-
break;
|
|
199
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
254
200
|
default:
|
|
255
201
|
const parsedBody = parsedOutput.body;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
...parsedBody.Error,
|
|
259
|
-
name: `${errorCode}`,
|
|
260
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
202
|
+
response = new STSServiceException_1.STSServiceException({
|
|
203
|
+
name: parsedBody.Error.code || parsedBody.Error.Code || errorCode,
|
|
261
204
|
$fault: "client",
|
|
262
205
|
$metadata: deserializeMetadata(output),
|
|
263
|
-
};
|
|
206
|
+
});
|
|
207
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody.Error);
|
|
264
208
|
}
|
|
265
|
-
const message = response.message || response.Message || errorCode;
|
|
266
|
-
response.message = message;
|
|
267
|
-
delete response.Message;
|
|
268
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
269
209
|
};
|
|
270
210
|
const deserializeAws_queryAssumeRoleWithWebIdentityCommand = async (output, context) => {
|
|
271
211
|
if (output.statusCode >= 300) {
|
|
@@ -292,75 +232,34 @@ const deserializeAws_queryAssumeRoleWithWebIdentityCommandError = async (output,
|
|
|
292
232
|
switch (errorCode) {
|
|
293
233
|
case "ExpiredTokenException":
|
|
294
234
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
295
|
-
|
|
296
|
-
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
|
|
297
|
-
name: errorCode,
|
|
298
|
-
$metadata: deserializeMetadata(output),
|
|
299
|
-
};
|
|
300
|
-
break;
|
|
235
|
+
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
301
236
|
case "IDPCommunicationErrorException":
|
|
302
237
|
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
303
|
-
|
|
304
|
-
...(await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context)),
|
|
305
|
-
name: errorCode,
|
|
306
|
-
$metadata: deserializeMetadata(output),
|
|
307
|
-
};
|
|
308
|
-
break;
|
|
238
|
+
throw await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context);
|
|
309
239
|
case "IDPRejectedClaimException":
|
|
310
240
|
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
311
|
-
|
|
312
|
-
...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)),
|
|
313
|
-
name: errorCode,
|
|
314
|
-
$metadata: deserializeMetadata(output),
|
|
315
|
-
};
|
|
316
|
-
break;
|
|
241
|
+
throw await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context);
|
|
317
242
|
case "InvalidIdentityTokenException":
|
|
318
243
|
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
319
|
-
|
|
320
|
-
...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)),
|
|
321
|
-
name: errorCode,
|
|
322
|
-
$metadata: deserializeMetadata(output),
|
|
323
|
-
};
|
|
324
|
-
break;
|
|
244
|
+
throw await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context);
|
|
325
245
|
case "MalformedPolicyDocumentException":
|
|
326
246
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
327
|
-
|
|
328
|
-
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
329
|
-
name: errorCode,
|
|
330
|
-
$metadata: deserializeMetadata(output),
|
|
331
|
-
};
|
|
332
|
-
break;
|
|
247
|
+
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
333
248
|
case "PackedPolicyTooLargeException":
|
|
334
249
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
335
|
-
|
|
336
|
-
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
|
|
337
|
-
name: errorCode,
|
|
338
|
-
$metadata: deserializeMetadata(output),
|
|
339
|
-
};
|
|
340
|
-
break;
|
|
250
|
+
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
341
251
|
case "RegionDisabledException":
|
|
342
252
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
343
|
-
|
|
344
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
345
|
-
name: errorCode,
|
|
346
|
-
$metadata: deserializeMetadata(output),
|
|
347
|
-
};
|
|
348
|
-
break;
|
|
253
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
349
254
|
default:
|
|
350
255
|
const parsedBody = parsedOutput.body;
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
...parsedBody.Error,
|
|
354
|
-
name: `${errorCode}`,
|
|
355
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
256
|
+
response = new STSServiceException_1.STSServiceException({
|
|
257
|
+
name: parsedBody.Error.code || parsedBody.Error.Code || errorCode,
|
|
356
258
|
$fault: "client",
|
|
357
259
|
$metadata: deserializeMetadata(output),
|
|
358
|
-
};
|
|
260
|
+
});
|
|
261
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody.Error);
|
|
359
262
|
}
|
|
360
|
-
const message = response.message || response.Message || errorCode;
|
|
361
|
-
response.message = message;
|
|
362
|
-
delete response.Message;
|
|
363
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
364
263
|
};
|
|
365
264
|
const deserializeAws_queryDecodeAuthorizationMessageCommand = async (output, context) => {
|
|
366
265
|
if (output.statusCode >= 300) {
|
|
@@ -387,27 +286,16 @@ const deserializeAws_queryDecodeAuthorizationMessageCommandError = async (output
|
|
|
387
286
|
switch (errorCode) {
|
|
388
287
|
case "InvalidAuthorizationMessageException":
|
|
389
288
|
case "com.amazonaws.sts#InvalidAuthorizationMessageException":
|
|
390
|
-
|
|
391
|
-
...(await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context)),
|
|
392
|
-
name: errorCode,
|
|
393
|
-
$metadata: deserializeMetadata(output),
|
|
394
|
-
};
|
|
395
|
-
break;
|
|
289
|
+
throw await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context);
|
|
396
290
|
default:
|
|
397
291
|
const parsedBody = parsedOutput.body;
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
...parsedBody.Error,
|
|
401
|
-
name: `${errorCode}`,
|
|
402
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
292
|
+
response = new STSServiceException_1.STSServiceException({
|
|
293
|
+
name: parsedBody.Error.code || parsedBody.Error.Code || errorCode,
|
|
403
294
|
$fault: "client",
|
|
404
295
|
$metadata: deserializeMetadata(output),
|
|
405
|
-
};
|
|
296
|
+
});
|
|
297
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody.Error);
|
|
406
298
|
}
|
|
407
|
-
const message = response.message || response.Message || errorCode;
|
|
408
|
-
response.message = message;
|
|
409
|
-
delete response.Message;
|
|
410
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
411
299
|
};
|
|
412
300
|
const deserializeAws_queryGetAccessKeyInfoCommand = async (output, context) => {
|
|
413
301
|
if (output.statusCode >= 300) {
|
|
@@ -434,19 +322,13 @@ const deserializeAws_queryGetAccessKeyInfoCommandError = async (output, context)
|
|
|
434
322
|
switch (errorCode) {
|
|
435
323
|
default:
|
|
436
324
|
const parsedBody = parsedOutput.body;
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
...parsedBody.Error,
|
|
440
|
-
name: `${errorCode}`,
|
|
441
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
325
|
+
response = new STSServiceException_1.STSServiceException({
|
|
326
|
+
name: parsedBody.Error.code || parsedBody.Error.Code || errorCode,
|
|
442
327
|
$fault: "client",
|
|
443
328
|
$metadata: deserializeMetadata(output),
|
|
444
|
-
};
|
|
329
|
+
});
|
|
330
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody.Error);
|
|
445
331
|
}
|
|
446
|
-
const message = response.message || response.Message || errorCode;
|
|
447
|
-
response.message = message;
|
|
448
|
-
delete response.Message;
|
|
449
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
450
332
|
};
|
|
451
333
|
const deserializeAws_queryGetCallerIdentityCommand = async (output, context) => {
|
|
452
334
|
if (output.statusCode >= 300) {
|
|
@@ -473,19 +355,13 @@ const deserializeAws_queryGetCallerIdentityCommandError = async (output, context
|
|
|
473
355
|
switch (errorCode) {
|
|
474
356
|
default:
|
|
475
357
|
const parsedBody = parsedOutput.body;
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
...parsedBody.Error,
|
|
479
|
-
name: `${errorCode}`,
|
|
480
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
358
|
+
response = new STSServiceException_1.STSServiceException({
|
|
359
|
+
name: parsedBody.Error.code || parsedBody.Error.Code || errorCode,
|
|
481
360
|
$fault: "client",
|
|
482
361
|
$metadata: deserializeMetadata(output),
|
|
483
|
-
};
|
|
362
|
+
});
|
|
363
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody.Error);
|
|
484
364
|
}
|
|
485
|
-
const message = response.message || response.Message || errorCode;
|
|
486
|
-
response.message = message;
|
|
487
|
-
delete response.Message;
|
|
488
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
489
365
|
};
|
|
490
366
|
const deserializeAws_queryGetFederationTokenCommand = async (output, context) => {
|
|
491
367
|
if (output.statusCode >= 300) {
|
|
@@ -512,43 +388,22 @@ const deserializeAws_queryGetFederationTokenCommandError = async (output, contex
|
|
|
512
388
|
switch (errorCode) {
|
|
513
389
|
case "MalformedPolicyDocumentException":
|
|
514
390
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
515
|
-
|
|
516
|
-
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
517
|
-
name: errorCode,
|
|
518
|
-
$metadata: deserializeMetadata(output),
|
|
519
|
-
};
|
|
520
|
-
break;
|
|
391
|
+
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
521
392
|
case "PackedPolicyTooLargeException":
|
|
522
393
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
523
|
-
|
|
524
|
-
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
|
|
525
|
-
name: errorCode,
|
|
526
|
-
$metadata: deserializeMetadata(output),
|
|
527
|
-
};
|
|
528
|
-
break;
|
|
394
|
+
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
529
395
|
case "RegionDisabledException":
|
|
530
396
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
531
|
-
|
|
532
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
533
|
-
name: errorCode,
|
|
534
|
-
$metadata: deserializeMetadata(output),
|
|
535
|
-
};
|
|
536
|
-
break;
|
|
397
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
537
398
|
default:
|
|
538
399
|
const parsedBody = parsedOutput.body;
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
...parsedBody.Error,
|
|
542
|
-
name: `${errorCode}`,
|
|
543
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
400
|
+
response = new STSServiceException_1.STSServiceException({
|
|
401
|
+
name: parsedBody.Error.code || parsedBody.Error.Code || errorCode,
|
|
544
402
|
$fault: "client",
|
|
545
403
|
$metadata: deserializeMetadata(output),
|
|
546
|
-
};
|
|
404
|
+
});
|
|
405
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody.Error);
|
|
547
406
|
}
|
|
548
|
-
const message = response.message || response.Message || errorCode;
|
|
549
|
-
response.message = message;
|
|
550
|
-
delete response.Message;
|
|
551
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
552
407
|
};
|
|
553
408
|
const deserializeAws_queryGetSessionTokenCommand = async (output, context) => {
|
|
554
409
|
if (output.statusCode >= 300) {
|
|
@@ -575,115 +430,88 @@ const deserializeAws_queryGetSessionTokenCommandError = async (output, context)
|
|
|
575
430
|
switch (errorCode) {
|
|
576
431
|
case "RegionDisabledException":
|
|
577
432
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
578
|
-
|
|
579
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
580
|
-
name: errorCode,
|
|
581
|
-
$metadata: deserializeMetadata(output),
|
|
582
|
-
};
|
|
583
|
-
break;
|
|
433
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
584
434
|
default:
|
|
585
435
|
const parsedBody = parsedOutput.body;
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
...parsedBody.Error,
|
|
589
|
-
name: `${errorCode}`,
|
|
590
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
436
|
+
response = new STSServiceException_1.STSServiceException({
|
|
437
|
+
name: parsedBody.Error.code || parsedBody.Error.Code || errorCode,
|
|
591
438
|
$fault: "client",
|
|
592
439
|
$metadata: deserializeMetadata(output),
|
|
593
|
-
};
|
|
440
|
+
});
|
|
441
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody.Error);
|
|
594
442
|
}
|
|
595
|
-
const message = response.message || response.Message || errorCode;
|
|
596
|
-
response.message = message;
|
|
597
|
-
delete response.Message;
|
|
598
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
599
443
|
};
|
|
600
444
|
const deserializeAws_queryExpiredTokenExceptionResponse = async (parsedOutput, context) => {
|
|
601
445
|
const body = parsedOutput.body;
|
|
602
446
|
const deserialized = deserializeAws_queryExpiredTokenException(body.Error, context);
|
|
603
|
-
const
|
|
604
|
-
name: "ExpiredTokenException",
|
|
605
|
-
$fault: "client",
|
|
447
|
+
const exception = new models_0_1.ExpiredTokenException({
|
|
606
448
|
$metadata: deserializeMetadata(parsedOutput),
|
|
607
449
|
...deserialized,
|
|
608
|
-
};
|
|
609
|
-
return
|
|
450
|
+
});
|
|
451
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
610
452
|
};
|
|
611
453
|
const deserializeAws_queryIDPCommunicationErrorExceptionResponse = async (parsedOutput, context) => {
|
|
612
454
|
const body = parsedOutput.body;
|
|
613
455
|
const deserialized = deserializeAws_queryIDPCommunicationErrorException(body.Error, context);
|
|
614
|
-
const
|
|
615
|
-
name: "IDPCommunicationErrorException",
|
|
616
|
-
$fault: "client",
|
|
456
|
+
const exception = new models_0_1.IDPCommunicationErrorException({
|
|
617
457
|
$metadata: deserializeMetadata(parsedOutput),
|
|
618
458
|
...deserialized,
|
|
619
|
-
};
|
|
620
|
-
return
|
|
459
|
+
});
|
|
460
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
621
461
|
};
|
|
622
462
|
const deserializeAws_queryIDPRejectedClaimExceptionResponse = async (parsedOutput, context) => {
|
|
623
463
|
const body = parsedOutput.body;
|
|
624
464
|
const deserialized = deserializeAws_queryIDPRejectedClaimException(body.Error, context);
|
|
625
|
-
const
|
|
626
|
-
name: "IDPRejectedClaimException",
|
|
627
|
-
$fault: "client",
|
|
465
|
+
const exception = new models_0_1.IDPRejectedClaimException({
|
|
628
466
|
$metadata: deserializeMetadata(parsedOutput),
|
|
629
467
|
...deserialized,
|
|
630
|
-
};
|
|
631
|
-
return
|
|
468
|
+
});
|
|
469
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
632
470
|
};
|
|
633
471
|
const deserializeAws_queryInvalidAuthorizationMessageExceptionResponse = async (parsedOutput, context) => {
|
|
634
472
|
const body = parsedOutput.body;
|
|
635
473
|
const deserialized = deserializeAws_queryInvalidAuthorizationMessageException(body.Error, context);
|
|
636
|
-
const
|
|
637
|
-
name: "InvalidAuthorizationMessageException",
|
|
638
|
-
$fault: "client",
|
|
474
|
+
const exception = new models_0_1.InvalidAuthorizationMessageException({
|
|
639
475
|
$metadata: deserializeMetadata(parsedOutput),
|
|
640
476
|
...deserialized,
|
|
641
|
-
};
|
|
642
|
-
return
|
|
477
|
+
});
|
|
478
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
643
479
|
};
|
|
644
480
|
const deserializeAws_queryInvalidIdentityTokenExceptionResponse = async (parsedOutput, context) => {
|
|
645
481
|
const body = parsedOutput.body;
|
|
646
482
|
const deserialized = deserializeAws_queryInvalidIdentityTokenException(body.Error, context);
|
|
647
|
-
const
|
|
648
|
-
name: "InvalidIdentityTokenException",
|
|
649
|
-
$fault: "client",
|
|
483
|
+
const exception = new models_0_1.InvalidIdentityTokenException({
|
|
650
484
|
$metadata: deserializeMetadata(parsedOutput),
|
|
651
485
|
...deserialized,
|
|
652
|
-
};
|
|
653
|
-
return
|
|
486
|
+
});
|
|
487
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
654
488
|
};
|
|
655
489
|
const deserializeAws_queryMalformedPolicyDocumentExceptionResponse = async (parsedOutput, context) => {
|
|
656
490
|
const body = parsedOutput.body;
|
|
657
491
|
const deserialized = deserializeAws_queryMalformedPolicyDocumentException(body.Error, context);
|
|
658
|
-
const
|
|
659
|
-
name: "MalformedPolicyDocumentException",
|
|
660
|
-
$fault: "client",
|
|
492
|
+
const exception = new models_0_1.MalformedPolicyDocumentException({
|
|
661
493
|
$metadata: deserializeMetadata(parsedOutput),
|
|
662
494
|
...deserialized,
|
|
663
|
-
};
|
|
664
|
-
return
|
|
495
|
+
});
|
|
496
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
665
497
|
};
|
|
666
498
|
const deserializeAws_queryPackedPolicyTooLargeExceptionResponse = async (parsedOutput, context) => {
|
|
667
499
|
const body = parsedOutput.body;
|
|
668
500
|
const deserialized = deserializeAws_queryPackedPolicyTooLargeException(body.Error, context);
|
|
669
|
-
const
|
|
670
|
-
name: "PackedPolicyTooLargeException",
|
|
671
|
-
$fault: "client",
|
|
501
|
+
const exception = new models_0_1.PackedPolicyTooLargeException({
|
|
672
502
|
$metadata: deserializeMetadata(parsedOutput),
|
|
673
503
|
...deserialized,
|
|
674
|
-
};
|
|
675
|
-
return
|
|
504
|
+
});
|
|
505
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
676
506
|
};
|
|
677
507
|
const deserializeAws_queryRegionDisabledExceptionResponse = async (parsedOutput, context) => {
|
|
678
508
|
const body = parsedOutput.body;
|
|
679
509
|
const deserialized = deserializeAws_queryRegionDisabledException(body.Error, context);
|
|
680
|
-
const
|
|
681
|
-
name: "RegionDisabledException",
|
|
682
|
-
$fault: "client",
|
|
510
|
+
const exception = new models_0_1.RegionDisabledException({
|
|
683
511
|
$metadata: deserializeMetadata(parsedOutput),
|
|
684
512
|
...deserialized,
|
|
685
|
-
};
|
|
686
|
-
return
|
|
513
|
+
});
|
|
514
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
687
515
|
};
|
|
688
516
|
const serializeAws_queryAssumeRoleRequest = (input, context) => {
|
|
689
517
|
const entries = {};
|
package/dist-es/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
+
var STSServiceException = (function (_super) {
|
|
4
|
+
__extends(STSServiceException, _super);
|
|
5
|
+
function STSServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, STSServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return STSServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { STSServiceException };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
2
|
+
import { STSServiceException as __BaseException } from "./STSServiceException";
|
|
2
3
|
export var AssumedRoleUser;
|
|
3
4
|
(function (AssumedRoleUser) {
|
|
4
5
|
AssumedRoleUser.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -23,6 +24,54 @@ export var AssumeRoleResponse;
|
|
|
23
24
|
(function (AssumeRoleResponse) {
|
|
24
25
|
AssumeRoleResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
25
26
|
})(AssumeRoleResponse || (AssumeRoleResponse = {}));
|
|
27
|
+
var ExpiredTokenException = (function (_super) {
|
|
28
|
+
__extends(ExpiredTokenException, _super);
|
|
29
|
+
function ExpiredTokenException(opts) {
|
|
30
|
+
var _this = _super.call(this, __assign({ name: "ExpiredTokenException", $fault: "client" }, opts)) || this;
|
|
31
|
+
_this.name = "ExpiredTokenException";
|
|
32
|
+
_this.$fault = "client";
|
|
33
|
+
Object.setPrototypeOf(_this, ExpiredTokenException.prototype);
|
|
34
|
+
return _this;
|
|
35
|
+
}
|
|
36
|
+
return ExpiredTokenException;
|
|
37
|
+
}(__BaseException));
|
|
38
|
+
export { ExpiredTokenException };
|
|
39
|
+
var MalformedPolicyDocumentException = (function (_super) {
|
|
40
|
+
__extends(MalformedPolicyDocumentException, _super);
|
|
41
|
+
function MalformedPolicyDocumentException(opts) {
|
|
42
|
+
var _this = _super.call(this, __assign({ name: "MalformedPolicyDocumentException", $fault: "client" }, opts)) || this;
|
|
43
|
+
_this.name = "MalformedPolicyDocumentException";
|
|
44
|
+
_this.$fault = "client";
|
|
45
|
+
Object.setPrototypeOf(_this, MalformedPolicyDocumentException.prototype);
|
|
46
|
+
return _this;
|
|
47
|
+
}
|
|
48
|
+
return MalformedPolicyDocumentException;
|
|
49
|
+
}(__BaseException));
|
|
50
|
+
export { MalformedPolicyDocumentException };
|
|
51
|
+
var PackedPolicyTooLargeException = (function (_super) {
|
|
52
|
+
__extends(PackedPolicyTooLargeException, _super);
|
|
53
|
+
function PackedPolicyTooLargeException(opts) {
|
|
54
|
+
var _this = _super.call(this, __assign({ name: "PackedPolicyTooLargeException", $fault: "client" }, opts)) || this;
|
|
55
|
+
_this.name = "PackedPolicyTooLargeException";
|
|
56
|
+
_this.$fault = "client";
|
|
57
|
+
Object.setPrototypeOf(_this, PackedPolicyTooLargeException.prototype);
|
|
58
|
+
return _this;
|
|
59
|
+
}
|
|
60
|
+
return PackedPolicyTooLargeException;
|
|
61
|
+
}(__BaseException));
|
|
62
|
+
export { PackedPolicyTooLargeException };
|
|
63
|
+
var RegionDisabledException = (function (_super) {
|
|
64
|
+
__extends(RegionDisabledException, _super);
|
|
65
|
+
function RegionDisabledException(opts) {
|
|
66
|
+
var _this = _super.call(this, __assign({ name: "RegionDisabledException", $fault: "client" }, opts)) || this;
|
|
67
|
+
_this.name = "RegionDisabledException";
|
|
68
|
+
_this.$fault = "client";
|
|
69
|
+
Object.setPrototypeOf(_this, RegionDisabledException.prototype);
|
|
70
|
+
return _this;
|
|
71
|
+
}
|
|
72
|
+
return RegionDisabledException;
|
|
73
|
+
}(__BaseException));
|
|
74
|
+
export { RegionDisabledException };
|
|
26
75
|
export var AssumeRoleWithSAMLRequest;
|
|
27
76
|
(function (AssumeRoleWithSAMLRequest) {
|
|
28
77
|
AssumeRoleWithSAMLRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -31,6 +80,30 @@ export var AssumeRoleWithSAMLResponse;
|
|
|
31
80
|
(function (AssumeRoleWithSAMLResponse) {
|
|
32
81
|
AssumeRoleWithSAMLResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
33
82
|
})(AssumeRoleWithSAMLResponse || (AssumeRoleWithSAMLResponse = {}));
|
|
83
|
+
var IDPRejectedClaimException = (function (_super) {
|
|
84
|
+
__extends(IDPRejectedClaimException, _super);
|
|
85
|
+
function IDPRejectedClaimException(opts) {
|
|
86
|
+
var _this = _super.call(this, __assign({ name: "IDPRejectedClaimException", $fault: "client" }, opts)) || this;
|
|
87
|
+
_this.name = "IDPRejectedClaimException";
|
|
88
|
+
_this.$fault = "client";
|
|
89
|
+
Object.setPrototypeOf(_this, IDPRejectedClaimException.prototype);
|
|
90
|
+
return _this;
|
|
91
|
+
}
|
|
92
|
+
return IDPRejectedClaimException;
|
|
93
|
+
}(__BaseException));
|
|
94
|
+
export { IDPRejectedClaimException };
|
|
95
|
+
var InvalidIdentityTokenException = (function (_super) {
|
|
96
|
+
__extends(InvalidIdentityTokenException, _super);
|
|
97
|
+
function InvalidIdentityTokenException(opts) {
|
|
98
|
+
var _this = _super.call(this, __assign({ name: "InvalidIdentityTokenException", $fault: "client" }, opts)) || this;
|
|
99
|
+
_this.name = "InvalidIdentityTokenException";
|
|
100
|
+
_this.$fault = "client";
|
|
101
|
+
Object.setPrototypeOf(_this, InvalidIdentityTokenException.prototype);
|
|
102
|
+
return _this;
|
|
103
|
+
}
|
|
104
|
+
return InvalidIdentityTokenException;
|
|
105
|
+
}(__BaseException));
|
|
106
|
+
export { InvalidIdentityTokenException };
|
|
34
107
|
export var AssumeRoleWithWebIdentityRequest;
|
|
35
108
|
(function (AssumeRoleWithWebIdentityRequest) {
|
|
36
109
|
AssumeRoleWithWebIdentityRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -39,6 +112,18 @@ export var AssumeRoleWithWebIdentityResponse;
|
|
|
39
112
|
(function (AssumeRoleWithWebIdentityResponse) {
|
|
40
113
|
AssumeRoleWithWebIdentityResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
41
114
|
})(AssumeRoleWithWebIdentityResponse || (AssumeRoleWithWebIdentityResponse = {}));
|
|
115
|
+
var IDPCommunicationErrorException = (function (_super) {
|
|
116
|
+
__extends(IDPCommunicationErrorException, _super);
|
|
117
|
+
function IDPCommunicationErrorException(opts) {
|
|
118
|
+
var _this = _super.call(this, __assign({ name: "IDPCommunicationErrorException", $fault: "client" }, opts)) || this;
|
|
119
|
+
_this.name = "IDPCommunicationErrorException";
|
|
120
|
+
_this.$fault = "client";
|
|
121
|
+
Object.setPrototypeOf(_this, IDPCommunicationErrorException.prototype);
|
|
122
|
+
return _this;
|
|
123
|
+
}
|
|
124
|
+
return IDPCommunicationErrorException;
|
|
125
|
+
}(__BaseException));
|
|
126
|
+
export { IDPCommunicationErrorException };
|
|
42
127
|
export var DecodeAuthorizationMessageRequest;
|
|
43
128
|
(function (DecodeAuthorizationMessageRequest) {
|
|
44
129
|
DecodeAuthorizationMessageRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -47,6 +132,18 @@ export var DecodeAuthorizationMessageResponse;
|
|
|
47
132
|
(function (DecodeAuthorizationMessageResponse) {
|
|
48
133
|
DecodeAuthorizationMessageResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
49
134
|
})(DecodeAuthorizationMessageResponse || (DecodeAuthorizationMessageResponse = {}));
|
|
135
|
+
var InvalidAuthorizationMessageException = (function (_super) {
|
|
136
|
+
__extends(InvalidAuthorizationMessageException, _super);
|
|
137
|
+
function InvalidAuthorizationMessageException(opts) {
|
|
138
|
+
var _this = _super.call(this, __assign({ name: "InvalidAuthorizationMessageException", $fault: "client" }, opts)) || this;
|
|
139
|
+
_this.name = "InvalidAuthorizationMessageException";
|
|
140
|
+
_this.$fault = "client";
|
|
141
|
+
Object.setPrototypeOf(_this, InvalidAuthorizationMessageException.prototype);
|
|
142
|
+
return _this;
|
|
143
|
+
}
|
|
144
|
+
return InvalidAuthorizationMessageException;
|
|
145
|
+
}(__BaseException));
|
|
146
|
+
export { InvalidAuthorizationMessageException };
|
|
50
147
|
export var GetAccessKeyInfoRequest;
|
|
51
148
|
(function (GetAccessKeyInfoRequest) {
|
|
52
149
|
GetAccessKeyInfoRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|