@aws-sdk/client-sso 3.51.0 → 3.54.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 +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/SSOServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +54 -1
- package/dist-cjs/protocols/Aws_restJson1.js +61 -160
- package/dist-es/index.js +1 -0
- package/dist-es/models/SSOServiceException.js +12 -0
- package/dist-es/models/models_0.js +50 -1
- package/dist-es/protocols/Aws_restJson1.js +101 -181
- package/dist-types/SSOClient.d.ts +2 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/SSOServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +30 -17
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/SSOClient.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/SSOServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +22 -17
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +30 -30
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
|
|
5
|
+
import { SSOServiceException as __BaseException } from "../models/SSOServiceException";
|
|
4
6
|
export var serializeAws_restJson1GetRoleCredentialsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
7
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
6
8
|
return __generator(this, function (_c) {
|
|
@@ -116,16 +118,16 @@ export var deserializeAws_restJson1GetRoleCredentialsCommand = function (output,
|
|
|
116
118
|
});
|
|
117
119
|
}); };
|
|
118
120
|
var deserializeAws_restJson1GetRoleCredentialsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
119
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
120
|
-
var
|
|
121
|
-
return __generator(this, function (
|
|
122
|
-
switch (
|
|
121
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
122
|
+
var _c;
|
|
123
|
+
return __generator(this, function (_d) {
|
|
124
|
+
switch (_d.label) {
|
|
123
125
|
case 0:
|
|
124
126
|
_a = [__assign({}, output)];
|
|
125
|
-
|
|
127
|
+
_c = {};
|
|
126
128
|
return [4, parseBody(output.body, context)];
|
|
127
129
|
case 1:
|
|
128
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
130
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
129
131
|
errorCode = "UnknownError";
|
|
130
132
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
131
133
|
_b = errorCode;
|
|
@@ -140,40 +142,22 @@ var deserializeAws_restJson1GetRoleCredentialsCommandError = function (output, c
|
|
|
140
142
|
case "com.amazonaws.sso#UnauthorizedException": return [3, 8];
|
|
141
143
|
}
|
|
142
144
|
return [3, 10];
|
|
143
|
-
case 2:
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
case
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
case 4
|
|
150
|
-
|
|
151
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
152
|
-
case 5:
|
|
153
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
154
|
-
return [3, 11];
|
|
155
|
-
case 6:
|
|
156
|
-
_e = [{}];
|
|
157
|
-
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
158
|
-
case 7:
|
|
159
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
160
|
-
return [3, 11];
|
|
161
|
-
case 8:
|
|
162
|
-
_f = [{}];
|
|
163
|
-
return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
164
|
-
case 9:
|
|
165
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
166
|
-
return [3, 11];
|
|
145
|
+
case 2: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
146
|
+
case 3: throw _d.sent();
|
|
147
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
148
|
+
case 5: throw _d.sent();
|
|
149
|
+
case 6: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
150
|
+
case 7: throw _d.sent();
|
|
151
|
+
case 8: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
152
|
+
case 9: throw _d.sent();
|
|
167
153
|
case 10:
|
|
168
154
|
parsedBody = parsedOutput.body;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
response
|
|
175
|
-
delete response.Message;
|
|
176
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
155
|
+
response = new __BaseException({
|
|
156
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
157
|
+
$fault: "client",
|
|
158
|
+
$metadata: deserializeMetadata(output),
|
|
159
|
+
});
|
|
160
|
+
throw __decorateServiceException(response, parsedBody);
|
|
177
161
|
}
|
|
178
162
|
});
|
|
179
163
|
}); };
|
|
@@ -206,16 +190,16 @@ export var deserializeAws_restJson1ListAccountRolesCommand = function (output, c
|
|
|
206
190
|
});
|
|
207
191
|
}); };
|
|
208
192
|
var deserializeAws_restJson1ListAccountRolesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
209
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
210
|
-
var
|
|
211
|
-
return __generator(this, function (
|
|
212
|
-
switch (
|
|
193
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
194
|
+
var _c;
|
|
195
|
+
return __generator(this, function (_d) {
|
|
196
|
+
switch (_d.label) {
|
|
213
197
|
case 0:
|
|
214
198
|
_a = [__assign({}, output)];
|
|
215
|
-
|
|
199
|
+
_c = {};
|
|
216
200
|
return [4, parseBody(output.body, context)];
|
|
217
201
|
case 1:
|
|
218
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
202
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
219
203
|
errorCode = "UnknownError";
|
|
220
204
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
221
205
|
_b = errorCode;
|
|
@@ -230,40 +214,22 @@ var deserializeAws_restJson1ListAccountRolesCommandError = function (output, con
|
|
|
230
214
|
case "com.amazonaws.sso#UnauthorizedException": return [3, 8];
|
|
231
215
|
}
|
|
232
216
|
return [3, 10];
|
|
233
|
-
case 2:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
case
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
case 4
|
|
240
|
-
|
|
241
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
242
|
-
case 5:
|
|
243
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
244
|
-
return [3, 11];
|
|
245
|
-
case 6:
|
|
246
|
-
_e = [{}];
|
|
247
|
-
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
248
|
-
case 7:
|
|
249
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
250
|
-
return [3, 11];
|
|
251
|
-
case 8:
|
|
252
|
-
_f = [{}];
|
|
253
|
-
return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
254
|
-
case 9:
|
|
255
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
256
|
-
return [3, 11];
|
|
217
|
+
case 2: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
218
|
+
case 3: throw _d.sent();
|
|
219
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
220
|
+
case 5: throw _d.sent();
|
|
221
|
+
case 6: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
222
|
+
case 7: throw _d.sent();
|
|
223
|
+
case 8: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
224
|
+
case 9: throw _d.sent();
|
|
257
225
|
case 10:
|
|
258
226
|
parsedBody = parsedOutput.body;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
response
|
|
265
|
-
delete response.Message;
|
|
266
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
227
|
+
response = new __BaseException({
|
|
228
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
229
|
+
$fault: "client",
|
|
230
|
+
$metadata: deserializeMetadata(output),
|
|
231
|
+
});
|
|
232
|
+
throw __decorateServiceException(response, parsedBody);
|
|
267
233
|
}
|
|
268
234
|
});
|
|
269
235
|
}); };
|
|
@@ -296,16 +262,16 @@ export var deserializeAws_restJson1ListAccountsCommand = function (output, conte
|
|
|
296
262
|
});
|
|
297
263
|
}); };
|
|
298
264
|
var deserializeAws_restJson1ListAccountsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
299
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
300
|
-
var
|
|
301
|
-
return __generator(this, function (
|
|
302
|
-
switch (
|
|
265
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
266
|
+
var _c;
|
|
267
|
+
return __generator(this, function (_d) {
|
|
268
|
+
switch (_d.label) {
|
|
303
269
|
case 0:
|
|
304
270
|
_a = [__assign({}, output)];
|
|
305
|
-
|
|
271
|
+
_c = {};
|
|
306
272
|
return [4, parseBody(output.body, context)];
|
|
307
273
|
case 1:
|
|
308
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
274
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
309
275
|
errorCode = "UnknownError";
|
|
310
276
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
311
277
|
_b = errorCode;
|
|
@@ -320,40 +286,22 @@ var deserializeAws_restJson1ListAccountsCommandError = function (output, context
|
|
|
320
286
|
case "com.amazonaws.sso#UnauthorizedException": return [3, 8];
|
|
321
287
|
}
|
|
322
288
|
return [3, 10];
|
|
323
|
-
case 2:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
case
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
case 4
|
|
330
|
-
|
|
331
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
332
|
-
case 5:
|
|
333
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
334
|
-
return [3, 11];
|
|
335
|
-
case 6:
|
|
336
|
-
_e = [{}];
|
|
337
|
-
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
338
|
-
case 7:
|
|
339
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
340
|
-
return [3, 11];
|
|
341
|
-
case 8:
|
|
342
|
-
_f = [{}];
|
|
343
|
-
return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
344
|
-
case 9:
|
|
345
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
346
|
-
return [3, 11];
|
|
289
|
+
case 2: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
290
|
+
case 3: throw _d.sent();
|
|
291
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
292
|
+
case 5: throw _d.sent();
|
|
293
|
+
case 6: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
294
|
+
case 7: throw _d.sent();
|
|
295
|
+
case 8: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
296
|
+
case 9: throw _d.sent();
|
|
347
297
|
case 10:
|
|
348
298
|
parsedBody = parsedOutput.body;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
response
|
|
355
|
-
delete response.Message;
|
|
356
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
299
|
+
response = new __BaseException({
|
|
300
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
301
|
+
$fault: "client",
|
|
302
|
+
$metadata: deserializeMetadata(output),
|
|
303
|
+
});
|
|
304
|
+
throw __decorateServiceException(response, parsedBody);
|
|
357
305
|
}
|
|
358
306
|
});
|
|
359
307
|
}); };
|
|
@@ -376,16 +324,16 @@ export var deserializeAws_restJson1LogoutCommand = function (output, context) {
|
|
|
376
324
|
});
|
|
377
325
|
}); };
|
|
378
326
|
var deserializeAws_restJson1LogoutCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
379
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
380
|
-
var
|
|
381
|
-
return __generator(this, function (
|
|
382
|
-
switch (
|
|
327
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
328
|
+
var _c;
|
|
329
|
+
return __generator(this, function (_d) {
|
|
330
|
+
switch (_d.label) {
|
|
383
331
|
case 0:
|
|
384
332
|
_a = [__assign({}, output)];
|
|
385
|
-
|
|
333
|
+
_c = {};
|
|
386
334
|
return [4, parseBody(output.body, context)];
|
|
387
335
|
case 1:
|
|
388
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
336
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
389
337
|
errorCode = "UnknownError";
|
|
390
338
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
391
339
|
_b = errorCode;
|
|
@@ -398,99 +346,69 @@ var deserializeAws_restJson1LogoutCommandError = function (output, context) { re
|
|
|
398
346
|
case "com.amazonaws.sso#UnauthorizedException": return [3, 6];
|
|
399
347
|
}
|
|
400
348
|
return [3, 8];
|
|
401
|
-
case 2:
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
case
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
case 4:
|
|
408
|
-
_d = [{}];
|
|
409
|
-
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
410
|
-
case 5:
|
|
411
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
412
|
-
return [3, 9];
|
|
413
|
-
case 6:
|
|
414
|
-
_e = [{}];
|
|
415
|
-
return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
416
|
-
case 7:
|
|
417
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
418
|
-
return [3, 9];
|
|
349
|
+
case 2: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
350
|
+
case 3: throw _d.sent();
|
|
351
|
+
case 4: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
352
|
+
case 5: throw _d.sent();
|
|
353
|
+
case 6: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
354
|
+
case 7: throw _d.sent();
|
|
419
355
|
case 8:
|
|
420
356
|
parsedBody = parsedOutput.body;
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
response
|
|
427
|
-
delete response.Message;
|
|
428
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
357
|
+
response = new __BaseException({
|
|
358
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
359
|
+
$fault: "client",
|
|
360
|
+
$metadata: deserializeMetadata(output),
|
|
361
|
+
});
|
|
362
|
+
throw __decorateServiceException(response, parsedBody);
|
|
429
363
|
}
|
|
430
364
|
});
|
|
431
365
|
}); };
|
|
432
366
|
var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
433
|
-
var contents, data;
|
|
367
|
+
var contents, data, exception;
|
|
434
368
|
return __generator(this, function (_a) {
|
|
435
|
-
contents = {
|
|
436
|
-
name: "InvalidRequestException",
|
|
437
|
-
$fault: "client",
|
|
438
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
439
|
-
message: undefined,
|
|
440
|
-
};
|
|
369
|
+
contents = {};
|
|
441
370
|
data = parsedOutput.body;
|
|
442
371
|
if (data.message !== undefined && data.message !== null) {
|
|
443
372
|
contents.message = __expectString(data.message);
|
|
444
373
|
}
|
|
445
|
-
|
|
374
|
+
exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
375
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
446
376
|
});
|
|
447
377
|
}); };
|
|
448
378
|
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
449
|
-
var contents, data;
|
|
379
|
+
var contents, data, exception;
|
|
450
380
|
return __generator(this, function (_a) {
|
|
451
|
-
contents = {
|
|
452
|
-
name: "ResourceNotFoundException",
|
|
453
|
-
$fault: "client",
|
|
454
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
455
|
-
message: undefined,
|
|
456
|
-
};
|
|
381
|
+
contents = {};
|
|
457
382
|
data = parsedOutput.body;
|
|
458
383
|
if (data.message !== undefined && data.message !== null) {
|
|
459
384
|
contents.message = __expectString(data.message);
|
|
460
385
|
}
|
|
461
|
-
|
|
386
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
387
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
462
388
|
});
|
|
463
389
|
}); };
|
|
464
390
|
var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
465
|
-
var contents, data;
|
|
391
|
+
var contents, data, exception;
|
|
466
392
|
return __generator(this, function (_a) {
|
|
467
|
-
contents = {
|
|
468
|
-
name: "TooManyRequestsException",
|
|
469
|
-
$fault: "client",
|
|
470
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
471
|
-
message: undefined,
|
|
472
|
-
};
|
|
393
|
+
contents = {};
|
|
473
394
|
data = parsedOutput.body;
|
|
474
395
|
if (data.message !== undefined && data.message !== null) {
|
|
475
396
|
contents.message = __expectString(data.message);
|
|
476
397
|
}
|
|
477
|
-
|
|
398
|
+
exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
399
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
478
400
|
});
|
|
479
401
|
}); };
|
|
480
402
|
var deserializeAws_restJson1UnauthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
481
|
-
var contents, data;
|
|
403
|
+
var contents, data, exception;
|
|
482
404
|
return __generator(this, function (_a) {
|
|
483
|
-
contents = {
|
|
484
|
-
name: "UnauthorizedException",
|
|
485
|
-
$fault: "client",
|
|
486
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
487
|
-
message: undefined,
|
|
488
|
-
};
|
|
405
|
+
contents = {};
|
|
489
406
|
data = parsedOutput.body;
|
|
490
407
|
if (data.message !== undefined && data.message !== null) {
|
|
491
408
|
contents.message = __expectString(data.message);
|
|
492
409
|
}
|
|
493
|
-
|
|
410
|
+
exception = new UnauthorizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
411
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
494
412
|
});
|
|
495
413
|
}); };
|
|
496
414
|
var deserializeAws_restJson1AccountInfo = function (output, context) {
|
|
@@ -501,7 +419,7 @@ var deserializeAws_restJson1AccountInfo = function (output, context) {
|
|
|
501
419
|
};
|
|
502
420
|
};
|
|
503
421
|
var deserializeAws_restJson1AccountListType = function (output, context) {
|
|
504
|
-
|
|
422
|
+
var retVal = (output || [])
|
|
505
423
|
.filter(function (e) { return e != null; })
|
|
506
424
|
.map(function (entry) {
|
|
507
425
|
if (entry === null) {
|
|
@@ -509,6 +427,7 @@ var deserializeAws_restJson1AccountListType = function (output, context) {
|
|
|
509
427
|
}
|
|
510
428
|
return deserializeAws_restJson1AccountInfo(entry, context);
|
|
511
429
|
});
|
|
430
|
+
return retVal;
|
|
512
431
|
};
|
|
513
432
|
var deserializeAws_restJson1RoleCredentials = function (output, context) {
|
|
514
433
|
return {
|
|
@@ -525,7 +444,7 @@ var deserializeAws_restJson1RoleInfo = function (output, context) {
|
|
|
525
444
|
};
|
|
526
445
|
};
|
|
527
446
|
var deserializeAws_restJson1RoleListType = function (output, context) {
|
|
528
|
-
|
|
447
|
+
var retVal = (output || [])
|
|
529
448
|
.filter(function (e) { return e != null; })
|
|
530
449
|
.map(function (entry) {
|
|
531
450
|
if (entry === null) {
|
|
@@ -533,6 +452,7 @@ var deserializeAws_restJson1RoleListType = function (output, context) {
|
|
|
533
452
|
}
|
|
534
453
|
return deserializeAws_restJson1RoleInfo(entry, context);
|
|
535
454
|
});
|
|
455
|
+
return retVal;
|
|
536
456
|
};
|
|
537
457
|
var deserializeMetadata = function (output) {
|
|
538
458
|
var _a;
|
|
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
|
|
|
4
4
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
5
5
|
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
6
6
|
import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
7
|
-
import { Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
7
|
+
import { BodyLengthCalculator as __BodyLengthCalculator, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
8
8
|
import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand";
|
|
9
9
|
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand";
|
|
10
10
|
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand";
|
|
@@ -31,7 +31,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
31
31
|
* A function that can calculate the length of a request body.
|
|
32
32
|
* @internal
|
|
33
33
|
*/
|
|
34
|
-
bodyLengthChecker?:
|
|
34
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
35
35
|
/**
|
|
36
36
|
* A function that converts a stream into an array of bytes.
|
|
37
37
|
* @internal
|
package/dist-types/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
|
|
2
|
+
/**
|
|
3
|
+
* Base exception class for all service exceptions from SSO service.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SSOServiceException extends __ServiceException {
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
constructor(options: __ServiceExceptionOptions);
|
|
10
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { SSOServiceException as __BaseException } from "./SSOServiceException";
|
|
2
3
|
/**
|
|
3
4
|
* <p>Provides information about your AWS account.</p>
|
|
4
5
|
*/
|
|
@@ -90,34 +91,46 @@ export declare namespace GetRoleCredentialsResponse {
|
|
|
90
91
|
* <p>Indicates that a problem occurred with the input to the request. For example, a required
|
|
91
92
|
* parameter might be missing or out of range.</p>
|
|
92
93
|
*/
|
|
93
|
-
export
|
|
94
|
-
name: "InvalidRequestException";
|
|
95
|
-
$fault: "client";
|
|
96
|
-
|
|
94
|
+
export declare class InvalidRequestException extends __BaseException {
|
|
95
|
+
readonly name: "InvalidRequestException";
|
|
96
|
+
readonly $fault: "client";
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
constructor(opts: __ExceptionOptionType<InvalidRequestException, __BaseException>);
|
|
97
101
|
}
|
|
98
102
|
/**
|
|
99
103
|
* <p>The specified resource doesn't exist.</p>
|
|
100
104
|
*/
|
|
101
|
-
export
|
|
102
|
-
name: "ResourceNotFoundException";
|
|
103
|
-
$fault: "client";
|
|
104
|
-
|
|
105
|
+
export declare class ResourceNotFoundException extends __BaseException {
|
|
106
|
+
readonly name: "ResourceNotFoundException";
|
|
107
|
+
readonly $fault: "client";
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
105
112
|
}
|
|
106
113
|
/**
|
|
107
114
|
* <p>Indicates that the request is being made too frequently and is more than what the server can handle.</p>
|
|
108
115
|
*/
|
|
109
|
-
export
|
|
110
|
-
name: "TooManyRequestsException";
|
|
111
|
-
$fault: "client";
|
|
112
|
-
|
|
116
|
+
export declare class TooManyRequestsException extends __BaseException {
|
|
117
|
+
readonly name: "TooManyRequestsException";
|
|
118
|
+
readonly $fault: "client";
|
|
119
|
+
/**
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>);
|
|
113
123
|
}
|
|
114
124
|
/**
|
|
115
125
|
* <p>Indicates that the request is not authorized. This can happen due to an invalid access token in the request.</p>
|
|
116
126
|
*/
|
|
117
|
-
export
|
|
118
|
-
name: "UnauthorizedException";
|
|
119
|
-
$fault: "client";
|
|
120
|
-
|
|
127
|
+
export declare class UnauthorizedException extends __BaseException {
|
|
128
|
+
readonly name: "UnauthorizedException";
|
|
129
|
+
readonly $fault: "client";
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
|
|
121
134
|
}
|
|
122
135
|
export interface ListAccountRolesRequest {
|
|
123
136
|
/**
|
|
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: SSOClientConfig) => {
|
|
|
8
8
|
defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
|
|
9
9
|
base64Decoder: import("@aws-sdk/types").Decoder;
|
|
10
10
|
base64Encoder: import("@aws-sdk/types").Encoder;
|
|
11
|
-
bodyLengthChecker: (
|
|
11
|
+
bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
|
|
12
12
|
defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
|
|
13
13
|
maxAttempts: number | import("@aws-sdk/types").Provider<number>;
|
|
14
14
|
region: string | import("@aws-sdk/types").Provider<any>;
|
|
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: SSOClientConfig) => {
|
|
|
8
8
|
defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
|
|
9
9
|
base64Decoder: import("@aws-sdk/types").Decoder;
|
|
10
10
|
base64Encoder: import("@aws-sdk/types").Encoder;
|
|
11
|
-
bodyLengthChecker: (
|
|
11
|
+
bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
|
|
12
12
|
defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
|
|
13
13
|
maxAttempts: number | import("@aws-sdk/types").Provider<number>;
|
|
14
14
|
region: string | import("@aws-sdk/types").Provider<string>;
|
|
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: SSOClientConfig) => {
|
|
|
8
8
|
requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | import("@aws-sdk/fetch-http-handler").FetchHttpHandler;
|
|
9
9
|
apiVersion: string;
|
|
10
10
|
urlParser: import("@aws-sdk/types").UrlParser;
|
|
11
|
-
bodyLengthChecker: (
|
|
11
|
+
bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
|
|
12
12
|
streamCollector: import("@aws-sdk/types").StreamCollector;
|
|
13
13
|
base64Decoder: import("@aws-sdk/types").Decoder;
|
|
14
14
|
base64Encoder: import("@aws-sdk/types").Encoder;
|
|
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
|
|
|
4
4
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
5
5
|
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
6
6
|
import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
7
|
-
import { Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
7
|
+
import { BodyLengthCalculator as __BodyLengthCalculator, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
8
8
|
import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand";
|
|
9
9
|
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand";
|
|
10
10
|
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand";
|
|
@@ -19,7 +19,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
19
19
|
|
|
20
20
|
urlParser?: __UrlParser;
|
|
21
21
|
|
|
22
|
-
bodyLengthChecker?:
|
|
22
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
23
23
|
|
|
24
24
|
streamCollector?: __StreamCollector;
|
|
25
25
|
|