@aws-sdk/client-verifiedpermissions 3.490.0 → 3.496.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/VerifiedPermissions.js +1 -61
- package/dist-cjs/VerifiedPermissionsClient.js +1 -43
- package/dist-cjs/commands/BatchIsAuthorizedCommand.js +1 -29
- package/dist-cjs/commands/CreateIdentitySourceCommand.js +1 -29
- package/dist-cjs/commands/CreatePolicyCommand.js +1 -29
- package/dist-cjs/commands/CreatePolicyStoreCommand.js +1 -29
- package/dist-cjs/commands/CreatePolicyTemplateCommand.js +1 -29
- package/dist-cjs/commands/DeleteIdentitySourceCommand.js +1 -28
- package/dist-cjs/commands/DeletePolicyCommand.js +1 -28
- package/dist-cjs/commands/DeletePolicyStoreCommand.js +1 -28
- package/dist-cjs/commands/DeletePolicyTemplateCommand.js +1 -28
- package/dist-cjs/commands/GetIdentitySourceCommand.js +1 -29
- package/dist-cjs/commands/GetPolicyCommand.js +1 -29
- package/dist-cjs/commands/GetPolicyStoreCommand.js +1 -29
- package/dist-cjs/commands/GetPolicyTemplateCommand.js +1 -29
- package/dist-cjs/commands/GetSchemaCommand.js +1 -29
- package/dist-cjs/commands/IsAuthorizedCommand.js +1 -29
- package/dist-cjs/commands/IsAuthorizedWithTokenCommand.js +1 -29
- package/dist-cjs/commands/ListIdentitySourcesCommand.js +1 -29
- package/dist-cjs/commands/ListPoliciesCommand.js +1 -29
- package/dist-cjs/commands/ListPolicyStoresCommand.js +1 -29
- package/dist-cjs/commands/ListPolicyTemplatesCommand.js +1 -29
- package/dist-cjs/commands/PutSchemaCommand.js +1 -29
- package/dist-cjs/commands/UpdateIdentitySourceCommand.js +1 -29
- package/dist-cjs/commands/UpdatePolicyCommand.js +1 -29
- package/dist-cjs/commands/UpdatePolicyStoreCommand.js +1 -29
- package/dist-cjs/commands/UpdatePolicyTemplateCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -28
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +3350 -11
- package/dist-cjs/models/VerifiedPermissionsServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -648
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListIdentitySourcesPaginator.js +1 -7
- package/dist-cjs/pagination/ListPoliciesPaginator.js +1 -7
- package/dist-cjs/pagination/ListPolicyStoresPaginator.js +1 -7
- package/dist-cjs/pagination/ListPolicyTemplatesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -8
- package/dist-cjs/protocols/Aws_json1_0.js +1 -1948
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1948 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdatePolicyTemplateCommand = exports.de_UpdatePolicyStoreCommand = exports.de_UpdatePolicyCommand = exports.de_UpdateIdentitySourceCommand = exports.de_PutSchemaCommand = exports.de_ListPolicyTemplatesCommand = exports.de_ListPolicyStoresCommand = exports.de_ListPoliciesCommand = exports.de_ListIdentitySourcesCommand = exports.de_IsAuthorizedWithTokenCommand = exports.de_IsAuthorizedCommand = exports.de_GetSchemaCommand = exports.de_GetPolicyTemplateCommand = exports.de_GetPolicyStoreCommand = exports.de_GetPolicyCommand = exports.de_GetIdentitySourceCommand = exports.de_DeletePolicyTemplateCommand = exports.de_DeletePolicyStoreCommand = exports.de_DeletePolicyCommand = exports.de_DeleteIdentitySourceCommand = exports.de_CreatePolicyTemplateCommand = exports.de_CreatePolicyStoreCommand = exports.de_CreatePolicyCommand = exports.de_CreateIdentitySourceCommand = exports.de_BatchIsAuthorizedCommand = exports.se_UpdatePolicyTemplateCommand = exports.se_UpdatePolicyStoreCommand = exports.se_UpdatePolicyCommand = exports.se_UpdateIdentitySourceCommand = exports.se_PutSchemaCommand = exports.se_ListPolicyTemplatesCommand = exports.se_ListPolicyStoresCommand = exports.se_ListPoliciesCommand = exports.se_ListIdentitySourcesCommand = exports.se_IsAuthorizedWithTokenCommand = exports.se_IsAuthorizedCommand = exports.se_GetSchemaCommand = exports.se_GetPolicyTemplateCommand = exports.se_GetPolicyStoreCommand = exports.se_GetPolicyCommand = exports.se_GetIdentitySourceCommand = exports.se_DeletePolicyTemplateCommand = exports.se_DeletePolicyStoreCommand = exports.se_DeletePolicyCommand = exports.se_DeleteIdentitySourceCommand = exports.se_CreatePolicyTemplateCommand = exports.se_CreatePolicyStoreCommand = exports.se_CreatePolicyCommand = exports.se_CreateIdentitySourceCommand = exports.se_BatchIsAuthorizedCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const uuid_1 = require("uuid");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const VerifiedPermissionsServiceException_1 = require("../models/VerifiedPermissionsServiceException");
|
|
10
|
-
const se_BatchIsAuthorizedCommand = async (input, context) => {
|
|
11
|
-
const headers = sharedHeaders("BatchIsAuthorized");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(se_BatchIsAuthorizedInput(input, context));
|
|
14
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
15
|
-
};
|
|
16
|
-
exports.se_BatchIsAuthorizedCommand = se_BatchIsAuthorizedCommand;
|
|
17
|
-
const se_CreateIdentitySourceCommand = async (input, context) => {
|
|
18
|
-
const headers = sharedHeaders("CreateIdentitySource");
|
|
19
|
-
let body;
|
|
20
|
-
body = JSON.stringify(se_CreateIdentitySourceInput(input, context));
|
|
21
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
-
};
|
|
23
|
-
exports.se_CreateIdentitySourceCommand = se_CreateIdentitySourceCommand;
|
|
24
|
-
const se_CreatePolicyCommand = async (input, context) => {
|
|
25
|
-
const headers = sharedHeaders("CreatePolicy");
|
|
26
|
-
let body;
|
|
27
|
-
body = JSON.stringify(se_CreatePolicyInput(input, context));
|
|
28
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
-
};
|
|
30
|
-
exports.se_CreatePolicyCommand = se_CreatePolicyCommand;
|
|
31
|
-
const se_CreatePolicyStoreCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("CreatePolicyStore");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify(se_CreatePolicyStoreInput(input, context));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
exports.se_CreatePolicyStoreCommand = se_CreatePolicyStoreCommand;
|
|
38
|
-
const se_CreatePolicyTemplateCommand = async (input, context) => {
|
|
39
|
-
const headers = sharedHeaders("CreatePolicyTemplate");
|
|
40
|
-
let body;
|
|
41
|
-
body = JSON.stringify(se_CreatePolicyTemplateInput(input, context));
|
|
42
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
43
|
-
};
|
|
44
|
-
exports.se_CreatePolicyTemplateCommand = se_CreatePolicyTemplateCommand;
|
|
45
|
-
const se_DeleteIdentitySourceCommand = async (input, context) => {
|
|
46
|
-
const headers = sharedHeaders("DeleteIdentitySource");
|
|
47
|
-
let body;
|
|
48
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
49
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
|
-
};
|
|
51
|
-
exports.se_DeleteIdentitySourceCommand = se_DeleteIdentitySourceCommand;
|
|
52
|
-
const se_DeletePolicyCommand = async (input, context) => {
|
|
53
|
-
const headers = sharedHeaders("DeletePolicy");
|
|
54
|
-
let body;
|
|
55
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
56
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
|
-
};
|
|
58
|
-
exports.se_DeletePolicyCommand = se_DeletePolicyCommand;
|
|
59
|
-
const se_DeletePolicyStoreCommand = async (input, context) => {
|
|
60
|
-
const headers = sharedHeaders("DeletePolicyStore");
|
|
61
|
-
let body;
|
|
62
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
63
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
64
|
-
};
|
|
65
|
-
exports.se_DeletePolicyStoreCommand = se_DeletePolicyStoreCommand;
|
|
66
|
-
const se_DeletePolicyTemplateCommand = async (input, context) => {
|
|
67
|
-
const headers = sharedHeaders("DeletePolicyTemplate");
|
|
68
|
-
let body;
|
|
69
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
70
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
71
|
-
};
|
|
72
|
-
exports.se_DeletePolicyTemplateCommand = se_DeletePolicyTemplateCommand;
|
|
73
|
-
const se_GetIdentitySourceCommand = async (input, context) => {
|
|
74
|
-
const headers = sharedHeaders("GetIdentitySource");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
77
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
-
};
|
|
79
|
-
exports.se_GetIdentitySourceCommand = se_GetIdentitySourceCommand;
|
|
80
|
-
const se_GetPolicyCommand = async (input, context) => {
|
|
81
|
-
const headers = sharedHeaders("GetPolicy");
|
|
82
|
-
let body;
|
|
83
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
84
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
|
-
};
|
|
86
|
-
exports.se_GetPolicyCommand = se_GetPolicyCommand;
|
|
87
|
-
const se_GetPolicyStoreCommand = async (input, context) => {
|
|
88
|
-
const headers = sharedHeaders("GetPolicyStore");
|
|
89
|
-
let body;
|
|
90
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
91
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
92
|
-
};
|
|
93
|
-
exports.se_GetPolicyStoreCommand = se_GetPolicyStoreCommand;
|
|
94
|
-
const se_GetPolicyTemplateCommand = async (input, context) => {
|
|
95
|
-
const headers = sharedHeaders("GetPolicyTemplate");
|
|
96
|
-
let body;
|
|
97
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
98
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
99
|
-
};
|
|
100
|
-
exports.se_GetPolicyTemplateCommand = se_GetPolicyTemplateCommand;
|
|
101
|
-
const se_GetSchemaCommand = async (input, context) => {
|
|
102
|
-
const headers = sharedHeaders("GetSchema");
|
|
103
|
-
let body;
|
|
104
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
105
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
106
|
-
};
|
|
107
|
-
exports.se_GetSchemaCommand = se_GetSchemaCommand;
|
|
108
|
-
const se_IsAuthorizedCommand = async (input, context) => {
|
|
109
|
-
const headers = sharedHeaders("IsAuthorized");
|
|
110
|
-
let body;
|
|
111
|
-
body = JSON.stringify(se_IsAuthorizedInput(input, context));
|
|
112
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
113
|
-
};
|
|
114
|
-
exports.se_IsAuthorizedCommand = se_IsAuthorizedCommand;
|
|
115
|
-
const se_IsAuthorizedWithTokenCommand = async (input, context) => {
|
|
116
|
-
const headers = sharedHeaders("IsAuthorizedWithToken");
|
|
117
|
-
let body;
|
|
118
|
-
body = JSON.stringify(se_IsAuthorizedWithTokenInput(input, context));
|
|
119
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
120
|
-
};
|
|
121
|
-
exports.se_IsAuthorizedWithTokenCommand = se_IsAuthorizedWithTokenCommand;
|
|
122
|
-
const se_ListIdentitySourcesCommand = async (input, context) => {
|
|
123
|
-
const headers = sharedHeaders("ListIdentitySources");
|
|
124
|
-
let body;
|
|
125
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
126
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
127
|
-
};
|
|
128
|
-
exports.se_ListIdentitySourcesCommand = se_ListIdentitySourcesCommand;
|
|
129
|
-
const se_ListPoliciesCommand = async (input, context) => {
|
|
130
|
-
const headers = sharedHeaders("ListPolicies");
|
|
131
|
-
let body;
|
|
132
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
133
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
134
|
-
};
|
|
135
|
-
exports.se_ListPoliciesCommand = se_ListPoliciesCommand;
|
|
136
|
-
const se_ListPolicyStoresCommand = async (input, context) => {
|
|
137
|
-
const headers = sharedHeaders("ListPolicyStores");
|
|
138
|
-
let body;
|
|
139
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
140
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
141
|
-
};
|
|
142
|
-
exports.se_ListPolicyStoresCommand = se_ListPolicyStoresCommand;
|
|
143
|
-
const se_ListPolicyTemplatesCommand = async (input, context) => {
|
|
144
|
-
const headers = sharedHeaders("ListPolicyTemplates");
|
|
145
|
-
let body;
|
|
146
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
147
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
148
|
-
};
|
|
149
|
-
exports.se_ListPolicyTemplatesCommand = se_ListPolicyTemplatesCommand;
|
|
150
|
-
const se_PutSchemaCommand = async (input, context) => {
|
|
151
|
-
const headers = sharedHeaders("PutSchema");
|
|
152
|
-
let body;
|
|
153
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
154
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
155
|
-
};
|
|
156
|
-
exports.se_PutSchemaCommand = se_PutSchemaCommand;
|
|
157
|
-
const se_UpdateIdentitySourceCommand = async (input, context) => {
|
|
158
|
-
const headers = sharedHeaders("UpdateIdentitySource");
|
|
159
|
-
let body;
|
|
160
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
161
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
162
|
-
};
|
|
163
|
-
exports.se_UpdateIdentitySourceCommand = se_UpdateIdentitySourceCommand;
|
|
164
|
-
const se_UpdatePolicyCommand = async (input, context) => {
|
|
165
|
-
const headers = sharedHeaders("UpdatePolicy");
|
|
166
|
-
let body;
|
|
167
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
168
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
169
|
-
};
|
|
170
|
-
exports.se_UpdatePolicyCommand = se_UpdatePolicyCommand;
|
|
171
|
-
const se_UpdatePolicyStoreCommand = async (input, context) => {
|
|
172
|
-
const headers = sharedHeaders("UpdatePolicyStore");
|
|
173
|
-
let body;
|
|
174
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
175
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
176
|
-
};
|
|
177
|
-
exports.se_UpdatePolicyStoreCommand = se_UpdatePolicyStoreCommand;
|
|
178
|
-
const se_UpdatePolicyTemplateCommand = async (input, context) => {
|
|
179
|
-
const headers = sharedHeaders("UpdatePolicyTemplate");
|
|
180
|
-
let body;
|
|
181
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
182
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
183
|
-
};
|
|
184
|
-
exports.se_UpdatePolicyTemplateCommand = se_UpdatePolicyTemplateCommand;
|
|
185
|
-
const de_BatchIsAuthorizedCommand = async (output, context) => {
|
|
186
|
-
if (output.statusCode >= 300) {
|
|
187
|
-
return de_BatchIsAuthorizedCommandError(output, context);
|
|
188
|
-
}
|
|
189
|
-
const data = await parseBody(output.body, context);
|
|
190
|
-
let contents = {};
|
|
191
|
-
contents = de_BatchIsAuthorizedOutput(data, context);
|
|
192
|
-
const response = {
|
|
193
|
-
$metadata: deserializeMetadata(output),
|
|
194
|
-
...contents,
|
|
195
|
-
};
|
|
196
|
-
return response;
|
|
197
|
-
};
|
|
198
|
-
exports.de_BatchIsAuthorizedCommand = de_BatchIsAuthorizedCommand;
|
|
199
|
-
const de_BatchIsAuthorizedCommandError = async (output, context) => {
|
|
200
|
-
const parsedOutput = {
|
|
201
|
-
...output,
|
|
202
|
-
body: await parseErrorBody(output.body, context),
|
|
203
|
-
};
|
|
204
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
205
|
-
switch (errorCode) {
|
|
206
|
-
case "AccessDeniedException":
|
|
207
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
208
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
209
|
-
case "InternalServerException":
|
|
210
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
211
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
212
|
-
case "ResourceNotFoundException":
|
|
213
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
214
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
215
|
-
case "ThrottlingException":
|
|
216
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
217
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
218
|
-
case "ValidationException":
|
|
219
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
220
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
221
|
-
default:
|
|
222
|
-
const parsedBody = parsedOutput.body;
|
|
223
|
-
return throwDefaultError({
|
|
224
|
-
output,
|
|
225
|
-
parsedBody,
|
|
226
|
-
errorCode,
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
const de_CreateIdentitySourceCommand = async (output, context) => {
|
|
231
|
-
if (output.statusCode >= 300) {
|
|
232
|
-
return de_CreateIdentitySourceCommandError(output, context);
|
|
233
|
-
}
|
|
234
|
-
const data = await parseBody(output.body, context);
|
|
235
|
-
let contents = {};
|
|
236
|
-
contents = de_CreateIdentitySourceOutput(data, context);
|
|
237
|
-
const response = {
|
|
238
|
-
$metadata: deserializeMetadata(output),
|
|
239
|
-
...contents,
|
|
240
|
-
};
|
|
241
|
-
return response;
|
|
242
|
-
};
|
|
243
|
-
exports.de_CreateIdentitySourceCommand = de_CreateIdentitySourceCommand;
|
|
244
|
-
const de_CreateIdentitySourceCommandError = async (output, context) => {
|
|
245
|
-
const parsedOutput = {
|
|
246
|
-
...output,
|
|
247
|
-
body: await parseErrorBody(output.body, context),
|
|
248
|
-
};
|
|
249
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
250
|
-
switch (errorCode) {
|
|
251
|
-
case "AccessDeniedException":
|
|
252
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
253
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
254
|
-
case "ConflictException":
|
|
255
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
256
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
257
|
-
case "InternalServerException":
|
|
258
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
259
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
260
|
-
case "ResourceNotFoundException":
|
|
261
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
262
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
263
|
-
case "ServiceQuotaExceededException":
|
|
264
|
-
case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
|
|
265
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
266
|
-
case "ThrottlingException":
|
|
267
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
268
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
269
|
-
case "ValidationException":
|
|
270
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
271
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
272
|
-
default:
|
|
273
|
-
const parsedBody = parsedOutput.body;
|
|
274
|
-
return throwDefaultError({
|
|
275
|
-
output,
|
|
276
|
-
parsedBody,
|
|
277
|
-
errorCode,
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
const de_CreatePolicyCommand = async (output, context) => {
|
|
282
|
-
if (output.statusCode >= 300) {
|
|
283
|
-
return de_CreatePolicyCommandError(output, context);
|
|
284
|
-
}
|
|
285
|
-
const data = await parseBody(output.body, context);
|
|
286
|
-
let contents = {};
|
|
287
|
-
contents = de_CreatePolicyOutput(data, context);
|
|
288
|
-
const response = {
|
|
289
|
-
$metadata: deserializeMetadata(output),
|
|
290
|
-
...contents,
|
|
291
|
-
};
|
|
292
|
-
return response;
|
|
293
|
-
};
|
|
294
|
-
exports.de_CreatePolicyCommand = de_CreatePolicyCommand;
|
|
295
|
-
const de_CreatePolicyCommandError = async (output, context) => {
|
|
296
|
-
const parsedOutput = {
|
|
297
|
-
...output,
|
|
298
|
-
body: await parseErrorBody(output.body, context),
|
|
299
|
-
};
|
|
300
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
301
|
-
switch (errorCode) {
|
|
302
|
-
case "AccessDeniedException":
|
|
303
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
304
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
305
|
-
case "ConflictException":
|
|
306
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
307
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
308
|
-
case "InternalServerException":
|
|
309
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
310
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
311
|
-
case "ResourceNotFoundException":
|
|
312
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
313
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
314
|
-
case "ServiceQuotaExceededException":
|
|
315
|
-
case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
|
|
316
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
317
|
-
case "ThrottlingException":
|
|
318
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
319
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
320
|
-
case "ValidationException":
|
|
321
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
322
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
323
|
-
default:
|
|
324
|
-
const parsedBody = parsedOutput.body;
|
|
325
|
-
return throwDefaultError({
|
|
326
|
-
output,
|
|
327
|
-
parsedBody,
|
|
328
|
-
errorCode,
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
const de_CreatePolicyStoreCommand = async (output, context) => {
|
|
333
|
-
if (output.statusCode >= 300) {
|
|
334
|
-
return de_CreatePolicyStoreCommandError(output, context);
|
|
335
|
-
}
|
|
336
|
-
const data = await parseBody(output.body, context);
|
|
337
|
-
let contents = {};
|
|
338
|
-
contents = de_CreatePolicyStoreOutput(data, context);
|
|
339
|
-
const response = {
|
|
340
|
-
$metadata: deserializeMetadata(output),
|
|
341
|
-
...contents,
|
|
342
|
-
};
|
|
343
|
-
return response;
|
|
344
|
-
};
|
|
345
|
-
exports.de_CreatePolicyStoreCommand = de_CreatePolicyStoreCommand;
|
|
346
|
-
const de_CreatePolicyStoreCommandError = async (output, context) => {
|
|
347
|
-
const parsedOutput = {
|
|
348
|
-
...output,
|
|
349
|
-
body: await parseErrorBody(output.body, context),
|
|
350
|
-
};
|
|
351
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
352
|
-
switch (errorCode) {
|
|
353
|
-
case "AccessDeniedException":
|
|
354
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
355
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
356
|
-
case "ConflictException":
|
|
357
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
358
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
359
|
-
case "InternalServerException":
|
|
360
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
361
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
362
|
-
case "ServiceQuotaExceededException":
|
|
363
|
-
case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
|
|
364
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
365
|
-
case "ThrottlingException":
|
|
366
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
367
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
368
|
-
case "ValidationException":
|
|
369
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
370
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
371
|
-
default:
|
|
372
|
-
const parsedBody = parsedOutput.body;
|
|
373
|
-
return throwDefaultError({
|
|
374
|
-
output,
|
|
375
|
-
parsedBody,
|
|
376
|
-
errorCode,
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
const de_CreatePolicyTemplateCommand = async (output, context) => {
|
|
381
|
-
if (output.statusCode >= 300) {
|
|
382
|
-
return de_CreatePolicyTemplateCommandError(output, context);
|
|
383
|
-
}
|
|
384
|
-
const data = await parseBody(output.body, context);
|
|
385
|
-
let contents = {};
|
|
386
|
-
contents = de_CreatePolicyTemplateOutput(data, context);
|
|
387
|
-
const response = {
|
|
388
|
-
$metadata: deserializeMetadata(output),
|
|
389
|
-
...contents,
|
|
390
|
-
};
|
|
391
|
-
return response;
|
|
392
|
-
};
|
|
393
|
-
exports.de_CreatePolicyTemplateCommand = de_CreatePolicyTemplateCommand;
|
|
394
|
-
const de_CreatePolicyTemplateCommandError = async (output, context) => {
|
|
395
|
-
const parsedOutput = {
|
|
396
|
-
...output,
|
|
397
|
-
body: await parseErrorBody(output.body, context),
|
|
398
|
-
};
|
|
399
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
400
|
-
switch (errorCode) {
|
|
401
|
-
case "AccessDeniedException":
|
|
402
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
403
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
404
|
-
case "ConflictException":
|
|
405
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
406
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
407
|
-
case "InternalServerException":
|
|
408
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
409
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
410
|
-
case "ResourceNotFoundException":
|
|
411
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
412
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
413
|
-
case "ServiceQuotaExceededException":
|
|
414
|
-
case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
|
|
415
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
416
|
-
case "ThrottlingException":
|
|
417
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
418
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
419
|
-
case "ValidationException":
|
|
420
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
421
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
422
|
-
default:
|
|
423
|
-
const parsedBody = parsedOutput.body;
|
|
424
|
-
return throwDefaultError({
|
|
425
|
-
output,
|
|
426
|
-
parsedBody,
|
|
427
|
-
errorCode,
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
const de_DeleteIdentitySourceCommand = async (output, context) => {
|
|
432
|
-
if (output.statusCode >= 300) {
|
|
433
|
-
return de_DeleteIdentitySourceCommandError(output, context);
|
|
434
|
-
}
|
|
435
|
-
const data = await parseBody(output.body, context);
|
|
436
|
-
let contents = {};
|
|
437
|
-
contents = (0, smithy_client_1._json)(data);
|
|
438
|
-
const response = {
|
|
439
|
-
$metadata: deserializeMetadata(output),
|
|
440
|
-
...contents,
|
|
441
|
-
};
|
|
442
|
-
return response;
|
|
443
|
-
};
|
|
444
|
-
exports.de_DeleteIdentitySourceCommand = de_DeleteIdentitySourceCommand;
|
|
445
|
-
const de_DeleteIdentitySourceCommandError = async (output, context) => {
|
|
446
|
-
const parsedOutput = {
|
|
447
|
-
...output,
|
|
448
|
-
body: await parseErrorBody(output.body, context),
|
|
449
|
-
};
|
|
450
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
451
|
-
switch (errorCode) {
|
|
452
|
-
case "AccessDeniedException":
|
|
453
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
454
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
455
|
-
case "ConflictException":
|
|
456
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
457
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
458
|
-
case "InternalServerException":
|
|
459
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
460
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
461
|
-
case "ResourceNotFoundException":
|
|
462
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
463
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
464
|
-
case "ThrottlingException":
|
|
465
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
466
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
467
|
-
case "ValidationException":
|
|
468
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
469
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
470
|
-
default:
|
|
471
|
-
const parsedBody = parsedOutput.body;
|
|
472
|
-
return throwDefaultError({
|
|
473
|
-
output,
|
|
474
|
-
parsedBody,
|
|
475
|
-
errorCode,
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
const de_DeletePolicyCommand = async (output, context) => {
|
|
480
|
-
if (output.statusCode >= 300) {
|
|
481
|
-
return de_DeletePolicyCommandError(output, context);
|
|
482
|
-
}
|
|
483
|
-
const data = await parseBody(output.body, context);
|
|
484
|
-
let contents = {};
|
|
485
|
-
contents = (0, smithy_client_1._json)(data);
|
|
486
|
-
const response = {
|
|
487
|
-
$metadata: deserializeMetadata(output),
|
|
488
|
-
...contents,
|
|
489
|
-
};
|
|
490
|
-
return response;
|
|
491
|
-
};
|
|
492
|
-
exports.de_DeletePolicyCommand = de_DeletePolicyCommand;
|
|
493
|
-
const de_DeletePolicyCommandError = async (output, context) => {
|
|
494
|
-
const parsedOutput = {
|
|
495
|
-
...output,
|
|
496
|
-
body: await parseErrorBody(output.body, context),
|
|
497
|
-
};
|
|
498
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
499
|
-
switch (errorCode) {
|
|
500
|
-
case "AccessDeniedException":
|
|
501
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
502
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
503
|
-
case "ConflictException":
|
|
504
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
505
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
506
|
-
case "InternalServerException":
|
|
507
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
508
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
509
|
-
case "ResourceNotFoundException":
|
|
510
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
511
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
512
|
-
case "ThrottlingException":
|
|
513
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
514
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
515
|
-
case "ValidationException":
|
|
516
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
517
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
518
|
-
default:
|
|
519
|
-
const parsedBody = parsedOutput.body;
|
|
520
|
-
return throwDefaultError({
|
|
521
|
-
output,
|
|
522
|
-
parsedBody,
|
|
523
|
-
errorCode,
|
|
524
|
-
});
|
|
525
|
-
}
|
|
526
|
-
};
|
|
527
|
-
const de_DeletePolicyStoreCommand = async (output, context) => {
|
|
528
|
-
if (output.statusCode >= 300) {
|
|
529
|
-
return de_DeletePolicyStoreCommandError(output, context);
|
|
530
|
-
}
|
|
531
|
-
const data = await parseBody(output.body, context);
|
|
532
|
-
let contents = {};
|
|
533
|
-
contents = (0, smithy_client_1._json)(data);
|
|
534
|
-
const response = {
|
|
535
|
-
$metadata: deserializeMetadata(output),
|
|
536
|
-
...contents,
|
|
537
|
-
};
|
|
538
|
-
return response;
|
|
539
|
-
};
|
|
540
|
-
exports.de_DeletePolicyStoreCommand = de_DeletePolicyStoreCommand;
|
|
541
|
-
const de_DeletePolicyStoreCommandError = async (output, context) => {
|
|
542
|
-
const parsedOutput = {
|
|
543
|
-
...output,
|
|
544
|
-
body: await parseErrorBody(output.body, context),
|
|
545
|
-
};
|
|
546
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
547
|
-
switch (errorCode) {
|
|
548
|
-
case "AccessDeniedException":
|
|
549
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
550
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
551
|
-
case "InternalServerException":
|
|
552
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
553
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
554
|
-
case "ThrottlingException":
|
|
555
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
556
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
557
|
-
case "ValidationException":
|
|
558
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
559
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
560
|
-
default:
|
|
561
|
-
const parsedBody = parsedOutput.body;
|
|
562
|
-
return throwDefaultError({
|
|
563
|
-
output,
|
|
564
|
-
parsedBody,
|
|
565
|
-
errorCode,
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
|
-
const de_DeletePolicyTemplateCommand = async (output, context) => {
|
|
570
|
-
if (output.statusCode >= 300) {
|
|
571
|
-
return de_DeletePolicyTemplateCommandError(output, context);
|
|
572
|
-
}
|
|
573
|
-
const data = await parseBody(output.body, context);
|
|
574
|
-
let contents = {};
|
|
575
|
-
contents = (0, smithy_client_1._json)(data);
|
|
576
|
-
const response = {
|
|
577
|
-
$metadata: deserializeMetadata(output),
|
|
578
|
-
...contents,
|
|
579
|
-
};
|
|
580
|
-
return response;
|
|
581
|
-
};
|
|
582
|
-
exports.de_DeletePolicyTemplateCommand = de_DeletePolicyTemplateCommand;
|
|
583
|
-
const de_DeletePolicyTemplateCommandError = async (output, context) => {
|
|
584
|
-
const parsedOutput = {
|
|
585
|
-
...output,
|
|
586
|
-
body: await parseErrorBody(output.body, context),
|
|
587
|
-
};
|
|
588
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
589
|
-
switch (errorCode) {
|
|
590
|
-
case "AccessDeniedException":
|
|
591
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
592
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
593
|
-
case "ConflictException":
|
|
594
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
595
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
596
|
-
case "InternalServerException":
|
|
597
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
598
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
599
|
-
case "ResourceNotFoundException":
|
|
600
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
601
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
602
|
-
case "ThrottlingException":
|
|
603
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
604
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
605
|
-
case "ValidationException":
|
|
606
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
607
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
608
|
-
default:
|
|
609
|
-
const parsedBody = parsedOutput.body;
|
|
610
|
-
return throwDefaultError({
|
|
611
|
-
output,
|
|
612
|
-
parsedBody,
|
|
613
|
-
errorCode,
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
};
|
|
617
|
-
const de_GetIdentitySourceCommand = async (output, context) => {
|
|
618
|
-
if (output.statusCode >= 300) {
|
|
619
|
-
return de_GetIdentitySourceCommandError(output, context);
|
|
620
|
-
}
|
|
621
|
-
const data = await parseBody(output.body, context);
|
|
622
|
-
let contents = {};
|
|
623
|
-
contents = de_GetIdentitySourceOutput(data, context);
|
|
624
|
-
const response = {
|
|
625
|
-
$metadata: deserializeMetadata(output),
|
|
626
|
-
...contents,
|
|
627
|
-
};
|
|
628
|
-
return response;
|
|
629
|
-
};
|
|
630
|
-
exports.de_GetIdentitySourceCommand = de_GetIdentitySourceCommand;
|
|
631
|
-
const de_GetIdentitySourceCommandError = async (output, context) => {
|
|
632
|
-
const parsedOutput = {
|
|
633
|
-
...output,
|
|
634
|
-
body: await parseErrorBody(output.body, context),
|
|
635
|
-
};
|
|
636
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
637
|
-
switch (errorCode) {
|
|
638
|
-
case "AccessDeniedException":
|
|
639
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
640
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
641
|
-
case "InternalServerException":
|
|
642
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
643
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
644
|
-
case "ResourceNotFoundException":
|
|
645
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
646
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
647
|
-
case "ThrottlingException":
|
|
648
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
649
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
650
|
-
case "ValidationException":
|
|
651
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
652
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
653
|
-
default:
|
|
654
|
-
const parsedBody = parsedOutput.body;
|
|
655
|
-
return throwDefaultError({
|
|
656
|
-
output,
|
|
657
|
-
parsedBody,
|
|
658
|
-
errorCode,
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
const de_GetPolicyCommand = async (output, context) => {
|
|
663
|
-
if (output.statusCode >= 300) {
|
|
664
|
-
return de_GetPolicyCommandError(output, context);
|
|
665
|
-
}
|
|
666
|
-
const data = await parseBody(output.body, context);
|
|
667
|
-
let contents = {};
|
|
668
|
-
contents = de_GetPolicyOutput(data, context);
|
|
669
|
-
const response = {
|
|
670
|
-
$metadata: deserializeMetadata(output),
|
|
671
|
-
...contents,
|
|
672
|
-
};
|
|
673
|
-
return response;
|
|
674
|
-
};
|
|
675
|
-
exports.de_GetPolicyCommand = de_GetPolicyCommand;
|
|
676
|
-
const de_GetPolicyCommandError = async (output, context) => {
|
|
677
|
-
const parsedOutput = {
|
|
678
|
-
...output,
|
|
679
|
-
body: await parseErrorBody(output.body, context),
|
|
680
|
-
};
|
|
681
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
682
|
-
switch (errorCode) {
|
|
683
|
-
case "AccessDeniedException":
|
|
684
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
685
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
686
|
-
case "InternalServerException":
|
|
687
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
688
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
689
|
-
case "ResourceNotFoundException":
|
|
690
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
691
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
692
|
-
case "ThrottlingException":
|
|
693
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
694
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
695
|
-
case "ValidationException":
|
|
696
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
697
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
698
|
-
default:
|
|
699
|
-
const parsedBody = parsedOutput.body;
|
|
700
|
-
return throwDefaultError({
|
|
701
|
-
output,
|
|
702
|
-
parsedBody,
|
|
703
|
-
errorCode,
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
};
|
|
707
|
-
const de_GetPolicyStoreCommand = async (output, context) => {
|
|
708
|
-
if (output.statusCode >= 300) {
|
|
709
|
-
return de_GetPolicyStoreCommandError(output, context);
|
|
710
|
-
}
|
|
711
|
-
const data = await parseBody(output.body, context);
|
|
712
|
-
let contents = {};
|
|
713
|
-
contents = de_GetPolicyStoreOutput(data, context);
|
|
714
|
-
const response = {
|
|
715
|
-
$metadata: deserializeMetadata(output),
|
|
716
|
-
...contents,
|
|
717
|
-
};
|
|
718
|
-
return response;
|
|
719
|
-
};
|
|
720
|
-
exports.de_GetPolicyStoreCommand = de_GetPolicyStoreCommand;
|
|
721
|
-
const de_GetPolicyStoreCommandError = async (output, context) => {
|
|
722
|
-
const parsedOutput = {
|
|
723
|
-
...output,
|
|
724
|
-
body: await parseErrorBody(output.body, context),
|
|
725
|
-
};
|
|
726
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
727
|
-
switch (errorCode) {
|
|
728
|
-
case "AccessDeniedException":
|
|
729
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
730
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
731
|
-
case "InternalServerException":
|
|
732
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
733
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
734
|
-
case "ResourceNotFoundException":
|
|
735
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
736
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
737
|
-
case "ThrottlingException":
|
|
738
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
739
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
740
|
-
case "ValidationException":
|
|
741
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
742
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
743
|
-
default:
|
|
744
|
-
const parsedBody = parsedOutput.body;
|
|
745
|
-
return throwDefaultError({
|
|
746
|
-
output,
|
|
747
|
-
parsedBody,
|
|
748
|
-
errorCode,
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
const de_GetPolicyTemplateCommand = async (output, context) => {
|
|
753
|
-
if (output.statusCode >= 300) {
|
|
754
|
-
return de_GetPolicyTemplateCommandError(output, context);
|
|
755
|
-
}
|
|
756
|
-
const data = await parseBody(output.body, context);
|
|
757
|
-
let contents = {};
|
|
758
|
-
contents = de_GetPolicyTemplateOutput(data, context);
|
|
759
|
-
const response = {
|
|
760
|
-
$metadata: deserializeMetadata(output),
|
|
761
|
-
...contents,
|
|
762
|
-
};
|
|
763
|
-
return response;
|
|
764
|
-
};
|
|
765
|
-
exports.de_GetPolicyTemplateCommand = de_GetPolicyTemplateCommand;
|
|
766
|
-
const de_GetPolicyTemplateCommandError = async (output, context) => {
|
|
767
|
-
const parsedOutput = {
|
|
768
|
-
...output,
|
|
769
|
-
body: await parseErrorBody(output.body, context),
|
|
770
|
-
};
|
|
771
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
772
|
-
switch (errorCode) {
|
|
773
|
-
case "AccessDeniedException":
|
|
774
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
775
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
776
|
-
case "InternalServerException":
|
|
777
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
778
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
779
|
-
case "ResourceNotFoundException":
|
|
780
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
781
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
782
|
-
case "ThrottlingException":
|
|
783
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
784
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
785
|
-
case "ValidationException":
|
|
786
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
787
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
788
|
-
default:
|
|
789
|
-
const parsedBody = parsedOutput.body;
|
|
790
|
-
return throwDefaultError({
|
|
791
|
-
output,
|
|
792
|
-
parsedBody,
|
|
793
|
-
errorCode,
|
|
794
|
-
});
|
|
795
|
-
}
|
|
796
|
-
};
|
|
797
|
-
const de_GetSchemaCommand = async (output, context) => {
|
|
798
|
-
if (output.statusCode >= 300) {
|
|
799
|
-
return de_GetSchemaCommandError(output, context);
|
|
800
|
-
}
|
|
801
|
-
const data = await parseBody(output.body, context);
|
|
802
|
-
let contents = {};
|
|
803
|
-
contents = de_GetSchemaOutput(data, context);
|
|
804
|
-
const response = {
|
|
805
|
-
$metadata: deserializeMetadata(output),
|
|
806
|
-
...contents,
|
|
807
|
-
};
|
|
808
|
-
return response;
|
|
809
|
-
};
|
|
810
|
-
exports.de_GetSchemaCommand = de_GetSchemaCommand;
|
|
811
|
-
const de_GetSchemaCommandError = async (output, context) => {
|
|
812
|
-
const parsedOutput = {
|
|
813
|
-
...output,
|
|
814
|
-
body: await parseErrorBody(output.body, context),
|
|
815
|
-
};
|
|
816
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
817
|
-
switch (errorCode) {
|
|
818
|
-
case "AccessDeniedException":
|
|
819
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
820
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
821
|
-
case "InternalServerException":
|
|
822
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
823
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
824
|
-
case "ResourceNotFoundException":
|
|
825
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
826
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
827
|
-
case "ThrottlingException":
|
|
828
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
829
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
830
|
-
case "ValidationException":
|
|
831
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
832
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
833
|
-
default:
|
|
834
|
-
const parsedBody = parsedOutput.body;
|
|
835
|
-
return throwDefaultError({
|
|
836
|
-
output,
|
|
837
|
-
parsedBody,
|
|
838
|
-
errorCode,
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
};
|
|
842
|
-
const de_IsAuthorizedCommand = async (output, context) => {
|
|
843
|
-
if (output.statusCode >= 300) {
|
|
844
|
-
return de_IsAuthorizedCommandError(output, context);
|
|
845
|
-
}
|
|
846
|
-
const data = await parseBody(output.body, context);
|
|
847
|
-
let contents = {};
|
|
848
|
-
contents = (0, smithy_client_1._json)(data);
|
|
849
|
-
const response = {
|
|
850
|
-
$metadata: deserializeMetadata(output),
|
|
851
|
-
...contents,
|
|
852
|
-
};
|
|
853
|
-
return response;
|
|
854
|
-
};
|
|
855
|
-
exports.de_IsAuthorizedCommand = de_IsAuthorizedCommand;
|
|
856
|
-
const de_IsAuthorizedCommandError = async (output, context) => {
|
|
857
|
-
const parsedOutput = {
|
|
858
|
-
...output,
|
|
859
|
-
body: await parseErrorBody(output.body, context),
|
|
860
|
-
};
|
|
861
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
862
|
-
switch (errorCode) {
|
|
863
|
-
case "AccessDeniedException":
|
|
864
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
865
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
866
|
-
case "InternalServerException":
|
|
867
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
868
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
869
|
-
case "ResourceNotFoundException":
|
|
870
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
871
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
872
|
-
case "ThrottlingException":
|
|
873
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
874
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
875
|
-
case "ValidationException":
|
|
876
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
877
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
878
|
-
default:
|
|
879
|
-
const parsedBody = parsedOutput.body;
|
|
880
|
-
return throwDefaultError({
|
|
881
|
-
output,
|
|
882
|
-
parsedBody,
|
|
883
|
-
errorCode,
|
|
884
|
-
});
|
|
885
|
-
}
|
|
886
|
-
};
|
|
887
|
-
const de_IsAuthorizedWithTokenCommand = async (output, context) => {
|
|
888
|
-
if (output.statusCode >= 300) {
|
|
889
|
-
return de_IsAuthorizedWithTokenCommandError(output, context);
|
|
890
|
-
}
|
|
891
|
-
const data = await parseBody(output.body, context);
|
|
892
|
-
let contents = {};
|
|
893
|
-
contents = (0, smithy_client_1._json)(data);
|
|
894
|
-
const response = {
|
|
895
|
-
$metadata: deserializeMetadata(output),
|
|
896
|
-
...contents,
|
|
897
|
-
};
|
|
898
|
-
return response;
|
|
899
|
-
};
|
|
900
|
-
exports.de_IsAuthorizedWithTokenCommand = de_IsAuthorizedWithTokenCommand;
|
|
901
|
-
const de_IsAuthorizedWithTokenCommandError = async (output, context) => {
|
|
902
|
-
const parsedOutput = {
|
|
903
|
-
...output,
|
|
904
|
-
body: await parseErrorBody(output.body, context),
|
|
905
|
-
};
|
|
906
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
907
|
-
switch (errorCode) {
|
|
908
|
-
case "AccessDeniedException":
|
|
909
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
910
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
911
|
-
case "InternalServerException":
|
|
912
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
913
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
914
|
-
case "ResourceNotFoundException":
|
|
915
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
916
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
917
|
-
case "ThrottlingException":
|
|
918
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
919
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
920
|
-
case "ValidationException":
|
|
921
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
922
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
923
|
-
default:
|
|
924
|
-
const parsedBody = parsedOutput.body;
|
|
925
|
-
return throwDefaultError({
|
|
926
|
-
output,
|
|
927
|
-
parsedBody,
|
|
928
|
-
errorCode,
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
};
|
|
932
|
-
const de_ListIdentitySourcesCommand = async (output, context) => {
|
|
933
|
-
if (output.statusCode >= 300) {
|
|
934
|
-
return de_ListIdentitySourcesCommandError(output, context);
|
|
935
|
-
}
|
|
936
|
-
const data = await parseBody(output.body, context);
|
|
937
|
-
let contents = {};
|
|
938
|
-
contents = de_ListIdentitySourcesOutput(data, context);
|
|
939
|
-
const response = {
|
|
940
|
-
$metadata: deserializeMetadata(output),
|
|
941
|
-
...contents,
|
|
942
|
-
};
|
|
943
|
-
return response;
|
|
944
|
-
};
|
|
945
|
-
exports.de_ListIdentitySourcesCommand = de_ListIdentitySourcesCommand;
|
|
946
|
-
const de_ListIdentitySourcesCommandError = async (output, context) => {
|
|
947
|
-
const parsedOutput = {
|
|
948
|
-
...output,
|
|
949
|
-
body: await parseErrorBody(output.body, context),
|
|
950
|
-
};
|
|
951
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
952
|
-
switch (errorCode) {
|
|
953
|
-
case "AccessDeniedException":
|
|
954
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
955
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
956
|
-
case "InternalServerException":
|
|
957
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
958
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
959
|
-
case "ResourceNotFoundException":
|
|
960
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
961
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
962
|
-
case "ThrottlingException":
|
|
963
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
964
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
965
|
-
case "ValidationException":
|
|
966
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
967
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
968
|
-
default:
|
|
969
|
-
const parsedBody = parsedOutput.body;
|
|
970
|
-
return throwDefaultError({
|
|
971
|
-
output,
|
|
972
|
-
parsedBody,
|
|
973
|
-
errorCode,
|
|
974
|
-
});
|
|
975
|
-
}
|
|
976
|
-
};
|
|
977
|
-
const de_ListPoliciesCommand = async (output, context) => {
|
|
978
|
-
if (output.statusCode >= 300) {
|
|
979
|
-
return de_ListPoliciesCommandError(output, context);
|
|
980
|
-
}
|
|
981
|
-
const data = await parseBody(output.body, context);
|
|
982
|
-
let contents = {};
|
|
983
|
-
contents = de_ListPoliciesOutput(data, context);
|
|
984
|
-
const response = {
|
|
985
|
-
$metadata: deserializeMetadata(output),
|
|
986
|
-
...contents,
|
|
987
|
-
};
|
|
988
|
-
return response;
|
|
989
|
-
};
|
|
990
|
-
exports.de_ListPoliciesCommand = de_ListPoliciesCommand;
|
|
991
|
-
const de_ListPoliciesCommandError = async (output, context) => {
|
|
992
|
-
const parsedOutput = {
|
|
993
|
-
...output,
|
|
994
|
-
body: await parseErrorBody(output.body, context),
|
|
995
|
-
};
|
|
996
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
997
|
-
switch (errorCode) {
|
|
998
|
-
case "AccessDeniedException":
|
|
999
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
1000
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1001
|
-
case "InternalServerException":
|
|
1002
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
1003
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1004
|
-
case "ResourceNotFoundException":
|
|
1005
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
1006
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1007
|
-
case "ThrottlingException":
|
|
1008
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
1009
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1010
|
-
case "ValidationException":
|
|
1011
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
1012
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1013
|
-
default:
|
|
1014
|
-
const parsedBody = parsedOutput.body;
|
|
1015
|
-
return throwDefaultError({
|
|
1016
|
-
output,
|
|
1017
|
-
parsedBody,
|
|
1018
|
-
errorCode,
|
|
1019
|
-
});
|
|
1020
|
-
}
|
|
1021
|
-
};
|
|
1022
|
-
const de_ListPolicyStoresCommand = async (output, context) => {
|
|
1023
|
-
if (output.statusCode >= 300) {
|
|
1024
|
-
return de_ListPolicyStoresCommandError(output, context);
|
|
1025
|
-
}
|
|
1026
|
-
const data = await parseBody(output.body, context);
|
|
1027
|
-
let contents = {};
|
|
1028
|
-
contents = de_ListPolicyStoresOutput(data, context);
|
|
1029
|
-
const response = {
|
|
1030
|
-
$metadata: deserializeMetadata(output),
|
|
1031
|
-
...contents,
|
|
1032
|
-
};
|
|
1033
|
-
return response;
|
|
1034
|
-
};
|
|
1035
|
-
exports.de_ListPolicyStoresCommand = de_ListPolicyStoresCommand;
|
|
1036
|
-
const de_ListPolicyStoresCommandError = async (output, context) => {
|
|
1037
|
-
const parsedOutput = {
|
|
1038
|
-
...output,
|
|
1039
|
-
body: await parseErrorBody(output.body, context),
|
|
1040
|
-
};
|
|
1041
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1042
|
-
switch (errorCode) {
|
|
1043
|
-
case "AccessDeniedException":
|
|
1044
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
1045
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1046
|
-
case "InternalServerException":
|
|
1047
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
1048
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1049
|
-
case "ThrottlingException":
|
|
1050
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
1051
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1052
|
-
case "ValidationException":
|
|
1053
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
1054
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1055
|
-
default:
|
|
1056
|
-
const parsedBody = parsedOutput.body;
|
|
1057
|
-
return throwDefaultError({
|
|
1058
|
-
output,
|
|
1059
|
-
parsedBody,
|
|
1060
|
-
errorCode,
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
};
|
|
1064
|
-
const de_ListPolicyTemplatesCommand = async (output, context) => {
|
|
1065
|
-
if (output.statusCode >= 300) {
|
|
1066
|
-
return de_ListPolicyTemplatesCommandError(output, context);
|
|
1067
|
-
}
|
|
1068
|
-
const data = await parseBody(output.body, context);
|
|
1069
|
-
let contents = {};
|
|
1070
|
-
contents = de_ListPolicyTemplatesOutput(data, context);
|
|
1071
|
-
const response = {
|
|
1072
|
-
$metadata: deserializeMetadata(output),
|
|
1073
|
-
...contents,
|
|
1074
|
-
};
|
|
1075
|
-
return response;
|
|
1076
|
-
};
|
|
1077
|
-
exports.de_ListPolicyTemplatesCommand = de_ListPolicyTemplatesCommand;
|
|
1078
|
-
const de_ListPolicyTemplatesCommandError = async (output, context) => {
|
|
1079
|
-
const parsedOutput = {
|
|
1080
|
-
...output,
|
|
1081
|
-
body: await parseErrorBody(output.body, context),
|
|
1082
|
-
};
|
|
1083
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1084
|
-
switch (errorCode) {
|
|
1085
|
-
case "AccessDeniedException":
|
|
1086
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
1087
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1088
|
-
case "InternalServerException":
|
|
1089
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
1090
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1091
|
-
case "ResourceNotFoundException":
|
|
1092
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
1093
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1094
|
-
case "ThrottlingException":
|
|
1095
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
1096
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1097
|
-
case "ValidationException":
|
|
1098
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
1099
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1100
|
-
default:
|
|
1101
|
-
const parsedBody = parsedOutput.body;
|
|
1102
|
-
return throwDefaultError({
|
|
1103
|
-
output,
|
|
1104
|
-
parsedBody,
|
|
1105
|
-
errorCode,
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
};
|
|
1109
|
-
const de_PutSchemaCommand = async (output, context) => {
|
|
1110
|
-
if (output.statusCode >= 300) {
|
|
1111
|
-
return de_PutSchemaCommandError(output, context);
|
|
1112
|
-
}
|
|
1113
|
-
const data = await parseBody(output.body, context);
|
|
1114
|
-
let contents = {};
|
|
1115
|
-
contents = de_PutSchemaOutput(data, context);
|
|
1116
|
-
const response = {
|
|
1117
|
-
$metadata: deserializeMetadata(output),
|
|
1118
|
-
...contents,
|
|
1119
|
-
};
|
|
1120
|
-
return response;
|
|
1121
|
-
};
|
|
1122
|
-
exports.de_PutSchemaCommand = de_PutSchemaCommand;
|
|
1123
|
-
const de_PutSchemaCommandError = async (output, context) => {
|
|
1124
|
-
const parsedOutput = {
|
|
1125
|
-
...output,
|
|
1126
|
-
body: await parseErrorBody(output.body, context),
|
|
1127
|
-
};
|
|
1128
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1129
|
-
switch (errorCode) {
|
|
1130
|
-
case "AccessDeniedException":
|
|
1131
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
1132
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1133
|
-
case "ConflictException":
|
|
1134
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
1135
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1136
|
-
case "InternalServerException":
|
|
1137
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
1138
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1139
|
-
case "ResourceNotFoundException":
|
|
1140
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
1141
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1142
|
-
case "ServiceQuotaExceededException":
|
|
1143
|
-
case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
|
|
1144
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1145
|
-
case "ThrottlingException":
|
|
1146
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
1147
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1148
|
-
case "ValidationException":
|
|
1149
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
1150
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1151
|
-
default:
|
|
1152
|
-
const parsedBody = parsedOutput.body;
|
|
1153
|
-
return throwDefaultError({
|
|
1154
|
-
output,
|
|
1155
|
-
parsedBody,
|
|
1156
|
-
errorCode,
|
|
1157
|
-
});
|
|
1158
|
-
}
|
|
1159
|
-
};
|
|
1160
|
-
const de_UpdateIdentitySourceCommand = async (output, context) => {
|
|
1161
|
-
if (output.statusCode >= 300) {
|
|
1162
|
-
return de_UpdateIdentitySourceCommandError(output, context);
|
|
1163
|
-
}
|
|
1164
|
-
const data = await parseBody(output.body, context);
|
|
1165
|
-
let contents = {};
|
|
1166
|
-
contents = de_UpdateIdentitySourceOutput(data, context);
|
|
1167
|
-
const response = {
|
|
1168
|
-
$metadata: deserializeMetadata(output),
|
|
1169
|
-
...contents,
|
|
1170
|
-
};
|
|
1171
|
-
return response;
|
|
1172
|
-
};
|
|
1173
|
-
exports.de_UpdateIdentitySourceCommand = de_UpdateIdentitySourceCommand;
|
|
1174
|
-
const de_UpdateIdentitySourceCommandError = async (output, context) => {
|
|
1175
|
-
const parsedOutput = {
|
|
1176
|
-
...output,
|
|
1177
|
-
body: await parseErrorBody(output.body, context),
|
|
1178
|
-
};
|
|
1179
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1180
|
-
switch (errorCode) {
|
|
1181
|
-
case "AccessDeniedException":
|
|
1182
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
1183
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1184
|
-
case "ConflictException":
|
|
1185
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
1186
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1187
|
-
case "InternalServerException":
|
|
1188
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
1189
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1190
|
-
case "ResourceNotFoundException":
|
|
1191
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
1192
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1193
|
-
case "ThrottlingException":
|
|
1194
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
1195
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1196
|
-
case "ValidationException":
|
|
1197
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
1198
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1199
|
-
default:
|
|
1200
|
-
const parsedBody = parsedOutput.body;
|
|
1201
|
-
return throwDefaultError({
|
|
1202
|
-
output,
|
|
1203
|
-
parsedBody,
|
|
1204
|
-
errorCode,
|
|
1205
|
-
});
|
|
1206
|
-
}
|
|
1207
|
-
};
|
|
1208
|
-
const de_UpdatePolicyCommand = async (output, context) => {
|
|
1209
|
-
if (output.statusCode >= 300) {
|
|
1210
|
-
return de_UpdatePolicyCommandError(output, context);
|
|
1211
|
-
}
|
|
1212
|
-
const data = await parseBody(output.body, context);
|
|
1213
|
-
let contents = {};
|
|
1214
|
-
contents = de_UpdatePolicyOutput(data, context);
|
|
1215
|
-
const response = {
|
|
1216
|
-
$metadata: deserializeMetadata(output),
|
|
1217
|
-
...contents,
|
|
1218
|
-
};
|
|
1219
|
-
return response;
|
|
1220
|
-
};
|
|
1221
|
-
exports.de_UpdatePolicyCommand = de_UpdatePolicyCommand;
|
|
1222
|
-
const de_UpdatePolicyCommandError = async (output, context) => {
|
|
1223
|
-
const parsedOutput = {
|
|
1224
|
-
...output,
|
|
1225
|
-
body: await parseErrorBody(output.body, context),
|
|
1226
|
-
};
|
|
1227
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1228
|
-
switch (errorCode) {
|
|
1229
|
-
case "AccessDeniedException":
|
|
1230
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
1231
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1232
|
-
case "ConflictException":
|
|
1233
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
1234
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1235
|
-
case "InternalServerException":
|
|
1236
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
1237
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1238
|
-
case "ResourceNotFoundException":
|
|
1239
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
1240
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1241
|
-
case "ServiceQuotaExceededException":
|
|
1242
|
-
case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
|
|
1243
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1244
|
-
case "ThrottlingException":
|
|
1245
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
1246
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1247
|
-
case "ValidationException":
|
|
1248
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
1249
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1250
|
-
default:
|
|
1251
|
-
const parsedBody = parsedOutput.body;
|
|
1252
|
-
return throwDefaultError({
|
|
1253
|
-
output,
|
|
1254
|
-
parsedBody,
|
|
1255
|
-
errorCode,
|
|
1256
|
-
});
|
|
1257
|
-
}
|
|
1258
|
-
};
|
|
1259
|
-
const de_UpdatePolicyStoreCommand = async (output, context) => {
|
|
1260
|
-
if (output.statusCode >= 300) {
|
|
1261
|
-
return de_UpdatePolicyStoreCommandError(output, context);
|
|
1262
|
-
}
|
|
1263
|
-
const data = await parseBody(output.body, context);
|
|
1264
|
-
let contents = {};
|
|
1265
|
-
contents = de_UpdatePolicyStoreOutput(data, context);
|
|
1266
|
-
const response = {
|
|
1267
|
-
$metadata: deserializeMetadata(output),
|
|
1268
|
-
...contents,
|
|
1269
|
-
};
|
|
1270
|
-
return response;
|
|
1271
|
-
};
|
|
1272
|
-
exports.de_UpdatePolicyStoreCommand = de_UpdatePolicyStoreCommand;
|
|
1273
|
-
const de_UpdatePolicyStoreCommandError = async (output, context) => {
|
|
1274
|
-
const parsedOutput = {
|
|
1275
|
-
...output,
|
|
1276
|
-
body: await parseErrorBody(output.body, context),
|
|
1277
|
-
};
|
|
1278
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1279
|
-
switch (errorCode) {
|
|
1280
|
-
case "AccessDeniedException":
|
|
1281
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
1282
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1283
|
-
case "ConflictException":
|
|
1284
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
1285
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1286
|
-
case "InternalServerException":
|
|
1287
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
1288
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1289
|
-
case "ResourceNotFoundException":
|
|
1290
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
1291
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1292
|
-
case "ThrottlingException":
|
|
1293
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
1294
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1295
|
-
case "ValidationException":
|
|
1296
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
1297
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1298
|
-
default:
|
|
1299
|
-
const parsedBody = parsedOutput.body;
|
|
1300
|
-
return throwDefaultError({
|
|
1301
|
-
output,
|
|
1302
|
-
parsedBody,
|
|
1303
|
-
errorCode,
|
|
1304
|
-
});
|
|
1305
|
-
}
|
|
1306
|
-
};
|
|
1307
|
-
const de_UpdatePolicyTemplateCommand = async (output, context) => {
|
|
1308
|
-
if (output.statusCode >= 300) {
|
|
1309
|
-
return de_UpdatePolicyTemplateCommandError(output, context);
|
|
1310
|
-
}
|
|
1311
|
-
const data = await parseBody(output.body, context);
|
|
1312
|
-
let contents = {};
|
|
1313
|
-
contents = de_UpdatePolicyTemplateOutput(data, context);
|
|
1314
|
-
const response = {
|
|
1315
|
-
$metadata: deserializeMetadata(output),
|
|
1316
|
-
...contents,
|
|
1317
|
-
};
|
|
1318
|
-
return response;
|
|
1319
|
-
};
|
|
1320
|
-
exports.de_UpdatePolicyTemplateCommand = de_UpdatePolicyTemplateCommand;
|
|
1321
|
-
const de_UpdatePolicyTemplateCommandError = async (output, context) => {
|
|
1322
|
-
const parsedOutput = {
|
|
1323
|
-
...output,
|
|
1324
|
-
body: await parseErrorBody(output.body, context),
|
|
1325
|
-
};
|
|
1326
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1327
|
-
switch (errorCode) {
|
|
1328
|
-
case "AccessDeniedException":
|
|
1329
|
-
case "com.amazonaws.verifiedpermissions#AccessDeniedException":
|
|
1330
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1331
|
-
case "ConflictException":
|
|
1332
|
-
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
1333
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1334
|
-
case "InternalServerException":
|
|
1335
|
-
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
1336
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1337
|
-
case "ResourceNotFoundException":
|
|
1338
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
1339
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1340
|
-
case "ThrottlingException":
|
|
1341
|
-
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
1342
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1343
|
-
case "ValidationException":
|
|
1344
|
-
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
1345
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1346
|
-
default:
|
|
1347
|
-
const parsedBody = parsedOutput.body;
|
|
1348
|
-
return throwDefaultError({
|
|
1349
|
-
output,
|
|
1350
|
-
parsedBody,
|
|
1351
|
-
errorCode,
|
|
1352
|
-
});
|
|
1353
|
-
}
|
|
1354
|
-
};
|
|
1355
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1356
|
-
const body = parsedOutput.body;
|
|
1357
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1358
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1359
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1360
|
-
...deserialized,
|
|
1361
|
-
});
|
|
1362
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1363
|
-
};
|
|
1364
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1365
|
-
const body = parsedOutput.body;
|
|
1366
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1367
|
-
const exception = new models_0_1.ConflictException({
|
|
1368
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1369
|
-
...deserialized,
|
|
1370
|
-
});
|
|
1371
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1372
|
-
};
|
|
1373
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1374
|
-
const body = parsedOutput.body;
|
|
1375
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1376
|
-
const exception = new models_0_1.InternalServerException({
|
|
1377
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1378
|
-
...deserialized,
|
|
1379
|
-
});
|
|
1380
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1381
|
-
};
|
|
1382
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1383
|
-
const body = parsedOutput.body;
|
|
1384
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1385
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1386
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1387
|
-
...deserialized,
|
|
1388
|
-
});
|
|
1389
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1390
|
-
};
|
|
1391
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1392
|
-
const body = parsedOutput.body;
|
|
1393
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1394
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1395
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1396
|
-
...deserialized,
|
|
1397
|
-
});
|
|
1398
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1399
|
-
};
|
|
1400
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1401
|
-
const body = parsedOutput.body;
|
|
1402
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1403
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1404
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1405
|
-
...deserialized,
|
|
1406
|
-
});
|
|
1407
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1408
|
-
};
|
|
1409
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1410
|
-
const body = parsedOutput.body;
|
|
1411
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1412
|
-
const exception = new models_0_1.ValidationException({
|
|
1413
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1414
|
-
...deserialized,
|
|
1415
|
-
});
|
|
1416
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1417
|
-
};
|
|
1418
|
-
const se_AttributeValue = (input, context) => {
|
|
1419
|
-
return models_0_1.AttributeValue.visit(input, {
|
|
1420
|
-
boolean: (value) => ({ boolean: value }),
|
|
1421
|
-
entityIdentifier: (value) => ({ entityIdentifier: (0, smithy_client_1._json)(value) }),
|
|
1422
|
-
long: (value) => ({ long: value }),
|
|
1423
|
-
record: (value) => ({ record: se_RecordAttribute(value, context) }),
|
|
1424
|
-
set: (value) => ({ set: se_SetAttribute(value, context) }),
|
|
1425
|
-
string: (value) => ({ string: value }),
|
|
1426
|
-
_: (name, value) => ({ name: value }),
|
|
1427
|
-
});
|
|
1428
|
-
};
|
|
1429
|
-
const se_BatchIsAuthorizedInput = (input, context) => {
|
|
1430
|
-
return (0, smithy_client_1.take)(input, {
|
|
1431
|
-
entities: (_) => se_EntitiesDefinition(_, context),
|
|
1432
|
-
policyStoreId: [],
|
|
1433
|
-
requests: (_) => se_BatchIsAuthorizedInputList(_, context),
|
|
1434
|
-
});
|
|
1435
|
-
};
|
|
1436
|
-
const se_BatchIsAuthorizedInputItem = (input, context) => {
|
|
1437
|
-
return (0, smithy_client_1.take)(input, {
|
|
1438
|
-
action: smithy_client_1._json,
|
|
1439
|
-
context: (_) => se_ContextDefinition(_, context),
|
|
1440
|
-
principal: smithy_client_1._json,
|
|
1441
|
-
resource: smithy_client_1._json,
|
|
1442
|
-
});
|
|
1443
|
-
};
|
|
1444
|
-
const se_BatchIsAuthorizedInputList = (input, context) => {
|
|
1445
|
-
return input
|
|
1446
|
-
.filter((e) => e != null)
|
|
1447
|
-
.map((entry) => {
|
|
1448
|
-
return se_BatchIsAuthorizedInputItem(entry, context);
|
|
1449
|
-
});
|
|
1450
|
-
};
|
|
1451
|
-
const se_ContextDefinition = (input, context) => {
|
|
1452
|
-
return models_0_1.ContextDefinition.visit(input, {
|
|
1453
|
-
contextMap: (value) => ({ contextMap: se_ContextMap(value, context) }),
|
|
1454
|
-
_: (name, value) => ({ name: value }),
|
|
1455
|
-
});
|
|
1456
|
-
};
|
|
1457
|
-
const se_ContextMap = (input, context) => {
|
|
1458
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1459
|
-
if (value === null) {
|
|
1460
|
-
return acc;
|
|
1461
|
-
}
|
|
1462
|
-
acc[key] = se_AttributeValue(value, context);
|
|
1463
|
-
return acc;
|
|
1464
|
-
}, {});
|
|
1465
|
-
};
|
|
1466
|
-
const se_CreateIdentitySourceInput = (input, context) => {
|
|
1467
|
-
return (0, smithy_client_1.take)(input, {
|
|
1468
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1469
|
-
configuration: smithy_client_1._json,
|
|
1470
|
-
policyStoreId: [],
|
|
1471
|
-
principalEntityType: [],
|
|
1472
|
-
});
|
|
1473
|
-
};
|
|
1474
|
-
const se_CreatePolicyInput = (input, context) => {
|
|
1475
|
-
return (0, smithy_client_1.take)(input, {
|
|
1476
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1477
|
-
definition: smithy_client_1._json,
|
|
1478
|
-
policyStoreId: [],
|
|
1479
|
-
});
|
|
1480
|
-
};
|
|
1481
|
-
const se_CreatePolicyStoreInput = (input, context) => {
|
|
1482
|
-
return (0, smithy_client_1.take)(input, {
|
|
1483
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1484
|
-
description: [],
|
|
1485
|
-
validationSettings: smithy_client_1._json,
|
|
1486
|
-
});
|
|
1487
|
-
};
|
|
1488
|
-
const se_CreatePolicyTemplateInput = (input, context) => {
|
|
1489
|
-
return (0, smithy_client_1.take)(input, {
|
|
1490
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1491
|
-
description: [],
|
|
1492
|
-
policyStoreId: [],
|
|
1493
|
-
statement: [],
|
|
1494
|
-
});
|
|
1495
|
-
};
|
|
1496
|
-
const se_EntitiesDefinition = (input, context) => {
|
|
1497
|
-
return models_0_1.EntitiesDefinition.visit(input, {
|
|
1498
|
-
entityList: (value) => ({ entityList: se_EntityList(value, context) }),
|
|
1499
|
-
_: (name, value) => ({ name: value }),
|
|
1500
|
-
});
|
|
1501
|
-
};
|
|
1502
|
-
const se_EntityAttributes = (input, context) => {
|
|
1503
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1504
|
-
if (value === null) {
|
|
1505
|
-
return acc;
|
|
1506
|
-
}
|
|
1507
|
-
acc[key] = se_AttributeValue(value, context);
|
|
1508
|
-
return acc;
|
|
1509
|
-
}, {});
|
|
1510
|
-
};
|
|
1511
|
-
const se_EntityItem = (input, context) => {
|
|
1512
|
-
return (0, smithy_client_1.take)(input, {
|
|
1513
|
-
attributes: (_) => se_EntityAttributes(_, context),
|
|
1514
|
-
identifier: smithy_client_1._json,
|
|
1515
|
-
parents: smithy_client_1._json,
|
|
1516
|
-
});
|
|
1517
|
-
};
|
|
1518
|
-
const se_EntityList = (input, context) => {
|
|
1519
|
-
return input
|
|
1520
|
-
.filter((e) => e != null)
|
|
1521
|
-
.map((entry) => {
|
|
1522
|
-
return se_EntityItem(entry, context);
|
|
1523
|
-
});
|
|
1524
|
-
};
|
|
1525
|
-
const se_IsAuthorizedInput = (input, context) => {
|
|
1526
|
-
return (0, smithy_client_1.take)(input, {
|
|
1527
|
-
action: smithy_client_1._json,
|
|
1528
|
-
context: (_) => se_ContextDefinition(_, context),
|
|
1529
|
-
entities: (_) => se_EntitiesDefinition(_, context),
|
|
1530
|
-
policyStoreId: [],
|
|
1531
|
-
principal: smithy_client_1._json,
|
|
1532
|
-
resource: smithy_client_1._json,
|
|
1533
|
-
});
|
|
1534
|
-
};
|
|
1535
|
-
const se_IsAuthorizedWithTokenInput = (input, context) => {
|
|
1536
|
-
return (0, smithy_client_1.take)(input, {
|
|
1537
|
-
accessToken: [],
|
|
1538
|
-
action: smithy_client_1._json,
|
|
1539
|
-
context: (_) => se_ContextDefinition(_, context),
|
|
1540
|
-
entities: (_) => se_EntitiesDefinition(_, context),
|
|
1541
|
-
identityToken: [],
|
|
1542
|
-
policyStoreId: [],
|
|
1543
|
-
resource: smithy_client_1._json,
|
|
1544
|
-
});
|
|
1545
|
-
};
|
|
1546
|
-
const se_RecordAttribute = (input, context) => {
|
|
1547
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1548
|
-
if (value === null) {
|
|
1549
|
-
return acc;
|
|
1550
|
-
}
|
|
1551
|
-
acc[key] = se_AttributeValue(value, context);
|
|
1552
|
-
return acc;
|
|
1553
|
-
}, {});
|
|
1554
|
-
};
|
|
1555
|
-
const se_SetAttribute = (input, context) => {
|
|
1556
|
-
return input
|
|
1557
|
-
.filter((e) => e != null)
|
|
1558
|
-
.map((entry) => {
|
|
1559
|
-
return se_AttributeValue(entry, context);
|
|
1560
|
-
});
|
|
1561
|
-
};
|
|
1562
|
-
const de_AttributeValue = (output, context) => {
|
|
1563
|
-
if ((0, smithy_client_1.expectBoolean)(output.boolean) !== undefined) {
|
|
1564
|
-
return { boolean: (0, smithy_client_1.expectBoolean)(output.boolean) };
|
|
1565
|
-
}
|
|
1566
|
-
if (output.entityIdentifier != null) {
|
|
1567
|
-
return {
|
|
1568
|
-
entityIdentifier: (0, smithy_client_1._json)(output.entityIdentifier),
|
|
1569
|
-
};
|
|
1570
|
-
}
|
|
1571
|
-
if ((0, smithy_client_1.expectLong)(output.long) !== undefined) {
|
|
1572
|
-
return { long: (0, smithy_client_1.expectLong)(output.long) };
|
|
1573
|
-
}
|
|
1574
|
-
if (output.record != null) {
|
|
1575
|
-
return {
|
|
1576
|
-
record: de_RecordAttribute(output.record, context),
|
|
1577
|
-
};
|
|
1578
|
-
}
|
|
1579
|
-
if (output.set != null) {
|
|
1580
|
-
return {
|
|
1581
|
-
set: de_SetAttribute(output.set, context),
|
|
1582
|
-
};
|
|
1583
|
-
}
|
|
1584
|
-
if ((0, smithy_client_1.expectString)(output.string) !== undefined) {
|
|
1585
|
-
return { string: (0, smithy_client_1.expectString)(output.string) };
|
|
1586
|
-
}
|
|
1587
|
-
return { $unknown: Object.entries(output)[0] };
|
|
1588
|
-
};
|
|
1589
|
-
const de_BatchIsAuthorizedInputItem = (output, context) => {
|
|
1590
|
-
return (0, smithy_client_1.take)(output, {
|
|
1591
|
-
action: smithy_client_1._json,
|
|
1592
|
-
context: (_) => de_ContextDefinition((0, core_1.awsExpectUnion)(_), context),
|
|
1593
|
-
principal: smithy_client_1._json,
|
|
1594
|
-
resource: smithy_client_1._json,
|
|
1595
|
-
});
|
|
1596
|
-
};
|
|
1597
|
-
const de_BatchIsAuthorizedOutput = (output, context) => {
|
|
1598
|
-
return (0, smithy_client_1.take)(output, {
|
|
1599
|
-
results: (_) => de_BatchIsAuthorizedOutputList(_, context),
|
|
1600
|
-
});
|
|
1601
|
-
};
|
|
1602
|
-
const de_BatchIsAuthorizedOutputItem = (output, context) => {
|
|
1603
|
-
return (0, smithy_client_1.take)(output, {
|
|
1604
|
-
decision: smithy_client_1.expectString,
|
|
1605
|
-
determiningPolicies: smithy_client_1._json,
|
|
1606
|
-
errors: smithy_client_1._json,
|
|
1607
|
-
request: (_) => de_BatchIsAuthorizedInputItem(_, context),
|
|
1608
|
-
});
|
|
1609
|
-
};
|
|
1610
|
-
const de_BatchIsAuthorizedOutputList = (output, context) => {
|
|
1611
|
-
const retVal = (output || [])
|
|
1612
|
-
.filter((e) => e != null)
|
|
1613
|
-
.map((entry) => {
|
|
1614
|
-
return de_BatchIsAuthorizedOutputItem(entry, context);
|
|
1615
|
-
});
|
|
1616
|
-
return retVal;
|
|
1617
|
-
};
|
|
1618
|
-
const de_ContextDefinition = (output, context) => {
|
|
1619
|
-
if (output.contextMap != null) {
|
|
1620
|
-
return {
|
|
1621
|
-
contextMap: de_ContextMap(output.contextMap, context),
|
|
1622
|
-
};
|
|
1623
|
-
}
|
|
1624
|
-
return { $unknown: Object.entries(output)[0] };
|
|
1625
|
-
};
|
|
1626
|
-
const de_ContextMap = (output, context) => {
|
|
1627
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1628
|
-
if (value === null) {
|
|
1629
|
-
return acc;
|
|
1630
|
-
}
|
|
1631
|
-
acc[key] = de_AttributeValue((0, core_1.awsExpectUnion)(value), context);
|
|
1632
|
-
return acc;
|
|
1633
|
-
}, {});
|
|
1634
|
-
};
|
|
1635
|
-
const de_CreateIdentitySourceOutput = (output, context) => {
|
|
1636
|
-
return (0, smithy_client_1.take)(output, {
|
|
1637
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1638
|
-
identitySourceId: smithy_client_1.expectString,
|
|
1639
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1640
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1641
|
-
});
|
|
1642
|
-
};
|
|
1643
|
-
const de_CreatePolicyOutput = (output, context) => {
|
|
1644
|
-
return (0, smithy_client_1.take)(output, {
|
|
1645
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1646
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1647
|
-
policyId: smithy_client_1.expectString,
|
|
1648
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1649
|
-
policyType: smithy_client_1.expectString,
|
|
1650
|
-
principal: smithy_client_1._json,
|
|
1651
|
-
resource: smithy_client_1._json,
|
|
1652
|
-
});
|
|
1653
|
-
};
|
|
1654
|
-
const de_CreatePolicyStoreOutput = (output, context) => {
|
|
1655
|
-
return (0, smithy_client_1.take)(output, {
|
|
1656
|
-
arn: smithy_client_1.expectString,
|
|
1657
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1658
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1659
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1660
|
-
});
|
|
1661
|
-
};
|
|
1662
|
-
const de_CreatePolicyTemplateOutput = (output, context) => {
|
|
1663
|
-
return (0, smithy_client_1.take)(output, {
|
|
1664
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1665
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1666
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1667
|
-
policyTemplateId: smithy_client_1.expectString,
|
|
1668
|
-
});
|
|
1669
|
-
};
|
|
1670
|
-
const de_GetIdentitySourceOutput = (output, context) => {
|
|
1671
|
-
return (0, smithy_client_1.take)(output, {
|
|
1672
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1673
|
-
details: smithy_client_1._json,
|
|
1674
|
-
identitySourceId: smithy_client_1.expectString,
|
|
1675
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1676
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1677
|
-
principalEntityType: smithy_client_1.expectString,
|
|
1678
|
-
});
|
|
1679
|
-
};
|
|
1680
|
-
const de_GetPolicyOutput = (output, context) => {
|
|
1681
|
-
return (0, smithy_client_1.take)(output, {
|
|
1682
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1683
|
-
definition: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
1684
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1685
|
-
policyId: smithy_client_1.expectString,
|
|
1686
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1687
|
-
policyType: smithy_client_1.expectString,
|
|
1688
|
-
principal: smithy_client_1._json,
|
|
1689
|
-
resource: smithy_client_1._json,
|
|
1690
|
-
});
|
|
1691
|
-
};
|
|
1692
|
-
const de_GetPolicyStoreOutput = (output, context) => {
|
|
1693
|
-
return (0, smithy_client_1.take)(output, {
|
|
1694
|
-
arn: smithy_client_1.expectString,
|
|
1695
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1696
|
-
description: smithy_client_1.expectString,
|
|
1697
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1698
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1699
|
-
validationSettings: smithy_client_1._json,
|
|
1700
|
-
});
|
|
1701
|
-
};
|
|
1702
|
-
const de_GetPolicyTemplateOutput = (output, context) => {
|
|
1703
|
-
return (0, smithy_client_1.take)(output, {
|
|
1704
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1705
|
-
description: smithy_client_1.expectString,
|
|
1706
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1707
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1708
|
-
policyTemplateId: smithy_client_1.expectString,
|
|
1709
|
-
statement: smithy_client_1.expectString,
|
|
1710
|
-
});
|
|
1711
|
-
};
|
|
1712
|
-
const de_GetSchemaOutput = (output, context) => {
|
|
1713
|
-
return (0, smithy_client_1.take)(output, {
|
|
1714
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1715
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1716
|
-
namespaces: smithy_client_1._json,
|
|
1717
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1718
|
-
schema: smithy_client_1.expectString,
|
|
1719
|
-
});
|
|
1720
|
-
};
|
|
1721
|
-
const de_IdentitySourceItem = (output, context) => {
|
|
1722
|
-
return (0, smithy_client_1.take)(output, {
|
|
1723
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1724
|
-
details: smithy_client_1._json,
|
|
1725
|
-
identitySourceId: smithy_client_1.expectString,
|
|
1726
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1727
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1728
|
-
principalEntityType: smithy_client_1.expectString,
|
|
1729
|
-
});
|
|
1730
|
-
};
|
|
1731
|
-
const de_IdentitySources = (output, context) => {
|
|
1732
|
-
const retVal = (output || [])
|
|
1733
|
-
.filter((e) => e != null)
|
|
1734
|
-
.map((entry) => {
|
|
1735
|
-
return de_IdentitySourceItem(entry, context);
|
|
1736
|
-
});
|
|
1737
|
-
return retVal;
|
|
1738
|
-
};
|
|
1739
|
-
const de_ListIdentitySourcesOutput = (output, context) => {
|
|
1740
|
-
return (0, smithy_client_1.take)(output, {
|
|
1741
|
-
identitySources: (_) => de_IdentitySources(_, context),
|
|
1742
|
-
nextToken: smithy_client_1.expectString,
|
|
1743
|
-
});
|
|
1744
|
-
};
|
|
1745
|
-
const de_ListPoliciesOutput = (output, context) => {
|
|
1746
|
-
return (0, smithy_client_1.take)(output, {
|
|
1747
|
-
nextToken: smithy_client_1.expectString,
|
|
1748
|
-
policies: (_) => de_PolicyList(_, context),
|
|
1749
|
-
});
|
|
1750
|
-
};
|
|
1751
|
-
const de_ListPolicyStoresOutput = (output, context) => {
|
|
1752
|
-
return (0, smithy_client_1.take)(output, {
|
|
1753
|
-
nextToken: smithy_client_1.expectString,
|
|
1754
|
-
policyStores: (_) => de_PolicyStoreList(_, context),
|
|
1755
|
-
});
|
|
1756
|
-
};
|
|
1757
|
-
const de_ListPolicyTemplatesOutput = (output, context) => {
|
|
1758
|
-
return (0, smithy_client_1.take)(output, {
|
|
1759
|
-
nextToken: smithy_client_1.expectString,
|
|
1760
|
-
policyTemplates: (_) => de_PolicyTemplatesList(_, context),
|
|
1761
|
-
});
|
|
1762
|
-
};
|
|
1763
|
-
const de_PolicyItem = (output, context) => {
|
|
1764
|
-
return (0, smithy_client_1.take)(output, {
|
|
1765
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1766
|
-
definition: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
1767
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1768
|
-
policyId: smithy_client_1.expectString,
|
|
1769
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1770
|
-
policyType: smithy_client_1.expectString,
|
|
1771
|
-
principal: smithy_client_1._json,
|
|
1772
|
-
resource: smithy_client_1._json,
|
|
1773
|
-
});
|
|
1774
|
-
};
|
|
1775
|
-
const de_PolicyList = (output, context) => {
|
|
1776
|
-
const retVal = (output || [])
|
|
1777
|
-
.filter((e) => e != null)
|
|
1778
|
-
.map((entry) => {
|
|
1779
|
-
return de_PolicyItem(entry, context);
|
|
1780
|
-
});
|
|
1781
|
-
return retVal;
|
|
1782
|
-
};
|
|
1783
|
-
const de_PolicyStoreItem = (output, context) => {
|
|
1784
|
-
return (0, smithy_client_1.take)(output, {
|
|
1785
|
-
arn: smithy_client_1.expectString,
|
|
1786
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1787
|
-
description: smithy_client_1.expectString,
|
|
1788
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1789
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1790
|
-
});
|
|
1791
|
-
};
|
|
1792
|
-
const de_PolicyStoreList = (output, context) => {
|
|
1793
|
-
const retVal = (output || [])
|
|
1794
|
-
.filter((e) => e != null)
|
|
1795
|
-
.map((entry) => {
|
|
1796
|
-
return de_PolicyStoreItem(entry, context);
|
|
1797
|
-
});
|
|
1798
|
-
return retVal;
|
|
1799
|
-
};
|
|
1800
|
-
const de_PolicyTemplateItem = (output, context) => {
|
|
1801
|
-
return (0, smithy_client_1.take)(output, {
|
|
1802
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1803
|
-
description: smithy_client_1.expectString,
|
|
1804
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1805
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1806
|
-
policyTemplateId: smithy_client_1.expectString,
|
|
1807
|
-
});
|
|
1808
|
-
};
|
|
1809
|
-
const de_PolicyTemplatesList = (output, context) => {
|
|
1810
|
-
const retVal = (output || [])
|
|
1811
|
-
.filter((e) => e != null)
|
|
1812
|
-
.map((entry) => {
|
|
1813
|
-
return de_PolicyTemplateItem(entry, context);
|
|
1814
|
-
});
|
|
1815
|
-
return retVal;
|
|
1816
|
-
};
|
|
1817
|
-
const de_PutSchemaOutput = (output, context) => {
|
|
1818
|
-
return (0, smithy_client_1.take)(output, {
|
|
1819
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1820
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1821
|
-
namespaces: smithy_client_1._json,
|
|
1822
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1823
|
-
});
|
|
1824
|
-
};
|
|
1825
|
-
const de_RecordAttribute = (output, context) => {
|
|
1826
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1827
|
-
if (value === null) {
|
|
1828
|
-
return acc;
|
|
1829
|
-
}
|
|
1830
|
-
acc[key] = de_AttributeValue((0, core_1.awsExpectUnion)(value), context);
|
|
1831
|
-
return acc;
|
|
1832
|
-
}, {});
|
|
1833
|
-
};
|
|
1834
|
-
const de_SetAttribute = (output, context) => {
|
|
1835
|
-
const retVal = (output || [])
|
|
1836
|
-
.filter((e) => e != null)
|
|
1837
|
-
.map((entry) => {
|
|
1838
|
-
return de_AttributeValue((0, core_1.awsExpectUnion)(entry), context);
|
|
1839
|
-
});
|
|
1840
|
-
return retVal;
|
|
1841
|
-
};
|
|
1842
|
-
const de_UpdateIdentitySourceOutput = (output, context) => {
|
|
1843
|
-
return (0, smithy_client_1.take)(output, {
|
|
1844
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1845
|
-
identitySourceId: smithy_client_1.expectString,
|
|
1846
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1847
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1848
|
-
});
|
|
1849
|
-
};
|
|
1850
|
-
const de_UpdatePolicyOutput = (output, context) => {
|
|
1851
|
-
return (0, smithy_client_1.take)(output, {
|
|
1852
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1853
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1854
|
-
policyId: smithy_client_1.expectString,
|
|
1855
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1856
|
-
policyType: smithy_client_1.expectString,
|
|
1857
|
-
principal: smithy_client_1._json,
|
|
1858
|
-
resource: smithy_client_1._json,
|
|
1859
|
-
});
|
|
1860
|
-
};
|
|
1861
|
-
const de_UpdatePolicyStoreOutput = (output, context) => {
|
|
1862
|
-
return (0, smithy_client_1.take)(output, {
|
|
1863
|
-
arn: smithy_client_1.expectString,
|
|
1864
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1865
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1866
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1867
|
-
});
|
|
1868
|
-
};
|
|
1869
|
-
const de_UpdatePolicyTemplateOutput = (output, context) => {
|
|
1870
|
-
return (0, smithy_client_1.take)(output, {
|
|
1871
|
-
createdDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1872
|
-
lastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1873
|
-
policyStoreId: smithy_client_1.expectString,
|
|
1874
|
-
policyTemplateId: smithy_client_1.expectString,
|
|
1875
|
-
});
|
|
1876
|
-
};
|
|
1877
|
-
const deserializeMetadata = (output) => ({
|
|
1878
|
-
httpStatusCode: output.statusCode,
|
|
1879
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1880
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1881
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1882
|
-
});
|
|
1883
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1884
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(VerifiedPermissionsServiceException_1.VerifiedPermissionsServiceException);
|
|
1885
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1886
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1887
|
-
const contents = {
|
|
1888
|
-
protocol,
|
|
1889
|
-
hostname,
|
|
1890
|
-
port,
|
|
1891
|
-
method: "POST",
|
|
1892
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1893
|
-
headers,
|
|
1894
|
-
};
|
|
1895
|
-
if (resolvedHostname !== undefined) {
|
|
1896
|
-
contents.hostname = resolvedHostname;
|
|
1897
|
-
}
|
|
1898
|
-
if (body !== undefined) {
|
|
1899
|
-
contents.body = body;
|
|
1900
|
-
}
|
|
1901
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
1902
|
-
};
|
|
1903
|
-
function sharedHeaders(operation) {
|
|
1904
|
-
return {
|
|
1905
|
-
"content-type": "application/x-amz-json-1.0",
|
|
1906
|
-
"x-amz-target": `VerifiedPermissions.${operation}`,
|
|
1907
|
-
};
|
|
1908
|
-
}
|
|
1909
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1910
|
-
if (encoded.length) {
|
|
1911
|
-
return JSON.parse(encoded);
|
|
1912
|
-
}
|
|
1913
|
-
return {};
|
|
1914
|
-
});
|
|
1915
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1916
|
-
const value = await parseBody(errorBody, context);
|
|
1917
|
-
value.message = value.message ?? value.Message;
|
|
1918
|
-
return value;
|
|
1919
|
-
};
|
|
1920
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1921
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1922
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1923
|
-
let cleanValue = rawValue;
|
|
1924
|
-
if (typeof cleanValue === "number") {
|
|
1925
|
-
cleanValue = cleanValue.toString();
|
|
1926
|
-
}
|
|
1927
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1928
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1929
|
-
}
|
|
1930
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1931
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1932
|
-
}
|
|
1933
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1934
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1935
|
-
}
|
|
1936
|
-
return cleanValue;
|
|
1937
|
-
};
|
|
1938
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1939
|
-
if (headerKey !== undefined) {
|
|
1940
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1941
|
-
}
|
|
1942
|
-
if (data.code !== undefined) {
|
|
1943
|
-
return sanitizeErrorCode(data.code);
|
|
1944
|
-
}
|
|
1945
|
-
if (data["__type"] !== undefined) {
|
|
1946
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1947
|
-
}
|
|
1948
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|