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