@aws-sdk/client-sts 3.180.0 → 3.183.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 +26 -0
- package/dist-cjs/protocols/Aws_query.js +29 -21
- package/dist-es/STS.js +34 -41
- package/dist-es/STSClient.js +21 -27
- package/dist-es/commands/AssumeRoleCommand.js +21 -28
- package/dist-es/commands/AssumeRoleWithSAMLCommand.js +21 -28
- package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +21 -28
- package/dist-es/commands/DecodeAuthorizationMessageCommand.js +21 -28
- package/dist-es/commands/GetAccessKeyInfoCommand.js +21 -28
- package/dist-es/commands/GetCallerIdentityCommand.js +21 -28
- package/dist-es/commands/GetFederationTokenCommand.js +21 -28
- package/dist-es/commands/GetSessionTokenCommand.js +21 -28
- package/dist-es/defaultRoleAssumers.js +14 -35
- package/dist-es/defaultStsRoleAssumers.js +61 -78
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/STSServiceException.js +5 -10
- package/dist-es/models/models_0.js +151 -110
- package/dist-es/protocols/Aws_query.js +614 -806
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,616 +1,479 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read, __values } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getValueFromTextNode as __getValueFromTextNode, parseRfc3339DateTime as __parseRfc3339DateTime, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { decodeHTML } from "entities";
|
|
5
4
|
import { parse as xmlParse } from "fast-xml-parser";
|
|
6
5
|
import { ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, } from "../models/models_0";
|
|
7
6
|
import { STSServiceException as __BaseException } from "../models/STSServiceException";
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}); };
|
|
18
|
-
export var serializeAws_queryAssumeRoleWithSAMLCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
19
|
-
var headers, body;
|
|
20
|
-
return __generator(this, function (_a) {
|
|
21
|
-
headers = {
|
|
22
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
23
|
-
};
|
|
24
|
-
body = buildFormUrlencodedString(__assign(__assign({}, serializeAws_queryAssumeRoleWithSAMLRequest(input, context)), { Action: "AssumeRoleWithSAML", Version: "2011-06-15" }));
|
|
25
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
26
|
-
});
|
|
27
|
-
}); };
|
|
28
|
-
export var serializeAws_queryAssumeRoleWithWebIdentityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
-
var headers, body;
|
|
30
|
-
return __generator(this, function (_a) {
|
|
31
|
-
headers = {
|
|
32
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
33
|
-
};
|
|
34
|
-
body = buildFormUrlencodedString(__assign(__assign({}, serializeAws_queryAssumeRoleWithWebIdentityRequest(input, context)), { Action: "AssumeRoleWithWebIdentity", Version: "2011-06-15" }));
|
|
35
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
36
|
-
});
|
|
37
|
-
}); };
|
|
38
|
-
export var serializeAws_queryDecodeAuthorizationMessageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
39
|
-
var headers, body;
|
|
40
|
-
return __generator(this, function (_a) {
|
|
41
|
-
headers = {
|
|
42
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
43
|
-
};
|
|
44
|
-
body = buildFormUrlencodedString(__assign(__assign({}, serializeAws_queryDecodeAuthorizationMessageRequest(input, context)), { Action: "DecodeAuthorizationMessage", Version: "2011-06-15" }));
|
|
45
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
46
|
-
});
|
|
47
|
-
}); };
|
|
48
|
-
export var serializeAws_queryGetAccessKeyInfoCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
49
|
-
var headers, body;
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
headers = {
|
|
52
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
53
|
-
};
|
|
54
|
-
body = buildFormUrlencodedString(__assign(__assign({}, serializeAws_queryGetAccessKeyInfoRequest(input, context)), { Action: "GetAccessKeyInfo", Version: "2011-06-15" }));
|
|
55
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
56
|
-
});
|
|
57
|
-
}); };
|
|
58
|
-
export var serializeAws_queryGetCallerIdentityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
-
var headers, body;
|
|
60
|
-
return __generator(this, function (_a) {
|
|
61
|
-
headers = {
|
|
62
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
63
|
-
};
|
|
64
|
-
body = buildFormUrlencodedString(__assign(__assign({}, serializeAws_queryGetCallerIdentityRequest(input, context)), { Action: "GetCallerIdentity", Version: "2011-06-15" }));
|
|
65
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
66
|
-
});
|
|
67
|
-
}); };
|
|
68
|
-
export var serializeAws_queryGetFederationTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
|
-
var headers, body;
|
|
70
|
-
return __generator(this, function (_a) {
|
|
71
|
-
headers = {
|
|
72
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
73
|
-
};
|
|
74
|
-
body = buildFormUrlencodedString(__assign(__assign({}, serializeAws_queryGetFederationTokenRequest(input, context)), { Action: "GetFederationToken", Version: "2011-06-15" }));
|
|
75
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
76
|
-
});
|
|
77
|
-
}); };
|
|
78
|
-
export var serializeAws_queryGetSessionTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
79
|
-
var headers, body;
|
|
80
|
-
return __generator(this, function (_a) {
|
|
81
|
-
headers = {
|
|
82
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
83
|
-
};
|
|
84
|
-
body = buildFormUrlencodedString(__assign(__assign({}, serializeAws_queryGetSessionTokenRequest(input, context)), { Action: "GetSessionToken", Version: "2011-06-15" }));
|
|
85
|
-
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
86
|
-
});
|
|
87
|
-
}); };
|
|
88
|
-
export var deserializeAws_queryAssumeRoleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
|
-
var data, contents, response;
|
|
90
|
-
return __generator(this, function (_a) {
|
|
91
|
-
switch (_a.label) {
|
|
92
|
-
case 0:
|
|
93
|
-
if (output.statusCode >= 300) {
|
|
94
|
-
return [2, deserializeAws_queryAssumeRoleCommandError(output, context)];
|
|
95
|
-
}
|
|
96
|
-
return [4, parseBody(output.body, context)];
|
|
97
|
-
case 1:
|
|
98
|
-
data = _a.sent();
|
|
99
|
-
contents = {};
|
|
100
|
-
contents = deserializeAws_queryAssumeRoleResponse(data.AssumeRoleResult, context);
|
|
101
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
102
|
-
return [2, Promise.resolve(response)];
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}); };
|
|
106
|
-
var deserializeAws_queryAssumeRoleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
107
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
108
|
-
var _c;
|
|
109
|
-
return __generator(this, function (_d) {
|
|
110
|
-
switch (_d.label) {
|
|
111
|
-
case 0:
|
|
112
|
-
_a = [__assign({}, output)];
|
|
113
|
-
_c = {};
|
|
114
|
-
return [4, parseBody(output.body, context)];
|
|
115
|
-
case 1:
|
|
116
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
117
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
118
|
-
_b = errorCode;
|
|
119
|
-
switch (_b) {
|
|
120
|
-
case "ExpiredTokenException": return [3, 2];
|
|
121
|
-
case "com.amazonaws.sts#ExpiredTokenException": return [3, 2];
|
|
122
|
-
case "MalformedPolicyDocumentException": return [3, 4];
|
|
123
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException": return [3, 4];
|
|
124
|
-
case "PackedPolicyTooLargeException": return [3, 6];
|
|
125
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException": return [3, 6];
|
|
126
|
-
case "RegionDisabledException": return [3, 8];
|
|
127
|
-
case "com.amazonaws.sts#RegionDisabledException": return [3, 8];
|
|
128
|
-
}
|
|
129
|
-
return [3, 10];
|
|
130
|
-
case 2: return [4, deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)];
|
|
131
|
-
case 3: throw _d.sent();
|
|
132
|
-
case 4: return [4, deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)];
|
|
133
|
-
case 5: throw _d.sent();
|
|
134
|
-
case 6: return [4, deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)];
|
|
135
|
-
case 7: throw _d.sent();
|
|
136
|
-
case 8: return [4, deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)];
|
|
137
|
-
case 9: throw _d.sent();
|
|
138
|
-
case 10:
|
|
139
|
-
parsedBody = parsedOutput.body;
|
|
140
|
-
throwDefaultError({
|
|
141
|
-
output: output,
|
|
142
|
-
parsedBody: parsedBody.Error,
|
|
143
|
-
exceptionCtor: __BaseException,
|
|
144
|
-
errorCode: errorCode,
|
|
145
|
-
});
|
|
146
|
-
_d.label = 11;
|
|
147
|
-
case 11: return [2];
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}); };
|
|
151
|
-
export var deserializeAws_queryAssumeRoleWithSAMLCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
152
|
-
var data, contents, response;
|
|
153
|
-
return __generator(this, function (_a) {
|
|
154
|
-
switch (_a.label) {
|
|
155
|
-
case 0:
|
|
156
|
-
if (output.statusCode >= 300) {
|
|
157
|
-
return [2, deserializeAws_queryAssumeRoleWithSAMLCommandError(output, context)];
|
|
158
|
-
}
|
|
159
|
-
return [4, parseBody(output.body, context)];
|
|
160
|
-
case 1:
|
|
161
|
-
data = _a.sent();
|
|
162
|
-
contents = {};
|
|
163
|
-
contents = deserializeAws_queryAssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);
|
|
164
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
165
|
-
return [2, Promise.resolve(response)];
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}); };
|
|
169
|
-
var deserializeAws_queryAssumeRoleWithSAMLCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
170
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
171
|
-
var _c;
|
|
172
|
-
return __generator(this, function (_d) {
|
|
173
|
-
switch (_d.label) {
|
|
174
|
-
case 0:
|
|
175
|
-
_a = [__assign({}, output)];
|
|
176
|
-
_c = {};
|
|
177
|
-
return [4, parseBody(output.body, context)];
|
|
178
|
-
case 1:
|
|
179
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
180
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
181
|
-
_b = errorCode;
|
|
182
|
-
switch (_b) {
|
|
183
|
-
case "ExpiredTokenException": return [3, 2];
|
|
184
|
-
case "com.amazonaws.sts#ExpiredTokenException": return [3, 2];
|
|
185
|
-
case "IDPRejectedClaimException": return [3, 4];
|
|
186
|
-
case "com.amazonaws.sts#IDPRejectedClaimException": return [3, 4];
|
|
187
|
-
case "InvalidIdentityTokenException": return [3, 6];
|
|
188
|
-
case "com.amazonaws.sts#InvalidIdentityTokenException": return [3, 6];
|
|
189
|
-
case "MalformedPolicyDocumentException": return [3, 8];
|
|
190
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException": return [3, 8];
|
|
191
|
-
case "PackedPolicyTooLargeException": return [3, 10];
|
|
192
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException": return [3, 10];
|
|
193
|
-
case "RegionDisabledException": return [3, 12];
|
|
194
|
-
case "com.amazonaws.sts#RegionDisabledException": return [3, 12];
|
|
195
|
-
}
|
|
196
|
-
return [3, 14];
|
|
197
|
-
case 2: return [4, deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)];
|
|
198
|
-
case 3: throw _d.sent();
|
|
199
|
-
case 4: return [4, deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)];
|
|
200
|
-
case 5: throw _d.sent();
|
|
201
|
-
case 6: return [4, deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)];
|
|
202
|
-
case 7: throw _d.sent();
|
|
203
|
-
case 8: return [4, deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)];
|
|
204
|
-
case 9: throw _d.sent();
|
|
205
|
-
case 10: return [4, deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)];
|
|
206
|
-
case 11: throw _d.sent();
|
|
207
|
-
case 12: return [4, deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)];
|
|
208
|
-
case 13: throw _d.sent();
|
|
209
|
-
case 14:
|
|
210
|
-
parsedBody = parsedOutput.body;
|
|
211
|
-
throwDefaultError({
|
|
212
|
-
output: output,
|
|
213
|
-
parsedBody: parsedBody.Error,
|
|
214
|
-
exceptionCtor: __BaseException,
|
|
215
|
-
errorCode: errorCode,
|
|
216
|
-
});
|
|
217
|
-
_d.label = 15;
|
|
218
|
-
case 15: return [2];
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}); };
|
|
222
|
-
export var deserializeAws_queryAssumeRoleWithWebIdentityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
223
|
-
var data, contents, response;
|
|
224
|
-
return __generator(this, function (_a) {
|
|
225
|
-
switch (_a.label) {
|
|
226
|
-
case 0:
|
|
227
|
-
if (output.statusCode >= 300) {
|
|
228
|
-
return [2, deserializeAws_queryAssumeRoleWithWebIdentityCommandError(output, context)];
|
|
229
|
-
}
|
|
230
|
-
return [4, parseBody(output.body, context)];
|
|
231
|
-
case 1:
|
|
232
|
-
data = _a.sent();
|
|
233
|
-
contents = {};
|
|
234
|
-
contents = deserializeAws_queryAssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
|
|
235
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
236
|
-
return [2, Promise.resolve(response)];
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}); };
|
|
240
|
-
var deserializeAws_queryAssumeRoleWithWebIdentityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
241
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
242
|
-
var _c;
|
|
243
|
-
return __generator(this, function (_d) {
|
|
244
|
-
switch (_d.label) {
|
|
245
|
-
case 0:
|
|
246
|
-
_a = [__assign({}, output)];
|
|
247
|
-
_c = {};
|
|
248
|
-
return [4, parseBody(output.body, context)];
|
|
249
|
-
case 1:
|
|
250
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
251
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
252
|
-
_b = errorCode;
|
|
253
|
-
switch (_b) {
|
|
254
|
-
case "ExpiredTokenException": return [3, 2];
|
|
255
|
-
case "com.amazonaws.sts#ExpiredTokenException": return [3, 2];
|
|
256
|
-
case "IDPCommunicationErrorException": return [3, 4];
|
|
257
|
-
case "com.amazonaws.sts#IDPCommunicationErrorException": return [3, 4];
|
|
258
|
-
case "IDPRejectedClaimException": return [3, 6];
|
|
259
|
-
case "com.amazonaws.sts#IDPRejectedClaimException": return [3, 6];
|
|
260
|
-
case "InvalidIdentityTokenException": return [3, 8];
|
|
261
|
-
case "com.amazonaws.sts#InvalidIdentityTokenException": return [3, 8];
|
|
262
|
-
case "MalformedPolicyDocumentException": return [3, 10];
|
|
263
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException": return [3, 10];
|
|
264
|
-
case "PackedPolicyTooLargeException": return [3, 12];
|
|
265
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException": return [3, 12];
|
|
266
|
-
case "RegionDisabledException": return [3, 14];
|
|
267
|
-
case "com.amazonaws.sts#RegionDisabledException": return [3, 14];
|
|
268
|
-
}
|
|
269
|
-
return [3, 16];
|
|
270
|
-
case 2: return [4, deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)];
|
|
271
|
-
case 3: throw _d.sent();
|
|
272
|
-
case 4: return [4, deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context)];
|
|
273
|
-
case 5: throw _d.sent();
|
|
274
|
-
case 6: return [4, deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)];
|
|
275
|
-
case 7: throw _d.sent();
|
|
276
|
-
case 8: return [4, deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)];
|
|
277
|
-
case 9: throw _d.sent();
|
|
278
|
-
case 10: return [4, deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)];
|
|
279
|
-
case 11: throw _d.sent();
|
|
280
|
-
case 12: return [4, deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)];
|
|
281
|
-
case 13: throw _d.sent();
|
|
282
|
-
case 14: return [4, deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)];
|
|
283
|
-
case 15: throw _d.sent();
|
|
284
|
-
case 16:
|
|
285
|
-
parsedBody = parsedOutput.body;
|
|
286
|
-
throwDefaultError({
|
|
287
|
-
output: output,
|
|
288
|
-
parsedBody: parsedBody.Error,
|
|
289
|
-
exceptionCtor: __BaseException,
|
|
290
|
-
errorCode: errorCode,
|
|
291
|
-
});
|
|
292
|
-
_d.label = 17;
|
|
293
|
-
case 17: return [2];
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
}); };
|
|
297
|
-
export var deserializeAws_queryDecodeAuthorizationMessageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
298
|
-
var data, contents, response;
|
|
299
|
-
return __generator(this, function (_a) {
|
|
300
|
-
switch (_a.label) {
|
|
301
|
-
case 0:
|
|
302
|
-
if (output.statusCode >= 300) {
|
|
303
|
-
return [2, deserializeAws_queryDecodeAuthorizationMessageCommandError(output, context)];
|
|
304
|
-
}
|
|
305
|
-
return [4, parseBody(output.body, context)];
|
|
306
|
-
case 1:
|
|
307
|
-
data = _a.sent();
|
|
308
|
-
contents = {};
|
|
309
|
-
contents = deserializeAws_queryDecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);
|
|
310
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
311
|
-
return [2, Promise.resolve(response)];
|
|
312
|
-
}
|
|
7
|
+
export const serializeAws_queryAssumeRoleCommand = async (input, context) => {
|
|
8
|
+
const headers = {
|
|
9
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
10
|
+
};
|
|
11
|
+
let body;
|
|
12
|
+
body = buildFormUrlencodedString({
|
|
13
|
+
...serializeAws_queryAssumeRoleRequest(input, context),
|
|
14
|
+
Action: "AssumeRole",
|
|
15
|
+
Version: "2011-06-15",
|
|
313
16
|
});
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
326
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
327
|
-
_b = errorCode;
|
|
328
|
-
switch (_b) {
|
|
329
|
-
case "InvalidAuthorizationMessageException": return [3, 2];
|
|
330
|
-
case "com.amazonaws.sts#InvalidAuthorizationMessageException": return [3, 2];
|
|
331
|
-
}
|
|
332
|
-
return [3, 4];
|
|
333
|
-
case 2: return [4, deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context)];
|
|
334
|
-
case 3: throw _d.sent();
|
|
335
|
-
case 4:
|
|
336
|
-
parsedBody = parsedOutput.body;
|
|
337
|
-
throwDefaultError({
|
|
338
|
-
output: output,
|
|
339
|
-
parsedBody: parsedBody.Error,
|
|
340
|
-
exceptionCtor: __BaseException,
|
|
341
|
-
errorCode: errorCode,
|
|
342
|
-
});
|
|
343
|
-
_d.label = 5;
|
|
344
|
-
case 5: return [2];
|
|
345
|
-
}
|
|
17
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
18
|
+
};
|
|
19
|
+
export const serializeAws_queryAssumeRoleWithSAMLCommand = async (input, context) => {
|
|
20
|
+
const headers = {
|
|
21
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
22
|
+
};
|
|
23
|
+
let body;
|
|
24
|
+
body = buildFormUrlencodedString({
|
|
25
|
+
...serializeAws_queryAssumeRoleWithSAMLRequest(input, context),
|
|
26
|
+
Action: "AssumeRoleWithSAML",
|
|
27
|
+
Version: "2011-06-15",
|
|
346
28
|
});
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
data = _a.sent();
|
|
359
|
-
contents = {};
|
|
360
|
-
contents = deserializeAws_queryGetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);
|
|
361
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
362
|
-
return [2, Promise.resolve(response)];
|
|
363
|
-
}
|
|
29
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
30
|
+
};
|
|
31
|
+
export const serializeAws_queryAssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
32
|
+
const headers = {
|
|
33
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
34
|
+
};
|
|
35
|
+
let body;
|
|
36
|
+
body = buildFormUrlencodedString({
|
|
37
|
+
...serializeAws_queryAssumeRoleWithWebIdentityRequest(input, context),
|
|
38
|
+
Action: "AssumeRoleWithWebIdentity",
|
|
39
|
+
Version: "2011-06-15",
|
|
364
40
|
});
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
377
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
378
|
-
parsedBody = parsedOutput.body;
|
|
379
|
-
throwDefaultError({
|
|
380
|
-
output: output,
|
|
381
|
-
parsedBody: parsedBody.Error,
|
|
382
|
-
exceptionCtor: __BaseException,
|
|
383
|
-
errorCode: errorCode,
|
|
384
|
-
});
|
|
385
|
-
return [2];
|
|
386
|
-
}
|
|
41
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
+
};
|
|
43
|
+
export const serializeAws_queryDecodeAuthorizationMessageCommand = async (input, context) => {
|
|
44
|
+
const headers = {
|
|
45
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
46
|
+
};
|
|
47
|
+
let body;
|
|
48
|
+
body = buildFormUrlencodedString({
|
|
49
|
+
...serializeAws_queryDecodeAuthorizationMessageRequest(input, context),
|
|
50
|
+
Action: "DecodeAuthorizationMessage",
|
|
51
|
+
Version: "2011-06-15",
|
|
387
52
|
});
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
data = _a.sent();
|
|
400
|
-
contents = {};
|
|
401
|
-
contents = deserializeAws_queryGetCallerIdentityResponse(data.GetCallerIdentityResult, context);
|
|
402
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
403
|
-
return [2, Promise.resolve(response)];
|
|
404
|
-
}
|
|
53
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
54
|
+
};
|
|
55
|
+
export const serializeAws_queryGetAccessKeyInfoCommand = async (input, context) => {
|
|
56
|
+
const headers = {
|
|
57
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
58
|
+
};
|
|
59
|
+
let body;
|
|
60
|
+
body = buildFormUrlencodedString({
|
|
61
|
+
...serializeAws_queryGetAccessKeyInfoRequest(input, context),
|
|
62
|
+
Action: "GetAccessKeyInfo",
|
|
63
|
+
Version: "2011-06-15",
|
|
405
64
|
});
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
418
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
419
|
-
parsedBody = parsedOutput.body;
|
|
420
|
-
throwDefaultError({
|
|
421
|
-
output: output,
|
|
422
|
-
parsedBody: parsedBody.Error,
|
|
423
|
-
exceptionCtor: __BaseException,
|
|
424
|
-
errorCode: errorCode,
|
|
425
|
-
});
|
|
426
|
-
return [2];
|
|
427
|
-
}
|
|
65
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
|
+
};
|
|
67
|
+
export const serializeAws_queryGetCallerIdentityCommand = async (input, context) => {
|
|
68
|
+
const headers = {
|
|
69
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
70
|
+
};
|
|
71
|
+
let body;
|
|
72
|
+
body = buildFormUrlencodedString({
|
|
73
|
+
...serializeAws_queryGetCallerIdentityRequest(input, context),
|
|
74
|
+
Action: "GetCallerIdentity",
|
|
75
|
+
Version: "2011-06-15",
|
|
428
76
|
});
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
data = _a.sent();
|
|
441
|
-
contents = {};
|
|
442
|
-
contents = deserializeAws_queryGetFederationTokenResponse(data.GetFederationTokenResult, context);
|
|
443
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
444
|
-
return [2, Promise.resolve(response)];
|
|
445
|
-
}
|
|
77
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
+
};
|
|
79
|
+
export const serializeAws_queryGetFederationTokenCommand = async (input, context) => {
|
|
80
|
+
const headers = {
|
|
81
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
82
|
+
};
|
|
83
|
+
let body;
|
|
84
|
+
body = buildFormUrlencodedString({
|
|
85
|
+
...serializeAws_queryGetFederationTokenRequest(input, context),
|
|
86
|
+
Action: "GetFederationToken",
|
|
87
|
+
Version: "2011-06-15",
|
|
446
88
|
});
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
459
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
460
|
-
_b = errorCode;
|
|
461
|
-
switch (_b) {
|
|
462
|
-
case "MalformedPolicyDocumentException": return [3, 2];
|
|
463
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException": return [3, 2];
|
|
464
|
-
case "PackedPolicyTooLargeException": return [3, 4];
|
|
465
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException": return [3, 4];
|
|
466
|
-
case "RegionDisabledException": return [3, 6];
|
|
467
|
-
case "com.amazonaws.sts#RegionDisabledException": return [3, 6];
|
|
468
|
-
}
|
|
469
|
-
return [3, 8];
|
|
470
|
-
case 2: return [4, deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)];
|
|
471
|
-
case 3: throw _d.sent();
|
|
472
|
-
case 4: return [4, deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)];
|
|
473
|
-
case 5: throw _d.sent();
|
|
474
|
-
case 6: return [4, deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)];
|
|
475
|
-
case 7: throw _d.sent();
|
|
476
|
-
case 8:
|
|
477
|
-
parsedBody = parsedOutput.body;
|
|
478
|
-
throwDefaultError({
|
|
479
|
-
output: output,
|
|
480
|
-
parsedBody: parsedBody.Error,
|
|
481
|
-
exceptionCtor: __BaseException,
|
|
482
|
-
errorCode: errorCode,
|
|
483
|
-
});
|
|
484
|
-
_d.label = 9;
|
|
485
|
-
case 9: return [2];
|
|
486
|
-
}
|
|
89
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
+
};
|
|
91
|
+
export const serializeAws_queryGetSessionTokenCommand = async (input, context) => {
|
|
92
|
+
const headers = {
|
|
93
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
94
|
+
};
|
|
95
|
+
let body;
|
|
96
|
+
body = buildFormUrlencodedString({
|
|
97
|
+
...serializeAws_queryGetSessionTokenRequest(input, context),
|
|
98
|
+
Action: "GetSessionToken",
|
|
99
|
+
Version: "2011-06-15",
|
|
487
100
|
});
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
101
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
102
|
+
};
|
|
103
|
+
export const deserializeAws_queryAssumeRoleCommand = async (output, context) => {
|
|
104
|
+
if (output.statusCode >= 300) {
|
|
105
|
+
return deserializeAws_queryAssumeRoleCommandError(output, context);
|
|
106
|
+
}
|
|
107
|
+
const data = await parseBody(output.body, context);
|
|
108
|
+
let contents = {};
|
|
109
|
+
contents = deserializeAws_queryAssumeRoleResponse(data.AssumeRoleResult, context);
|
|
110
|
+
const response = {
|
|
111
|
+
$metadata: deserializeMetadata(output),
|
|
112
|
+
...contents,
|
|
113
|
+
};
|
|
114
|
+
return Promise.resolve(response);
|
|
115
|
+
};
|
|
116
|
+
const deserializeAws_queryAssumeRoleCommandError = async (output, context) => {
|
|
117
|
+
const parsedOutput = {
|
|
118
|
+
...output,
|
|
119
|
+
body: await parseErrorBody(output.body, context),
|
|
120
|
+
};
|
|
121
|
+
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
122
|
+
switch (errorCode) {
|
|
123
|
+
case "ExpiredTokenException":
|
|
124
|
+
case "com.amazonaws.sts#ExpiredTokenException":
|
|
125
|
+
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
126
|
+
case "MalformedPolicyDocument":
|
|
127
|
+
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
128
|
+
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
129
|
+
case "PackedPolicyTooLarge":
|
|
130
|
+
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
131
|
+
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
132
|
+
case "RegionDisabledException":
|
|
133
|
+
case "com.amazonaws.sts#RegionDisabledException":
|
|
134
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
135
|
+
default:
|
|
136
|
+
const parsedBody = parsedOutput.body;
|
|
137
|
+
throwDefaultError({
|
|
138
|
+
output,
|
|
139
|
+
parsedBody: parsedBody.Error,
|
|
140
|
+
exceptionCtor: __BaseException,
|
|
141
|
+
errorCode,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
export const deserializeAws_queryAssumeRoleWithSAMLCommand = async (output, context) => {
|
|
146
|
+
if (output.statusCode >= 300) {
|
|
147
|
+
return deserializeAws_queryAssumeRoleWithSAMLCommandError(output, context);
|
|
148
|
+
}
|
|
149
|
+
const data = await parseBody(output.body, context);
|
|
150
|
+
let contents = {};
|
|
151
|
+
contents = deserializeAws_queryAssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);
|
|
152
|
+
const response = {
|
|
153
|
+
$metadata: deserializeMetadata(output),
|
|
154
|
+
...contents,
|
|
155
|
+
};
|
|
156
|
+
return Promise.resolve(response);
|
|
157
|
+
};
|
|
158
|
+
const deserializeAws_queryAssumeRoleWithSAMLCommandError = async (output, context) => {
|
|
159
|
+
const parsedOutput = {
|
|
160
|
+
...output,
|
|
161
|
+
body: await parseErrorBody(output.body, context),
|
|
162
|
+
};
|
|
163
|
+
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
164
|
+
switch (errorCode) {
|
|
165
|
+
case "ExpiredTokenException":
|
|
166
|
+
case "com.amazonaws.sts#ExpiredTokenException":
|
|
167
|
+
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
168
|
+
case "IDPRejectedClaim":
|
|
169
|
+
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
170
|
+
throw await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context);
|
|
171
|
+
case "InvalidIdentityToken":
|
|
172
|
+
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
173
|
+
throw await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context);
|
|
174
|
+
case "MalformedPolicyDocument":
|
|
175
|
+
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
176
|
+
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
177
|
+
case "PackedPolicyTooLarge":
|
|
178
|
+
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
179
|
+
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
180
|
+
case "RegionDisabledException":
|
|
181
|
+
case "com.amazonaws.sts#RegionDisabledException":
|
|
182
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
183
|
+
default:
|
|
184
|
+
const parsedBody = parsedOutput.body;
|
|
185
|
+
throwDefaultError({
|
|
186
|
+
output,
|
|
187
|
+
parsedBody: parsedBody.Error,
|
|
188
|
+
exceptionCtor: __BaseException,
|
|
189
|
+
errorCode,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
export const deserializeAws_queryAssumeRoleWithWebIdentityCommand = async (output, context) => {
|
|
194
|
+
if (output.statusCode >= 300) {
|
|
195
|
+
return deserializeAws_queryAssumeRoleWithWebIdentityCommandError(output, context);
|
|
196
|
+
}
|
|
197
|
+
const data = await parseBody(output.body, context);
|
|
198
|
+
let contents = {};
|
|
199
|
+
contents = deserializeAws_queryAssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
|
|
200
|
+
const response = {
|
|
201
|
+
$metadata: deserializeMetadata(output),
|
|
202
|
+
...contents,
|
|
203
|
+
};
|
|
204
|
+
return Promise.resolve(response);
|
|
205
|
+
};
|
|
206
|
+
const deserializeAws_queryAssumeRoleWithWebIdentityCommandError = async (output, context) => {
|
|
207
|
+
const parsedOutput = {
|
|
208
|
+
...output,
|
|
209
|
+
body: await parseErrorBody(output.body, context),
|
|
210
|
+
};
|
|
211
|
+
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
212
|
+
switch (errorCode) {
|
|
213
|
+
case "ExpiredTokenException":
|
|
214
|
+
case "com.amazonaws.sts#ExpiredTokenException":
|
|
215
|
+
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
216
|
+
case "IDPCommunicationError":
|
|
217
|
+
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
218
|
+
throw await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context);
|
|
219
|
+
case "IDPRejectedClaim":
|
|
220
|
+
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
221
|
+
throw await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context);
|
|
222
|
+
case "InvalidIdentityToken":
|
|
223
|
+
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
224
|
+
throw await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context);
|
|
225
|
+
case "MalformedPolicyDocument":
|
|
226
|
+
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
227
|
+
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
228
|
+
case "PackedPolicyTooLarge":
|
|
229
|
+
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
230
|
+
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
231
|
+
case "RegionDisabledException":
|
|
232
|
+
case "com.amazonaws.sts#RegionDisabledException":
|
|
233
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
234
|
+
default:
|
|
235
|
+
const parsedBody = parsedOutput.body;
|
|
236
|
+
throwDefaultError({
|
|
237
|
+
output,
|
|
238
|
+
parsedBody: parsedBody.Error,
|
|
239
|
+
exceptionCtor: __BaseException,
|
|
240
|
+
errorCode,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
export const deserializeAws_queryDecodeAuthorizationMessageCommand = async (output, context) => {
|
|
245
|
+
if (output.statusCode >= 300) {
|
|
246
|
+
return deserializeAws_queryDecodeAuthorizationMessageCommandError(output, context);
|
|
247
|
+
}
|
|
248
|
+
const data = await parseBody(output.body, context);
|
|
249
|
+
let contents = {};
|
|
250
|
+
contents = deserializeAws_queryDecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);
|
|
251
|
+
const response = {
|
|
252
|
+
$metadata: deserializeMetadata(output),
|
|
253
|
+
...contents,
|
|
254
|
+
};
|
|
255
|
+
return Promise.resolve(response);
|
|
256
|
+
};
|
|
257
|
+
const deserializeAws_queryDecodeAuthorizationMessageCommandError = async (output, context) => {
|
|
258
|
+
const parsedOutput = {
|
|
259
|
+
...output,
|
|
260
|
+
body: await parseErrorBody(output.body, context),
|
|
261
|
+
};
|
|
262
|
+
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
263
|
+
switch (errorCode) {
|
|
264
|
+
case "InvalidAuthorizationMessageException":
|
|
265
|
+
case "com.amazonaws.sts#InvalidAuthorizationMessageException":
|
|
266
|
+
throw await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context);
|
|
267
|
+
default:
|
|
268
|
+
const parsedBody = parsedOutput.body;
|
|
269
|
+
throwDefaultError({
|
|
270
|
+
output,
|
|
271
|
+
parsedBody: parsedBody.Error,
|
|
272
|
+
exceptionCtor: __BaseException,
|
|
273
|
+
errorCode,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
export const deserializeAws_queryGetAccessKeyInfoCommand = async (output, context) => {
|
|
278
|
+
if (output.statusCode >= 300) {
|
|
279
|
+
return deserializeAws_queryGetAccessKeyInfoCommandError(output, context);
|
|
280
|
+
}
|
|
281
|
+
const data = await parseBody(output.body, context);
|
|
282
|
+
let contents = {};
|
|
283
|
+
contents = deserializeAws_queryGetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);
|
|
284
|
+
const response = {
|
|
285
|
+
$metadata: deserializeMetadata(output),
|
|
286
|
+
...contents,
|
|
287
|
+
};
|
|
288
|
+
return Promise.resolve(response);
|
|
289
|
+
};
|
|
290
|
+
const deserializeAws_queryGetAccessKeyInfoCommandError = async (output, context) => {
|
|
291
|
+
const parsedOutput = {
|
|
292
|
+
...output,
|
|
293
|
+
body: await parseErrorBody(output.body, context),
|
|
294
|
+
};
|
|
295
|
+
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
296
|
+
const parsedBody = parsedOutput.body;
|
|
297
|
+
throwDefaultError({
|
|
298
|
+
output,
|
|
299
|
+
parsedBody: parsedBody.Error,
|
|
300
|
+
exceptionCtor: __BaseException,
|
|
301
|
+
errorCode,
|
|
505
302
|
});
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
exceptionCtor: __BaseException,
|
|
533
|
-
errorCode: errorCode,
|
|
534
|
-
});
|
|
535
|
-
_d.label = 5;
|
|
536
|
-
case 5: return [2];
|
|
537
|
-
}
|
|
303
|
+
};
|
|
304
|
+
export const deserializeAws_queryGetCallerIdentityCommand = async (output, context) => {
|
|
305
|
+
if (output.statusCode >= 300) {
|
|
306
|
+
return deserializeAws_queryGetCallerIdentityCommandError(output, context);
|
|
307
|
+
}
|
|
308
|
+
const data = await parseBody(output.body, context);
|
|
309
|
+
let contents = {};
|
|
310
|
+
contents = deserializeAws_queryGetCallerIdentityResponse(data.GetCallerIdentityResult, context);
|
|
311
|
+
const response = {
|
|
312
|
+
$metadata: deserializeMetadata(output),
|
|
313
|
+
...contents,
|
|
314
|
+
};
|
|
315
|
+
return Promise.resolve(response);
|
|
316
|
+
};
|
|
317
|
+
const deserializeAws_queryGetCallerIdentityCommandError = async (output, context) => {
|
|
318
|
+
const parsedOutput = {
|
|
319
|
+
...output,
|
|
320
|
+
body: await parseErrorBody(output.body, context),
|
|
321
|
+
};
|
|
322
|
+
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
323
|
+
const parsedBody = parsedOutput.body;
|
|
324
|
+
throwDefaultError({
|
|
325
|
+
output,
|
|
326
|
+
parsedBody: parsedBody.Error,
|
|
327
|
+
exceptionCtor: __BaseException,
|
|
328
|
+
errorCode,
|
|
538
329
|
});
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
330
|
+
};
|
|
331
|
+
export const deserializeAws_queryGetFederationTokenCommand = async (output, context) => {
|
|
332
|
+
if (output.statusCode >= 300) {
|
|
333
|
+
return deserializeAws_queryGetFederationTokenCommandError(output, context);
|
|
334
|
+
}
|
|
335
|
+
const data = await parseBody(output.body, context);
|
|
336
|
+
let contents = {};
|
|
337
|
+
contents = deserializeAws_queryGetFederationTokenResponse(data.GetFederationTokenResult, context);
|
|
338
|
+
const response = {
|
|
339
|
+
$metadata: deserializeMetadata(output),
|
|
340
|
+
...contents,
|
|
341
|
+
};
|
|
342
|
+
return Promise.resolve(response);
|
|
343
|
+
};
|
|
344
|
+
const deserializeAws_queryGetFederationTokenCommandError = async (output, context) => {
|
|
345
|
+
const parsedOutput = {
|
|
346
|
+
...output,
|
|
347
|
+
body: await parseErrorBody(output.body, context),
|
|
348
|
+
};
|
|
349
|
+
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
350
|
+
switch (errorCode) {
|
|
351
|
+
case "MalformedPolicyDocument":
|
|
352
|
+
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
353
|
+
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
354
|
+
case "PackedPolicyTooLarge":
|
|
355
|
+
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
356
|
+
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
357
|
+
case "RegionDisabledException":
|
|
358
|
+
case "com.amazonaws.sts#RegionDisabledException":
|
|
359
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
360
|
+
default:
|
|
361
|
+
const parsedBody = parsedOutput.body;
|
|
362
|
+
throwDefaultError({
|
|
363
|
+
output,
|
|
364
|
+
parsedBody: parsedBody.Error,
|
|
365
|
+
exceptionCtor: __BaseException,
|
|
366
|
+
errorCode,
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
export const deserializeAws_queryGetSessionTokenCommand = async (output, context) => {
|
|
371
|
+
if (output.statusCode >= 300) {
|
|
372
|
+
return deserializeAws_queryGetSessionTokenCommandError(output, context);
|
|
373
|
+
}
|
|
374
|
+
const data = await parseBody(output.body, context);
|
|
375
|
+
let contents = {};
|
|
376
|
+
contents = deserializeAws_queryGetSessionTokenResponse(data.GetSessionTokenResult, context);
|
|
377
|
+
const response = {
|
|
378
|
+
$metadata: deserializeMetadata(output),
|
|
379
|
+
...contents,
|
|
380
|
+
};
|
|
381
|
+
return Promise.resolve(response);
|
|
382
|
+
};
|
|
383
|
+
const deserializeAws_queryGetSessionTokenCommandError = async (output, context) => {
|
|
384
|
+
const parsedOutput = {
|
|
385
|
+
...output,
|
|
386
|
+
body: await parseErrorBody(output.body, context),
|
|
387
|
+
};
|
|
388
|
+
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
389
|
+
switch (errorCode) {
|
|
390
|
+
case "RegionDisabledException":
|
|
391
|
+
case "com.amazonaws.sts#RegionDisabledException":
|
|
392
|
+
throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
|
|
393
|
+
default:
|
|
394
|
+
const parsedBody = parsedOutput.body;
|
|
395
|
+
throwDefaultError({
|
|
396
|
+
output,
|
|
397
|
+
parsedBody: parsedBody.Error,
|
|
398
|
+
exceptionCtor: __BaseException,
|
|
399
|
+
errorCode,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
const deserializeAws_queryExpiredTokenExceptionResponse = async (parsedOutput, context) => {
|
|
404
|
+
const body = parsedOutput.body;
|
|
405
|
+
const deserialized = deserializeAws_queryExpiredTokenException(body.Error, context);
|
|
406
|
+
const exception = new ExpiredTokenException({
|
|
407
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
408
|
+
...deserialized,
|
|
547
409
|
});
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
410
|
+
return __decorateServiceException(exception, body);
|
|
411
|
+
};
|
|
412
|
+
const deserializeAws_queryIDPCommunicationErrorExceptionResponse = async (parsedOutput, context) => {
|
|
413
|
+
const body = parsedOutput.body;
|
|
414
|
+
const deserialized = deserializeAws_queryIDPCommunicationErrorException(body.Error, context);
|
|
415
|
+
const exception = new IDPCommunicationErrorException({
|
|
416
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
417
|
+
...deserialized,
|
|
556
418
|
});
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
419
|
+
return __decorateServiceException(exception, body);
|
|
420
|
+
};
|
|
421
|
+
const deserializeAws_queryIDPRejectedClaimExceptionResponse = async (parsedOutput, context) => {
|
|
422
|
+
const body = parsedOutput.body;
|
|
423
|
+
const deserialized = deserializeAws_queryIDPRejectedClaimException(body.Error, context);
|
|
424
|
+
const exception = new IDPRejectedClaimException({
|
|
425
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
426
|
+
...deserialized,
|
|
565
427
|
});
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
428
|
+
return __decorateServiceException(exception, body);
|
|
429
|
+
};
|
|
430
|
+
const deserializeAws_queryInvalidAuthorizationMessageExceptionResponse = async (parsedOutput, context) => {
|
|
431
|
+
const body = parsedOutput.body;
|
|
432
|
+
const deserialized = deserializeAws_queryInvalidAuthorizationMessageException(body.Error, context);
|
|
433
|
+
const exception = new InvalidAuthorizationMessageException({
|
|
434
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
435
|
+
...deserialized,
|
|
574
436
|
});
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
437
|
+
return __decorateServiceException(exception, body);
|
|
438
|
+
};
|
|
439
|
+
const deserializeAws_queryInvalidIdentityTokenExceptionResponse = async (parsedOutput, context) => {
|
|
440
|
+
const body = parsedOutput.body;
|
|
441
|
+
const deserialized = deserializeAws_queryInvalidIdentityTokenException(body.Error, context);
|
|
442
|
+
const exception = new InvalidIdentityTokenException({
|
|
443
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
444
|
+
...deserialized,
|
|
583
445
|
});
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
446
|
+
return __decorateServiceException(exception, body);
|
|
447
|
+
};
|
|
448
|
+
const deserializeAws_queryMalformedPolicyDocumentExceptionResponse = async (parsedOutput, context) => {
|
|
449
|
+
const body = parsedOutput.body;
|
|
450
|
+
const deserialized = deserializeAws_queryMalformedPolicyDocumentException(body.Error, context);
|
|
451
|
+
const exception = new MalformedPolicyDocumentException({
|
|
452
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
453
|
+
...deserialized,
|
|
592
454
|
});
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
455
|
+
return __decorateServiceException(exception, body);
|
|
456
|
+
};
|
|
457
|
+
const deserializeAws_queryPackedPolicyTooLargeExceptionResponse = async (parsedOutput, context) => {
|
|
458
|
+
const body = parsedOutput.body;
|
|
459
|
+
const deserialized = deserializeAws_queryPackedPolicyTooLargeException(body.Error, context);
|
|
460
|
+
const exception = new PackedPolicyTooLargeException({
|
|
461
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
462
|
+
...deserialized,
|
|
601
463
|
});
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
464
|
+
return __decorateServiceException(exception, body);
|
|
465
|
+
};
|
|
466
|
+
const deserializeAws_queryRegionDisabledExceptionResponse = async (parsedOutput, context) => {
|
|
467
|
+
const body = parsedOutput.body;
|
|
468
|
+
const deserialized = deserializeAws_queryRegionDisabledException(body.Error, context);
|
|
469
|
+
const exception = new RegionDisabledException({
|
|
470
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
471
|
+
...deserialized,
|
|
610
472
|
});
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
473
|
+
return __decorateServiceException(exception, body);
|
|
474
|
+
};
|
|
475
|
+
const serializeAws_queryAssumeRoleRequest = (input, context) => {
|
|
476
|
+
const entries = {};
|
|
614
477
|
if (input.RoleArn != null) {
|
|
615
478
|
entries["RoleArn"] = input.RoleArn;
|
|
616
479
|
}
|
|
@@ -618,10 +481,9 @@ var serializeAws_queryAssumeRoleRequest = function (input, context) {
|
|
|
618
481
|
entries["RoleSessionName"] = input.RoleSessionName;
|
|
619
482
|
}
|
|
620
483
|
if (input.PolicyArns != null) {
|
|
621
|
-
|
|
622
|
-
Object.entries(memberEntries).forEach(
|
|
623
|
-
|
|
624
|
-
var loc = "PolicyArns.".concat(key);
|
|
484
|
+
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
|
|
485
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
486
|
+
const loc = `PolicyArns.${key}`;
|
|
625
487
|
entries[loc] = value;
|
|
626
488
|
});
|
|
627
489
|
}
|
|
@@ -632,18 +494,16 @@ var serializeAws_queryAssumeRoleRequest = function (input, context) {
|
|
|
632
494
|
entries["DurationSeconds"] = input.DurationSeconds;
|
|
633
495
|
}
|
|
634
496
|
if (input.Tags != null) {
|
|
635
|
-
|
|
636
|
-
Object.entries(memberEntries).forEach(
|
|
637
|
-
|
|
638
|
-
var loc = "Tags.".concat(key);
|
|
497
|
+
const memberEntries = serializeAws_querytagListType(input.Tags, context);
|
|
498
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
499
|
+
const loc = `Tags.${key}`;
|
|
639
500
|
entries[loc] = value;
|
|
640
501
|
});
|
|
641
502
|
}
|
|
642
503
|
if (input.TransitiveTagKeys != null) {
|
|
643
|
-
|
|
644
|
-
Object.entries(memberEntries).forEach(
|
|
645
|
-
|
|
646
|
-
var loc = "TransitiveTagKeys.".concat(key);
|
|
504
|
+
const memberEntries = serializeAws_querytagKeyListType(input.TransitiveTagKeys, context);
|
|
505
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
506
|
+
const loc = `TransitiveTagKeys.${key}`;
|
|
647
507
|
entries[loc] = value;
|
|
648
508
|
});
|
|
649
509
|
}
|
|
@@ -661,8 +521,8 @@ var serializeAws_queryAssumeRoleRequest = function (input, context) {
|
|
|
661
521
|
}
|
|
662
522
|
return entries;
|
|
663
523
|
};
|
|
664
|
-
|
|
665
|
-
|
|
524
|
+
const serializeAws_queryAssumeRoleWithSAMLRequest = (input, context) => {
|
|
525
|
+
const entries = {};
|
|
666
526
|
if (input.RoleArn != null) {
|
|
667
527
|
entries["RoleArn"] = input.RoleArn;
|
|
668
528
|
}
|
|
@@ -673,10 +533,9 @@ var serializeAws_queryAssumeRoleWithSAMLRequest = function (input, context) {
|
|
|
673
533
|
entries["SAMLAssertion"] = input.SAMLAssertion;
|
|
674
534
|
}
|
|
675
535
|
if (input.PolicyArns != null) {
|
|
676
|
-
|
|
677
|
-
Object.entries(memberEntries).forEach(
|
|
678
|
-
|
|
679
|
-
var loc = "PolicyArns.".concat(key);
|
|
536
|
+
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
|
|
537
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
538
|
+
const loc = `PolicyArns.${key}`;
|
|
680
539
|
entries[loc] = value;
|
|
681
540
|
});
|
|
682
541
|
}
|
|
@@ -688,8 +547,8 @@ var serializeAws_queryAssumeRoleWithSAMLRequest = function (input, context) {
|
|
|
688
547
|
}
|
|
689
548
|
return entries;
|
|
690
549
|
};
|
|
691
|
-
|
|
692
|
-
|
|
550
|
+
const serializeAws_queryAssumeRoleWithWebIdentityRequest = (input, context) => {
|
|
551
|
+
const entries = {};
|
|
693
552
|
if (input.RoleArn != null) {
|
|
694
553
|
entries["RoleArn"] = input.RoleArn;
|
|
695
554
|
}
|
|
@@ -703,10 +562,9 @@ var serializeAws_queryAssumeRoleWithWebIdentityRequest = function (input, contex
|
|
|
703
562
|
entries["ProviderId"] = input.ProviderId;
|
|
704
563
|
}
|
|
705
564
|
if (input.PolicyArns != null) {
|
|
706
|
-
|
|
707
|
-
Object.entries(memberEntries).forEach(
|
|
708
|
-
|
|
709
|
-
var loc = "PolicyArns.".concat(key);
|
|
565
|
+
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
|
|
566
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
567
|
+
const loc = `PolicyArns.${key}`;
|
|
710
568
|
entries[loc] = value;
|
|
711
569
|
});
|
|
712
570
|
}
|
|
@@ -718,26 +576,26 @@ var serializeAws_queryAssumeRoleWithWebIdentityRequest = function (input, contex
|
|
|
718
576
|
}
|
|
719
577
|
return entries;
|
|
720
578
|
};
|
|
721
|
-
|
|
722
|
-
|
|
579
|
+
const serializeAws_queryDecodeAuthorizationMessageRequest = (input, context) => {
|
|
580
|
+
const entries = {};
|
|
723
581
|
if (input.EncodedMessage != null) {
|
|
724
582
|
entries["EncodedMessage"] = input.EncodedMessage;
|
|
725
583
|
}
|
|
726
584
|
return entries;
|
|
727
585
|
};
|
|
728
|
-
|
|
729
|
-
|
|
586
|
+
const serializeAws_queryGetAccessKeyInfoRequest = (input, context) => {
|
|
587
|
+
const entries = {};
|
|
730
588
|
if (input.AccessKeyId != null) {
|
|
731
589
|
entries["AccessKeyId"] = input.AccessKeyId;
|
|
732
590
|
}
|
|
733
591
|
return entries;
|
|
734
592
|
};
|
|
735
|
-
|
|
736
|
-
|
|
593
|
+
const serializeAws_queryGetCallerIdentityRequest = (input, context) => {
|
|
594
|
+
const entries = {};
|
|
737
595
|
return entries;
|
|
738
596
|
};
|
|
739
|
-
|
|
740
|
-
|
|
597
|
+
const serializeAws_queryGetFederationTokenRequest = (input, context) => {
|
|
598
|
+
const entries = {};
|
|
741
599
|
if (input.Name != null) {
|
|
742
600
|
entries["Name"] = input.Name;
|
|
743
601
|
}
|
|
@@ -745,10 +603,9 @@ var serializeAws_queryGetFederationTokenRequest = function (input, context) {
|
|
|
745
603
|
entries["Policy"] = input.Policy;
|
|
746
604
|
}
|
|
747
605
|
if (input.PolicyArns != null) {
|
|
748
|
-
|
|
749
|
-
Object.entries(memberEntries).forEach(
|
|
750
|
-
|
|
751
|
-
var loc = "PolicyArns.".concat(key);
|
|
606
|
+
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
|
|
607
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
608
|
+
const loc = `PolicyArns.${key}`;
|
|
752
609
|
entries[loc] = value;
|
|
753
610
|
});
|
|
754
611
|
}
|
|
@@ -756,17 +613,16 @@ var serializeAws_queryGetFederationTokenRequest = function (input, context) {
|
|
|
756
613
|
entries["DurationSeconds"] = input.DurationSeconds;
|
|
757
614
|
}
|
|
758
615
|
if (input.Tags != null) {
|
|
759
|
-
|
|
760
|
-
Object.entries(memberEntries).forEach(
|
|
761
|
-
|
|
762
|
-
var loc = "Tags.".concat(key);
|
|
616
|
+
const memberEntries = serializeAws_querytagListType(input.Tags, context);
|
|
617
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
618
|
+
const loc = `Tags.${key}`;
|
|
763
619
|
entries[loc] = value;
|
|
764
620
|
});
|
|
765
621
|
}
|
|
766
622
|
return entries;
|
|
767
623
|
};
|
|
768
|
-
|
|
769
|
-
|
|
624
|
+
const serializeAws_queryGetSessionTokenRequest = (input, context) => {
|
|
625
|
+
const entries = {};
|
|
770
626
|
if (input.DurationSeconds != null) {
|
|
771
627
|
entries["DurationSeconds"] = input.DurationSeconds;
|
|
772
628
|
}
|
|
@@ -778,42 +634,30 @@ var serializeAws_queryGetSessionTokenRequest = function (input, context) {
|
|
|
778
634
|
}
|
|
779
635
|
return entries;
|
|
780
636
|
};
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
var entry = input_1_1.value;
|
|
788
|
-
if (entry === null) {
|
|
789
|
-
continue;
|
|
790
|
-
}
|
|
791
|
-
var memberEntries = serializeAws_queryPolicyDescriptorType(entry, context);
|
|
792
|
-
Object.entries(memberEntries).forEach(function (_a) {
|
|
793
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
794
|
-
entries["member.".concat(counter, ".").concat(key)] = value;
|
|
795
|
-
});
|
|
796
|
-
counter++;
|
|
637
|
+
const serializeAws_querypolicyDescriptorListType = (input, context) => {
|
|
638
|
+
const entries = {};
|
|
639
|
+
let counter = 1;
|
|
640
|
+
for (const entry of input) {
|
|
641
|
+
if (entry === null) {
|
|
642
|
+
continue;
|
|
797
643
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
}
|
|
804
|
-
finally { if (e_1) throw e_1.error; }
|
|
644
|
+
const memberEntries = serializeAws_queryPolicyDescriptorType(entry, context);
|
|
645
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
646
|
+
entries[`member.${counter}.${key}`] = value;
|
|
647
|
+
});
|
|
648
|
+
counter++;
|
|
805
649
|
}
|
|
806
650
|
return entries;
|
|
807
651
|
};
|
|
808
|
-
|
|
809
|
-
|
|
652
|
+
const serializeAws_queryPolicyDescriptorType = (input, context) => {
|
|
653
|
+
const entries = {};
|
|
810
654
|
if (input.arn != null) {
|
|
811
655
|
entries["arn"] = input.arn;
|
|
812
656
|
}
|
|
813
657
|
return entries;
|
|
814
658
|
};
|
|
815
|
-
|
|
816
|
-
|
|
659
|
+
const serializeAws_queryTag = (input, context) => {
|
|
660
|
+
const entries = {};
|
|
817
661
|
if (input.Key != null) {
|
|
818
662
|
entries["Key"] = input.Key;
|
|
819
663
|
}
|
|
@@ -822,58 +666,35 @@ var serializeAws_queryTag = function (input, context) {
|
|
|
822
666
|
}
|
|
823
667
|
return entries;
|
|
824
668
|
};
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
var entry = input_2_1.value;
|
|
832
|
-
if (entry === null) {
|
|
833
|
-
continue;
|
|
834
|
-
}
|
|
835
|
-
entries["member.".concat(counter)] = entry;
|
|
836
|
-
counter++;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
840
|
-
finally {
|
|
841
|
-
try {
|
|
842
|
-
if (input_2_1 && !input_2_1.done && (_a = input_2.return)) _a.call(input_2);
|
|
669
|
+
const serializeAws_querytagKeyListType = (input, context) => {
|
|
670
|
+
const entries = {};
|
|
671
|
+
let counter = 1;
|
|
672
|
+
for (const entry of input) {
|
|
673
|
+
if (entry === null) {
|
|
674
|
+
continue;
|
|
843
675
|
}
|
|
844
|
-
|
|
676
|
+
entries[`member.${counter}`] = entry;
|
|
677
|
+
counter++;
|
|
845
678
|
}
|
|
846
679
|
return entries;
|
|
847
680
|
};
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
var entry = input_3_1.value;
|
|
855
|
-
if (entry === null) {
|
|
856
|
-
continue;
|
|
857
|
-
}
|
|
858
|
-
var memberEntries = serializeAws_queryTag(entry, context);
|
|
859
|
-
Object.entries(memberEntries).forEach(function (_a) {
|
|
860
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
861
|
-
entries["member.".concat(counter, ".").concat(key)] = value;
|
|
862
|
-
});
|
|
863
|
-
counter++;
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
867
|
-
finally {
|
|
868
|
-
try {
|
|
869
|
-
if (input_3_1 && !input_3_1.done && (_a = input_3.return)) _a.call(input_3);
|
|
681
|
+
const serializeAws_querytagListType = (input, context) => {
|
|
682
|
+
const entries = {};
|
|
683
|
+
let counter = 1;
|
|
684
|
+
for (const entry of input) {
|
|
685
|
+
if (entry === null) {
|
|
686
|
+
continue;
|
|
870
687
|
}
|
|
871
|
-
|
|
688
|
+
const memberEntries = serializeAws_queryTag(entry, context);
|
|
689
|
+
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
690
|
+
entries[`member.${counter}.${key}`] = value;
|
|
691
|
+
});
|
|
692
|
+
counter++;
|
|
872
693
|
}
|
|
873
694
|
return entries;
|
|
874
695
|
};
|
|
875
|
-
|
|
876
|
-
|
|
696
|
+
const deserializeAws_queryAssumedRoleUser = (output, context) => {
|
|
697
|
+
const contents = {
|
|
877
698
|
AssumedRoleId: undefined,
|
|
878
699
|
Arn: undefined,
|
|
879
700
|
};
|
|
@@ -885,8 +706,8 @@ var deserializeAws_queryAssumedRoleUser = function (output, context) {
|
|
|
885
706
|
}
|
|
886
707
|
return contents;
|
|
887
708
|
};
|
|
888
|
-
|
|
889
|
-
|
|
709
|
+
const deserializeAws_queryAssumeRoleResponse = (output, context) => {
|
|
710
|
+
const contents = {
|
|
890
711
|
Credentials: undefined,
|
|
891
712
|
AssumedRoleUser: undefined,
|
|
892
713
|
PackedPolicySize: undefined,
|
|
@@ -906,8 +727,8 @@ var deserializeAws_queryAssumeRoleResponse = function (output, context) {
|
|
|
906
727
|
}
|
|
907
728
|
return contents;
|
|
908
729
|
};
|
|
909
|
-
|
|
910
|
-
|
|
730
|
+
const deserializeAws_queryAssumeRoleWithSAMLResponse = (output, context) => {
|
|
731
|
+
const contents = {
|
|
911
732
|
Credentials: undefined,
|
|
912
733
|
AssumedRoleUser: undefined,
|
|
913
734
|
PackedPolicySize: undefined,
|
|
@@ -947,8 +768,8 @@ var deserializeAws_queryAssumeRoleWithSAMLResponse = function (output, context)
|
|
|
947
768
|
}
|
|
948
769
|
return contents;
|
|
949
770
|
};
|
|
950
|
-
|
|
951
|
-
|
|
771
|
+
const deserializeAws_queryAssumeRoleWithWebIdentityResponse = (output, context) => {
|
|
772
|
+
const contents = {
|
|
952
773
|
Credentials: undefined,
|
|
953
774
|
SubjectFromWebIdentityToken: undefined,
|
|
954
775
|
AssumedRoleUser: undefined,
|
|
@@ -980,8 +801,8 @@ var deserializeAws_queryAssumeRoleWithWebIdentityResponse = function (output, co
|
|
|
980
801
|
}
|
|
981
802
|
return contents;
|
|
982
803
|
};
|
|
983
|
-
|
|
984
|
-
|
|
804
|
+
const deserializeAws_queryCredentials = (output, context) => {
|
|
805
|
+
const contents = {
|
|
985
806
|
AccessKeyId: undefined,
|
|
986
807
|
SecretAccessKey: undefined,
|
|
987
808
|
SessionToken: undefined,
|
|
@@ -1001,8 +822,8 @@ var deserializeAws_queryCredentials = function (output, context) {
|
|
|
1001
822
|
}
|
|
1002
823
|
return contents;
|
|
1003
824
|
};
|
|
1004
|
-
|
|
1005
|
-
|
|
825
|
+
const deserializeAws_queryDecodeAuthorizationMessageResponse = (output, context) => {
|
|
826
|
+
const contents = {
|
|
1006
827
|
DecodedMessage: undefined,
|
|
1007
828
|
};
|
|
1008
829
|
if (output["DecodedMessage"] !== undefined) {
|
|
@@ -1010,8 +831,8 @@ var deserializeAws_queryDecodeAuthorizationMessageResponse = function (output, c
|
|
|
1010
831
|
}
|
|
1011
832
|
return contents;
|
|
1012
833
|
};
|
|
1013
|
-
|
|
1014
|
-
|
|
834
|
+
const deserializeAws_queryExpiredTokenException = (output, context) => {
|
|
835
|
+
const contents = {
|
|
1015
836
|
message: undefined,
|
|
1016
837
|
};
|
|
1017
838
|
if (output["message"] !== undefined) {
|
|
@@ -1019,8 +840,8 @@ var deserializeAws_queryExpiredTokenException = function (output, context) {
|
|
|
1019
840
|
}
|
|
1020
841
|
return contents;
|
|
1021
842
|
};
|
|
1022
|
-
|
|
1023
|
-
|
|
843
|
+
const deserializeAws_queryFederatedUser = (output, context) => {
|
|
844
|
+
const contents = {
|
|
1024
845
|
FederatedUserId: undefined,
|
|
1025
846
|
Arn: undefined,
|
|
1026
847
|
};
|
|
@@ -1032,8 +853,8 @@ var deserializeAws_queryFederatedUser = function (output, context) {
|
|
|
1032
853
|
}
|
|
1033
854
|
return contents;
|
|
1034
855
|
};
|
|
1035
|
-
|
|
1036
|
-
|
|
856
|
+
const deserializeAws_queryGetAccessKeyInfoResponse = (output, context) => {
|
|
857
|
+
const contents = {
|
|
1037
858
|
Account: undefined,
|
|
1038
859
|
};
|
|
1039
860
|
if (output["Account"] !== undefined) {
|
|
@@ -1041,8 +862,8 @@ var deserializeAws_queryGetAccessKeyInfoResponse = function (output, context) {
|
|
|
1041
862
|
}
|
|
1042
863
|
return contents;
|
|
1043
864
|
};
|
|
1044
|
-
|
|
1045
|
-
|
|
865
|
+
const deserializeAws_queryGetCallerIdentityResponse = (output, context) => {
|
|
866
|
+
const contents = {
|
|
1046
867
|
UserId: undefined,
|
|
1047
868
|
Account: undefined,
|
|
1048
869
|
Arn: undefined,
|
|
@@ -1058,8 +879,8 @@ var deserializeAws_queryGetCallerIdentityResponse = function (output, context) {
|
|
|
1058
879
|
}
|
|
1059
880
|
return contents;
|
|
1060
881
|
};
|
|
1061
|
-
|
|
1062
|
-
|
|
882
|
+
const deserializeAws_queryGetFederationTokenResponse = (output, context) => {
|
|
883
|
+
const contents = {
|
|
1063
884
|
Credentials: undefined,
|
|
1064
885
|
FederatedUser: undefined,
|
|
1065
886
|
PackedPolicySize: undefined,
|
|
@@ -1075,8 +896,8 @@ var deserializeAws_queryGetFederationTokenResponse = function (output, context)
|
|
|
1075
896
|
}
|
|
1076
897
|
return contents;
|
|
1077
898
|
};
|
|
1078
|
-
|
|
1079
|
-
|
|
899
|
+
const deserializeAws_queryGetSessionTokenResponse = (output, context) => {
|
|
900
|
+
const contents = {
|
|
1080
901
|
Credentials: undefined,
|
|
1081
902
|
};
|
|
1082
903
|
if (output["Credentials"] !== undefined) {
|
|
@@ -1084,8 +905,8 @@ var deserializeAws_queryGetSessionTokenResponse = function (output, context) {
|
|
|
1084
905
|
}
|
|
1085
906
|
return contents;
|
|
1086
907
|
};
|
|
1087
|
-
|
|
1088
|
-
|
|
908
|
+
const deserializeAws_queryIDPCommunicationErrorException = (output, context) => {
|
|
909
|
+
const contents = {
|
|
1089
910
|
message: undefined,
|
|
1090
911
|
};
|
|
1091
912
|
if (output["message"] !== undefined) {
|
|
@@ -1093,8 +914,8 @@ var deserializeAws_queryIDPCommunicationErrorException = function (output, conte
|
|
|
1093
914
|
}
|
|
1094
915
|
return contents;
|
|
1095
916
|
};
|
|
1096
|
-
|
|
1097
|
-
|
|
917
|
+
const deserializeAws_queryIDPRejectedClaimException = (output, context) => {
|
|
918
|
+
const contents = {
|
|
1098
919
|
message: undefined,
|
|
1099
920
|
};
|
|
1100
921
|
if (output["message"] !== undefined) {
|
|
@@ -1102,8 +923,8 @@ var deserializeAws_queryIDPRejectedClaimException = function (output, context) {
|
|
|
1102
923
|
}
|
|
1103
924
|
return contents;
|
|
1104
925
|
};
|
|
1105
|
-
|
|
1106
|
-
|
|
926
|
+
const deserializeAws_queryInvalidAuthorizationMessageException = (output, context) => {
|
|
927
|
+
const contents = {
|
|
1107
928
|
message: undefined,
|
|
1108
929
|
};
|
|
1109
930
|
if (output["message"] !== undefined) {
|
|
@@ -1111,8 +932,8 @@ var deserializeAws_queryInvalidAuthorizationMessageException = function (output,
|
|
|
1111
932
|
}
|
|
1112
933
|
return contents;
|
|
1113
934
|
};
|
|
1114
|
-
|
|
1115
|
-
|
|
935
|
+
const deserializeAws_queryInvalidIdentityTokenException = (output, context) => {
|
|
936
|
+
const contents = {
|
|
1116
937
|
message: undefined,
|
|
1117
938
|
};
|
|
1118
939
|
if (output["message"] !== undefined) {
|
|
@@ -1120,8 +941,8 @@ var deserializeAws_queryInvalidIdentityTokenException = function (output, contex
|
|
|
1120
941
|
}
|
|
1121
942
|
return contents;
|
|
1122
943
|
};
|
|
1123
|
-
|
|
1124
|
-
|
|
944
|
+
const deserializeAws_queryMalformedPolicyDocumentException = (output, context) => {
|
|
945
|
+
const contents = {
|
|
1125
946
|
message: undefined,
|
|
1126
947
|
};
|
|
1127
948
|
if (output["message"] !== undefined) {
|
|
@@ -1129,8 +950,8 @@ var deserializeAws_queryMalformedPolicyDocumentException = function (output, con
|
|
|
1129
950
|
}
|
|
1130
951
|
return contents;
|
|
1131
952
|
};
|
|
1132
|
-
|
|
1133
|
-
|
|
953
|
+
const deserializeAws_queryPackedPolicyTooLargeException = (output, context) => {
|
|
954
|
+
const contents = {
|
|
1134
955
|
message: undefined,
|
|
1135
956
|
};
|
|
1136
957
|
if (output["message"] !== undefined) {
|
|
@@ -1138,8 +959,8 @@ var deserializeAws_queryPackedPolicyTooLargeException = function (output, contex
|
|
|
1138
959
|
}
|
|
1139
960
|
return contents;
|
|
1140
961
|
};
|
|
1141
|
-
|
|
1142
|
-
|
|
962
|
+
const deserializeAws_queryRegionDisabledException = (output, context) => {
|
|
963
|
+
const contents = {
|
|
1143
964
|
message: undefined,
|
|
1144
965
|
};
|
|
1145
966
|
if (output["message"] !== undefined) {
|
|
@@ -1147,81 +968,68 @@ var deserializeAws_queryRegionDisabledException = function (output, context) {
|
|
|
1147
968
|
}
|
|
1148
969
|
return contents;
|
|
1149
970
|
};
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
});
|
|
1158
|
-
};
|
|
1159
|
-
var collectBody = function (streamBody, context) {
|
|
1160
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
971
|
+
const deserializeMetadata = (output) => ({
|
|
972
|
+
httpStatusCode: output.statusCode,
|
|
973
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
974
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
975
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
976
|
+
});
|
|
977
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1161
978
|
if (streamBody instanceof Uint8Array) {
|
|
1162
979
|
return Promise.resolve(streamBody);
|
|
1163
980
|
}
|
|
1164
981
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1165
982
|
};
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
};
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
if (resolvedHostname !== undefined) {
|
|
1185
|
-
contents.hostname = resolvedHostname;
|
|
1186
|
-
}
|
|
1187
|
-
if (body !== undefined) {
|
|
1188
|
-
contents.body = body;
|
|
1189
|
-
}
|
|
1190
|
-
return [2, new __HttpRequest(contents)];
|
|
1191
|
-
}
|
|
1192
|
-
});
|
|
1193
|
-
}); };
|
|
1194
|
-
var parseBody = function (streamBody, context) {
|
|
1195
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1196
|
-
if (encoded.length) {
|
|
1197
|
-
var parsedObj = xmlParse(encoded, {
|
|
1198
|
-
attributeNamePrefix: "",
|
|
1199
|
-
ignoreAttributes: false,
|
|
1200
|
-
parseNodeValue: false,
|
|
1201
|
-
trimValues: false,
|
|
1202
|
-
tagValueProcessor: function (val) { return (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)); },
|
|
1203
|
-
});
|
|
1204
|
-
var textNodeName = "#text";
|
|
1205
|
-
var key = Object.keys(parsedObj)[0];
|
|
1206
|
-
var parsedObjToReturn = parsedObj[key];
|
|
1207
|
-
if (parsedObjToReturn[textNodeName]) {
|
|
1208
|
-
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
|
|
1209
|
-
delete parsedObjToReturn[textNodeName];
|
|
1210
|
-
}
|
|
1211
|
-
return __getValueFromTextNode(parsedObjToReturn);
|
|
1212
|
-
}
|
|
1213
|
-
return {};
|
|
1214
|
-
});
|
|
983
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
984
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
985
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
986
|
+
const contents = {
|
|
987
|
+
protocol,
|
|
988
|
+
hostname,
|
|
989
|
+
port,
|
|
990
|
+
method: "POST",
|
|
991
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
992
|
+
headers,
|
|
993
|
+
};
|
|
994
|
+
if (resolvedHostname !== undefined) {
|
|
995
|
+
contents.hostname = resolvedHostname;
|
|
996
|
+
}
|
|
997
|
+
if (body !== undefined) {
|
|
998
|
+
contents.body = body;
|
|
999
|
+
}
|
|
1000
|
+
return new __HttpRequest(contents);
|
|
1215
1001
|
};
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1002
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1003
|
+
if (encoded.length) {
|
|
1004
|
+
const parsedObj = xmlParse(encoded, {
|
|
1005
|
+
attributeNamePrefix: "",
|
|
1006
|
+
ignoreAttributes: false,
|
|
1007
|
+
parseNodeValue: false,
|
|
1008
|
+
trimValues: false,
|
|
1009
|
+
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
|
|
1010
|
+
});
|
|
1011
|
+
const textNodeName = "#text";
|
|
1012
|
+
const key = Object.keys(parsedObj)[0];
|
|
1013
|
+
const parsedObjToReturn = parsedObj[key];
|
|
1014
|
+
if (parsedObjToReturn[textNodeName]) {
|
|
1015
|
+
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
|
|
1016
|
+
delete parsedObjToReturn[textNodeName];
|
|
1017
|
+
}
|
|
1018
|
+
return __getValueFromTextNode(parsedObjToReturn);
|
|
1019
|
+
}
|
|
1020
|
+
return {};
|
|
1021
|
+
});
|
|
1022
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1023
|
+
const value = await parseBody(errorBody, context);
|
|
1024
|
+
if (value.Error) {
|
|
1025
|
+
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
1026
|
+
}
|
|
1027
|
+
return value;
|
|
1223
1028
|
};
|
|
1224
|
-
|
|
1029
|
+
const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries)
|
|
1030
|
+
.map(([key, value]) => __extendedEncodeURIComponent(key) + "=" + __extendedEncodeURIComponent(value))
|
|
1031
|
+
.join("&");
|
|
1032
|
+
const loadQueryErrorCode = (output, data) => {
|
|
1225
1033
|
if (data.Error.Code !== undefined) {
|
|
1226
1034
|
return data.Error.Code;
|
|
1227
1035
|
}
|