@aws-sdk/client-sts 3.35.0 → 3.38.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 +47 -0
- package/dist-cjs/STS.js +0 -8
- package/dist-cjs/STSClient.js +0 -13
- package/dist-cjs/commands/AssumeRoleCommand.js +0 -108
- package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js +0 -156
- package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js +0 -160
- package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +0 -60
- package/dist-cjs/commands/GetAccessKeyInfoCommand.js +0 -42
- package/dist-cjs/commands/GetCallerIdentityCommand.js +0 -34
- package/dist-cjs/commands/GetFederationTokenCommand.js +0 -163
- package/dist-cjs/commands/GetSessionTokenCommand.js +0 -76
- package/dist-cjs/commands/index.js +11 -0
- package/dist-cjs/defaultRoleAssumers.js +0 -17
- package/dist-cjs/defaultStsRoleAssumers.js +0 -21
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +3 -11
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -88
- package/dist-cjs/protocols/Aws_query.js +0 -3
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +3 -8
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/STS.js +0 -1
- package/dist-es/STSClient.js +0 -1
- package/dist-es/commands/AssumeRoleCommand.js +0 -1
- package/dist-es/commands/AssumeRoleWithSAMLCommand.js +0 -1
- package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +0 -1
- package/dist-es/commands/DecodeAuthorizationMessageCommand.js +0 -1
- package/dist-es/commands/GetAccessKeyInfoCommand.js +0 -1
- package/dist-es/commands/GetCallerIdentityCommand.js +0 -1
- package/dist-es/commands/GetFederationTokenCommand.js +0 -1
- package/dist-es/commands/GetSessionTokenCommand.js +0 -1
- package/dist-es/commands/index.js +8 -0
- package/dist-es/defaultRoleAssumers.js +0 -1
- package/dist-es/defaultStsRoleAssumers.js +0 -1
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +3 -11
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/protocols/Aws_query.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +3 -4
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/index.d.ts +3 -10
- package/dist-types/ts3.4/STS.d.ts +9 -630
- package/dist-types/ts3.4/STSClient.d.ts +24 -93
- package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +2 -103
- package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +2 -151
- package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +2 -155
- package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +2 -55
- package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +2 -37
- package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +2 -29
- package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +2 -158
- package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +2 -71
- package/dist-types/ts3.4/commands/index.d.ts +8 -0
- package/dist-types/ts3.4/defaultRoleAssumers.d.ts +3 -14
- package/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +6 -25
- package/dist-types/ts3.4/index.d.ts +3 -10
- package/dist-types/ts3.4/models/models_0.d.ts +123 -948
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/STS.js.map +0 -1
- package/dist-cjs/STSClient.js.map +0 -1
- package/dist-cjs/commands/AssumeRoleCommand.js.map +0 -1
- package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
- package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
- package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
- package/dist-cjs/commands/GetAccessKeyInfoCommand.js.map +0 -1
- package/dist-cjs/commands/GetCallerIdentityCommand.js.map +0 -1
- package/dist-cjs/commands/GetFederationTokenCommand.js.map +0 -1
- package/dist-cjs/commands/GetSessionTokenCommand.js.map +0 -1
- package/dist-cjs/defaultRoleAssumers.js.map +0 -1
- package/dist-cjs/defaultStsRoleAssumers.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/protocols/Aws_query.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/STS.js.map +0 -1
- package/dist-es/STSClient.js.map +0 -1
- package/dist-es/commands/AssumeRoleCommand.js.map +0 -1
- package/dist-es/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
- package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
- package/dist-es/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
- package/dist-es/commands/GetAccessKeyInfoCommand.js.map +0 -1
- package/dist-es/commands/GetCallerIdentityCommand.js.map +0 -1
- package/dist-es/commands/GetFederationTokenCommand.js.map +0 -1
- package/dist-es/commands/GetSessionTokenCommand.js.map +0 -1
- package/dist-es/defaultRoleAssumers.js.map +0 -1
- package/dist-es/defaultStsRoleAssumers.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/protocols/Aws_query.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/STS.ts +0 -897
- package/src/STSClient.ts +0 -264
- package/src/commands/AssumeRoleCommand.ts +0 -177
- package/src/commands/AssumeRoleWithSAMLCommand.ts +0 -226
- package/src/commands/AssumeRoleWithWebIdentityCommand.ts +0 -233
- package/src/commands/DecodeAuthorizationMessageCommand.ts +0 -135
- package/src/commands/GetAccessKeyInfoCommand.ts +0 -114
- package/src/commands/GetCallerIdentityCommand.ts +0 -106
- package/src/commands/GetFederationTokenCommand.ts +0 -235
- package/src/commands/GetSessionTokenCommand.ts +0 -148
- package/src/defaultRoleAssumers.ts +0 -41
- package/src/defaultStsRoleAssumers.ts +0 -126
- package/src/endpoints.ts +0 -91
- package/src/index.ts +0 -12
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1361
- package/src/protocols/Aws_query.ts +0 -1514
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/test/defaultRoleAssumers.spec.ts +0 -149
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,1514 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectNonNull as __expectNonNull,
|
|
4
|
-
expectString as __expectString,
|
|
5
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
6
|
-
getValueFromTextNode as __getValueFromTextNode,
|
|
7
|
-
parseRfc3339DateTime as __parseRfc3339DateTime,
|
|
8
|
-
strictParseInt32 as __strictParseInt32,
|
|
9
|
-
} from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
Endpoint as __Endpoint,
|
|
12
|
-
HeaderBag as __HeaderBag,
|
|
13
|
-
MetadataBearer as __MetadataBearer,
|
|
14
|
-
ResponseMetadata as __ResponseMetadata,
|
|
15
|
-
SerdeContext as __SerdeContext,
|
|
16
|
-
SmithyException as __SmithyException,
|
|
17
|
-
} from "@aws-sdk/types";
|
|
18
|
-
import { decodeHTML } from "entities";
|
|
19
|
-
import { parse as xmlParse } from "fast-xml-parser";
|
|
20
|
-
|
|
21
|
-
import { AssumeRoleCommandInput, AssumeRoleCommandOutput } from "../commands/AssumeRoleCommand";
|
|
22
|
-
import { AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput } from "../commands/AssumeRoleWithSAMLCommand";
|
|
23
|
-
import {
|
|
24
|
-
AssumeRoleWithWebIdentityCommandInput,
|
|
25
|
-
AssumeRoleWithWebIdentityCommandOutput,
|
|
26
|
-
} from "../commands/AssumeRoleWithWebIdentityCommand";
|
|
27
|
-
import {
|
|
28
|
-
DecodeAuthorizationMessageCommandInput,
|
|
29
|
-
DecodeAuthorizationMessageCommandOutput,
|
|
30
|
-
} from "../commands/DecodeAuthorizationMessageCommand";
|
|
31
|
-
import { GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput } from "../commands/GetAccessKeyInfoCommand";
|
|
32
|
-
import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from "../commands/GetCallerIdentityCommand";
|
|
33
|
-
import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "../commands/GetFederationTokenCommand";
|
|
34
|
-
import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "../commands/GetSessionTokenCommand";
|
|
35
|
-
import {
|
|
36
|
-
AssumedRoleUser,
|
|
37
|
-
AssumeRoleRequest,
|
|
38
|
-
AssumeRoleResponse,
|
|
39
|
-
AssumeRoleWithSAMLRequest,
|
|
40
|
-
AssumeRoleWithSAMLResponse,
|
|
41
|
-
AssumeRoleWithWebIdentityRequest,
|
|
42
|
-
AssumeRoleWithWebIdentityResponse,
|
|
43
|
-
Credentials,
|
|
44
|
-
DecodeAuthorizationMessageRequest,
|
|
45
|
-
DecodeAuthorizationMessageResponse,
|
|
46
|
-
ExpiredTokenException,
|
|
47
|
-
FederatedUser,
|
|
48
|
-
GetAccessKeyInfoRequest,
|
|
49
|
-
GetAccessKeyInfoResponse,
|
|
50
|
-
GetCallerIdentityRequest,
|
|
51
|
-
GetCallerIdentityResponse,
|
|
52
|
-
GetFederationTokenRequest,
|
|
53
|
-
GetFederationTokenResponse,
|
|
54
|
-
GetSessionTokenRequest,
|
|
55
|
-
GetSessionTokenResponse,
|
|
56
|
-
IDPCommunicationErrorException,
|
|
57
|
-
IDPRejectedClaimException,
|
|
58
|
-
InvalidAuthorizationMessageException,
|
|
59
|
-
InvalidIdentityTokenException,
|
|
60
|
-
MalformedPolicyDocumentException,
|
|
61
|
-
PackedPolicyTooLargeException,
|
|
62
|
-
PolicyDescriptorType,
|
|
63
|
-
RegionDisabledException,
|
|
64
|
-
Tag,
|
|
65
|
-
} from "../models/models_0";
|
|
66
|
-
|
|
67
|
-
export const serializeAws_queryAssumeRoleCommand = async (
|
|
68
|
-
input: AssumeRoleCommandInput,
|
|
69
|
-
context: __SerdeContext
|
|
70
|
-
): Promise<__HttpRequest> => {
|
|
71
|
-
const headers: __HeaderBag = {
|
|
72
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
73
|
-
};
|
|
74
|
-
let body: any;
|
|
75
|
-
body = buildFormUrlencodedString({
|
|
76
|
-
...serializeAws_queryAssumeRoleRequest(input, context),
|
|
77
|
-
Action: "AssumeRole",
|
|
78
|
-
Version: "2011-06-15",
|
|
79
|
-
});
|
|
80
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const serializeAws_queryAssumeRoleWithSAMLCommand = async (
|
|
84
|
-
input: AssumeRoleWithSAMLCommandInput,
|
|
85
|
-
context: __SerdeContext
|
|
86
|
-
): Promise<__HttpRequest> => {
|
|
87
|
-
const headers: __HeaderBag = {
|
|
88
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
89
|
-
};
|
|
90
|
-
let body: any;
|
|
91
|
-
body = buildFormUrlencodedString({
|
|
92
|
-
...serializeAws_queryAssumeRoleWithSAMLRequest(input, context),
|
|
93
|
-
Action: "AssumeRoleWithSAML",
|
|
94
|
-
Version: "2011-06-15",
|
|
95
|
-
});
|
|
96
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const serializeAws_queryAssumeRoleWithWebIdentityCommand = async (
|
|
100
|
-
input: AssumeRoleWithWebIdentityCommandInput,
|
|
101
|
-
context: __SerdeContext
|
|
102
|
-
): Promise<__HttpRequest> => {
|
|
103
|
-
const headers: __HeaderBag = {
|
|
104
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
105
|
-
};
|
|
106
|
-
let body: any;
|
|
107
|
-
body = buildFormUrlencodedString({
|
|
108
|
-
...serializeAws_queryAssumeRoleWithWebIdentityRequest(input, context),
|
|
109
|
-
Action: "AssumeRoleWithWebIdentity",
|
|
110
|
-
Version: "2011-06-15",
|
|
111
|
-
});
|
|
112
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export const serializeAws_queryDecodeAuthorizationMessageCommand = async (
|
|
116
|
-
input: DecodeAuthorizationMessageCommandInput,
|
|
117
|
-
context: __SerdeContext
|
|
118
|
-
): Promise<__HttpRequest> => {
|
|
119
|
-
const headers: __HeaderBag = {
|
|
120
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
121
|
-
};
|
|
122
|
-
let body: any;
|
|
123
|
-
body = buildFormUrlencodedString({
|
|
124
|
-
...serializeAws_queryDecodeAuthorizationMessageRequest(input, context),
|
|
125
|
-
Action: "DecodeAuthorizationMessage",
|
|
126
|
-
Version: "2011-06-15",
|
|
127
|
-
});
|
|
128
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export const serializeAws_queryGetAccessKeyInfoCommand = async (
|
|
132
|
-
input: GetAccessKeyInfoCommandInput,
|
|
133
|
-
context: __SerdeContext
|
|
134
|
-
): Promise<__HttpRequest> => {
|
|
135
|
-
const headers: __HeaderBag = {
|
|
136
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
137
|
-
};
|
|
138
|
-
let body: any;
|
|
139
|
-
body = buildFormUrlencodedString({
|
|
140
|
-
...serializeAws_queryGetAccessKeyInfoRequest(input, context),
|
|
141
|
-
Action: "GetAccessKeyInfo",
|
|
142
|
-
Version: "2011-06-15",
|
|
143
|
-
});
|
|
144
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
export const serializeAws_queryGetCallerIdentityCommand = async (
|
|
148
|
-
input: GetCallerIdentityCommandInput,
|
|
149
|
-
context: __SerdeContext
|
|
150
|
-
): Promise<__HttpRequest> => {
|
|
151
|
-
const headers: __HeaderBag = {
|
|
152
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
153
|
-
};
|
|
154
|
-
let body: any;
|
|
155
|
-
body = buildFormUrlencodedString({
|
|
156
|
-
...serializeAws_queryGetCallerIdentityRequest(input, context),
|
|
157
|
-
Action: "GetCallerIdentity",
|
|
158
|
-
Version: "2011-06-15",
|
|
159
|
-
});
|
|
160
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
export const serializeAws_queryGetFederationTokenCommand = async (
|
|
164
|
-
input: GetFederationTokenCommandInput,
|
|
165
|
-
context: __SerdeContext
|
|
166
|
-
): Promise<__HttpRequest> => {
|
|
167
|
-
const headers: __HeaderBag = {
|
|
168
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
169
|
-
};
|
|
170
|
-
let body: any;
|
|
171
|
-
body = buildFormUrlencodedString({
|
|
172
|
-
...serializeAws_queryGetFederationTokenRequest(input, context),
|
|
173
|
-
Action: "GetFederationToken",
|
|
174
|
-
Version: "2011-06-15",
|
|
175
|
-
});
|
|
176
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export const serializeAws_queryGetSessionTokenCommand = async (
|
|
180
|
-
input: GetSessionTokenCommandInput,
|
|
181
|
-
context: __SerdeContext
|
|
182
|
-
): Promise<__HttpRequest> => {
|
|
183
|
-
const headers: __HeaderBag = {
|
|
184
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
185
|
-
};
|
|
186
|
-
let body: any;
|
|
187
|
-
body = buildFormUrlencodedString({
|
|
188
|
-
...serializeAws_queryGetSessionTokenRequest(input, context),
|
|
189
|
-
Action: "GetSessionToken",
|
|
190
|
-
Version: "2011-06-15",
|
|
191
|
-
});
|
|
192
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
export const deserializeAws_queryAssumeRoleCommand = async (
|
|
196
|
-
output: __HttpResponse,
|
|
197
|
-
context: __SerdeContext
|
|
198
|
-
): Promise<AssumeRoleCommandOutput> => {
|
|
199
|
-
if (output.statusCode >= 300) {
|
|
200
|
-
return deserializeAws_queryAssumeRoleCommandError(output, context);
|
|
201
|
-
}
|
|
202
|
-
const data: any = await parseBody(output.body, context);
|
|
203
|
-
let contents: any = {};
|
|
204
|
-
contents = deserializeAws_queryAssumeRoleResponse(data.AssumeRoleResult, context);
|
|
205
|
-
const response: AssumeRoleCommandOutput = {
|
|
206
|
-
$metadata: deserializeMetadata(output),
|
|
207
|
-
...contents,
|
|
208
|
-
};
|
|
209
|
-
return Promise.resolve(response);
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
const deserializeAws_queryAssumeRoleCommandError = async (
|
|
213
|
-
output: __HttpResponse,
|
|
214
|
-
context: __SerdeContext
|
|
215
|
-
): Promise<AssumeRoleCommandOutput> => {
|
|
216
|
-
const parsedOutput: any = {
|
|
217
|
-
...output,
|
|
218
|
-
body: await parseBody(output.body, context),
|
|
219
|
-
};
|
|
220
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
221
|
-
let errorCode = "UnknownError";
|
|
222
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
223
|
-
switch (errorCode) {
|
|
224
|
-
case "ExpiredTokenException":
|
|
225
|
-
case "com.amazonaws.sts#ExpiredTokenException":
|
|
226
|
-
response = {
|
|
227
|
-
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
|
|
228
|
-
name: errorCode,
|
|
229
|
-
$metadata: deserializeMetadata(output),
|
|
230
|
-
};
|
|
231
|
-
break;
|
|
232
|
-
case "MalformedPolicyDocumentException":
|
|
233
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
234
|
-
response = {
|
|
235
|
-
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
236
|
-
name: errorCode,
|
|
237
|
-
$metadata: deserializeMetadata(output),
|
|
238
|
-
};
|
|
239
|
-
break;
|
|
240
|
-
case "PackedPolicyTooLargeException":
|
|
241
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
242
|
-
response = {
|
|
243
|
-
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
|
|
244
|
-
name: errorCode,
|
|
245
|
-
$metadata: deserializeMetadata(output),
|
|
246
|
-
};
|
|
247
|
-
break;
|
|
248
|
-
case "RegionDisabledException":
|
|
249
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
|
250
|
-
response = {
|
|
251
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
252
|
-
name: errorCode,
|
|
253
|
-
$metadata: deserializeMetadata(output),
|
|
254
|
-
};
|
|
255
|
-
break;
|
|
256
|
-
default:
|
|
257
|
-
const parsedBody = parsedOutput.body;
|
|
258
|
-
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
|
|
259
|
-
response = {
|
|
260
|
-
...parsedBody.Error,
|
|
261
|
-
name: `${errorCode}`,
|
|
262
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
263
|
-
$fault: "client",
|
|
264
|
-
$metadata: deserializeMetadata(output),
|
|
265
|
-
} as any;
|
|
266
|
-
}
|
|
267
|
-
const message = response.message || response.Message || errorCode;
|
|
268
|
-
response.message = message;
|
|
269
|
-
delete response.Message;
|
|
270
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
export const deserializeAws_queryAssumeRoleWithSAMLCommand = async (
|
|
274
|
-
output: __HttpResponse,
|
|
275
|
-
context: __SerdeContext
|
|
276
|
-
): Promise<AssumeRoleWithSAMLCommandOutput> => {
|
|
277
|
-
if (output.statusCode >= 300) {
|
|
278
|
-
return deserializeAws_queryAssumeRoleWithSAMLCommandError(output, context);
|
|
279
|
-
}
|
|
280
|
-
const data: any = await parseBody(output.body, context);
|
|
281
|
-
let contents: any = {};
|
|
282
|
-
contents = deserializeAws_queryAssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);
|
|
283
|
-
const response: AssumeRoleWithSAMLCommandOutput = {
|
|
284
|
-
$metadata: deserializeMetadata(output),
|
|
285
|
-
...contents,
|
|
286
|
-
};
|
|
287
|
-
return Promise.resolve(response);
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
const deserializeAws_queryAssumeRoleWithSAMLCommandError = async (
|
|
291
|
-
output: __HttpResponse,
|
|
292
|
-
context: __SerdeContext
|
|
293
|
-
): Promise<AssumeRoleWithSAMLCommandOutput> => {
|
|
294
|
-
const parsedOutput: any = {
|
|
295
|
-
...output,
|
|
296
|
-
body: await parseBody(output.body, context),
|
|
297
|
-
};
|
|
298
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
299
|
-
let errorCode = "UnknownError";
|
|
300
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
301
|
-
switch (errorCode) {
|
|
302
|
-
case "ExpiredTokenException":
|
|
303
|
-
case "com.amazonaws.sts#ExpiredTokenException":
|
|
304
|
-
response = {
|
|
305
|
-
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
|
|
306
|
-
name: errorCode,
|
|
307
|
-
$metadata: deserializeMetadata(output),
|
|
308
|
-
};
|
|
309
|
-
break;
|
|
310
|
-
case "IDPRejectedClaimException":
|
|
311
|
-
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
312
|
-
response = {
|
|
313
|
-
...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)),
|
|
314
|
-
name: errorCode,
|
|
315
|
-
$metadata: deserializeMetadata(output),
|
|
316
|
-
};
|
|
317
|
-
break;
|
|
318
|
-
case "InvalidIdentityTokenException":
|
|
319
|
-
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
320
|
-
response = {
|
|
321
|
-
...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)),
|
|
322
|
-
name: errorCode,
|
|
323
|
-
$metadata: deserializeMetadata(output),
|
|
324
|
-
};
|
|
325
|
-
break;
|
|
326
|
-
case "MalformedPolicyDocumentException":
|
|
327
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
328
|
-
response = {
|
|
329
|
-
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
330
|
-
name: errorCode,
|
|
331
|
-
$metadata: deserializeMetadata(output),
|
|
332
|
-
};
|
|
333
|
-
break;
|
|
334
|
-
case "PackedPolicyTooLargeException":
|
|
335
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
336
|
-
response = {
|
|
337
|
-
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
|
|
338
|
-
name: errorCode,
|
|
339
|
-
$metadata: deserializeMetadata(output),
|
|
340
|
-
};
|
|
341
|
-
break;
|
|
342
|
-
case "RegionDisabledException":
|
|
343
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
|
344
|
-
response = {
|
|
345
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
346
|
-
name: errorCode,
|
|
347
|
-
$metadata: deserializeMetadata(output),
|
|
348
|
-
};
|
|
349
|
-
break;
|
|
350
|
-
default:
|
|
351
|
-
const parsedBody = parsedOutput.body;
|
|
352
|
-
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
|
|
353
|
-
response = {
|
|
354
|
-
...parsedBody.Error,
|
|
355
|
-
name: `${errorCode}`,
|
|
356
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
357
|
-
$fault: "client",
|
|
358
|
-
$metadata: deserializeMetadata(output),
|
|
359
|
-
} as any;
|
|
360
|
-
}
|
|
361
|
-
const message = response.message || response.Message || errorCode;
|
|
362
|
-
response.message = message;
|
|
363
|
-
delete response.Message;
|
|
364
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
export const deserializeAws_queryAssumeRoleWithWebIdentityCommand = async (
|
|
368
|
-
output: __HttpResponse,
|
|
369
|
-
context: __SerdeContext
|
|
370
|
-
): Promise<AssumeRoleWithWebIdentityCommandOutput> => {
|
|
371
|
-
if (output.statusCode >= 300) {
|
|
372
|
-
return deserializeAws_queryAssumeRoleWithWebIdentityCommandError(output, context);
|
|
373
|
-
}
|
|
374
|
-
const data: any = await parseBody(output.body, context);
|
|
375
|
-
let contents: any = {};
|
|
376
|
-
contents = deserializeAws_queryAssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
|
|
377
|
-
const response: AssumeRoleWithWebIdentityCommandOutput = {
|
|
378
|
-
$metadata: deserializeMetadata(output),
|
|
379
|
-
...contents,
|
|
380
|
-
};
|
|
381
|
-
return Promise.resolve(response);
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
const deserializeAws_queryAssumeRoleWithWebIdentityCommandError = async (
|
|
385
|
-
output: __HttpResponse,
|
|
386
|
-
context: __SerdeContext
|
|
387
|
-
): Promise<AssumeRoleWithWebIdentityCommandOutput> => {
|
|
388
|
-
const parsedOutput: any = {
|
|
389
|
-
...output,
|
|
390
|
-
body: await parseBody(output.body, context),
|
|
391
|
-
};
|
|
392
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
393
|
-
let errorCode = "UnknownError";
|
|
394
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
395
|
-
switch (errorCode) {
|
|
396
|
-
case "ExpiredTokenException":
|
|
397
|
-
case "com.amazonaws.sts#ExpiredTokenException":
|
|
398
|
-
response = {
|
|
399
|
-
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
|
|
400
|
-
name: errorCode,
|
|
401
|
-
$metadata: deserializeMetadata(output),
|
|
402
|
-
};
|
|
403
|
-
break;
|
|
404
|
-
case "IDPCommunicationErrorException":
|
|
405
|
-
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
406
|
-
response = {
|
|
407
|
-
...(await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context)),
|
|
408
|
-
name: errorCode,
|
|
409
|
-
$metadata: deserializeMetadata(output),
|
|
410
|
-
};
|
|
411
|
-
break;
|
|
412
|
-
case "IDPRejectedClaimException":
|
|
413
|
-
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
414
|
-
response = {
|
|
415
|
-
...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)),
|
|
416
|
-
name: errorCode,
|
|
417
|
-
$metadata: deserializeMetadata(output),
|
|
418
|
-
};
|
|
419
|
-
break;
|
|
420
|
-
case "InvalidIdentityTokenException":
|
|
421
|
-
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
422
|
-
response = {
|
|
423
|
-
...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)),
|
|
424
|
-
name: errorCode,
|
|
425
|
-
$metadata: deserializeMetadata(output),
|
|
426
|
-
};
|
|
427
|
-
break;
|
|
428
|
-
case "MalformedPolicyDocumentException":
|
|
429
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
430
|
-
response = {
|
|
431
|
-
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
432
|
-
name: errorCode,
|
|
433
|
-
$metadata: deserializeMetadata(output),
|
|
434
|
-
};
|
|
435
|
-
break;
|
|
436
|
-
case "PackedPolicyTooLargeException":
|
|
437
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
438
|
-
response = {
|
|
439
|
-
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
|
|
440
|
-
name: errorCode,
|
|
441
|
-
$metadata: deserializeMetadata(output),
|
|
442
|
-
};
|
|
443
|
-
break;
|
|
444
|
-
case "RegionDisabledException":
|
|
445
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
|
446
|
-
response = {
|
|
447
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
448
|
-
name: errorCode,
|
|
449
|
-
$metadata: deserializeMetadata(output),
|
|
450
|
-
};
|
|
451
|
-
break;
|
|
452
|
-
default:
|
|
453
|
-
const parsedBody = parsedOutput.body;
|
|
454
|
-
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
|
|
455
|
-
response = {
|
|
456
|
-
...parsedBody.Error,
|
|
457
|
-
name: `${errorCode}`,
|
|
458
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
459
|
-
$fault: "client",
|
|
460
|
-
$metadata: deserializeMetadata(output),
|
|
461
|
-
} as any;
|
|
462
|
-
}
|
|
463
|
-
const message = response.message || response.Message || errorCode;
|
|
464
|
-
response.message = message;
|
|
465
|
-
delete response.Message;
|
|
466
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
export const deserializeAws_queryDecodeAuthorizationMessageCommand = async (
|
|
470
|
-
output: __HttpResponse,
|
|
471
|
-
context: __SerdeContext
|
|
472
|
-
): Promise<DecodeAuthorizationMessageCommandOutput> => {
|
|
473
|
-
if (output.statusCode >= 300) {
|
|
474
|
-
return deserializeAws_queryDecodeAuthorizationMessageCommandError(output, context);
|
|
475
|
-
}
|
|
476
|
-
const data: any = await parseBody(output.body, context);
|
|
477
|
-
let contents: any = {};
|
|
478
|
-
contents = deserializeAws_queryDecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);
|
|
479
|
-
const response: DecodeAuthorizationMessageCommandOutput = {
|
|
480
|
-
$metadata: deserializeMetadata(output),
|
|
481
|
-
...contents,
|
|
482
|
-
};
|
|
483
|
-
return Promise.resolve(response);
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
const deserializeAws_queryDecodeAuthorizationMessageCommandError = async (
|
|
487
|
-
output: __HttpResponse,
|
|
488
|
-
context: __SerdeContext
|
|
489
|
-
): Promise<DecodeAuthorizationMessageCommandOutput> => {
|
|
490
|
-
const parsedOutput: any = {
|
|
491
|
-
...output,
|
|
492
|
-
body: await parseBody(output.body, context),
|
|
493
|
-
};
|
|
494
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
495
|
-
let errorCode = "UnknownError";
|
|
496
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
497
|
-
switch (errorCode) {
|
|
498
|
-
case "InvalidAuthorizationMessageException":
|
|
499
|
-
case "com.amazonaws.sts#InvalidAuthorizationMessageException":
|
|
500
|
-
response = {
|
|
501
|
-
...(await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context)),
|
|
502
|
-
name: errorCode,
|
|
503
|
-
$metadata: deserializeMetadata(output),
|
|
504
|
-
};
|
|
505
|
-
break;
|
|
506
|
-
default:
|
|
507
|
-
const parsedBody = parsedOutput.body;
|
|
508
|
-
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
|
|
509
|
-
response = {
|
|
510
|
-
...parsedBody.Error,
|
|
511
|
-
name: `${errorCode}`,
|
|
512
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
513
|
-
$fault: "client",
|
|
514
|
-
$metadata: deserializeMetadata(output),
|
|
515
|
-
} as any;
|
|
516
|
-
}
|
|
517
|
-
const message = response.message || response.Message || errorCode;
|
|
518
|
-
response.message = message;
|
|
519
|
-
delete response.Message;
|
|
520
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
export const deserializeAws_queryGetAccessKeyInfoCommand = async (
|
|
524
|
-
output: __HttpResponse,
|
|
525
|
-
context: __SerdeContext
|
|
526
|
-
): Promise<GetAccessKeyInfoCommandOutput> => {
|
|
527
|
-
if (output.statusCode >= 300) {
|
|
528
|
-
return deserializeAws_queryGetAccessKeyInfoCommandError(output, context);
|
|
529
|
-
}
|
|
530
|
-
const data: any = await parseBody(output.body, context);
|
|
531
|
-
let contents: any = {};
|
|
532
|
-
contents = deserializeAws_queryGetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);
|
|
533
|
-
const response: GetAccessKeyInfoCommandOutput = {
|
|
534
|
-
$metadata: deserializeMetadata(output),
|
|
535
|
-
...contents,
|
|
536
|
-
};
|
|
537
|
-
return Promise.resolve(response);
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
const deserializeAws_queryGetAccessKeyInfoCommandError = async (
|
|
541
|
-
output: __HttpResponse,
|
|
542
|
-
context: __SerdeContext
|
|
543
|
-
): Promise<GetAccessKeyInfoCommandOutput> => {
|
|
544
|
-
const parsedOutput: any = {
|
|
545
|
-
...output,
|
|
546
|
-
body: await parseBody(output.body, context),
|
|
547
|
-
};
|
|
548
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
549
|
-
let errorCode = "UnknownError";
|
|
550
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
551
|
-
switch (errorCode) {
|
|
552
|
-
default:
|
|
553
|
-
const parsedBody = parsedOutput.body;
|
|
554
|
-
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
|
|
555
|
-
response = {
|
|
556
|
-
...parsedBody.Error,
|
|
557
|
-
name: `${errorCode}`,
|
|
558
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
559
|
-
$fault: "client",
|
|
560
|
-
$metadata: deserializeMetadata(output),
|
|
561
|
-
} as any;
|
|
562
|
-
}
|
|
563
|
-
const message = response.message || response.Message || errorCode;
|
|
564
|
-
response.message = message;
|
|
565
|
-
delete response.Message;
|
|
566
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
export const deserializeAws_queryGetCallerIdentityCommand = async (
|
|
570
|
-
output: __HttpResponse,
|
|
571
|
-
context: __SerdeContext
|
|
572
|
-
): Promise<GetCallerIdentityCommandOutput> => {
|
|
573
|
-
if (output.statusCode >= 300) {
|
|
574
|
-
return deserializeAws_queryGetCallerIdentityCommandError(output, context);
|
|
575
|
-
}
|
|
576
|
-
const data: any = await parseBody(output.body, context);
|
|
577
|
-
let contents: any = {};
|
|
578
|
-
contents = deserializeAws_queryGetCallerIdentityResponse(data.GetCallerIdentityResult, context);
|
|
579
|
-
const response: GetCallerIdentityCommandOutput = {
|
|
580
|
-
$metadata: deserializeMetadata(output),
|
|
581
|
-
...contents,
|
|
582
|
-
};
|
|
583
|
-
return Promise.resolve(response);
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
const deserializeAws_queryGetCallerIdentityCommandError = async (
|
|
587
|
-
output: __HttpResponse,
|
|
588
|
-
context: __SerdeContext
|
|
589
|
-
): Promise<GetCallerIdentityCommandOutput> => {
|
|
590
|
-
const parsedOutput: any = {
|
|
591
|
-
...output,
|
|
592
|
-
body: await parseBody(output.body, context),
|
|
593
|
-
};
|
|
594
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
595
|
-
let errorCode = "UnknownError";
|
|
596
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
597
|
-
switch (errorCode) {
|
|
598
|
-
default:
|
|
599
|
-
const parsedBody = parsedOutput.body;
|
|
600
|
-
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
|
|
601
|
-
response = {
|
|
602
|
-
...parsedBody.Error,
|
|
603
|
-
name: `${errorCode}`,
|
|
604
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
605
|
-
$fault: "client",
|
|
606
|
-
$metadata: deserializeMetadata(output),
|
|
607
|
-
} as any;
|
|
608
|
-
}
|
|
609
|
-
const message = response.message || response.Message || errorCode;
|
|
610
|
-
response.message = message;
|
|
611
|
-
delete response.Message;
|
|
612
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
export const deserializeAws_queryGetFederationTokenCommand = async (
|
|
616
|
-
output: __HttpResponse,
|
|
617
|
-
context: __SerdeContext
|
|
618
|
-
): Promise<GetFederationTokenCommandOutput> => {
|
|
619
|
-
if (output.statusCode >= 300) {
|
|
620
|
-
return deserializeAws_queryGetFederationTokenCommandError(output, context);
|
|
621
|
-
}
|
|
622
|
-
const data: any = await parseBody(output.body, context);
|
|
623
|
-
let contents: any = {};
|
|
624
|
-
contents = deserializeAws_queryGetFederationTokenResponse(data.GetFederationTokenResult, context);
|
|
625
|
-
const response: GetFederationTokenCommandOutput = {
|
|
626
|
-
$metadata: deserializeMetadata(output),
|
|
627
|
-
...contents,
|
|
628
|
-
};
|
|
629
|
-
return Promise.resolve(response);
|
|
630
|
-
};
|
|
631
|
-
|
|
632
|
-
const deserializeAws_queryGetFederationTokenCommandError = async (
|
|
633
|
-
output: __HttpResponse,
|
|
634
|
-
context: __SerdeContext
|
|
635
|
-
): Promise<GetFederationTokenCommandOutput> => {
|
|
636
|
-
const parsedOutput: any = {
|
|
637
|
-
...output,
|
|
638
|
-
body: await parseBody(output.body, context),
|
|
639
|
-
};
|
|
640
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
641
|
-
let errorCode = "UnknownError";
|
|
642
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
643
|
-
switch (errorCode) {
|
|
644
|
-
case "MalformedPolicyDocumentException":
|
|
645
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
646
|
-
response = {
|
|
647
|
-
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
648
|
-
name: errorCode,
|
|
649
|
-
$metadata: deserializeMetadata(output),
|
|
650
|
-
};
|
|
651
|
-
break;
|
|
652
|
-
case "PackedPolicyTooLargeException":
|
|
653
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
654
|
-
response = {
|
|
655
|
-
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
|
|
656
|
-
name: errorCode,
|
|
657
|
-
$metadata: deserializeMetadata(output),
|
|
658
|
-
};
|
|
659
|
-
break;
|
|
660
|
-
case "RegionDisabledException":
|
|
661
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
|
662
|
-
response = {
|
|
663
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
664
|
-
name: errorCode,
|
|
665
|
-
$metadata: deserializeMetadata(output),
|
|
666
|
-
};
|
|
667
|
-
break;
|
|
668
|
-
default:
|
|
669
|
-
const parsedBody = parsedOutput.body;
|
|
670
|
-
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
|
|
671
|
-
response = {
|
|
672
|
-
...parsedBody.Error,
|
|
673
|
-
name: `${errorCode}`,
|
|
674
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
675
|
-
$fault: "client",
|
|
676
|
-
$metadata: deserializeMetadata(output),
|
|
677
|
-
} as any;
|
|
678
|
-
}
|
|
679
|
-
const message = response.message || response.Message || errorCode;
|
|
680
|
-
response.message = message;
|
|
681
|
-
delete response.Message;
|
|
682
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
683
|
-
};
|
|
684
|
-
|
|
685
|
-
export const deserializeAws_queryGetSessionTokenCommand = async (
|
|
686
|
-
output: __HttpResponse,
|
|
687
|
-
context: __SerdeContext
|
|
688
|
-
): Promise<GetSessionTokenCommandOutput> => {
|
|
689
|
-
if (output.statusCode >= 300) {
|
|
690
|
-
return deserializeAws_queryGetSessionTokenCommandError(output, context);
|
|
691
|
-
}
|
|
692
|
-
const data: any = await parseBody(output.body, context);
|
|
693
|
-
let contents: any = {};
|
|
694
|
-
contents = deserializeAws_queryGetSessionTokenResponse(data.GetSessionTokenResult, context);
|
|
695
|
-
const response: GetSessionTokenCommandOutput = {
|
|
696
|
-
$metadata: deserializeMetadata(output),
|
|
697
|
-
...contents,
|
|
698
|
-
};
|
|
699
|
-
return Promise.resolve(response);
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
const deserializeAws_queryGetSessionTokenCommandError = async (
|
|
703
|
-
output: __HttpResponse,
|
|
704
|
-
context: __SerdeContext
|
|
705
|
-
): Promise<GetSessionTokenCommandOutput> => {
|
|
706
|
-
const parsedOutput: any = {
|
|
707
|
-
...output,
|
|
708
|
-
body: await parseBody(output.body, context),
|
|
709
|
-
};
|
|
710
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
711
|
-
let errorCode = "UnknownError";
|
|
712
|
-
errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
713
|
-
switch (errorCode) {
|
|
714
|
-
case "RegionDisabledException":
|
|
715
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
|
716
|
-
response = {
|
|
717
|
-
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
|
|
718
|
-
name: errorCode,
|
|
719
|
-
$metadata: deserializeMetadata(output),
|
|
720
|
-
};
|
|
721
|
-
break;
|
|
722
|
-
default:
|
|
723
|
-
const parsedBody = parsedOutput.body;
|
|
724
|
-
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
|
|
725
|
-
response = {
|
|
726
|
-
...parsedBody.Error,
|
|
727
|
-
name: `${errorCode}`,
|
|
728
|
-
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
|
|
729
|
-
$fault: "client",
|
|
730
|
-
$metadata: deserializeMetadata(output),
|
|
731
|
-
} as any;
|
|
732
|
-
}
|
|
733
|
-
const message = response.message || response.Message || errorCode;
|
|
734
|
-
response.message = message;
|
|
735
|
-
delete response.Message;
|
|
736
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
737
|
-
};
|
|
738
|
-
|
|
739
|
-
const deserializeAws_queryExpiredTokenExceptionResponse = async (
|
|
740
|
-
parsedOutput: any,
|
|
741
|
-
context: __SerdeContext
|
|
742
|
-
): Promise<ExpiredTokenException> => {
|
|
743
|
-
const body = parsedOutput.body;
|
|
744
|
-
const deserialized: any = deserializeAws_queryExpiredTokenException(body.Error, context);
|
|
745
|
-
const contents: ExpiredTokenException = {
|
|
746
|
-
name: "ExpiredTokenException",
|
|
747
|
-
$fault: "client",
|
|
748
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
749
|
-
...deserialized,
|
|
750
|
-
};
|
|
751
|
-
return contents;
|
|
752
|
-
};
|
|
753
|
-
|
|
754
|
-
const deserializeAws_queryIDPCommunicationErrorExceptionResponse = async (
|
|
755
|
-
parsedOutput: any,
|
|
756
|
-
context: __SerdeContext
|
|
757
|
-
): Promise<IDPCommunicationErrorException> => {
|
|
758
|
-
const body = parsedOutput.body;
|
|
759
|
-
const deserialized: any = deserializeAws_queryIDPCommunicationErrorException(body.Error, context);
|
|
760
|
-
const contents: IDPCommunicationErrorException = {
|
|
761
|
-
name: "IDPCommunicationErrorException",
|
|
762
|
-
$fault: "client",
|
|
763
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
764
|
-
...deserialized,
|
|
765
|
-
};
|
|
766
|
-
return contents;
|
|
767
|
-
};
|
|
768
|
-
|
|
769
|
-
const deserializeAws_queryIDPRejectedClaimExceptionResponse = async (
|
|
770
|
-
parsedOutput: any,
|
|
771
|
-
context: __SerdeContext
|
|
772
|
-
): Promise<IDPRejectedClaimException> => {
|
|
773
|
-
const body = parsedOutput.body;
|
|
774
|
-
const deserialized: any = deserializeAws_queryIDPRejectedClaimException(body.Error, context);
|
|
775
|
-
const contents: IDPRejectedClaimException = {
|
|
776
|
-
name: "IDPRejectedClaimException",
|
|
777
|
-
$fault: "client",
|
|
778
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
779
|
-
...deserialized,
|
|
780
|
-
};
|
|
781
|
-
return contents;
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
const deserializeAws_queryInvalidAuthorizationMessageExceptionResponse = async (
|
|
785
|
-
parsedOutput: any,
|
|
786
|
-
context: __SerdeContext
|
|
787
|
-
): Promise<InvalidAuthorizationMessageException> => {
|
|
788
|
-
const body = parsedOutput.body;
|
|
789
|
-
const deserialized: any = deserializeAws_queryInvalidAuthorizationMessageException(body.Error, context);
|
|
790
|
-
const contents: InvalidAuthorizationMessageException = {
|
|
791
|
-
name: "InvalidAuthorizationMessageException",
|
|
792
|
-
$fault: "client",
|
|
793
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
794
|
-
...deserialized,
|
|
795
|
-
};
|
|
796
|
-
return contents;
|
|
797
|
-
};
|
|
798
|
-
|
|
799
|
-
const deserializeAws_queryInvalidIdentityTokenExceptionResponse = async (
|
|
800
|
-
parsedOutput: any,
|
|
801
|
-
context: __SerdeContext
|
|
802
|
-
): Promise<InvalidIdentityTokenException> => {
|
|
803
|
-
const body = parsedOutput.body;
|
|
804
|
-
const deserialized: any = deserializeAws_queryInvalidIdentityTokenException(body.Error, context);
|
|
805
|
-
const contents: InvalidIdentityTokenException = {
|
|
806
|
-
name: "InvalidIdentityTokenException",
|
|
807
|
-
$fault: "client",
|
|
808
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
809
|
-
...deserialized,
|
|
810
|
-
};
|
|
811
|
-
return contents;
|
|
812
|
-
};
|
|
813
|
-
|
|
814
|
-
const deserializeAws_queryMalformedPolicyDocumentExceptionResponse = async (
|
|
815
|
-
parsedOutput: any,
|
|
816
|
-
context: __SerdeContext
|
|
817
|
-
): Promise<MalformedPolicyDocumentException> => {
|
|
818
|
-
const body = parsedOutput.body;
|
|
819
|
-
const deserialized: any = deserializeAws_queryMalformedPolicyDocumentException(body.Error, context);
|
|
820
|
-
const contents: MalformedPolicyDocumentException = {
|
|
821
|
-
name: "MalformedPolicyDocumentException",
|
|
822
|
-
$fault: "client",
|
|
823
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
824
|
-
...deserialized,
|
|
825
|
-
};
|
|
826
|
-
return contents;
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
const deserializeAws_queryPackedPolicyTooLargeExceptionResponse = async (
|
|
830
|
-
parsedOutput: any,
|
|
831
|
-
context: __SerdeContext
|
|
832
|
-
): Promise<PackedPolicyTooLargeException> => {
|
|
833
|
-
const body = parsedOutput.body;
|
|
834
|
-
const deserialized: any = deserializeAws_queryPackedPolicyTooLargeException(body.Error, context);
|
|
835
|
-
const contents: PackedPolicyTooLargeException = {
|
|
836
|
-
name: "PackedPolicyTooLargeException",
|
|
837
|
-
$fault: "client",
|
|
838
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
839
|
-
...deserialized,
|
|
840
|
-
};
|
|
841
|
-
return contents;
|
|
842
|
-
};
|
|
843
|
-
|
|
844
|
-
const deserializeAws_queryRegionDisabledExceptionResponse = async (
|
|
845
|
-
parsedOutput: any,
|
|
846
|
-
context: __SerdeContext
|
|
847
|
-
): Promise<RegionDisabledException> => {
|
|
848
|
-
const body = parsedOutput.body;
|
|
849
|
-
const deserialized: any = deserializeAws_queryRegionDisabledException(body.Error, context);
|
|
850
|
-
const contents: RegionDisabledException = {
|
|
851
|
-
name: "RegionDisabledException",
|
|
852
|
-
$fault: "client",
|
|
853
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
854
|
-
...deserialized,
|
|
855
|
-
};
|
|
856
|
-
return contents;
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
const serializeAws_queryAssumeRoleRequest = (input: AssumeRoleRequest, context: __SerdeContext): any => {
|
|
860
|
-
const entries: any = {};
|
|
861
|
-
if (input.RoleArn !== undefined && input.RoleArn !== null) {
|
|
862
|
-
entries["RoleArn"] = input.RoleArn;
|
|
863
|
-
}
|
|
864
|
-
if (input.RoleSessionName !== undefined && input.RoleSessionName !== null) {
|
|
865
|
-
entries["RoleSessionName"] = input.RoleSessionName;
|
|
866
|
-
}
|
|
867
|
-
if (input.PolicyArns !== undefined && input.PolicyArns !== null) {
|
|
868
|
-
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
|
|
869
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
870
|
-
const loc = `PolicyArns.${key}`;
|
|
871
|
-
entries[loc] = value;
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
if (input.Policy !== undefined && input.Policy !== null) {
|
|
875
|
-
entries["Policy"] = input.Policy;
|
|
876
|
-
}
|
|
877
|
-
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
|
|
878
|
-
entries["DurationSeconds"] = input.DurationSeconds;
|
|
879
|
-
}
|
|
880
|
-
if (input.Tags !== undefined && input.Tags !== null) {
|
|
881
|
-
const memberEntries = serializeAws_querytagListType(input.Tags, context);
|
|
882
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
883
|
-
const loc = `Tags.${key}`;
|
|
884
|
-
entries[loc] = value;
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
if (input.TransitiveTagKeys !== undefined && input.TransitiveTagKeys !== null) {
|
|
888
|
-
const memberEntries = serializeAws_querytagKeyListType(input.TransitiveTagKeys, context);
|
|
889
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
890
|
-
const loc = `TransitiveTagKeys.${key}`;
|
|
891
|
-
entries[loc] = value;
|
|
892
|
-
});
|
|
893
|
-
}
|
|
894
|
-
if (input.ExternalId !== undefined && input.ExternalId !== null) {
|
|
895
|
-
entries["ExternalId"] = input.ExternalId;
|
|
896
|
-
}
|
|
897
|
-
if (input.SerialNumber !== undefined && input.SerialNumber !== null) {
|
|
898
|
-
entries["SerialNumber"] = input.SerialNumber;
|
|
899
|
-
}
|
|
900
|
-
if (input.TokenCode !== undefined && input.TokenCode !== null) {
|
|
901
|
-
entries["TokenCode"] = input.TokenCode;
|
|
902
|
-
}
|
|
903
|
-
if (input.SourceIdentity !== undefined && input.SourceIdentity !== null) {
|
|
904
|
-
entries["SourceIdentity"] = input.SourceIdentity;
|
|
905
|
-
}
|
|
906
|
-
return entries;
|
|
907
|
-
};
|
|
908
|
-
|
|
909
|
-
const serializeAws_queryAssumeRoleWithSAMLRequest = (
|
|
910
|
-
input: AssumeRoleWithSAMLRequest,
|
|
911
|
-
context: __SerdeContext
|
|
912
|
-
): any => {
|
|
913
|
-
const entries: any = {};
|
|
914
|
-
if (input.RoleArn !== undefined && input.RoleArn !== null) {
|
|
915
|
-
entries["RoleArn"] = input.RoleArn;
|
|
916
|
-
}
|
|
917
|
-
if (input.PrincipalArn !== undefined && input.PrincipalArn !== null) {
|
|
918
|
-
entries["PrincipalArn"] = input.PrincipalArn;
|
|
919
|
-
}
|
|
920
|
-
if (input.SAMLAssertion !== undefined && input.SAMLAssertion !== null) {
|
|
921
|
-
entries["SAMLAssertion"] = input.SAMLAssertion;
|
|
922
|
-
}
|
|
923
|
-
if (input.PolicyArns !== undefined && input.PolicyArns !== null) {
|
|
924
|
-
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
|
|
925
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
926
|
-
const loc = `PolicyArns.${key}`;
|
|
927
|
-
entries[loc] = value;
|
|
928
|
-
});
|
|
929
|
-
}
|
|
930
|
-
if (input.Policy !== undefined && input.Policy !== null) {
|
|
931
|
-
entries["Policy"] = input.Policy;
|
|
932
|
-
}
|
|
933
|
-
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
|
|
934
|
-
entries["DurationSeconds"] = input.DurationSeconds;
|
|
935
|
-
}
|
|
936
|
-
return entries;
|
|
937
|
-
};
|
|
938
|
-
|
|
939
|
-
const serializeAws_queryAssumeRoleWithWebIdentityRequest = (
|
|
940
|
-
input: AssumeRoleWithWebIdentityRequest,
|
|
941
|
-
context: __SerdeContext
|
|
942
|
-
): any => {
|
|
943
|
-
const entries: any = {};
|
|
944
|
-
if (input.RoleArn !== undefined && input.RoleArn !== null) {
|
|
945
|
-
entries["RoleArn"] = input.RoleArn;
|
|
946
|
-
}
|
|
947
|
-
if (input.RoleSessionName !== undefined && input.RoleSessionName !== null) {
|
|
948
|
-
entries["RoleSessionName"] = input.RoleSessionName;
|
|
949
|
-
}
|
|
950
|
-
if (input.WebIdentityToken !== undefined && input.WebIdentityToken !== null) {
|
|
951
|
-
entries["WebIdentityToken"] = input.WebIdentityToken;
|
|
952
|
-
}
|
|
953
|
-
if (input.ProviderId !== undefined && input.ProviderId !== null) {
|
|
954
|
-
entries["ProviderId"] = input.ProviderId;
|
|
955
|
-
}
|
|
956
|
-
if (input.PolicyArns !== undefined && input.PolicyArns !== null) {
|
|
957
|
-
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
|
|
958
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
959
|
-
const loc = `PolicyArns.${key}`;
|
|
960
|
-
entries[loc] = value;
|
|
961
|
-
});
|
|
962
|
-
}
|
|
963
|
-
if (input.Policy !== undefined && input.Policy !== null) {
|
|
964
|
-
entries["Policy"] = input.Policy;
|
|
965
|
-
}
|
|
966
|
-
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
|
|
967
|
-
entries["DurationSeconds"] = input.DurationSeconds;
|
|
968
|
-
}
|
|
969
|
-
return entries;
|
|
970
|
-
};
|
|
971
|
-
|
|
972
|
-
const serializeAws_queryDecodeAuthorizationMessageRequest = (
|
|
973
|
-
input: DecodeAuthorizationMessageRequest,
|
|
974
|
-
context: __SerdeContext
|
|
975
|
-
): any => {
|
|
976
|
-
const entries: any = {};
|
|
977
|
-
if (input.EncodedMessage !== undefined && input.EncodedMessage !== null) {
|
|
978
|
-
entries["EncodedMessage"] = input.EncodedMessage;
|
|
979
|
-
}
|
|
980
|
-
return entries;
|
|
981
|
-
};
|
|
982
|
-
|
|
983
|
-
const serializeAws_queryGetAccessKeyInfoRequest = (input: GetAccessKeyInfoRequest, context: __SerdeContext): any => {
|
|
984
|
-
const entries: any = {};
|
|
985
|
-
if (input.AccessKeyId !== undefined && input.AccessKeyId !== null) {
|
|
986
|
-
entries["AccessKeyId"] = input.AccessKeyId;
|
|
987
|
-
}
|
|
988
|
-
return entries;
|
|
989
|
-
};
|
|
990
|
-
|
|
991
|
-
const serializeAws_queryGetCallerIdentityRequest = (input: GetCallerIdentityRequest, context: __SerdeContext): any => {
|
|
992
|
-
const entries: any = {};
|
|
993
|
-
return entries;
|
|
994
|
-
};
|
|
995
|
-
|
|
996
|
-
const serializeAws_queryGetFederationTokenRequest = (
|
|
997
|
-
input: GetFederationTokenRequest,
|
|
998
|
-
context: __SerdeContext
|
|
999
|
-
): any => {
|
|
1000
|
-
const entries: any = {};
|
|
1001
|
-
if (input.Name !== undefined && input.Name !== null) {
|
|
1002
|
-
entries["Name"] = input.Name;
|
|
1003
|
-
}
|
|
1004
|
-
if (input.Policy !== undefined && input.Policy !== null) {
|
|
1005
|
-
entries["Policy"] = input.Policy;
|
|
1006
|
-
}
|
|
1007
|
-
if (input.PolicyArns !== undefined && input.PolicyArns !== null) {
|
|
1008
|
-
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
|
|
1009
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
1010
|
-
const loc = `PolicyArns.${key}`;
|
|
1011
|
-
entries[loc] = value;
|
|
1012
|
-
});
|
|
1013
|
-
}
|
|
1014
|
-
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
|
|
1015
|
-
entries["DurationSeconds"] = input.DurationSeconds;
|
|
1016
|
-
}
|
|
1017
|
-
if (input.Tags !== undefined && input.Tags !== null) {
|
|
1018
|
-
const memberEntries = serializeAws_querytagListType(input.Tags, context);
|
|
1019
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
1020
|
-
const loc = `Tags.${key}`;
|
|
1021
|
-
entries[loc] = value;
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
return entries;
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
const serializeAws_queryGetSessionTokenRequest = (input: GetSessionTokenRequest, context: __SerdeContext): any => {
|
|
1028
|
-
const entries: any = {};
|
|
1029
|
-
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
|
|
1030
|
-
entries["DurationSeconds"] = input.DurationSeconds;
|
|
1031
|
-
}
|
|
1032
|
-
if (input.SerialNumber !== undefined && input.SerialNumber !== null) {
|
|
1033
|
-
entries["SerialNumber"] = input.SerialNumber;
|
|
1034
|
-
}
|
|
1035
|
-
if (input.TokenCode !== undefined && input.TokenCode !== null) {
|
|
1036
|
-
entries["TokenCode"] = input.TokenCode;
|
|
1037
|
-
}
|
|
1038
|
-
return entries;
|
|
1039
|
-
};
|
|
1040
|
-
|
|
1041
|
-
const serializeAws_querypolicyDescriptorListType = (input: PolicyDescriptorType[], context: __SerdeContext): any => {
|
|
1042
|
-
const entries: any = {};
|
|
1043
|
-
let counter = 1;
|
|
1044
|
-
for (const entry of input) {
|
|
1045
|
-
if (entry === null) {
|
|
1046
|
-
continue;
|
|
1047
|
-
}
|
|
1048
|
-
const memberEntries = serializeAws_queryPolicyDescriptorType(entry, context);
|
|
1049
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
1050
|
-
entries[`member.${counter}.${key}`] = value;
|
|
1051
|
-
});
|
|
1052
|
-
counter++;
|
|
1053
|
-
}
|
|
1054
|
-
return entries;
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
|
-
const serializeAws_queryPolicyDescriptorType = (input: PolicyDescriptorType, context: __SerdeContext): any => {
|
|
1058
|
-
const entries: any = {};
|
|
1059
|
-
if (input.arn !== undefined && input.arn !== null) {
|
|
1060
|
-
entries["arn"] = input.arn;
|
|
1061
|
-
}
|
|
1062
|
-
return entries;
|
|
1063
|
-
};
|
|
1064
|
-
|
|
1065
|
-
const serializeAws_queryTag = (input: Tag, context: __SerdeContext): any => {
|
|
1066
|
-
const entries: any = {};
|
|
1067
|
-
if (input.Key !== undefined && input.Key !== null) {
|
|
1068
|
-
entries["Key"] = input.Key;
|
|
1069
|
-
}
|
|
1070
|
-
if (input.Value !== undefined && input.Value !== null) {
|
|
1071
|
-
entries["Value"] = input.Value;
|
|
1072
|
-
}
|
|
1073
|
-
return entries;
|
|
1074
|
-
};
|
|
1075
|
-
|
|
1076
|
-
const serializeAws_querytagKeyListType = (input: string[], context: __SerdeContext): any => {
|
|
1077
|
-
const entries: any = {};
|
|
1078
|
-
let counter = 1;
|
|
1079
|
-
for (const entry of input) {
|
|
1080
|
-
if (entry === null) {
|
|
1081
|
-
continue;
|
|
1082
|
-
}
|
|
1083
|
-
entries[`member.${counter}`] = entry;
|
|
1084
|
-
counter++;
|
|
1085
|
-
}
|
|
1086
|
-
return entries;
|
|
1087
|
-
};
|
|
1088
|
-
|
|
1089
|
-
const serializeAws_querytagListType = (input: Tag[], context: __SerdeContext): any => {
|
|
1090
|
-
const entries: any = {};
|
|
1091
|
-
let counter = 1;
|
|
1092
|
-
for (const entry of input) {
|
|
1093
|
-
if (entry === null) {
|
|
1094
|
-
continue;
|
|
1095
|
-
}
|
|
1096
|
-
const memberEntries = serializeAws_queryTag(entry, context);
|
|
1097
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
1098
|
-
entries[`member.${counter}.${key}`] = value;
|
|
1099
|
-
});
|
|
1100
|
-
counter++;
|
|
1101
|
-
}
|
|
1102
|
-
return entries;
|
|
1103
|
-
};
|
|
1104
|
-
|
|
1105
|
-
const deserializeAws_queryAssumedRoleUser = (output: any, context: __SerdeContext): AssumedRoleUser => {
|
|
1106
|
-
const contents: any = {
|
|
1107
|
-
AssumedRoleId: undefined,
|
|
1108
|
-
Arn: undefined,
|
|
1109
|
-
};
|
|
1110
|
-
if (output["AssumedRoleId"] !== undefined) {
|
|
1111
|
-
contents.AssumedRoleId = __expectString(output["AssumedRoleId"]);
|
|
1112
|
-
}
|
|
1113
|
-
if (output["Arn"] !== undefined) {
|
|
1114
|
-
contents.Arn = __expectString(output["Arn"]);
|
|
1115
|
-
}
|
|
1116
|
-
return contents;
|
|
1117
|
-
};
|
|
1118
|
-
|
|
1119
|
-
const deserializeAws_queryAssumeRoleResponse = (output: any, context: __SerdeContext): AssumeRoleResponse => {
|
|
1120
|
-
const contents: any = {
|
|
1121
|
-
Credentials: undefined,
|
|
1122
|
-
AssumedRoleUser: undefined,
|
|
1123
|
-
PackedPolicySize: undefined,
|
|
1124
|
-
SourceIdentity: undefined,
|
|
1125
|
-
};
|
|
1126
|
-
if (output["Credentials"] !== undefined) {
|
|
1127
|
-
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
|
|
1128
|
-
}
|
|
1129
|
-
if (output["AssumedRoleUser"] !== undefined) {
|
|
1130
|
-
contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context);
|
|
1131
|
-
}
|
|
1132
|
-
if (output["PackedPolicySize"] !== undefined) {
|
|
1133
|
-
contents.PackedPolicySize = __strictParseInt32(output["PackedPolicySize"]) as number;
|
|
1134
|
-
}
|
|
1135
|
-
if (output["SourceIdentity"] !== undefined) {
|
|
1136
|
-
contents.SourceIdentity = __expectString(output["SourceIdentity"]);
|
|
1137
|
-
}
|
|
1138
|
-
return contents;
|
|
1139
|
-
};
|
|
1140
|
-
|
|
1141
|
-
const deserializeAws_queryAssumeRoleWithSAMLResponse = (
|
|
1142
|
-
output: any,
|
|
1143
|
-
context: __SerdeContext
|
|
1144
|
-
): AssumeRoleWithSAMLResponse => {
|
|
1145
|
-
const contents: any = {
|
|
1146
|
-
Credentials: undefined,
|
|
1147
|
-
AssumedRoleUser: undefined,
|
|
1148
|
-
PackedPolicySize: undefined,
|
|
1149
|
-
Subject: undefined,
|
|
1150
|
-
SubjectType: undefined,
|
|
1151
|
-
Issuer: undefined,
|
|
1152
|
-
Audience: undefined,
|
|
1153
|
-
NameQualifier: undefined,
|
|
1154
|
-
SourceIdentity: undefined,
|
|
1155
|
-
};
|
|
1156
|
-
if (output["Credentials"] !== undefined) {
|
|
1157
|
-
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
|
|
1158
|
-
}
|
|
1159
|
-
if (output["AssumedRoleUser"] !== undefined) {
|
|
1160
|
-
contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context);
|
|
1161
|
-
}
|
|
1162
|
-
if (output["PackedPolicySize"] !== undefined) {
|
|
1163
|
-
contents.PackedPolicySize = __strictParseInt32(output["PackedPolicySize"]) as number;
|
|
1164
|
-
}
|
|
1165
|
-
if (output["Subject"] !== undefined) {
|
|
1166
|
-
contents.Subject = __expectString(output["Subject"]);
|
|
1167
|
-
}
|
|
1168
|
-
if (output["SubjectType"] !== undefined) {
|
|
1169
|
-
contents.SubjectType = __expectString(output["SubjectType"]);
|
|
1170
|
-
}
|
|
1171
|
-
if (output["Issuer"] !== undefined) {
|
|
1172
|
-
contents.Issuer = __expectString(output["Issuer"]);
|
|
1173
|
-
}
|
|
1174
|
-
if (output["Audience"] !== undefined) {
|
|
1175
|
-
contents.Audience = __expectString(output["Audience"]);
|
|
1176
|
-
}
|
|
1177
|
-
if (output["NameQualifier"] !== undefined) {
|
|
1178
|
-
contents.NameQualifier = __expectString(output["NameQualifier"]);
|
|
1179
|
-
}
|
|
1180
|
-
if (output["SourceIdentity"] !== undefined) {
|
|
1181
|
-
contents.SourceIdentity = __expectString(output["SourceIdentity"]);
|
|
1182
|
-
}
|
|
1183
|
-
return contents;
|
|
1184
|
-
};
|
|
1185
|
-
|
|
1186
|
-
const deserializeAws_queryAssumeRoleWithWebIdentityResponse = (
|
|
1187
|
-
output: any,
|
|
1188
|
-
context: __SerdeContext
|
|
1189
|
-
): AssumeRoleWithWebIdentityResponse => {
|
|
1190
|
-
const contents: any = {
|
|
1191
|
-
Credentials: undefined,
|
|
1192
|
-
SubjectFromWebIdentityToken: undefined,
|
|
1193
|
-
AssumedRoleUser: undefined,
|
|
1194
|
-
PackedPolicySize: undefined,
|
|
1195
|
-
Provider: undefined,
|
|
1196
|
-
Audience: undefined,
|
|
1197
|
-
SourceIdentity: undefined,
|
|
1198
|
-
};
|
|
1199
|
-
if (output["Credentials"] !== undefined) {
|
|
1200
|
-
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
|
|
1201
|
-
}
|
|
1202
|
-
if (output["SubjectFromWebIdentityToken"] !== undefined) {
|
|
1203
|
-
contents.SubjectFromWebIdentityToken = __expectString(output["SubjectFromWebIdentityToken"]);
|
|
1204
|
-
}
|
|
1205
|
-
if (output["AssumedRoleUser"] !== undefined) {
|
|
1206
|
-
contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context);
|
|
1207
|
-
}
|
|
1208
|
-
if (output["PackedPolicySize"] !== undefined) {
|
|
1209
|
-
contents.PackedPolicySize = __strictParseInt32(output["PackedPolicySize"]) as number;
|
|
1210
|
-
}
|
|
1211
|
-
if (output["Provider"] !== undefined) {
|
|
1212
|
-
contents.Provider = __expectString(output["Provider"]);
|
|
1213
|
-
}
|
|
1214
|
-
if (output["Audience"] !== undefined) {
|
|
1215
|
-
contents.Audience = __expectString(output["Audience"]);
|
|
1216
|
-
}
|
|
1217
|
-
if (output["SourceIdentity"] !== undefined) {
|
|
1218
|
-
contents.SourceIdentity = __expectString(output["SourceIdentity"]);
|
|
1219
|
-
}
|
|
1220
|
-
return contents;
|
|
1221
|
-
};
|
|
1222
|
-
|
|
1223
|
-
const deserializeAws_queryCredentials = (output: any, context: __SerdeContext): Credentials => {
|
|
1224
|
-
const contents: any = {
|
|
1225
|
-
AccessKeyId: undefined,
|
|
1226
|
-
SecretAccessKey: undefined,
|
|
1227
|
-
SessionToken: undefined,
|
|
1228
|
-
Expiration: undefined,
|
|
1229
|
-
};
|
|
1230
|
-
if (output["AccessKeyId"] !== undefined) {
|
|
1231
|
-
contents.AccessKeyId = __expectString(output["AccessKeyId"]);
|
|
1232
|
-
}
|
|
1233
|
-
if (output["SecretAccessKey"] !== undefined) {
|
|
1234
|
-
contents.SecretAccessKey = __expectString(output["SecretAccessKey"]);
|
|
1235
|
-
}
|
|
1236
|
-
if (output["SessionToken"] !== undefined) {
|
|
1237
|
-
contents.SessionToken = __expectString(output["SessionToken"]);
|
|
1238
|
-
}
|
|
1239
|
-
if (output["Expiration"] !== undefined) {
|
|
1240
|
-
contents.Expiration = __expectNonNull(__parseRfc3339DateTime(output["Expiration"]));
|
|
1241
|
-
}
|
|
1242
|
-
return contents;
|
|
1243
|
-
};
|
|
1244
|
-
|
|
1245
|
-
const deserializeAws_queryDecodeAuthorizationMessageResponse = (
|
|
1246
|
-
output: any,
|
|
1247
|
-
context: __SerdeContext
|
|
1248
|
-
): DecodeAuthorizationMessageResponse => {
|
|
1249
|
-
const contents: any = {
|
|
1250
|
-
DecodedMessage: undefined,
|
|
1251
|
-
};
|
|
1252
|
-
if (output["DecodedMessage"] !== undefined) {
|
|
1253
|
-
contents.DecodedMessage = __expectString(output["DecodedMessage"]);
|
|
1254
|
-
}
|
|
1255
|
-
return contents;
|
|
1256
|
-
};
|
|
1257
|
-
|
|
1258
|
-
const deserializeAws_queryExpiredTokenException = (output: any, context: __SerdeContext): ExpiredTokenException => {
|
|
1259
|
-
const contents: any = {
|
|
1260
|
-
message: undefined,
|
|
1261
|
-
};
|
|
1262
|
-
if (output["message"] !== undefined) {
|
|
1263
|
-
contents.message = __expectString(output["message"]);
|
|
1264
|
-
}
|
|
1265
|
-
return contents;
|
|
1266
|
-
};
|
|
1267
|
-
|
|
1268
|
-
const deserializeAws_queryFederatedUser = (output: any, context: __SerdeContext): FederatedUser => {
|
|
1269
|
-
const contents: any = {
|
|
1270
|
-
FederatedUserId: undefined,
|
|
1271
|
-
Arn: undefined,
|
|
1272
|
-
};
|
|
1273
|
-
if (output["FederatedUserId"] !== undefined) {
|
|
1274
|
-
contents.FederatedUserId = __expectString(output["FederatedUserId"]);
|
|
1275
|
-
}
|
|
1276
|
-
if (output["Arn"] !== undefined) {
|
|
1277
|
-
contents.Arn = __expectString(output["Arn"]);
|
|
1278
|
-
}
|
|
1279
|
-
return contents;
|
|
1280
|
-
};
|
|
1281
|
-
|
|
1282
|
-
const deserializeAws_queryGetAccessKeyInfoResponse = (
|
|
1283
|
-
output: any,
|
|
1284
|
-
context: __SerdeContext
|
|
1285
|
-
): GetAccessKeyInfoResponse => {
|
|
1286
|
-
const contents: any = {
|
|
1287
|
-
Account: undefined,
|
|
1288
|
-
};
|
|
1289
|
-
if (output["Account"] !== undefined) {
|
|
1290
|
-
contents.Account = __expectString(output["Account"]);
|
|
1291
|
-
}
|
|
1292
|
-
return contents;
|
|
1293
|
-
};
|
|
1294
|
-
|
|
1295
|
-
const deserializeAws_queryGetCallerIdentityResponse = (
|
|
1296
|
-
output: any,
|
|
1297
|
-
context: __SerdeContext
|
|
1298
|
-
): GetCallerIdentityResponse => {
|
|
1299
|
-
const contents: any = {
|
|
1300
|
-
UserId: undefined,
|
|
1301
|
-
Account: undefined,
|
|
1302
|
-
Arn: undefined,
|
|
1303
|
-
};
|
|
1304
|
-
if (output["UserId"] !== undefined) {
|
|
1305
|
-
contents.UserId = __expectString(output["UserId"]);
|
|
1306
|
-
}
|
|
1307
|
-
if (output["Account"] !== undefined) {
|
|
1308
|
-
contents.Account = __expectString(output["Account"]);
|
|
1309
|
-
}
|
|
1310
|
-
if (output["Arn"] !== undefined) {
|
|
1311
|
-
contents.Arn = __expectString(output["Arn"]);
|
|
1312
|
-
}
|
|
1313
|
-
return contents;
|
|
1314
|
-
};
|
|
1315
|
-
|
|
1316
|
-
const deserializeAws_queryGetFederationTokenResponse = (
|
|
1317
|
-
output: any,
|
|
1318
|
-
context: __SerdeContext
|
|
1319
|
-
): GetFederationTokenResponse => {
|
|
1320
|
-
const contents: any = {
|
|
1321
|
-
Credentials: undefined,
|
|
1322
|
-
FederatedUser: undefined,
|
|
1323
|
-
PackedPolicySize: undefined,
|
|
1324
|
-
};
|
|
1325
|
-
if (output["Credentials"] !== undefined) {
|
|
1326
|
-
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
|
|
1327
|
-
}
|
|
1328
|
-
if (output["FederatedUser"] !== undefined) {
|
|
1329
|
-
contents.FederatedUser = deserializeAws_queryFederatedUser(output["FederatedUser"], context);
|
|
1330
|
-
}
|
|
1331
|
-
if (output["PackedPolicySize"] !== undefined) {
|
|
1332
|
-
contents.PackedPolicySize = __strictParseInt32(output["PackedPolicySize"]) as number;
|
|
1333
|
-
}
|
|
1334
|
-
return contents;
|
|
1335
|
-
};
|
|
1336
|
-
|
|
1337
|
-
const deserializeAws_queryGetSessionTokenResponse = (output: any, context: __SerdeContext): GetSessionTokenResponse => {
|
|
1338
|
-
const contents: any = {
|
|
1339
|
-
Credentials: undefined,
|
|
1340
|
-
};
|
|
1341
|
-
if (output["Credentials"] !== undefined) {
|
|
1342
|
-
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
|
|
1343
|
-
}
|
|
1344
|
-
return contents;
|
|
1345
|
-
};
|
|
1346
|
-
|
|
1347
|
-
const deserializeAws_queryIDPCommunicationErrorException = (
|
|
1348
|
-
output: any,
|
|
1349
|
-
context: __SerdeContext
|
|
1350
|
-
): IDPCommunicationErrorException => {
|
|
1351
|
-
const contents: any = {
|
|
1352
|
-
message: undefined,
|
|
1353
|
-
};
|
|
1354
|
-
if (output["message"] !== undefined) {
|
|
1355
|
-
contents.message = __expectString(output["message"]);
|
|
1356
|
-
}
|
|
1357
|
-
return contents;
|
|
1358
|
-
};
|
|
1359
|
-
|
|
1360
|
-
const deserializeAws_queryIDPRejectedClaimException = (
|
|
1361
|
-
output: any,
|
|
1362
|
-
context: __SerdeContext
|
|
1363
|
-
): IDPRejectedClaimException => {
|
|
1364
|
-
const contents: any = {
|
|
1365
|
-
message: undefined,
|
|
1366
|
-
};
|
|
1367
|
-
if (output["message"] !== undefined) {
|
|
1368
|
-
contents.message = __expectString(output["message"]);
|
|
1369
|
-
}
|
|
1370
|
-
return contents;
|
|
1371
|
-
};
|
|
1372
|
-
|
|
1373
|
-
const deserializeAws_queryInvalidAuthorizationMessageException = (
|
|
1374
|
-
output: any,
|
|
1375
|
-
context: __SerdeContext
|
|
1376
|
-
): InvalidAuthorizationMessageException => {
|
|
1377
|
-
const contents: any = {
|
|
1378
|
-
message: undefined,
|
|
1379
|
-
};
|
|
1380
|
-
if (output["message"] !== undefined) {
|
|
1381
|
-
contents.message = __expectString(output["message"]);
|
|
1382
|
-
}
|
|
1383
|
-
return contents;
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
|
-
const deserializeAws_queryInvalidIdentityTokenException = (
|
|
1387
|
-
output: any,
|
|
1388
|
-
context: __SerdeContext
|
|
1389
|
-
): InvalidIdentityTokenException => {
|
|
1390
|
-
const contents: any = {
|
|
1391
|
-
message: undefined,
|
|
1392
|
-
};
|
|
1393
|
-
if (output["message"] !== undefined) {
|
|
1394
|
-
contents.message = __expectString(output["message"]);
|
|
1395
|
-
}
|
|
1396
|
-
return contents;
|
|
1397
|
-
};
|
|
1398
|
-
|
|
1399
|
-
const deserializeAws_queryMalformedPolicyDocumentException = (
|
|
1400
|
-
output: any,
|
|
1401
|
-
context: __SerdeContext
|
|
1402
|
-
): MalformedPolicyDocumentException => {
|
|
1403
|
-
const contents: any = {
|
|
1404
|
-
message: undefined,
|
|
1405
|
-
};
|
|
1406
|
-
if (output["message"] !== undefined) {
|
|
1407
|
-
contents.message = __expectString(output["message"]);
|
|
1408
|
-
}
|
|
1409
|
-
return contents;
|
|
1410
|
-
};
|
|
1411
|
-
|
|
1412
|
-
const deserializeAws_queryPackedPolicyTooLargeException = (
|
|
1413
|
-
output: any,
|
|
1414
|
-
context: __SerdeContext
|
|
1415
|
-
): PackedPolicyTooLargeException => {
|
|
1416
|
-
const contents: any = {
|
|
1417
|
-
message: undefined,
|
|
1418
|
-
};
|
|
1419
|
-
if (output["message"] !== undefined) {
|
|
1420
|
-
contents.message = __expectString(output["message"]);
|
|
1421
|
-
}
|
|
1422
|
-
return contents;
|
|
1423
|
-
};
|
|
1424
|
-
|
|
1425
|
-
const deserializeAws_queryRegionDisabledException = (output: any, context: __SerdeContext): RegionDisabledException => {
|
|
1426
|
-
const contents: any = {
|
|
1427
|
-
message: undefined,
|
|
1428
|
-
};
|
|
1429
|
-
if (output["message"] !== undefined) {
|
|
1430
|
-
contents.message = __expectString(output["message"]);
|
|
1431
|
-
}
|
|
1432
|
-
return contents;
|
|
1433
|
-
};
|
|
1434
|
-
|
|
1435
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
1436
|
-
httpStatusCode: output.statusCode,
|
|
1437
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1438
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1439
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1440
|
-
});
|
|
1441
|
-
|
|
1442
|
-
// Collect low-level response body stream to Uint8Array.
|
|
1443
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
1444
|
-
if (streamBody instanceof Uint8Array) {
|
|
1445
|
-
return Promise.resolve(streamBody);
|
|
1446
|
-
}
|
|
1447
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1448
|
-
};
|
|
1449
|
-
|
|
1450
|
-
// Encode Uint8Array data into string with utf-8.
|
|
1451
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
1452
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1453
|
-
|
|
1454
|
-
const buildHttpRpcRequest = async (
|
|
1455
|
-
context: __SerdeContext,
|
|
1456
|
-
headers: __HeaderBag,
|
|
1457
|
-
path: string,
|
|
1458
|
-
resolvedHostname: string | undefined,
|
|
1459
|
-
body: any
|
|
1460
|
-
): Promise<__HttpRequest> => {
|
|
1461
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1462
|
-
const contents: any = {
|
|
1463
|
-
protocol,
|
|
1464
|
-
hostname,
|
|
1465
|
-
port,
|
|
1466
|
-
method: "POST",
|
|
1467
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1468
|
-
headers,
|
|
1469
|
-
};
|
|
1470
|
-
if (resolvedHostname !== undefined) {
|
|
1471
|
-
contents.hostname = resolvedHostname;
|
|
1472
|
-
}
|
|
1473
|
-
if (body !== undefined) {
|
|
1474
|
-
contents.body = body;
|
|
1475
|
-
}
|
|
1476
|
-
return new __HttpRequest(contents);
|
|
1477
|
-
};
|
|
1478
|
-
|
|
1479
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
1480
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
1481
|
-
if (encoded.length) {
|
|
1482
|
-
const parsedObj = xmlParse(encoded, {
|
|
1483
|
-
attributeNamePrefix: "",
|
|
1484
|
-
ignoreAttributes: false,
|
|
1485
|
-
parseNodeValue: false,
|
|
1486
|
-
trimValues: false,
|
|
1487
|
-
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
|
|
1488
|
-
});
|
|
1489
|
-
const textNodeName = "#text";
|
|
1490
|
-
const key = Object.keys(parsedObj)[0];
|
|
1491
|
-
const parsedObjToReturn = parsedObj[key];
|
|
1492
|
-
if (parsedObjToReturn[textNodeName]) {
|
|
1493
|
-
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
|
|
1494
|
-
delete parsedObjToReturn[textNodeName];
|
|
1495
|
-
}
|
|
1496
|
-
return __getValueFromTextNode(parsedObjToReturn);
|
|
1497
|
-
}
|
|
1498
|
-
return {};
|
|
1499
|
-
});
|
|
1500
|
-
|
|
1501
|
-
const buildFormUrlencodedString = (formEntries: { [key: string]: string }): string =>
|
|
1502
|
-
Object.entries(formEntries)
|
|
1503
|
-
.map(([key, value]) => __extendedEncodeURIComponent(key) + "=" + __extendedEncodeURIComponent(value))
|
|
1504
|
-
.join("&");
|
|
1505
|
-
|
|
1506
|
-
const loadQueryErrorCode = (output: __HttpResponse, data: any): string => {
|
|
1507
|
-
if (data.Error.Code !== undefined) {
|
|
1508
|
-
return data.Error.Code;
|
|
1509
|
-
}
|
|
1510
|
-
if (output.statusCode == 404) {
|
|
1511
|
-
return "NotFound";
|
|
1512
|
-
}
|
|
1513
|
-
return "";
|
|
1514
|
-
};
|