@aws-sdk/client-directory-service-data 3.893.0 → 3.895.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.
Files changed (38) hide show
  1. package/dist-cjs/index.js +1772 -10
  2. package/package.json +7 -7
  3. package/dist-cjs/DirectoryServiceData.js +0 -45
  4. package/dist-cjs/DirectoryServiceDataClient.js +0 -52
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
  6. package/dist-cjs/commands/AddGroupMemberCommand.js +0 -26
  7. package/dist-cjs/commands/CreateGroupCommand.js +0 -27
  8. package/dist-cjs/commands/CreateUserCommand.js +0 -27
  9. package/dist-cjs/commands/DeleteGroupCommand.js +0 -26
  10. package/dist-cjs/commands/DeleteUserCommand.js +0 -26
  11. package/dist-cjs/commands/DescribeGroupCommand.js +0 -27
  12. package/dist-cjs/commands/DescribeUserCommand.js +0 -27
  13. package/dist-cjs/commands/DisableUserCommand.js +0 -26
  14. package/dist-cjs/commands/ListGroupMembersCommand.js +0 -27
  15. package/dist-cjs/commands/ListGroupsCommand.js +0 -27
  16. package/dist-cjs/commands/ListGroupsForMemberCommand.js +0 -27
  17. package/dist-cjs/commands/ListUsersCommand.js +0 -27
  18. package/dist-cjs/commands/RemoveGroupMemberCommand.js +0 -26
  19. package/dist-cjs/commands/SearchGroupsCommand.js +0 -27
  20. package/dist-cjs/commands/SearchUsersCommand.js +0 -27
  21. package/dist-cjs/commands/UpdateGroupCommand.js +0 -27
  22. package/dist-cjs/commands/UpdateUserCommand.js +0 -27
  23. package/dist-cjs/commands/index.js +0 -20
  24. package/dist-cjs/endpoint/EndpointParameters.js +0 -17
  25. package/dist-cjs/extensionConfiguration.js +0 -2
  26. package/dist-cjs/models/DirectoryServiceDataServiceException.js +0 -12
  27. package/dist-cjs/models/index.js +0 -4
  28. package/dist-cjs/models/models_0.js +0 -344
  29. package/dist-cjs/pagination/Interfaces.js +0 -2
  30. package/dist-cjs/pagination/ListGroupMembersPaginator.js +0 -7
  31. package/dist-cjs/pagination/ListGroupsForMemberPaginator.js +0 -7
  32. package/dist-cjs/pagination/ListGroupsPaginator.js +0 -7
  33. package/dist-cjs/pagination/ListUsersPaginator.js +0 -7
  34. package/dist-cjs/pagination/SearchGroupsPaginator.js +0 -7
  35. package/dist-cjs/pagination/SearchUsersPaginator.js +0 -7
  36. package/dist-cjs/pagination/index.js +0 -10
  37. package/dist-cjs/protocols/Aws_restJson1.js +0 -763
  38. package/dist-cjs/runtimeExtensions.js +0 -13
