@aws-sdk/client-cognito-identity 3.489.0 → 3.495.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/dist-cjs/CognitoIdentity.js +1 -57
- package/dist-cjs/CognitoIdentityClient.js +1 -42
- package/dist-cjs/commands/CreateIdentityPoolCommand.js +1 -30
- package/dist-cjs/commands/DeleteIdentitiesCommand.js +1 -30
- package/dist-cjs/commands/DeleteIdentityPoolCommand.js +1 -30
- package/dist-cjs/commands/DescribeIdentityCommand.js +1 -30
- package/dist-cjs/commands/DescribeIdentityPoolCommand.js +1 -30
- package/dist-cjs/commands/GetCredentialsForIdentityCommand.js +1 -28
- package/dist-cjs/commands/GetIdCommand.js +1 -28
- package/dist-cjs/commands/GetIdentityPoolRolesCommand.js +1 -30
- package/dist-cjs/commands/GetOpenIdTokenCommand.js +1 -28
- package/dist-cjs/commands/GetOpenIdTokenForDeveloperIdentityCommand.js +1 -30
- package/dist-cjs/commands/GetPrincipalTagAttributeMapCommand.js +1 -30
- package/dist-cjs/commands/ListIdentitiesCommand.js +1 -30
- package/dist-cjs/commands/ListIdentityPoolsCommand.js +1 -30
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -30
- package/dist-cjs/commands/LookupDeveloperIdentityCommand.js +1 -30
- package/dist-cjs/commands/MergeDeveloperIdentitiesCommand.js +1 -30
- package/dist-cjs/commands/SetIdentityPoolRolesCommand.js +1 -30
- package/dist-cjs/commands/SetPrincipalTagAttributeMapCommand.js +1 -30
- package/dist-cjs/commands/TagResourceCommand.js +1 -30
- package/dist-cjs/commands/UnlinkDeveloperIdentityCommand.js +1 -30
- package/dist-cjs/commands/UnlinkIdentityCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -30
- package/dist-cjs/commands/UpdateIdentityPoolCommand.js +1 -30
- package/dist-cjs/commands/index.js +1 -26
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2302 -11
- package/dist-cjs/models/CognitoIdentityServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -165
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListIdentityPoolsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -5
- package/dist-cjs/protocols/Aws_json1_1.js +1 -1459
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +41 -41
|
@@ -1,1459 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateIdentityPoolCommand = exports.de_UntagResourceCommand = exports.de_UnlinkIdentityCommand = exports.de_UnlinkDeveloperIdentityCommand = exports.de_TagResourceCommand = exports.de_SetPrincipalTagAttributeMapCommand = exports.de_SetIdentityPoolRolesCommand = exports.de_MergeDeveloperIdentitiesCommand = exports.de_LookupDeveloperIdentityCommand = exports.de_ListTagsForResourceCommand = exports.de_ListIdentityPoolsCommand = exports.de_ListIdentitiesCommand = exports.de_GetPrincipalTagAttributeMapCommand = exports.de_GetOpenIdTokenForDeveloperIdentityCommand = exports.de_GetOpenIdTokenCommand = exports.de_GetIdentityPoolRolesCommand = exports.de_GetIdCommand = exports.de_GetCredentialsForIdentityCommand = exports.de_DescribeIdentityPoolCommand = exports.de_DescribeIdentityCommand = exports.de_DeleteIdentityPoolCommand = exports.de_DeleteIdentitiesCommand = exports.de_CreateIdentityPoolCommand = exports.se_UpdateIdentityPoolCommand = exports.se_UntagResourceCommand = exports.se_UnlinkIdentityCommand = exports.se_UnlinkDeveloperIdentityCommand = exports.se_TagResourceCommand = exports.se_SetPrincipalTagAttributeMapCommand = exports.se_SetIdentityPoolRolesCommand = exports.se_MergeDeveloperIdentitiesCommand = exports.se_LookupDeveloperIdentityCommand = exports.se_ListTagsForResourceCommand = exports.se_ListIdentityPoolsCommand = exports.se_ListIdentitiesCommand = exports.se_GetPrincipalTagAttributeMapCommand = exports.se_GetOpenIdTokenForDeveloperIdentityCommand = exports.se_GetOpenIdTokenCommand = exports.se_GetIdentityPoolRolesCommand = exports.se_GetIdCommand = exports.se_GetCredentialsForIdentityCommand = exports.se_DescribeIdentityPoolCommand = exports.se_DescribeIdentityCommand = exports.se_DeleteIdentityPoolCommand = exports.se_DeleteIdentitiesCommand = exports.se_CreateIdentityPoolCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const CognitoIdentityServiceException_1 = require("../models/CognitoIdentityServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_CreateIdentityPoolCommand = async (input, context) => {
|
|
9
|
-
const headers = sharedHeaders("CreateIdentityPool");
|
|
10
|
-
let body;
|
|
11
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
12
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
-
};
|
|
14
|
-
exports.se_CreateIdentityPoolCommand = se_CreateIdentityPoolCommand;
|
|
15
|
-
const se_DeleteIdentitiesCommand = async (input, context) => {
|
|
16
|
-
const headers = sharedHeaders("DeleteIdentities");
|
|
17
|
-
let body;
|
|
18
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
|
-
};
|
|
21
|
-
exports.se_DeleteIdentitiesCommand = se_DeleteIdentitiesCommand;
|
|
22
|
-
const se_DeleteIdentityPoolCommand = async (input, context) => {
|
|
23
|
-
const headers = sharedHeaders("DeleteIdentityPool");
|
|
24
|
-
let body;
|
|
25
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
|
-
};
|
|
28
|
-
exports.se_DeleteIdentityPoolCommand = se_DeleteIdentityPoolCommand;
|
|
29
|
-
const se_DescribeIdentityCommand = async (input, context) => {
|
|
30
|
-
const headers = sharedHeaders("DescribeIdentity");
|
|
31
|
-
let body;
|
|
32
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
33
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
-
};
|
|
35
|
-
exports.se_DescribeIdentityCommand = se_DescribeIdentityCommand;
|
|
36
|
-
const se_DescribeIdentityPoolCommand = async (input, context) => {
|
|
37
|
-
const headers = sharedHeaders("DescribeIdentityPool");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
40
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
-
};
|
|
42
|
-
exports.se_DescribeIdentityPoolCommand = se_DescribeIdentityPoolCommand;
|
|
43
|
-
const se_GetCredentialsForIdentityCommand = async (input, context) => {
|
|
44
|
-
const headers = sharedHeaders("GetCredentialsForIdentity");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
47
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
-
};
|
|
49
|
-
exports.se_GetCredentialsForIdentityCommand = se_GetCredentialsForIdentityCommand;
|
|
50
|
-
const se_GetIdCommand = async (input, context) => {
|
|
51
|
-
const headers = sharedHeaders("GetId");
|
|
52
|
-
let body;
|
|
53
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
54
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
55
|
-
};
|
|
56
|
-
exports.se_GetIdCommand = se_GetIdCommand;
|
|
57
|
-
const se_GetIdentityPoolRolesCommand = async (input, context) => {
|
|
58
|
-
const headers = sharedHeaders("GetIdentityPoolRoles");
|
|
59
|
-
let body;
|
|
60
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
61
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
62
|
-
};
|
|
63
|
-
exports.se_GetIdentityPoolRolesCommand = se_GetIdentityPoolRolesCommand;
|
|
64
|
-
const se_GetOpenIdTokenCommand = async (input, context) => {
|
|
65
|
-
const headers = sharedHeaders("GetOpenIdToken");
|
|
66
|
-
let body;
|
|
67
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
68
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
69
|
-
};
|
|
70
|
-
exports.se_GetOpenIdTokenCommand = se_GetOpenIdTokenCommand;
|
|
71
|
-
const se_GetOpenIdTokenForDeveloperIdentityCommand = async (input, context) => {
|
|
72
|
-
const headers = sharedHeaders("GetOpenIdTokenForDeveloperIdentity");
|
|
73
|
-
let body;
|
|
74
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
75
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
-
};
|
|
77
|
-
exports.se_GetOpenIdTokenForDeveloperIdentityCommand = se_GetOpenIdTokenForDeveloperIdentityCommand;
|
|
78
|
-
const se_GetPrincipalTagAttributeMapCommand = async (input, context) => {
|
|
79
|
-
const headers = sharedHeaders("GetPrincipalTagAttributeMap");
|
|
80
|
-
let body;
|
|
81
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
82
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
83
|
-
};
|
|
84
|
-
exports.se_GetPrincipalTagAttributeMapCommand = se_GetPrincipalTagAttributeMapCommand;
|
|
85
|
-
const se_ListIdentitiesCommand = async (input, context) => {
|
|
86
|
-
const headers = sharedHeaders("ListIdentities");
|
|
87
|
-
let body;
|
|
88
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
89
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
-
};
|
|
91
|
-
exports.se_ListIdentitiesCommand = se_ListIdentitiesCommand;
|
|
92
|
-
const se_ListIdentityPoolsCommand = async (input, context) => {
|
|
93
|
-
const headers = sharedHeaders("ListIdentityPools");
|
|
94
|
-
let body;
|
|
95
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
96
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
|
-
};
|
|
98
|
-
exports.se_ListIdentityPoolsCommand = se_ListIdentityPoolsCommand;
|
|
99
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
100
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
101
|
-
let body;
|
|
102
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
103
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
104
|
-
};
|
|
105
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
106
|
-
const se_LookupDeveloperIdentityCommand = async (input, context) => {
|
|
107
|
-
const headers = sharedHeaders("LookupDeveloperIdentity");
|
|
108
|
-
let body;
|
|
109
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
110
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
111
|
-
};
|
|
112
|
-
exports.se_LookupDeveloperIdentityCommand = se_LookupDeveloperIdentityCommand;
|
|
113
|
-
const se_MergeDeveloperIdentitiesCommand = async (input, context) => {
|
|
114
|
-
const headers = sharedHeaders("MergeDeveloperIdentities");
|
|
115
|
-
let body;
|
|
116
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
117
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
118
|
-
};
|
|
119
|
-
exports.se_MergeDeveloperIdentitiesCommand = se_MergeDeveloperIdentitiesCommand;
|
|
120
|
-
const se_SetIdentityPoolRolesCommand = async (input, context) => {
|
|
121
|
-
const headers = sharedHeaders("SetIdentityPoolRoles");
|
|
122
|
-
let body;
|
|
123
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
124
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
125
|
-
};
|
|
126
|
-
exports.se_SetIdentityPoolRolesCommand = se_SetIdentityPoolRolesCommand;
|
|
127
|
-
const se_SetPrincipalTagAttributeMapCommand = async (input, context) => {
|
|
128
|
-
const headers = sharedHeaders("SetPrincipalTagAttributeMap");
|
|
129
|
-
let body;
|
|
130
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
131
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
132
|
-
};
|
|
133
|
-
exports.se_SetPrincipalTagAttributeMapCommand = se_SetPrincipalTagAttributeMapCommand;
|
|
134
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
135
|
-
const headers = sharedHeaders("TagResource");
|
|
136
|
-
let body;
|
|
137
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
138
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
139
|
-
};
|
|
140
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
141
|
-
const se_UnlinkDeveloperIdentityCommand = async (input, context) => {
|
|
142
|
-
const headers = sharedHeaders("UnlinkDeveloperIdentity");
|
|
143
|
-
let body;
|
|
144
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
145
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
146
|
-
};
|
|
147
|
-
exports.se_UnlinkDeveloperIdentityCommand = se_UnlinkDeveloperIdentityCommand;
|
|
148
|
-
const se_UnlinkIdentityCommand = async (input, context) => {
|
|
149
|
-
const headers = sharedHeaders("UnlinkIdentity");
|
|
150
|
-
let body;
|
|
151
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
152
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
153
|
-
};
|
|
154
|
-
exports.se_UnlinkIdentityCommand = se_UnlinkIdentityCommand;
|
|
155
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
156
|
-
const headers = sharedHeaders("UntagResource");
|
|
157
|
-
let body;
|
|
158
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
159
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
160
|
-
};
|
|
161
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
162
|
-
const se_UpdateIdentityPoolCommand = async (input, context) => {
|
|
163
|
-
const headers = sharedHeaders("UpdateIdentityPool");
|
|
164
|
-
let body;
|
|
165
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
166
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
167
|
-
};
|
|
168
|
-
exports.se_UpdateIdentityPoolCommand = se_UpdateIdentityPoolCommand;
|
|
169
|
-
const de_CreateIdentityPoolCommand = async (output, context) => {
|
|
170
|
-
if (output.statusCode >= 300) {
|
|
171
|
-
return de_CreateIdentityPoolCommandError(output, context);
|
|
172
|
-
}
|
|
173
|
-
const data = await parseBody(output.body, context);
|
|
174
|
-
let contents = {};
|
|
175
|
-
contents = (0, smithy_client_1._json)(data);
|
|
176
|
-
const response = {
|
|
177
|
-
$metadata: deserializeMetadata(output),
|
|
178
|
-
...contents,
|
|
179
|
-
};
|
|
180
|
-
return response;
|
|
181
|
-
};
|
|
182
|
-
exports.de_CreateIdentityPoolCommand = de_CreateIdentityPoolCommand;
|
|
183
|
-
const de_CreateIdentityPoolCommandError = async (output, context) => {
|
|
184
|
-
const parsedOutput = {
|
|
185
|
-
...output,
|
|
186
|
-
body: await parseErrorBody(output.body, context),
|
|
187
|
-
};
|
|
188
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
189
|
-
switch (errorCode) {
|
|
190
|
-
case "InternalErrorException":
|
|
191
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
192
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
193
|
-
case "InvalidParameterException":
|
|
194
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
195
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
196
|
-
case "LimitExceededException":
|
|
197
|
-
case "com.amazonaws.cognitoidentity#LimitExceededException":
|
|
198
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
199
|
-
case "NotAuthorizedException":
|
|
200
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
201
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
202
|
-
case "ResourceConflictException":
|
|
203
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
204
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
205
|
-
case "TooManyRequestsException":
|
|
206
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
207
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
208
|
-
default:
|
|
209
|
-
const parsedBody = parsedOutput.body;
|
|
210
|
-
return throwDefaultError({
|
|
211
|
-
output,
|
|
212
|
-
parsedBody,
|
|
213
|
-
errorCode,
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
const de_DeleteIdentitiesCommand = async (output, context) => {
|
|
218
|
-
if (output.statusCode >= 300) {
|
|
219
|
-
return de_DeleteIdentitiesCommandError(output, context);
|
|
220
|
-
}
|
|
221
|
-
const data = await parseBody(output.body, context);
|
|
222
|
-
let contents = {};
|
|
223
|
-
contents = (0, smithy_client_1._json)(data);
|
|
224
|
-
const response = {
|
|
225
|
-
$metadata: deserializeMetadata(output),
|
|
226
|
-
...contents,
|
|
227
|
-
};
|
|
228
|
-
return response;
|
|
229
|
-
};
|
|
230
|
-
exports.de_DeleteIdentitiesCommand = de_DeleteIdentitiesCommand;
|
|
231
|
-
const de_DeleteIdentitiesCommandError = async (output, context) => {
|
|
232
|
-
const parsedOutput = {
|
|
233
|
-
...output,
|
|
234
|
-
body: await parseErrorBody(output.body, context),
|
|
235
|
-
};
|
|
236
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
237
|
-
switch (errorCode) {
|
|
238
|
-
case "InternalErrorException":
|
|
239
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
240
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
241
|
-
case "InvalidParameterException":
|
|
242
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
243
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
244
|
-
case "TooManyRequestsException":
|
|
245
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
246
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
247
|
-
default:
|
|
248
|
-
const parsedBody = parsedOutput.body;
|
|
249
|
-
return throwDefaultError({
|
|
250
|
-
output,
|
|
251
|
-
parsedBody,
|
|
252
|
-
errorCode,
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
const de_DeleteIdentityPoolCommand = async (output, context) => {
|
|
257
|
-
if (output.statusCode >= 300) {
|
|
258
|
-
return de_DeleteIdentityPoolCommandError(output, context);
|
|
259
|
-
}
|
|
260
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
261
|
-
const response = {
|
|
262
|
-
$metadata: deserializeMetadata(output),
|
|
263
|
-
};
|
|
264
|
-
return response;
|
|
265
|
-
};
|
|
266
|
-
exports.de_DeleteIdentityPoolCommand = de_DeleteIdentityPoolCommand;
|
|
267
|
-
const de_DeleteIdentityPoolCommandError = async (output, context) => {
|
|
268
|
-
const parsedOutput = {
|
|
269
|
-
...output,
|
|
270
|
-
body: await parseErrorBody(output.body, context),
|
|
271
|
-
};
|
|
272
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
273
|
-
switch (errorCode) {
|
|
274
|
-
case "InternalErrorException":
|
|
275
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
276
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
277
|
-
case "InvalidParameterException":
|
|
278
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
279
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
280
|
-
case "NotAuthorizedException":
|
|
281
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
282
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
283
|
-
case "ResourceNotFoundException":
|
|
284
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
285
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
286
|
-
case "TooManyRequestsException":
|
|
287
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
288
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
289
|
-
default:
|
|
290
|
-
const parsedBody = parsedOutput.body;
|
|
291
|
-
return throwDefaultError({
|
|
292
|
-
output,
|
|
293
|
-
parsedBody,
|
|
294
|
-
errorCode,
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
const de_DescribeIdentityCommand = async (output, context) => {
|
|
299
|
-
if (output.statusCode >= 300) {
|
|
300
|
-
return de_DescribeIdentityCommandError(output, context);
|
|
301
|
-
}
|
|
302
|
-
const data = await parseBody(output.body, context);
|
|
303
|
-
let contents = {};
|
|
304
|
-
contents = de_IdentityDescription(data, context);
|
|
305
|
-
const response = {
|
|
306
|
-
$metadata: deserializeMetadata(output),
|
|
307
|
-
...contents,
|
|
308
|
-
};
|
|
309
|
-
return response;
|
|
310
|
-
};
|
|
311
|
-
exports.de_DescribeIdentityCommand = de_DescribeIdentityCommand;
|
|
312
|
-
const de_DescribeIdentityCommandError = async (output, context) => {
|
|
313
|
-
const parsedOutput = {
|
|
314
|
-
...output,
|
|
315
|
-
body: await parseErrorBody(output.body, context),
|
|
316
|
-
};
|
|
317
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
318
|
-
switch (errorCode) {
|
|
319
|
-
case "InternalErrorException":
|
|
320
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
321
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
322
|
-
case "InvalidParameterException":
|
|
323
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
324
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
325
|
-
case "NotAuthorizedException":
|
|
326
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
327
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
328
|
-
case "ResourceNotFoundException":
|
|
329
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
330
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
331
|
-
case "TooManyRequestsException":
|
|
332
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
333
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
334
|
-
default:
|
|
335
|
-
const parsedBody = parsedOutput.body;
|
|
336
|
-
return throwDefaultError({
|
|
337
|
-
output,
|
|
338
|
-
parsedBody,
|
|
339
|
-
errorCode,
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
};
|
|
343
|
-
const de_DescribeIdentityPoolCommand = async (output, context) => {
|
|
344
|
-
if (output.statusCode >= 300) {
|
|
345
|
-
return de_DescribeIdentityPoolCommandError(output, context);
|
|
346
|
-
}
|
|
347
|
-
const data = await parseBody(output.body, context);
|
|
348
|
-
let contents = {};
|
|
349
|
-
contents = (0, smithy_client_1._json)(data);
|
|
350
|
-
const response = {
|
|
351
|
-
$metadata: deserializeMetadata(output),
|
|
352
|
-
...contents,
|
|
353
|
-
};
|
|
354
|
-
return response;
|
|
355
|
-
};
|
|
356
|
-
exports.de_DescribeIdentityPoolCommand = de_DescribeIdentityPoolCommand;
|
|
357
|
-
const de_DescribeIdentityPoolCommandError = async (output, context) => {
|
|
358
|
-
const parsedOutput = {
|
|
359
|
-
...output,
|
|
360
|
-
body: await parseErrorBody(output.body, context),
|
|
361
|
-
};
|
|
362
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
363
|
-
switch (errorCode) {
|
|
364
|
-
case "InternalErrorException":
|
|
365
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
366
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
367
|
-
case "InvalidParameterException":
|
|
368
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
369
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
370
|
-
case "NotAuthorizedException":
|
|
371
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
372
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
373
|
-
case "ResourceNotFoundException":
|
|
374
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
375
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
376
|
-
case "TooManyRequestsException":
|
|
377
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
378
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
379
|
-
default:
|
|
380
|
-
const parsedBody = parsedOutput.body;
|
|
381
|
-
return throwDefaultError({
|
|
382
|
-
output,
|
|
383
|
-
parsedBody,
|
|
384
|
-
errorCode,
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
const de_GetCredentialsForIdentityCommand = async (output, context) => {
|
|
389
|
-
if (output.statusCode >= 300) {
|
|
390
|
-
return de_GetCredentialsForIdentityCommandError(output, context);
|
|
391
|
-
}
|
|
392
|
-
const data = await parseBody(output.body, context);
|
|
393
|
-
let contents = {};
|
|
394
|
-
contents = de_GetCredentialsForIdentityResponse(data, context);
|
|
395
|
-
const response = {
|
|
396
|
-
$metadata: deserializeMetadata(output),
|
|
397
|
-
...contents,
|
|
398
|
-
};
|
|
399
|
-
return response;
|
|
400
|
-
};
|
|
401
|
-
exports.de_GetCredentialsForIdentityCommand = de_GetCredentialsForIdentityCommand;
|
|
402
|
-
const de_GetCredentialsForIdentityCommandError = async (output, context) => {
|
|
403
|
-
const parsedOutput = {
|
|
404
|
-
...output,
|
|
405
|
-
body: await parseErrorBody(output.body, context),
|
|
406
|
-
};
|
|
407
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
408
|
-
switch (errorCode) {
|
|
409
|
-
case "ExternalServiceException":
|
|
410
|
-
case "com.amazonaws.cognitoidentity#ExternalServiceException":
|
|
411
|
-
throw await de_ExternalServiceExceptionRes(parsedOutput, context);
|
|
412
|
-
case "InternalErrorException":
|
|
413
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
414
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
415
|
-
case "InvalidIdentityPoolConfigurationException":
|
|
416
|
-
case "com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":
|
|
417
|
-
throw await de_InvalidIdentityPoolConfigurationExceptionRes(parsedOutput, context);
|
|
418
|
-
case "InvalidParameterException":
|
|
419
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
420
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
421
|
-
case "NotAuthorizedException":
|
|
422
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
423
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
424
|
-
case "ResourceConflictException":
|
|
425
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
426
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
427
|
-
case "ResourceNotFoundException":
|
|
428
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
429
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
430
|
-
case "TooManyRequestsException":
|
|
431
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
432
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
433
|
-
default:
|
|
434
|
-
const parsedBody = parsedOutput.body;
|
|
435
|
-
return throwDefaultError({
|
|
436
|
-
output,
|
|
437
|
-
parsedBody,
|
|
438
|
-
errorCode,
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
const de_GetIdCommand = async (output, context) => {
|
|
443
|
-
if (output.statusCode >= 300) {
|
|
444
|
-
return de_GetIdCommandError(output, context);
|
|
445
|
-
}
|
|
446
|
-
const data = await parseBody(output.body, context);
|
|
447
|
-
let contents = {};
|
|
448
|
-
contents = (0, smithy_client_1._json)(data);
|
|
449
|
-
const response = {
|
|
450
|
-
$metadata: deserializeMetadata(output),
|
|
451
|
-
...contents,
|
|
452
|
-
};
|
|
453
|
-
return response;
|
|
454
|
-
};
|
|
455
|
-
exports.de_GetIdCommand = de_GetIdCommand;
|
|
456
|
-
const de_GetIdCommandError = async (output, context) => {
|
|
457
|
-
const parsedOutput = {
|
|
458
|
-
...output,
|
|
459
|
-
body: await parseErrorBody(output.body, context),
|
|
460
|
-
};
|
|
461
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
462
|
-
switch (errorCode) {
|
|
463
|
-
case "ExternalServiceException":
|
|
464
|
-
case "com.amazonaws.cognitoidentity#ExternalServiceException":
|
|
465
|
-
throw await de_ExternalServiceExceptionRes(parsedOutput, context);
|
|
466
|
-
case "InternalErrorException":
|
|
467
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
468
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
469
|
-
case "InvalidParameterException":
|
|
470
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
471
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
472
|
-
case "LimitExceededException":
|
|
473
|
-
case "com.amazonaws.cognitoidentity#LimitExceededException":
|
|
474
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
475
|
-
case "NotAuthorizedException":
|
|
476
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
477
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
478
|
-
case "ResourceConflictException":
|
|
479
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
480
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
481
|
-
case "ResourceNotFoundException":
|
|
482
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
483
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
484
|
-
case "TooManyRequestsException":
|
|
485
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
486
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
487
|
-
default:
|
|
488
|
-
const parsedBody = parsedOutput.body;
|
|
489
|
-
return throwDefaultError({
|
|
490
|
-
output,
|
|
491
|
-
parsedBody,
|
|
492
|
-
errorCode,
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
const de_GetIdentityPoolRolesCommand = async (output, context) => {
|
|
497
|
-
if (output.statusCode >= 300) {
|
|
498
|
-
return de_GetIdentityPoolRolesCommandError(output, context);
|
|
499
|
-
}
|
|
500
|
-
const data = await parseBody(output.body, context);
|
|
501
|
-
let contents = {};
|
|
502
|
-
contents = (0, smithy_client_1._json)(data);
|
|
503
|
-
const response = {
|
|
504
|
-
$metadata: deserializeMetadata(output),
|
|
505
|
-
...contents,
|
|
506
|
-
};
|
|
507
|
-
return response;
|
|
508
|
-
};
|
|
509
|
-
exports.de_GetIdentityPoolRolesCommand = de_GetIdentityPoolRolesCommand;
|
|
510
|
-
const de_GetIdentityPoolRolesCommandError = async (output, context) => {
|
|
511
|
-
const parsedOutput = {
|
|
512
|
-
...output,
|
|
513
|
-
body: await parseErrorBody(output.body, context),
|
|
514
|
-
};
|
|
515
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
516
|
-
switch (errorCode) {
|
|
517
|
-
case "InternalErrorException":
|
|
518
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
519
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
520
|
-
case "InvalidParameterException":
|
|
521
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
522
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
523
|
-
case "NotAuthorizedException":
|
|
524
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
525
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
526
|
-
case "ResourceConflictException":
|
|
527
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
528
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
529
|
-
case "ResourceNotFoundException":
|
|
530
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
531
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
532
|
-
case "TooManyRequestsException":
|
|
533
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
534
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
535
|
-
default:
|
|
536
|
-
const parsedBody = parsedOutput.body;
|
|
537
|
-
return throwDefaultError({
|
|
538
|
-
output,
|
|
539
|
-
parsedBody,
|
|
540
|
-
errorCode,
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
};
|
|
544
|
-
const de_GetOpenIdTokenCommand = async (output, context) => {
|
|
545
|
-
if (output.statusCode >= 300) {
|
|
546
|
-
return de_GetOpenIdTokenCommandError(output, context);
|
|
547
|
-
}
|
|
548
|
-
const data = await parseBody(output.body, context);
|
|
549
|
-
let contents = {};
|
|
550
|
-
contents = (0, smithy_client_1._json)(data);
|
|
551
|
-
const response = {
|
|
552
|
-
$metadata: deserializeMetadata(output),
|
|
553
|
-
...contents,
|
|
554
|
-
};
|
|
555
|
-
return response;
|
|
556
|
-
};
|
|
557
|
-
exports.de_GetOpenIdTokenCommand = de_GetOpenIdTokenCommand;
|
|
558
|
-
const de_GetOpenIdTokenCommandError = async (output, context) => {
|
|
559
|
-
const parsedOutput = {
|
|
560
|
-
...output,
|
|
561
|
-
body: await parseErrorBody(output.body, context),
|
|
562
|
-
};
|
|
563
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
564
|
-
switch (errorCode) {
|
|
565
|
-
case "ExternalServiceException":
|
|
566
|
-
case "com.amazonaws.cognitoidentity#ExternalServiceException":
|
|
567
|
-
throw await de_ExternalServiceExceptionRes(parsedOutput, context);
|
|
568
|
-
case "InternalErrorException":
|
|
569
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
570
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
571
|
-
case "InvalidParameterException":
|
|
572
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
573
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
574
|
-
case "NotAuthorizedException":
|
|
575
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
576
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
577
|
-
case "ResourceConflictException":
|
|
578
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
579
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
580
|
-
case "ResourceNotFoundException":
|
|
581
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
582
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
583
|
-
case "TooManyRequestsException":
|
|
584
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
585
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
586
|
-
default:
|
|
587
|
-
const parsedBody = parsedOutput.body;
|
|
588
|
-
return throwDefaultError({
|
|
589
|
-
output,
|
|
590
|
-
parsedBody,
|
|
591
|
-
errorCode,
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
};
|
|
595
|
-
const de_GetOpenIdTokenForDeveloperIdentityCommand = async (output, context) => {
|
|
596
|
-
if (output.statusCode >= 300) {
|
|
597
|
-
return de_GetOpenIdTokenForDeveloperIdentityCommandError(output, context);
|
|
598
|
-
}
|
|
599
|
-
const data = await parseBody(output.body, context);
|
|
600
|
-
let contents = {};
|
|
601
|
-
contents = (0, smithy_client_1._json)(data);
|
|
602
|
-
const response = {
|
|
603
|
-
$metadata: deserializeMetadata(output),
|
|
604
|
-
...contents,
|
|
605
|
-
};
|
|
606
|
-
return response;
|
|
607
|
-
};
|
|
608
|
-
exports.de_GetOpenIdTokenForDeveloperIdentityCommand = de_GetOpenIdTokenForDeveloperIdentityCommand;
|
|
609
|
-
const de_GetOpenIdTokenForDeveloperIdentityCommandError = async (output, context) => {
|
|
610
|
-
const parsedOutput = {
|
|
611
|
-
...output,
|
|
612
|
-
body: await parseErrorBody(output.body, context),
|
|
613
|
-
};
|
|
614
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
|
-
switch (errorCode) {
|
|
616
|
-
case "DeveloperUserAlreadyRegisteredException":
|
|
617
|
-
case "com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":
|
|
618
|
-
throw await de_DeveloperUserAlreadyRegisteredExceptionRes(parsedOutput, context);
|
|
619
|
-
case "InternalErrorException":
|
|
620
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
621
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
622
|
-
case "InvalidParameterException":
|
|
623
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
624
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
625
|
-
case "NotAuthorizedException":
|
|
626
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
627
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
628
|
-
case "ResourceConflictException":
|
|
629
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
630
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
631
|
-
case "ResourceNotFoundException":
|
|
632
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
633
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
634
|
-
case "TooManyRequestsException":
|
|
635
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
636
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
637
|
-
default:
|
|
638
|
-
const parsedBody = parsedOutput.body;
|
|
639
|
-
return throwDefaultError({
|
|
640
|
-
output,
|
|
641
|
-
parsedBody,
|
|
642
|
-
errorCode,
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
const de_GetPrincipalTagAttributeMapCommand = async (output, context) => {
|
|
647
|
-
if (output.statusCode >= 300) {
|
|
648
|
-
return de_GetPrincipalTagAttributeMapCommandError(output, context);
|
|
649
|
-
}
|
|
650
|
-
const data = await parseBody(output.body, context);
|
|
651
|
-
let contents = {};
|
|
652
|
-
contents = (0, smithy_client_1._json)(data);
|
|
653
|
-
const response = {
|
|
654
|
-
$metadata: deserializeMetadata(output),
|
|
655
|
-
...contents,
|
|
656
|
-
};
|
|
657
|
-
return response;
|
|
658
|
-
};
|
|
659
|
-
exports.de_GetPrincipalTagAttributeMapCommand = de_GetPrincipalTagAttributeMapCommand;
|
|
660
|
-
const de_GetPrincipalTagAttributeMapCommandError = async (output, context) => {
|
|
661
|
-
const parsedOutput = {
|
|
662
|
-
...output,
|
|
663
|
-
body: await parseErrorBody(output.body, context),
|
|
664
|
-
};
|
|
665
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
666
|
-
switch (errorCode) {
|
|
667
|
-
case "InternalErrorException":
|
|
668
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
669
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
670
|
-
case "InvalidParameterException":
|
|
671
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
672
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
673
|
-
case "NotAuthorizedException":
|
|
674
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
675
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
676
|
-
case "ResourceNotFoundException":
|
|
677
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
678
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
679
|
-
case "TooManyRequestsException":
|
|
680
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
681
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
682
|
-
default:
|
|
683
|
-
const parsedBody = parsedOutput.body;
|
|
684
|
-
return throwDefaultError({
|
|
685
|
-
output,
|
|
686
|
-
parsedBody,
|
|
687
|
-
errorCode,
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
};
|
|
691
|
-
const de_ListIdentitiesCommand = async (output, context) => {
|
|
692
|
-
if (output.statusCode >= 300) {
|
|
693
|
-
return de_ListIdentitiesCommandError(output, context);
|
|
694
|
-
}
|
|
695
|
-
const data = await parseBody(output.body, context);
|
|
696
|
-
let contents = {};
|
|
697
|
-
contents = de_ListIdentitiesResponse(data, context);
|
|
698
|
-
const response = {
|
|
699
|
-
$metadata: deserializeMetadata(output),
|
|
700
|
-
...contents,
|
|
701
|
-
};
|
|
702
|
-
return response;
|
|
703
|
-
};
|
|
704
|
-
exports.de_ListIdentitiesCommand = de_ListIdentitiesCommand;
|
|
705
|
-
const de_ListIdentitiesCommandError = async (output, context) => {
|
|
706
|
-
const parsedOutput = {
|
|
707
|
-
...output,
|
|
708
|
-
body: await parseErrorBody(output.body, context),
|
|
709
|
-
};
|
|
710
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
711
|
-
switch (errorCode) {
|
|
712
|
-
case "InternalErrorException":
|
|
713
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
714
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
715
|
-
case "InvalidParameterException":
|
|
716
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
717
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
718
|
-
case "NotAuthorizedException":
|
|
719
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
720
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
721
|
-
case "ResourceNotFoundException":
|
|
722
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
723
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
724
|
-
case "TooManyRequestsException":
|
|
725
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
726
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
727
|
-
default:
|
|
728
|
-
const parsedBody = parsedOutput.body;
|
|
729
|
-
return throwDefaultError({
|
|
730
|
-
output,
|
|
731
|
-
parsedBody,
|
|
732
|
-
errorCode,
|
|
733
|
-
});
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
const de_ListIdentityPoolsCommand = async (output, context) => {
|
|
737
|
-
if (output.statusCode >= 300) {
|
|
738
|
-
return de_ListIdentityPoolsCommandError(output, context);
|
|
739
|
-
}
|
|
740
|
-
const data = await parseBody(output.body, context);
|
|
741
|
-
let contents = {};
|
|
742
|
-
contents = (0, smithy_client_1._json)(data);
|
|
743
|
-
const response = {
|
|
744
|
-
$metadata: deserializeMetadata(output),
|
|
745
|
-
...contents,
|
|
746
|
-
};
|
|
747
|
-
return response;
|
|
748
|
-
};
|
|
749
|
-
exports.de_ListIdentityPoolsCommand = de_ListIdentityPoolsCommand;
|
|
750
|
-
const de_ListIdentityPoolsCommandError = async (output, context) => {
|
|
751
|
-
const parsedOutput = {
|
|
752
|
-
...output,
|
|
753
|
-
body: await parseErrorBody(output.body, context),
|
|
754
|
-
};
|
|
755
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
756
|
-
switch (errorCode) {
|
|
757
|
-
case "InternalErrorException":
|
|
758
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
759
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
760
|
-
case "InvalidParameterException":
|
|
761
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
762
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
763
|
-
case "NotAuthorizedException":
|
|
764
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
765
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
766
|
-
case "ResourceNotFoundException":
|
|
767
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
768
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
769
|
-
case "TooManyRequestsException":
|
|
770
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
771
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
772
|
-
default:
|
|
773
|
-
const parsedBody = parsedOutput.body;
|
|
774
|
-
return throwDefaultError({
|
|
775
|
-
output,
|
|
776
|
-
parsedBody,
|
|
777
|
-
errorCode,
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
};
|
|
781
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
782
|
-
if (output.statusCode >= 300) {
|
|
783
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
784
|
-
}
|
|
785
|
-
const data = await parseBody(output.body, context);
|
|
786
|
-
let contents = {};
|
|
787
|
-
contents = (0, smithy_client_1._json)(data);
|
|
788
|
-
const response = {
|
|
789
|
-
$metadata: deserializeMetadata(output),
|
|
790
|
-
...contents,
|
|
791
|
-
};
|
|
792
|
-
return response;
|
|
793
|
-
};
|
|
794
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
795
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
796
|
-
const parsedOutput = {
|
|
797
|
-
...output,
|
|
798
|
-
body: await parseErrorBody(output.body, context),
|
|
799
|
-
};
|
|
800
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
801
|
-
switch (errorCode) {
|
|
802
|
-
case "InternalErrorException":
|
|
803
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
804
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
805
|
-
case "InvalidParameterException":
|
|
806
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
807
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
808
|
-
case "NotAuthorizedException":
|
|
809
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
810
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
811
|
-
case "ResourceNotFoundException":
|
|
812
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
813
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
814
|
-
case "TooManyRequestsException":
|
|
815
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
816
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
817
|
-
default:
|
|
818
|
-
const parsedBody = parsedOutput.body;
|
|
819
|
-
return throwDefaultError({
|
|
820
|
-
output,
|
|
821
|
-
parsedBody,
|
|
822
|
-
errorCode,
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
const de_LookupDeveloperIdentityCommand = async (output, context) => {
|
|
827
|
-
if (output.statusCode >= 300) {
|
|
828
|
-
return de_LookupDeveloperIdentityCommandError(output, context);
|
|
829
|
-
}
|
|
830
|
-
const data = await parseBody(output.body, context);
|
|
831
|
-
let contents = {};
|
|
832
|
-
contents = (0, smithy_client_1._json)(data);
|
|
833
|
-
const response = {
|
|
834
|
-
$metadata: deserializeMetadata(output),
|
|
835
|
-
...contents,
|
|
836
|
-
};
|
|
837
|
-
return response;
|
|
838
|
-
};
|
|
839
|
-
exports.de_LookupDeveloperIdentityCommand = de_LookupDeveloperIdentityCommand;
|
|
840
|
-
const de_LookupDeveloperIdentityCommandError = async (output, context) => {
|
|
841
|
-
const parsedOutput = {
|
|
842
|
-
...output,
|
|
843
|
-
body: await parseErrorBody(output.body, context),
|
|
844
|
-
};
|
|
845
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
846
|
-
switch (errorCode) {
|
|
847
|
-
case "InternalErrorException":
|
|
848
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
849
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
850
|
-
case "InvalidParameterException":
|
|
851
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
852
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
853
|
-
case "NotAuthorizedException":
|
|
854
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
855
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
856
|
-
case "ResourceConflictException":
|
|
857
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
858
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
859
|
-
case "ResourceNotFoundException":
|
|
860
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
861
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
862
|
-
case "TooManyRequestsException":
|
|
863
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
864
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
865
|
-
default:
|
|
866
|
-
const parsedBody = parsedOutput.body;
|
|
867
|
-
return throwDefaultError({
|
|
868
|
-
output,
|
|
869
|
-
parsedBody,
|
|
870
|
-
errorCode,
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
const de_MergeDeveloperIdentitiesCommand = async (output, context) => {
|
|
875
|
-
if (output.statusCode >= 300) {
|
|
876
|
-
return de_MergeDeveloperIdentitiesCommandError(output, context);
|
|
877
|
-
}
|
|
878
|
-
const data = await parseBody(output.body, context);
|
|
879
|
-
let contents = {};
|
|
880
|
-
contents = (0, smithy_client_1._json)(data);
|
|
881
|
-
const response = {
|
|
882
|
-
$metadata: deserializeMetadata(output),
|
|
883
|
-
...contents,
|
|
884
|
-
};
|
|
885
|
-
return response;
|
|
886
|
-
};
|
|
887
|
-
exports.de_MergeDeveloperIdentitiesCommand = de_MergeDeveloperIdentitiesCommand;
|
|
888
|
-
const de_MergeDeveloperIdentitiesCommandError = async (output, context) => {
|
|
889
|
-
const parsedOutput = {
|
|
890
|
-
...output,
|
|
891
|
-
body: await parseErrorBody(output.body, context),
|
|
892
|
-
};
|
|
893
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
894
|
-
switch (errorCode) {
|
|
895
|
-
case "InternalErrorException":
|
|
896
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
897
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
898
|
-
case "InvalidParameterException":
|
|
899
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
900
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
901
|
-
case "NotAuthorizedException":
|
|
902
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
903
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
904
|
-
case "ResourceConflictException":
|
|
905
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
906
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
907
|
-
case "ResourceNotFoundException":
|
|
908
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
909
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
910
|
-
case "TooManyRequestsException":
|
|
911
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
912
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
913
|
-
default:
|
|
914
|
-
const parsedBody = parsedOutput.body;
|
|
915
|
-
return throwDefaultError({
|
|
916
|
-
output,
|
|
917
|
-
parsedBody,
|
|
918
|
-
errorCode,
|
|
919
|
-
});
|
|
920
|
-
}
|
|
921
|
-
};
|
|
922
|
-
const de_SetIdentityPoolRolesCommand = async (output, context) => {
|
|
923
|
-
if (output.statusCode >= 300) {
|
|
924
|
-
return de_SetIdentityPoolRolesCommandError(output, context);
|
|
925
|
-
}
|
|
926
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
927
|
-
const response = {
|
|
928
|
-
$metadata: deserializeMetadata(output),
|
|
929
|
-
};
|
|
930
|
-
return response;
|
|
931
|
-
};
|
|
932
|
-
exports.de_SetIdentityPoolRolesCommand = de_SetIdentityPoolRolesCommand;
|
|
933
|
-
const de_SetIdentityPoolRolesCommandError = async (output, context) => {
|
|
934
|
-
const parsedOutput = {
|
|
935
|
-
...output,
|
|
936
|
-
body: await parseErrorBody(output.body, context),
|
|
937
|
-
};
|
|
938
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
939
|
-
switch (errorCode) {
|
|
940
|
-
case "ConcurrentModificationException":
|
|
941
|
-
case "com.amazonaws.cognitoidentity#ConcurrentModificationException":
|
|
942
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
943
|
-
case "InternalErrorException":
|
|
944
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
945
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
946
|
-
case "InvalidParameterException":
|
|
947
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
948
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
949
|
-
case "NotAuthorizedException":
|
|
950
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
951
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
952
|
-
case "ResourceConflictException":
|
|
953
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
954
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
955
|
-
case "ResourceNotFoundException":
|
|
956
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
957
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
958
|
-
case "TooManyRequestsException":
|
|
959
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
960
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
961
|
-
default:
|
|
962
|
-
const parsedBody = parsedOutput.body;
|
|
963
|
-
return throwDefaultError({
|
|
964
|
-
output,
|
|
965
|
-
parsedBody,
|
|
966
|
-
errorCode,
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
const de_SetPrincipalTagAttributeMapCommand = async (output, context) => {
|
|
971
|
-
if (output.statusCode >= 300) {
|
|
972
|
-
return de_SetPrincipalTagAttributeMapCommandError(output, context);
|
|
973
|
-
}
|
|
974
|
-
const data = await parseBody(output.body, context);
|
|
975
|
-
let contents = {};
|
|
976
|
-
contents = (0, smithy_client_1._json)(data);
|
|
977
|
-
const response = {
|
|
978
|
-
$metadata: deserializeMetadata(output),
|
|
979
|
-
...contents,
|
|
980
|
-
};
|
|
981
|
-
return response;
|
|
982
|
-
};
|
|
983
|
-
exports.de_SetPrincipalTagAttributeMapCommand = de_SetPrincipalTagAttributeMapCommand;
|
|
984
|
-
const de_SetPrincipalTagAttributeMapCommandError = async (output, context) => {
|
|
985
|
-
const parsedOutput = {
|
|
986
|
-
...output,
|
|
987
|
-
body: await parseErrorBody(output.body, context),
|
|
988
|
-
};
|
|
989
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
990
|
-
switch (errorCode) {
|
|
991
|
-
case "InternalErrorException":
|
|
992
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
993
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
994
|
-
case "InvalidParameterException":
|
|
995
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
996
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
997
|
-
case "NotAuthorizedException":
|
|
998
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
999
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
1000
|
-
case "ResourceNotFoundException":
|
|
1001
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
1002
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1003
|
-
case "TooManyRequestsException":
|
|
1004
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
1005
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1006
|
-
default:
|
|
1007
|
-
const parsedBody = parsedOutput.body;
|
|
1008
|
-
return throwDefaultError({
|
|
1009
|
-
output,
|
|
1010
|
-
parsedBody,
|
|
1011
|
-
errorCode,
|
|
1012
|
-
});
|
|
1013
|
-
}
|
|
1014
|
-
};
|
|
1015
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1016
|
-
if (output.statusCode >= 300) {
|
|
1017
|
-
return de_TagResourceCommandError(output, context);
|
|
1018
|
-
}
|
|
1019
|
-
const data = await parseBody(output.body, context);
|
|
1020
|
-
let contents = {};
|
|
1021
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1022
|
-
const response = {
|
|
1023
|
-
$metadata: deserializeMetadata(output),
|
|
1024
|
-
...contents,
|
|
1025
|
-
};
|
|
1026
|
-
return response;
|
|
1027
|
-
};
|
|
1028
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1029
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1030
|
-
const parsedOutput = {
|
|
1031
|
-
...output,
|
|
1032
|
-
body: await parseErrorBody(output.body, context),
|
|
1033
|
-
};
|
|
1034
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1035
|
-
switch (errorCode) {
|
|
1036
|
-
case "InternalErrorException":
|
|
1037
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
1038
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1039
|
-
case "InvalidParameterException":
|
|
1040
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
1041
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1042
|
-
case "NotAuthorizedException":
|
|
1043
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
1044
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
1045
|
-
case "ResourceNotFoundException":
|
|
1046
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
1047
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1048
|
-
case "TooManyRequestsException":
|
|
1049
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
1050
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1051
|
-
default:
|
|
1052
|
-
const parsedBody = parsedOutput.body;
|
|
1053
|
-
return throwDefaultError({
|
|
1054
|
-
output,
|
|
1055
|
-
parsedBody,
|
|
1056
|
-
errorCode,
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
};
|
|
1060
|
-
const de_UnlinkDeveloperIdentityCommand = async (output, context) => {
|
|
1061
|
-
if (output.statusCode >= 300) {
|
|
1062
|
-
return de_UnlinkDeveloperIdentityCommandError(output, context);
|
|
1063
|
-
}
|
|
1064
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1065
|
-
const response = {
|
|
1066
|
-
$metadata: deserializeMetadata(output),
|
|
1067
|
-
};
|
|
1068
|
-
return response;
|
|
1069
|
-
};
|
|
1070
|
-
exports.de_UnlinkDeveloperIdentityCommand = de_UnlinkDeveloperIdentityCommand;
|
|
1071
|
-
const de_UnlinkDeveloperIdentityCommandError = async (output, context) => {
|
|
1072
|
-
const parsedOutput = {
|
|
1073
|
-
...output,
|
|
1074
|
-
body: await parseErrorBody(output.body, context),
|
|
1075
|
-
};
|
|
1076
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1077
|
-
switch (errorCode) {
|
|
1078
|
-
case "InternalErrorException":
|
|
1079
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
1080
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1081
|
-
case "InvalidParameterException":
|
|
1082
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
1083
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1084
|
-
case "NotAuthorizedException":
|
|
1085
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
1086
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
1087
|
-
case "ResourceConflictException":
|
|
1088
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
1089
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
1090
|
-
case "ResourceNotFoundException":
|
|
1091
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
1092
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1093
|
-
case "TooManyRequestsException":
|
|
1094
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
1095
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1096
|
-
default:
|
|
1097
|
-
const parsedBody = parsedOutput.body;
|
|
1098
|
-
return throwDefaultError({
|
|
1099
|
-
output,
|
|
1100
|
-
parsedBody,
|
|
1101
|
-
errorCode,
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
};
|
|
1105
|
-
const de_UnlinkIdentityCommand = async (output, context) => {
|
|
1106
|
-
if (output.statusCode >= 300) {
|
|
1107
|
-
return de_UnlinkIdentityCommandError(output, context);
|
|
1108
|
-
}
|
|
1109
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1110
|
-
const response = {
|
|
1111
|
-
$metadata: deserializeMetadata(output),
|
|
1112
|
-
};
|
|
1113
|
-
return response;
|
|
1114
|
-
};
|
|
1115
|
-
exports.de_UnlinkIdentityCommand = de_UnlinkIdentityCommand;
|
|
1116
|
-
const de_UnlinkIdentityCommandError = async (output, context) => {
|
|
1117
|
-
const parsedOutput = {
|
|
1118
|
-
...output,
|
|
1119
|
-
body: await parseErrorBody(output.body, context),
|
|
1120
|
-
};
|
|
1121
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1122
|
-
switch (errorCode) {
|
|
1123
|
-
case "ExternalServiceException":
|
|
1124
|
-
case "com.amazonaws.cognitoidentity#ExternalServiceException":
|
|
1125
|
-
throw await de_ExternalServiceExceptionRes(parsedOutput, context);
|
|
1126
|
-
case "InternalErrorException":
|
|
1127
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
1128
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1129
|
-
case "InvalidParameterException":
|
|
1130
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
1131
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1132
|
-
case "NotAuthorizedException":
|
|
1133
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
1134
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
1135
|
-
case "ResourceConflictException":
|
|
1136
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
1137
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
1138
|
-
case "ResourceNotFoundException":
|
|
1139
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
1140
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1141
|
-
case "TooManyRequestsException":
|
|
1142
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
1143
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1144
|
-
default:
|
|
1145
|
-
const parsedBody = parsedOutput.body;
|
|
1146
|
-
return throwDefaultError({
|
|
1147
|
-
output,
|
|
1148
|
-
parsedBody,
|
|
1149
|
-
errorCode,
|
|
1150
|
-
});
|
|
1151
|
-
}
|
|
1152
|
-
};
|
|
1153
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1154
|
-
if (output.statusCode >= 300) {
|
|
1155
|
-
return de_UntagResourceCommandError(output, context);
|
|
1156
|
-
}
|
|
1157
|
-
const data = await parseBody(output.body, context);
|
|
1158
|
-
let contents = {};
|
|
1159
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1160
|
-
const response = {
|
|
1161
|
-
$metadata: deserializeMetadata(output),
|
|
1162
|
-
...contents,
|
|
1163
|
-
};
|
|
1164
|
-
return response;
|
|
1165
|
-
};
|
|
1166
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1167
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1168
|
-
const parsedOutput = {
|
|
1169
|
-
...output,
|
|
1170
|
-
body: await parseErrorBody(output.body, context),
|
|
1171
|
-
};
|
|
1172
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1173
|
-
switch (errorCode) {
|
|
1174
|
-
case "InternalErrorException":
|
|
1175
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
1176
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1177
|
-
case "InvalidParameterException":
|
|
1178
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
1179
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1180
|
-
case "NotAuthorizedException":
|
|
1181
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
1182
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
1183
|
-
case "ResourceNotFoundException":
|
|
1184
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
1185
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1186
|
-
case "TooManyRequestsException":
|
|
1187
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
1188
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1189
|
-
default:
|
|
1190
|
-
const parsedBody = parsedOutput.body;
|
|
1191
|
-
return throwDefaultError({
|
|
1192
|
-
output,
|
|
1193
|
-
parsedBody,
|
|
1194
|
-
errorCode,
|
|
1195
|
-
});
|
|
1196
|
-
}
|
|
1197
|
-
};
|
|
1198
|
-
const de_UpdateIdentityPoolCommand = async (output, context) => {
|
|
1199
|
-
if (output.statusCode >= 300) {
|
|
1200
|
-
return de_UpdateIdentityPoolCommandError(output, context);
|
|
1201
|
-
}
|
|
1202
|
-
const data = await parseBody(output.body, context);
|
|
1203
|
-
let contents = {};
|
|
1204
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1205
|
-
const response = {
|
|
1206
|
-
$metadata: deserializeMetadata(output),
|
|
1207
|
-
...contents,
|
|
1208
|
-
};
|
|
1209
|
-
return response;
|
|
1210
|
-
};
|
|
1211
|
-
exports.de_UpdateIdentityPoolCommand = de_UpdateIdentityPoolCommand;
|
|
1212
|
-
const de_UpdateIdentityPoolCommandError = async (output, context) => {
|
|
1213
|
-
const parsedOutput = {
|
|
1214
|
-
...output,
|
|
1215
|
-
body: await parseErrorBody(output.body, context),
|
|
1216
|
-
};
|
|
1217
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1218
|
-
switch (errorCode) {
|
|
1219
|
-
case "ConcurrentModificationException":
|
|
1220
|
-
case "com.amazonaws.cognitoidentity#ConcurrentModificationException":
|
|
1221
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
1222
|
-
case "InternalErrorException":
|
|
1223
|
-
case "com.amazonaws.cognitoidentity#InternalErrorException":
|
|
1224
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1225
|
-
case "InvalidParameterException":
|
|
1226
|
-
case "com.amazonaws.cognitoidentity#InvalidParameterException":
|
|
1227
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1228
|
-
case "LimitExceededException":
|
|
1229
|
-
case "com.amazonaws.cognitoidentity#LimitExceededException":
|
|
1230
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1231
|
-
case "NotAuthorizedException":
|
|
1232
|
-
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
|
|
1233
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
1234
|
-
case "ResourceConflictException":
|
|
1235
|
-
case "com.amazonaws.cognitoidentity#ResourceConflictException":
|
|
1236
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
1237
|
-
case "ResourceNotFoundException":
|
|
1238
|
-
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
|
|
1239
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1240
|
-
case "TooManyRequestsException":
|
|
1241
|
-
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
|
|
1242
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1243
|
-
default:
|
|
1244
|
-
const parsedBody = parsedOutput.body;
|
|
1245
|
-
return throwDefaultError({
|
|
1246
|
-
output,
|
|
1247
|
-
parsedBody,
|
|
1248
|
-
errorCode,
|
|
1249
|
-
});
|
|
1250
|
-
}
|
|
1251
|
-
};
|
|
1252
|
-
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
1253
|
-
const body = parsedOutput.body;
|
|
1254
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1255
|
-
const exception = new models_0_1.ConcurrentModificationException({
|
|
1256
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1257
|
-
...deserialized,
|
|
1258
|
-
});
|
|
1259
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1260
|
-
};
|
|
1261
|
-
const de_DeveloperUserAlreadyRegisteredExceptionRes = async (parsedOutput, context) => {
|
|
1262
|
-
const body = parsedOutput.body;
|
|
1263
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1264
|
-
const exception = new models_0_1.DeveloperUserAlreadyRegisteredException({
|
|
1265
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1266
|
-
...deserialized,
|
|
1267
|
-
});
|
|
1268
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1269
|
-
};
|
|
1270
|
-
const de_ExternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
1271
|
-
const body = parsedOutput.body;
|
|
1272
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1273
|
-
const exception = new models_0_1.ExternalServiceException({
|
|
1274
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1275
|
-
...deserialized,
|
|
1276
|
-
});
|
|
1277
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1278
|
-
};
|
|
1279
|
-
const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
|
|
1280
|
-
const body = parsedOutput.body;
|
|
1281
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1282
|
-
const exception = new models_0_1.InternalErrorException({
|
|
1283
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1284
|
-
...deserialized,
|
|
1285
|
-
});
|
|
1286
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1287
|
-
};
|
|
1288
|
-
const de_InvalidIdentityPoolConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
1289
|
-
const body = parsedOutput.body;
|
|
1290
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1291
|
-
const exception = new models_0_1.InvalidIdentityPoolConfigurationException({
|
|
1292
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1293
|
-
...deserialized,
|
|
1294
|
-
});
|
|
1295
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1296
|
-
};
|
|
1297
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
1298
|
-
const body = parsedOutput.body;
|
|
1299
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1300
|
-
const exception = new models_0_1.InvalidParameterException({
|
|
1301
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1302
|
-
...deserialized,
|
|
1303
|
-
});
|
|
1304
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1305
|
-
};
|
|
1306
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1307
|
-
const body = parsedOutput.body;
|
|
1308
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1309
|
-
const exception = new models_0_1.LimitExceededException({
|
|
1310
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1311
|
-
...deserialized,
|
|
1312
|
-
});
|
|
1313
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1314
|
-
};
|
|
1315
|
-
const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
|
|
1316
|
-
const body = parsedOutput.body;
|
|
1317
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1318
|
-
const exception = new models_0_1.NotAuthorizedException({
|
|
1319
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1320
|
-
...deserialized,
|
|
1321
|
-
});
|
|
1322
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1323
|
-
};
|
|
1324
|
-
const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
|
|
1325
|
-
const body = parsedOutput.body;
|
|
1326
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1327
|
-
const exception = new models_0_1.ResourceConflictException({
|
|
1328
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1329
|
-
...deserialized,
|
|
1330
|
-
});
|
|
1331
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1332
|
-
};
|
|
1333
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1334
|
-
const body = parsedOutput.body;
|
|
1335
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1336
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1337
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1338
|
-
...deserialized,
|
|
1339
|
-
});
|
|
1340
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1341
|
-
};
|
|
1342
|
-
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
1343
|
-
const body = parsedOutput.body;
|
|
1344
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1345
|
-
const exception = new models_0_1.TooManyRequestsException({
|
|
1346
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1347
|
-
...deserialized,
|
|
1348
|
-
});
|
|
1349
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1350
|
-
};
|
|
1351
|
-
const de_Credentials = (output, context) => {
|
|
1352
|
-
return (0, smithy_client_1.take)(output, {
|
|
1353
|
-
AccessKeyId: smithy_client_1.expectString,
|
|
1354
|
-
Expiration: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1355
|
-
SecretKey: smithy_client_1.expectString,
|
|
1356
|
-
SessionToken: smithy_client_1.expectString,
|
|
1357
|
-
});
|
|
1358
|
-
};
|
|
1359
|
-
const de_GetCredentialsForIdentityResponse = (output, context) => {
|
|
1360
|
-
return (0, smithy_client_1.take)(output, {
|
|
1361
|
-
Credentials: (_) => de_Credentials(_, context),
|
|
1362
|
-
IdentityId: smithy_client_1.expectString,
|
|
1363
|
-
});
|
|
1364
|
-
};
|
|
1365
|
-
const de_IdentitiesList = (output, context) => {
|
|
1366
|
-
const retVal = (output || [])
|
|
1367
|
-
.filter((e) => e != null)
|
|
1368
|
-
.map((entry) => {
|
|
1369
|
-
return de_IdentityDescription(entry, context);
|
|
1370
|
-
});
|
|
1371
|
-
return retVal;
|
|
1372
|
-
};
|
|
1373
|
-
const de_IdentityDescription = (output, context) => {
|
|
1374
|
-
return (0, smithy_client_1.take)(output, {
|
|
1375
|
-
CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1376
|
-
IdentityId: smithy_client_1.expectString,
|
|
1377
|
-
LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1378
|
-
Logins: smithy_client_1._json,
|
|
1379
|
-
});
|
|
1380
|
-
};
|
|
1381
|
-
const de_ListIdentitiesResponse = (output, context) => {
|
|
1382
|
-
return (0, smithy_client_1.take)(output, {
|
|
1383
|
-
Identities: (_) => de_IdentitiesList(_, context),
|
|
1384
|
-
IdentityPoolId: smithy_client_1.expectString,
|
|
1385
|
-
NextToken: smithy_client_1.expectString,
|
|
1386
|
-
});
|
|
1387
|
-
};
|
|
1388
|
-
const deserializeMetadata = (output) => ({
|
|
1389
|
-
httpStatusCode: output.statusCode,
|
|
1390
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1391
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1392
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1393
|
-
});
|
|
1394
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1395
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(CognitoIdentityServiceException_1.CognitoIdentityServiceException);
|
|
1396
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1397
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1398
|
-
const contents = {
|
|
1399
|
-
protocol,
|
|
1400
|
-
hostname,
|
|
1401
|
-
port,
|
|
1402
|
-
method: "POST",
|
|
1403
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1404
|
-
headers,
|
|
1405
|
-
};
|
|
1406
|
-
if (resolvedHostname !== undefined) {
|
|
1407
|
-
contents.hostname = resolvedHostname;
|
|
1408
|
-
}
|
|
1409
|
-
if (body !== undefined) {
|
|
1410
|
-
contents.body = body;
|
|
1411
|
-
}
|
|
1412
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
1413
|
-
};
|
|
1414
|
-
function sharedHeaders(operation) {
|
|
1415
|
-
return {
|
|
1416
|
-
"content-type": "application/x-amz-json-1.1",
|
|
1417
|
-
"x-amz-target": `AWSCognitoIdentityService.${operation}`,
|
|
1418
|
-
};
|
|
1419
|
-
}
|
|
1420
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1421
|
-
if (encoded.length) {
|
|
1422
|
-
return JSON.parse(encoded);
|
|
1423
|
-
}
|
|
1424
|
-
return {};
|
|
1425
|
-
});
|
|
1426
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1427
|
-
const value = await parseBody(errorBody, context);
|
|
1428
|
-
value.message = value.message ?? value.Message;
|
|
1429
|
-
return value;
|
|
1430
|
-
};
|
|
1431
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1432
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1433
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1434
|
-
let cleanValue = rawValue;
|
|
1435
|
-
if (typeof cleanValue === "number") {
|
|
1436
|
-
cleanValue = cleanValue.toString();
|
|
1437
|
-
}
|
|
1438
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1439
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1440
|
-
}
|
|
1441
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1442
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1443
|
-
}
|
|
1444
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1445
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1446
|
-
}
|
|
1447
|
-
return cleanValue;
|
|
1448
|
-
};
|
|
1449
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1450
|
-
if (headerKey !== undefined) {
|
|
1451
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1452
|
-
}
|
|
1453
|
-
if (data.code !== undefined) {
|
|
1454
|
-
return sanitizeErrorCode(data.code);
|
|
1455
|
-
}
|
|
1456
|
-
if (data["__type"] !== undefined) {
|
|
1457
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1458
|
-
}
|
|
1459
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|