@@ -1,763 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateUserCommand = exports.de_UpdateGroupCommand = exports.de_SearchUsersCommand = exports.de_SearchGroupsCommand = exports.de_RemoveGroupMemberCommand = exports.de_ListUsersCommand = exports.de_ListGroupsForMemberCommand = exports.de_ListGroupsCommand = exports.de_ListGroupMembersCommand = exports.de_DisableUserCommand = exports.de_DescribeUserCommand = exports.de_DescribeGroupCommand = exports.de_DeleteUserCommand = exports.de_DeleteGroupCommand = exports.de_CreateUserCommand = exports.de_CreateGroupCommand = exports.de_AddGroupMemberCommand = exports.se_UpdateUserCommand = exports.se_UpdateGroupCommand = exports.se_SearchUsersCommand = exports.se_SearchGroupsCommand = exports.se_RemoveGroupMemberCommand = exports.se_ListUsersCommand = exports.se_ListGroupsForMemberCommand = exports.se_ListGroupsCommand = exports.se_ListGroupMembersCommand = exports.se_DisableUserCommand = exports.se_DescribeUserCommand = exports.se_DescribeGroupCommand = exports.se_DeleteUserCommand = exports.se_DeleteGroupCommand = exports.se_CreateUserCommand = exports.se_CreateGroupCommand = exports.se_AddGroupMemberCommand = void 0;
4
- const core_1 = require("@aws-sdk/core");
5
- const core_2 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const uuid_1 = require("uuid");
8
- const DirectoryServiceDataServiceException_1 = require("../models/DirectoryServiceDataServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_AddGroupMemberCommand = async (input, context) => {
11
- const b = (0, core_2.requestBuilder)(input, context);
12
- const headers = {
13
- "content-type": "application/json",
14
- };
15
- b.bp("/GroupMemberships/AddGroupMember");
16
- const query = (0, smithy_client_1.map)({
17
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
18
- });
19
- let body;
20
- body = JSON.stringify((0, smithy_client_1.take)(input, {
21
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
22
- GroupName: [],
23
- MemberName: [],
24
- MemberRealm: [],
25
- }));
26
- b.m("POST").h(headers).q(query).b(body);
27
- return b.build();
28
- };
29
- exports.se_AddGroupMemberCommand = se_AddGroupMemberCommand;
30
- const se_CreateGroupCommand = async (input, context) => {
31
- const b = (0, core_2.requestBuilder)(input, context);
32
- const headers = {
33
- "content-type": "application/json",
34
- };
35
- b.bp("/Groups/CreateGroup");
36
- const query = (0, smithy_client_1.map)({
37
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
38
- });
39
- let body;
40
- body = JSON.stringify((0, smithy_client_1.take)(input, {
41
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
42
- GroupScope: [],
43
- GroupType: [],
44
- OtherAttributes: (_) => (0, smithy_client_1._json)(_),
45
- SAMAccountName: [],
46
- }));
47
- b.m("POST").h(headers).q(query).b(body);
48
- return b.build();
49
- };
50
- exports.se_CreateGroupCommand = se_CreateGroupCommand;
51
- const se_CreateUserCommand = async (input, context) => {
52
- const b = (0, core_2.requestBuilder)(input, context);
53
- const headers = {
54
- "content-type": "application/json",
55
- };
56
- b.bp("/Users/CreateUser");
57
- const query = (0, smithy_client_1.map)({
58
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
59
- });
60
- let body;
61
- body = JSON.stringify((0, smithy_client_1.take)(input, {
62
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
63
- EmailAddress: [],
64
- GivenName: [],
65
- OtherAttributes: (_) => (0, smithy_client_1._json)(_),
66
- SAMAccountName: [],
67
- Surname: [],
68
- }));
69
- b.m("POST").h(headers).q(query).b(body);
70
- return b.build();
71
- };
72
- exports.se_CreateUserCommand = se_CreateUserCommand;
73
- const se_DeleteGroupCommand = async (input, context) => {
74
- const b = (0, core_2.requestBuilder)(input, context);
75
- const headers = {
76
- "content-type": "application/json",
77
- };
78
- b.bp("/Groups/DeleteGroup");
79
- const query = (0, smithy_client_1.map)({
80
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
81
- });
82
- let body;
83
- body = JSON.stringify((0, smithy_client_1.take)(input, {
84
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
85
- SAMAccountName: [],
86
- }));
87
- b.m("POST").h(headers).q(query).b(body);
88
- return b.build();
89
- };
90
- exports.se_DeleteGroupCommand = se_DeleteGroupCommand;
91
- const se_DeleteUserCommand = async (input, context) => {
92
- const b = (0, core_2.requestBuilder)(input, context);
93
- const headers = {
94
- "content-type": "application/json",
95
- };
96
- b.bp("/Users/DeleteUser");
97
- const query = (0, smithy_client_1.map)({
98
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
99
- });
100
- let body;
101
- body = JSON.stringify((0, smithy_client_1.take)(input, {
102
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
103
- SAMAccountName: [],
104
- }));
105
- b.m("POST").h(headers).q(query).b(body);
106
- return b.build();
107
- };
108
- exports.se_DeleteUserCommand = se_DeleteUserCommand;
109
- const se_DescribeGroupCommand = async (input, context) => {
110
- const b = (0, core_2.requestBuilder)(input, context);
111
- const headers = {
112
- "content-type": "application/json",
113
- };
114
- b.bp("/Groups/DescribeGroup");
115
- const query = (0, smithy_client_1.map)({
116
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
117
- });
118
- let body;
119
- body = JSON.stringify((0, smithy_client_1.take)(input, {
120
- OtherAttributes: (_) => (0, smithy_client_1._json)(_),
121
- Realm: [],
122
- SAMAccountName: [],
123
- }));
124
- b.m("POST").h(headers).q(query).b(body);
125
- return b.build();
126
- };
127
- exports.se_DescribeGroupCommand = se_DescribeGroupCommand;
128
- const se_DescribeUserCommand = async (input, context) => {
129
- const b = (0, core_2.requestBuilder)(input, context);
130
- const headers = {
131
- "content-type": "application/json",
132
- };
133
- b.bp("/Users/DescribeUser");
134
- const query = (0, smithy_client_1.map)({
135
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
136
- });
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1.take)(input, {
139
- OtherAttributes: (_) => (0, smithy_client_1._json)(_),
140
- Realm: [],
141
- SAMAccountName: [],
142
- }));
143
- b.m("POST").h(headers).q(query).b(body);
144
- return b.build();
145
- };
146
- exports.se_DescribeUserCommand = se_DescribeUserCommand;
147
- const se_DisableUserCommand = async (input, context) => {
148
- const b = (0, core_2.requestBuilder)(input, context);
149
- const headers = {
150
- "content-type": "application/json",
151
- };
152
- b.bp("/Users/DisableUser");
153
- const query = (0, smithy_client_1.map)({
154
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
155
- });
156
- let body;
157
- body = JSON.stringify((0, smithy_client_1.take)(input, {
158
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
159
- SAMAccountName: [],
160
- }));
161
- b.m("POST").h(headers).q(query).b(body);
162
- return b.build();
163
- };
164
- exports.se_DisableUserCommand = se_DisableUserCommand;
165
- const se_ListGroupMembersCommand = async (input, context) => {
166
- const b = (0, core_2.requestBuilder)(input, context);
167
- const headers = {
168
- "content-type": "application/json",
169
- };
170
- b.bp("/GroupMemberships/ListGroupMembers");
171
- const query = (0, smithy_client_1.map)({
172
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
173
- });
174
- let body;
175
- body = JSON.stringify((0, smithy_client_1.take)(input, {
176
- MaxResults: [],
177
- MemberRealm: [],
178
- NextToken: [],
179
- Realm: [],
180
- SAMAccountName: [],
181
- }));
182
- b.m("POST").h(headers).q(query).b(body);
183
- return b.build();
184
- };
185
- exports.se_ListGroupMembersCommand = se_ListGroupMembersCommand;
186
- const se_ListGroupsCommand = async (input, context) => {
187
- const b = (0, core_2.requestBuilder)(input, context);
188
- const headers = {
189
- "content-type": "application/json",
190
- };
191
- b.bp("/Groups/ListGroups");
192
- const query = (0, smithy_client_1.map)({
193
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
194
- });
195
- let body;
196
- body = JSON.stringify((0, smithy_client_1.take)(input, {
197
- MaxResults: [],
198
- NextToken: [],
199
- Realm: [],
200
- }));
201
- b.m("POST").h(headers).q(query).b(body);
202
- return b.build();
203
- };
204
- exports.se_ListGroupsCommand = se_ListGroupsCommand;
205
- const se_ListGroupsForMemberCommand = async (input, context) => {
206
- const b = (0, core_2.requestBuilder)(input, context);
207
- const headers = {
208
- "content-type": "application/json",
209
- };
210
- b.bp("/GroupMemberships/ListGroupsForMember");
211
- const query = (0, smithy_client_1.map)({
212
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
213
- });
214
- let body;
215
- body = JSON.stringify((0, smithy_client_1.take)(input, {
216
- MaxResults: [],
217
- MemberRealm: [],
218
- NextToken: [],
219
- Realm: [],
220
- SAMAccountName: [],
221
- }));
222
- b.m("POST").h(headers).q(query).b(body);
223
- return b.build();
224
- };
225
- exports.se_ListGroupsForMemberCommand = se_ListGroupsForMemberCommand;
226
- const se_ListUsersCommand = async (input, context) => {
227
- const b = (0, core_2.requestBuilder)(input, context);
228
- const headers = {
229
- "content-type": "application/json",
230
- };
231
- b.bp("/Users/ListUsers");
232
- const query = (0, smithy_client_1.map)({
233
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
234
- });
235
- let body;
236
- body = JSON.stringify((0, smithy_client_1.take)(input, {
237
- MaxResults: [],
238
- NextToken: [],
239
- Realm: [],
240
- }));
241
- b.m("POST").h(headers).q(query).b(body);
242
- return b.build();
243
- };
244
- exports.se_ListUsersCommand = se_ListUsersCommand;
245
- const se_RemoveGroupMemberCommand = async (input, context) => {
246
- const b = (0, core_2.requestBuilder)(input, context);
247
- const headers = {
248
- "content-type": "application/json",
249
- };
250
- b.bp("/GroupMemberships/RemoveGroupMember");
251
- const query = (0, smithy_client_1.map)({
252
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
253
- });
254
- let body;
255
- body = JSON.stringify((0, smithy_client_1.take)(input, {
256
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
257
- GroupName: [],
258
- MemberName: [],
259
- MemberRealm: [],
260
- }));
261
- b.m("POST").h(headers).q(query).b(body);
262
- return b.build();
263
- };
264
- exports.se_RemoveGroupMemberCommand = se_RemoveGroupMemberCommand;
265
- const se_SearchGroupsCommand = async (input, context) => {
266
- const b = (0, core_2.requestBuilder)(input, context);
267
- const headers = {
268
- "content-type": "application/json",
269
- };
270
- b.bp("/Groups/SearchGroups");
271
- const query = (0, smithy_client_1.map)({
272
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
273
- });
274
- let body;
275
- body = JSON.stringify((0, smithy_client_1.take)(input, {
276
- MaxResults: [],
277
- NextToken: [],
278
- Realm: [],
279
- SearchAttributes: (_) => (0, smithy_client_1._json)(_),
280
- SearchString: [],
281
- }));
282
- b.m("POST").h(headers).q(query).b(body);
283
- return b.build();
284
- };
285
- exports.se_SearchGroupsCommand = se_SearchGroupsCommand;
286
- const se_SearchUsersCommand = async (input, context) => {
287
- const b = (0, core_2.requestBuilder)(input, context);
288
- const headers = {
289
- "content-type": "application/json",
290
- };
291
- b.bp("/Users/SearchUsers");
292
- const query = (0, smithy_client_1.map)({
293
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
294
- });
295
- let body;
296
- body = JSON.stringify((0, smithy_client_1.take)(input, {
297
- MaxResults: [],
298
- NextToken: [],
299
- Realm: [],
300
- SearchAttributes: (_) => (0, smithy_client_1._json)(_),
301
- SearchString: [],
302
- }));
303
- b.m("POST").h(headers).q(query).b(body);
304
- return b.build();
305
- };
306
- exports.se_SearchUsersCommand = se_SearchUsersCommand;
307
- const se_UpdateGroupCommand = async (input, context) => {
308
- const b = (0, core_2.requestBuilder)(input, context);
309
- const headers = {
310
- "content-type": "application/json",
311
- };
312
- b.bp("/Groups/UpdateGroup");
313
- const query = (0, smithy_client_1.map)({
314
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
315
- });
316
- let body;
317
- body = JSON.stringify((0, smithy_client_1.take)(input, {
318
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
319
- GroupScope: [],
320
- GroupType: [],
321
- OtherAttributes: (_) => (0, smithy_client_1._json)(_),
322
- SAMAccountName: [],
323
- UpdateType: [],
324
- }));
325
- b.m("POST").h(headers).q(query).b(body);
326
- return b.build();
327
- };
328
- exports.se_UpdateGroupCommand = se_UpdateGroupCommand;
329
- const se_UpdateUserCommand = async (input, context) => {
330
- const b = (0, core_2.requestBuilder)(input, context);
331
- const headers = {
332
- "content-type": "application/json",
333
- };
334
- b.bp("/Users/UpdateUser");
335
- const query = (0, smithy_client_1.map)({
336
- [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
337
- });
338
- let body;
339
- body = JSON.stringify((0, smithy_client_1.take)(input, {
340
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
341
- EmailAddress: [],
342
- GivenName: [],
343
- OtherAttributes: (_) => (0, smithy_client_1._json)(_),
344
- SAMAccountName: [],
345
- Surname: [],
346
- UpdateType: [],
347
- }));
348
- b.m("POST").h(headers).q(query).b(body);
349
- return b.build();
350
- };
351
- exports.se_UpdateUserCommand = se_UpdateUserCommand;
352
- const de_AddGroupMemberCommand = async (output, context) => {
353
- if (output.statusCode !== 200 && output.statusCode >= 300) {
354
- return de_CommandError(output, context);
355
- }
356
- const contents = (0, smithy_client_1.map)({
357
- $metadata: deserializeMetadata(output),
358
- });
359
- await (0, smithy_client_1.collectBody)(output.body, context);
360
- return contents;
361
- };
362
- exports.de_AddGroupMemberCommand = de_AddGroupMemberCommand;
363
- const de_CreateGroupCommand = async (output, context) => {
364
- if (output.statusCode !== 200 && output.statusCode >= 300) {
365
- return de_CommandError(output, context);
366
- }
367
- const contents = (0, smithy_client_1.map)({
368
- $metadata: deserializeMetadata(output),
369
- });
370
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
371
- const doc = (0, smithy_client_1.take)(data, {
372
- DirectoryId: smithy_client_1.expectString,
373
- SAMAccountName: smithy_client_1.expectString,
374
- SID: smithy_client_1.expectString,
375
- });
376
- Object.assign(contents, doc);
377
- return contents;
378
- };
379
- exports.de_CreateGroupCommand = de_CreateGroupCommand;
380
- const de_CreateUserCommand = async (output, context) => {
381
- if (output.statusCode !== 200 && output.statusCode >= 300) {
382
- return de_CommandError(output, context);
383
- }
384
- const contents = (0, smithy_client_1.map)({
385
- $metadata: deserializeMetadata(output),
386
- });
387
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
388
- const doc = (0, smithy_client_1.take)(data, {
389
- DirectoryId: smithy_client_1.expectString,
390
- SAMAccountName: smithy_client_1.expectString,
391
- SID: smithy_client_1.expectString,
392
- });
393
- Object.assign(contents, doc);
394
- return contents;
395
- };
396
- exports.de_CreateUserCommand = de_CreateUserCommand;
397
- const de_DeleteGroupCommand = async (output, context) => {
398
- if (output.statusCode !== 200 && output.statusCode >= 300) {
399
- return de_CommandError(output, context);
400
- }
401
- const contents = (0, smithy_client_1.map)({
402
- $metadata: deserializeMetadata(output),
403
- });
404
- await (0, smithy_client_1.collectBody)(output.body, context);
405
- return contents;
406
- };
407
- exports.de_DeleteGroupCommand = de_DeleteGroupCommand;
408
- const de_DeleteUserCommand = async (output, context) => {
409
- if (output.statusCode !== 200 && output.statusCode >= 300) {
410
- return de_CommandError(output, context);
411
- }
412
- const contents = (0, smithy_client_1.map)({
413
- $metadata: deserializeMetadata(output),
414
- });
415
- await (0, smithy_client_1.collectBody)(output.body, context);
416
- return contents;
417
- };
418
- exports.de_DeleteUserCommand = de_DeleteUserCommand;
419
- const de_DescribeGroupCommand = async (output, context) => {
420
- if (output.statusCode !== 200 && output.statusCode >= 300) {
421
- return de_CommandError(output, context);
422
- }
423
- const contents = (0, smithy_client_1.map)({
424
- $metadata: deserializeMetadata(output),
425
- });
426
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
427
- const doc = (0, smithy_client_1.take)(data, {
428
- DirectoryId: smithy_client_1.expectString,
429
- DistinguishedName: smithy_client_1.expectString,
430
- GroupScope: smithy_client_1.expectString,
431
- GroupType: smithy_client_1.expectString,
432
- OtherAttributes: smithy_client_1._json,
433
- Realm: smithy_client_1.expectString,
434
- SAMAccountName: smithy_client_1.expectString,
435
- SID: smithy_client_1.expectString,
436
- });
437
- Object.assign(contents, doc);
438
- return contents;
439
- };
440
- exports.de_DescribeGroupCommand = de_DescribeGroupCommand;
441
- const de_DescribeUserCommand = async (output, context) => {
442
- if (output.statusCode !== 200 && output.statusCode >= 300) {
443
- return de_CommandError(output, context);
444
- }
445
- const contents = (0, smithy_client_1.map)({
446
- $metadata: deserializeMetadata(output),
447
- });
448
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
449
- const doc = (0, smithy_client_1.take)(data, {
450
- DirectoryId: smithy_client_1.expectString,
451
- DistinguishedName: smithy_client_1.expectString,
452
- EmailAddress: smithy_client_1.expectString,
453
- Enabled: smithy_client_1.expectBoolean,
454
- GivenName: smithy_client_1.expectString,
455
- OtherAttributes: smithy_client_1._json,
456
- Realm: smithy_client_1.expectString,
457
- SAMAccountName: smithy_client_1.expectString,
458
- SID: smithy_client_1.expectString,
459
- Surname: smithy_client_1.expectString,
460
- UserPrincipalName: smithy_client_1.expectString,
461
- });
462
- Object.assign(contents, doc);
463
- return contents;
464
- };
465
- exports.de_DescribeUserCommand = de_DescribeUserCommand;
466
- const de_DisableUserCommand = async (output, context) => {
467
- if (output.statusCode !== 200 && output.statusCode >= 300) {
468
- return de_CommandError(output, context);
469
- }
470
- const contents = (0, smithy_client_1.map)({
471
- $metadata: deserializeMetadata(output),
472
- });
473
- await (0, smithy_client_1.collectBody)(output.body, context);
474
- return contents;
475
- };
476
- exports.de_DisableUserCommand = de_DisableUserCommand;
477
- const de_ListGroupMembersCommand = async (output, context) => {
478
- if (output.statusCode !== 200 && output.statusCode >= 300) {
479
- return de_CommandError(output, context);
480
- }
481
- const contents = (0, smithy_client_1.map)({
482
- $metadata: deserializeMetadata(output),
483
- });
484
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
485
- const doc = (0, smithy_client_1.take)(data, {
486
- DirectoryId: smithy_client_1.expectString,
487
- MemberRealm: smithy_client_1.expectString,
488
- Members: smithy_client_1._json,
489
- NextToken: smithy_client_1.expectString,
490
- Realm: smithy_client_1.expectString,
491
- });
492
- Object.assign(contents, doc);
493
- return contents;
494
- };
495
- exports.de_ListGroupMembersCommand = de_ListGroupMembersCommand;
496
- const de_ListGroupsCommand = async (output, context) => {
497
- if (output.statusCode !== 200 && output.statusCode >= 300) {
498
- return de_CommandError(output, context);
499
- }
500
- const contents = (0, smithy_client_1.map)({
501
- $metadata: deserializeMetadata(output),
502
- });
503
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
504
- const doc = (0, smithy_client_1.take)(data, {
505
- DirectoryId: smithy_client_1.expectString,
506
- Groups: smithy_client_1._json,
507
- NextToken: smithy_client_1.expectString,
508
- Realm: smithy_client_1.expectString,
509
- });
510
- Object.assign(contents, doc);
511
- return contents;
512
- };
513
- exports.de_ListGroupsCommand = de_ListGroupsCommand;
514
- const de_ListGroupsForMemberCommand = async (output, context) => {
515
- if (output.statusCode !== 200 && output.statusCode >= 300) {
516
- return de_CommandError(output, context);
517
- }
518
- const contents = (0, smithy_client_1.map)({
519
- $metadata: deserializeMetadata(output),
520
- });
521
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
522
- const doc = (0, smithy_client_1.take)(data, {
523
- DirectoryId: smithy_client_1.expectString,
524
- Groups: smithy_client_1._json,
525
- MemberRealm: smithy_client_1.expectString,
526
- NextToken: smithy_client_1.expectString,
527
- Realm: smithy_client_1.expectString,
528
- });
529
- Object.assign(contents, doc);
530
- return contents;
531
- };
532
- exports.de_ListGroupsForMemberCommand = de_ListGroupsForMemberCommand;
533
- const de_ListUsersCommand = async (output, context) => {
534
- if (output.statusCode !== 200 && output.statusCode >= 300) {
535
- return de_CommandError(output, context);
536
- }
537
- const contents = (0, smithy_client_1.map)({
538
- $metadata: deserializeMetadata(output),
539
- });
540
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
541
- const doc = (0, smithy_client_1.take)(data, {
542
- DirectoryId: smithy_client_1.expectString,
543
- NextToken: smithy_client_1.expectString,
544
- Realm: smithy_client_1.expectString,
545
- Users: smithy_client_1._json,
546
- });
547
- Object.assign(contents, doc);
548
- return contents;
549
- };
550
- exports.de_ListUsersCommand = de_ListUsersCommand;
551
- const de_RemoveGroupMemberCommand = async (output, context) => {
552
- if (output.statusCode !== 200 && output.statusCode >= 300) {
553
- return de_CommandError(output, context);
554
- }
555
- const contents = (0, smithy_client_1.map)({
556
- $metadata: deserializeMetadata(output),
557
- });
558
- await (0, smithy_client_1.collectBody)(output.body, context);
559
- return contents;
560
- };
561
- exports.de_RemoveGroupMemberCommand = de_RemoveGroupMemberCommand;
562
- const de_SearchGroupsCommand = async (output, context) => {
563
- if (output.statusCode !== 200 && output.statusCode >= 300) {
564
- return de_CommandError(output, context);
565
- }
566
- const contents = (0, smithy_client_1.map)({
567
- $metadata: deserializeMetadata(output),
568
- });
569
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
570
- const doc = (0, smithy_client_1.take)(data, {
571
- DirectoryId: smithy_client_1.expectString,
572
- Groups: smithy_client_1._json,
573
- NextToken: smithy_client_1.expectString,
574
- Realm: smithy_client_1.expectString,
575
- });
576
- Object.assign(contents, doc);
577
- return contents;
578
- };
579
- exports.de_SearchGroupsCommand = de_SearchGroupsCommand;
580
- const de_SearchUsersCommand = async (output, context) => {
581
- if (output.statusCode !== 200 && output.statusCode >= 300) {
582
- return de_CommandError(output, context);
583
- }
584
- const contents = (0, smithy_client_1.map)({
585
- $metadata: deserializeMetadata(output),
586
- });
587
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
588
- const doc = (0, smithy_client_1.take)(data, {
589
- DirectoryId: smithy_client_1.expectString,
590
- NextToken: smithy_client_1.expectString,
591
- Realm: smithy_client_1.expectString,
592
- Users: smithy_client_1._json,
593
- });
594
- Object.assign(contents, doc);
595
- return contents;
596
- };
597
- exports.de_SearchUsersCommand = de_SearchUsersCommand;
598
- const de_UpdateGroupCommand = async (output, context) => {
599
- if (output.statusCode !== 200 && output.statusCode >= 300) {
600
- return de_CommandError(output, context);
601
- }
602
- const contents = (0, smithy_client_1.map)({
603
- $metadata: deserializeMetadata(output),
604
- });
605
- await (0, smithy_client_1.collectBody)(output.body, context);
606
- return contents;
607
- };
608
- exports.de_UpdateGroupCommand = de_UpdateGroupCommand;
609
- const de_UpdateUserCommand = async (output, context) => {
610
- if (output.statusCode !== 200 && output.statusCode >= 300) {
611
- return de_CommandError(output, context);
612
- }
613
- const contents = (0, smithy_client_1.map)({
614
- $metadata: deserializeMetadata(output),
615
- });
616
- await (0, smithy_client_1.collectBody)(output.body, context);
617
- return contents;
618
- };
619
- exports.de_UpdateUserCommand = de_UpdateUserCommand;
620
- const de_CommandError = async (output, context) => {
621
- const parsedOutput = {
622
- ...output,
623
- body: await (0, core_1.parseJsonErrorBody)(output.body, context),
624
- };
625
- const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
626
- switch (errorCode) {
627
- case "AccessDeniedException":
628
- case "com.amazonaws.directoryservicedata#AccessDeniedException":
629
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
630
- case "ConflictException":
631
- case "com.amazonaws.directoryservicedata#ConflictException":
632
- throw await de_ConflictExceptionRes(parsedOutput, context);
633
- case "DirectoryUnavailableException":
634
- case "com.amazonaws.directoryservicedata#DirectoryUnavailableException":
635
- throw await de_DirectoryUnavailableExceptionRes(parsedOutput, context);
636
- case "InternalServerException":
637
- case "com.amazonaws.directoryservicedata#InternalServerException":
638
- throw await de_InternalServerExceptionRes(parsedOutput, context);
639
- case "ResourceNotFoundException":
640
- case "com.amazonaws.directoryservicedata#ResourceNotFoundException":
641
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
642
- case "ThrottlingException":
643
- case "com.amazonaws.directoryservicedata#ThrottlingException":
644
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
645
- case "ValidationException":
646
- case "com.amazonaws.directoryservicedata#ValidationException":
647
- throw await de_ValidationExceptionRes(parsedOutput, context);
648
- default:
649
- const parsedBody = parsedOutput.body;
650
- return throwDefaultError({
651
- output,
652
- parsedBody,
653
- errorCode,
654
- });
655
- }
656
- };
657
- const throwDefaultError = (0, smithy_client_1.withBaseException)(DirectoryServiceDataServiceException_1.DirectoryServiceDataServiceException);
658
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
659
- const contents = (0, smithy_client_1.map)({});
660
- const data = parsedOutput.body;
661
- const doc = (0, smithy_client_1.take)(data, {
662
- Message: smithy_client_1.expectString,
663
- Reason: smithy_client_1.expectString,
664
- });
665
- Object.assign(contents, doc);
666
- const exception = new models_0_1.AccessDeniedException({
667
- $metadata: deserializeMetadata(parsedOutput),
668
- ...contents,
669
- });
670
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
671
- };
672
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
673
- const contents = (0, smithy_client_1.map)({});
674
- const data = parsedOutput.body;
675
- const doc = (0, smithy_client_1.take)(data, {
676
- Message: smithy_client_1.expectString,
677
- });
678
- Object.assign(contents, doc);
679
- const exception = new models_0_1.ConflictException({
680
- $metadata: deserializeMetadata(parsedOutput),
681
- ...contents,
682
- });
683
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
684
- };
685
- const de_DirectoryUnavailableExceptionRes = async (parsedOutput, context) => {
686
- const contents = (0, smithy_client_1.map)({});
687
- const data = parsedOutput.body;
688
- const doc = (0, smithy_client_1.take)(data, {
689
- Message: smithy_client_1.expectString,
690
- Reason: smithy_client_1.expectString,
691
- });
692
- Object.assign(contents, doc);
693
- const exception = new models_0_1.DirectoryUnavailableException({
694
- $metadata: deserializeMetadata(parsedOutput),
695
- ...contents,
696
- });
697
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
698
- };
699
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
700
- const contents = (0, smithy_client_1.map)({});
701
- const data = parsedOutput.body;
702
- const doc = (0, smithy_client_1.take)(data, {
703
- Message: smithy_client_1.expectString,
704
- });
705
- Object.assign(contents, doc);
706
- const exception = new models_0_1.InternalServerException({
707
- $metadata: deserializeMetadata(parsedOutput),
708
- ...contents,
709
- });
710
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
711
- };
712
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
713
- const contents = (0, smithy_client_1.map)({});
714
- const data = parsedOutput.body;
715
- const doc = (0, smithy_client_1.take)(data, {
716
- Message: smithy_client_1.expectString,
717
- });
718
- Object.assign(contents, doc);
719
- const exception = new models_0_1.ResourceNotFoundException({
720
- $metadata: deserializeMetadata(parsedOutput),
721
- ...contents,
722
- });
723
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
724
- };
725
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
726
- const contents = (0, smithy_client_1.map)({
727
- [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
728
- });
729
- const data = parsedOutput.body;
730
- const doc = (0, smithy_client_1.take)(data, {
731
- Message: smithy_client_1.expectString,
732
- });
733
- Object.assign(contents, doc);
734
- const exception = new models_0_1.ThrottlingException({
735
- $metadata: deserializeMetadata(parsedOutput),
736
- ...contents,
737
- });
738
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
739
- };
740
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
741
- const contents = (0, smithy_client_1.map)({});
742
- const data = parsedOutput.body;
743
- const doc = (0, smithy_client_1.take)(data, {
744
- Message: smithy_client_1.expectString,
745
- Reason: smithy_client_1.expectString,
746
- });
747
- Object.assign(contents, doc);
748
- const exception = new models_0_1.ValidationException({
749
- $metadata: deserializeMetadata(parsedOutput),
750
- ...contents,
751
- });
752
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
753
- };
754
- const deserializeMetadata = (output) => ({
755
- httpStatusCode: output.statusCode,
756
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
757
- extendedRequestId: output.headers["x-amz-id-2"],
758
- cfId: output.headers["x-amz-cf-id"],
759
- });
760
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
761
- const _DI = "DirectoryId";
762
- const _RAS = "RetryAfterSeconds";
763
- const _ra = "retry-after";