@aws-sdk/client-service-catalog-appregistry 3.928.0 → 3.929.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 (45) hide show
  1. package/dist-cjs/index.js +912 -1028
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/ServiceCatalogAppRegistryClient.js +2 -0
  4. package/dist-es/commands/AssociateAttributeGroupCommand.js +3 -9
  5. package/dist-es/commands/AssociateResourceCommand.js +3 -9
  6. package/dist-es/commands/CreateApplicationCommand.js +3 -9
  7. package/dist-es/commands/CreateAttributeGroupCommand.js +3 -9
  8. package/dist-es/commands/DeleteApplicationCommand.js +3 -9
  9. package/dist-es/commands/DeleteAttributeGroupCommand.js +3 -9
  10. package/dist-es/commands/DisassociateAttributeGroupCommand.js +3 -9
  11. package/dist-es/commands/DisassociateResourceCommand.js +3 -9
  12. package/dist-es/commands/GetApplicationCommand.js +3 -9
  13. package/dist-es/commands/GetAssociatedResourceCommand.js +3 -9
  14. package/dist-es/commands/GetAttributeGroupCommand.js +3 -9
  15. package/dist-es/commands/GetConfigurationCommand.js +3 -9
  16. package/dist-es/commands/ListApplicationsCommand.js +3 -9
  17. package/dist-es/commands/ListAssociatedAttributeGroupsCommand.js +3 -9
  18. package/dist-es/commands/ListAssociatedResourcesCommand.js +3 -9
  19. package/dist-es/commands/ListAttributeGroupsCommand.js +3 -9
  20. package/dist-es/commands/ListAttributeGroupsForApplicationCommand.js +3 -9
  21. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  22. package/dist-es/commands/PutConfigurationCommand.js +3 -9
  23. package/dist-es/commands/SyncResourceCommand.js +3 -9
  24. package/dist-es/commands/TagResourceCommand.js +3 -9
  25. package/dist-es/commands/UntagResourceCommand.js +3 -9
  26. package/dist-es/commands/UpdateApplicationCommand.js +3 -9
  27. package/dist-es/commands/UpdateAttributeGroupCommand.js +3 -9
  28. package/dist-es/runtimeConfig.shared.js +2 -0
  29. package/dist-es/schemas/schemas_0.js +853 -0
  30. package/dist-types/ServiceCatalogAppRegistryClient.d.ts +10 -1
  31. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  32. package/dist-types/runtimeConfig.d.ts +1 -0
  33. package/dist-types/runtimeConfig.native.d.ts +1 -0
  34. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  35. package/dist-types/schemas/schemas_0.d.ts +105 -0
  36. package/dist-types/ts3.4/ServiceCatalogAppRegistryClient.d.ts +4 -0
  37. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  38. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  39. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  40. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  41. package/dist-types/ts3.4/schemas/schemas_0.d.ts +110 -0
  42. package/package.json +2 -3
  43. package/dist-es/protocols/Aws_restJson1.js +0 -846
  44. package/dist-types/protocols/Aws_restJson1.d.ts +0 -218
  45. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -293
@@ -1,846 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- import { ServiceCatalogAppRegistryServiceException as __BaseException } from "../models/ServiceCatalogAppRegistryServiceException";
7
- export const se_AssociateAttributeGroupCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {};
10
- b.bp("/applications/{application}/attribute-groups/{attributeGroup}");
11
- b.p("application", () => input.application, "{application}", false);
12
- b.p("attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
13
- let body;
14
- b.m("PUT").h(headers).b(body);
15
- return b.build();
16
- };
17
- export const se_AssociateResourceCommand = async (input, context) => {
18
- const b = rb(input, context);
19
- const headers = {
20
- "content-type": "application/json",
21
- };
22
- b.bp("/applications/{application}/resources/{resourceType}/{resource}");
23
- b.p("application", () => input.application, "{application}", false);
24
- b.p("resourceType", () => input.resourceType, "{resourceType}", false);
25
- b.p("resource", () => input.resource, "{resource}", false);
26
- let body;
27
- body = JSON.stringify(take(input, {
28
- options: (_) => _json(_),
29
- }));
30
- b.m("PUT").h(headers).b(body);
31
- return b.build();
32
- };
33
- export const se_CreateApplicationCommand = async (input, context) => {
34
- const b = rb(input, context);
35
- const headers = {
36
- "content-type": "application/json",
37
- };
38
- b.bp("/applications");
39
- let body;
40
- body = JSON.stringify(take(input, {
41
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
42
- description: [],
43
- name: [],
44
- tags: (_) => _json(_),
45
- }));
46
- b.m("POST").h(headers).b(body);
47
- return b.build();
48
- };
49
- export const se_CreateAttributeGroupCommand = async (input, context) => {
50
- const b = rb(input, context);
51
- const headers = {
52
- "content-type": "application/json",
53
- };
54
- b.bp("/attribute-groups");
55
- let body;
56
- body = JSON.stringify(take(input, {
57
- attributes: [],
58
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
59
- description: [],
60
- name: [],
61
- tags: (_) => _json(_),
62
- }));
63
- b.m("POST").h(headers).b(body);
64
- return b.build();
65
- };
66
- export const se_DeleteApplicationCommand = async (input, context) => {
67
- const b = rb(input, context);
68
- const headers = {};
69
- b.bp("/applications/{application}");
70
- b.p("application", () => input.application, "{application}", false);
71
- let body;
72
- b.m("DELETE").h(headers).b(body);
73
- return b.build();
74
- };
75
- export const se_DeleteAttributeGroupCommand = async (input, context) => {
76
- const b = rb(input, context);
77
- const headers = {};
78
- b.bp("/attribute-groups/{attributeGroup}");
79
- b.p("attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
80
- let body;
81
- b.m("DELETE").h(headers).b(body);
82
- return b.build();
83
- };
84
- export const se_DisassociateAttributeGroupCommand = async (input, context) => {
85
- const b = rb(input, context);
86
- const headers = {};
87
- b.bp("/applications/{application}/attribute-groups/{attributeGroup}");
88
- b.p("application", () => input.application, "{application}", false);
89
- b.p("attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
90
- let body;
91
- b.m("DELETE").h(headers).b(body);
92
- return b.build();
93
- };
94
- export const se_DisassociateResourceCommand = async (input, context) => {
95
- const b = rb(input, context);
96
- const headers = {};
97
- b.bp("/applications/{application}/resources/{resourceType}/{resource}");
98
- b.p("application", () => input.application, "{application}", false);
99
- b.p("resourceType", () => input.resourceType, "{resourceType}", false);
100
- b.p("resource", () => input.resource, "{resource}", false);
101
- let body;
102
- b.m("DELETE").h(headers).b(body);
103
- return b.build();
104
- };
105
- export const se_GetApplicationCommand = async (input, context) => {
106
- const b = rb(input, context);
107
- const headers = {};
108
- b.bp("/applications/{application}");
109
- b.p("application", () => input.application, "{application}", false);
110
- let body;
111
- b.m("GET").h(headers).b(body);
112
- return b.build();
113
- };
114
- export const se_GetAssociatedResourceCommand = async (input, context) => {
115
- const b = rb(input, context);
116
- const headers = {};
117
- b.bp("/applications/{application}/resources/{resourceType}/{resource}");
118
- b.p("application", () => input.application, "{application}", false);
119
- b.p("resourceType", () => input.resourceType, "{resourceType}", false);
120
- b.p("resource", () => input.resource, "{resource}", false);
121
- const query = map({
122
- [_nT]: [, input[_nT]],
123
- [_rTS]: [() => input.resourceTagStatus !== void 0, () => input[_rTS] || []],
124
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
125
- });
126
- let body;
127
- b.m("GET").h(headers).q(query).b(body);
128
- return b.build();
129
- };
130
- export const se_GetAttributeGroupCommand = async (input, context) => {
131
- const b = rb(input, context);
132
- const headers = {};
133
- b.bp("/attribute-groups/{attributeGroup}");
134
- b.p("attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
135
- let body;
136
- b.m("GET").h(headers).b(body);
137
- return b.build();
138
- };
139
- export const se_GetConfigurationCommand = async (input, context) => {
140
- const b = rb(input, context);
141
- const headers = {};
142
- b.bp("/configuration");
143
- let body;
144
- b.m("GET").h(headers).b(body);
145
- return b.build();
146
- };
147
- export const se_ListApplicationsCommand = async (input, context) => {
148
- const b = rb(input, context);
149
- const headers = {};
150
- b.bp("/applications");
151
- const query = map({
152
- [_nT]: [, input[_nT]],
153
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
154
- });
155
- let body;
156
- b.m("GET").h(headers).q(query).b(body);
157
- return b.build();
158
- };
159
- export const se_ListAssociatedAttributeGroupsCommand = async (input, context) => {
160
- const b = rb(input, context);
161
- const headers = {};
162
- b.bp("/applications/{application}/attribute-groups");
163
- b.p("application", () => input.application, "{application}", false);
164
- const query = map({
165
- [_nT]: [, input[_nT]],
166
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
167
- });
168
- let body;
169
- b.m("GET").h(headers).q(query).b(body);
170
- return b.build();
171
- };
172
- export const se_ListAssociatedResourcesCommand = async (input, context) => {
173
- const b = rb(input, context);
174
- const headers = {};
175
- b.bp("/applications/{application}/resources");
176
- b.p("application", () => input.application, "{application}", false);
177
- const query = map({
178
- [_nT]: [, input[_nT]],
179
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
180
- });
181
- let body;
182
- b.m("GET").h(headers).q(query).b(body);
183
- return b.build();
184
- };
185
- export const se_ListAttributeGroupsCommand = async (input, context) => {
186
- const b = rb(input, context);
187
- const headers = {};
188
- b.bp("/attribute-groups");
189
- const query = map({
190
- [_nT]: [, input[_nT]],
191
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
192
- });
193
- let body;
194
- b.m("GET").h(headers).q(query).b(body);
195
- return b.build();
196
- };
197
- export const se_ListAttributeGroupsForApplicationCommand = async (input, context) => {
198
- const b = rb(input, context);
199
- const headers = {};
200
- b.bp("/applications/{application}/attribute-group-details");
201
- b.p("application", () => input.application, "{application}", false);
202
- const query = map({
203
- [_nT]: [, input[_nT]],
204
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
205
- });
206
- let body;
207
- b.m("GET").h(headers).q(query).b(body);
208
- return b.build();
209
- };
210
- export const se_ListTagsForResourceCommand = async (input, context) => {
211
- const b = rb(input, context);
212
- const headers = {};
213
- b.bp("/tags/{resourceArn}");
214
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
215
- let body;
216
- b.m("GET").h(headers).b(body);
217
- return b.build();
218
- };
219
- export const se_PutConfigurationCommand = async (input, context) => {
220
- const b = rb(input, context);
221
- const headers = {
222
- "content-type": "application/json",
223
- };
224
- b.bp("/configuration");
225
- let body;
226
- body = JSON.stringify(take(input, {
227
- configuration: (_) => _json(_),
228
- }));
229
- b.m("PUT").h(headers).b(body);
230
- return b.build();
231
- };
232
- export const se_SyncResourceCommand = async (input, context) => {
233
- const b = rb(input, context);
234
- const headers = {};
235
- b.bp("/sync/{resourceType}/{resource}");
236
- b.p("resourceType", () => input.resourceType, "{resourceType}", false);
237
- b.p("resource", () => input.resource, "{resource}", false);
238
- let body;
239
- b.m("POST").h(headers).b(body);
240
- return b.build();
241
- };
242
- export const se_TagResourceCommand = async (input, context) => {
243
- const b = rb(input, context);
244
- const headers = {
245
- "content-type": "application/json",
246
- };
247
- b.bp("/tags/{resourceArn}");
248
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
249
- let body;
250
- body = JSON.stringify(take(input, {
251
- tags: (_) => _json(_),
252
- }));
253
- b.m("POST").h(headers).b(body);
254
- return b.build();
255
- };
256
- export const se_UntagResourceCommand = async (input, context) => {
257
- const b = rb(input, context);
258
- const headers = {};
259
- b.bp("/tags/{resourceArn}");
260
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
261
- const query = map({
262
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
263
- });
264
- let body;
265
- b.m("DELETE").h(headers).q(query).b(body);
266
- return b.build();
267
- };
268
- export const se_UpdateApplicationCommand = async (input, context) => {
269
- const b = rb(input, context);
270
- const headers = {
271
- "content-type": "application/json",
272
- };
273
- b.bp("/applications/{application}");
274
- b.p("application", () => input.application, "{application}", false);
275
- let body;
276
- body = JSON.stringify(take(input, {
277
- description: [],
278
- name: [],
279
- }));
280
- b.m("PATCH").h(headers).b(body);
281
- return b.build();
282
- };
283
- export const se_UpdateAttributeGroupCommand = async (input, context) => {
284
- const b = rb(input, context);
285
- const headers = {
286
- "content-type": "application/json",
287
- };
288
- b.bp("/attribute-groups/{attributeGroup}");
289
- b.p("attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
290
- let body;
291
- body = JSON.stringify(take(input, {
292
- attributes: [],
293
- description: [],
294
- name: [],
295
- }));
296
- b.m("PATCH").h(headers).b(body);
297
- return b.build();
298
- };
299
- export const de_AssociateAttributeGroupCommand = async (output, context) => {
300
- if (output.statusCode !== 200 && output.statusCode >= 300) {
301
- return de_CommandError(output, context);
302
- }
303
- const contents = map({
304
- $metadata: deserializeMetadata(output),
305
- });
306
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
307
- const doc = take(data, {
308
- applicationArn: __expectString,
309
- attributeGroupArn: __expectString,
310
- });
311
- Object.assign(contents, doc);
312
- return contents;
313
- };
314
- export const de_AssociateResourceCommand = async (output, context) => {
315
- if (output.statusCode !== 200 && output.statusCode >= 300) {
316
- return de_CommandError(output, context);
317
- }
318
- const contents = map({
319
- $metadata: deserializeMetadata(output),
320
- });
321
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
322
- const doc = take(data, {
323
- applicationArn: __expectString,
324
- options: _json,
325
- resourceArn: __expectString,
326
- });
327
- Object.assign(contents, doc);
328
- return contents;
329
- };
330
- export const de_CreateApplicationCommand = async (output, context) => {
331
- if (output.statusCode !== 201 && output.statusCode >= 300) {
332
- return de_CommandError(output, context);
333
- }
334
- const contents = map({
335
- $metadata: deserializeMetadata(output),
336
- });
337
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
338
- const doc = take(data, {
339
- application: (_) => de_Application(_, context),
340
- });
341
- Object.assign(contents, doc);
342
- return contents;
343
- };
344
- export const de_CreateAttributeGroupCommand = async (output, context) => {
345
- if (output.statusCode !== 201 && output.statusCode >= 300) {
346
- return de_CommandError(output, context);
347
- }
348
- const contents = map({
349
- $metadata: deserializeMetadata(output),
350
- });
351
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
352
- const doc = take(data, {
353
- attributeGroup: (_) => de_AttributeGroup(_, context),
354
- });
355
- Object.assign(contents, doc);
356
- return contents;
357
- };
358
- export const de_DeleteApplicationCommand = async (output, context) => {
359
- if (output.statusCode !== 200 && output.statusCode >= 300) {
360
- return de_CommandError(output, context);
361
- }
362
- const contents = map({
363
- $metadata: deserializeMetadata(output),
364
- });
365
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
366
- const doc = take(data, {
367
- application: (_) => de_ApplicationSummary(_, context),
368
- });
369
- Object.assign(contents, doc);
370
- return contents;
371
- };
372
- export const de_DeleteAttributeGroupCommand = async (output, context) => {
373
- if (output.statusCode !== 200 && output.statusCode >= 300) {
374
- return de_CommandError(output, context);
375
- }
376
- const contents = map({
377
- $metadata: deserializeMetadata(output),
378
- });
379
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
380
- const doc = take(data, {
381
- attributeGroup: (_) => de_AttributeGroupSummary(_, context),
382
- });
383
- Object.assign(contents, doc);
384
- return contents;
385
- };
386
- export const de_DisassociateAttributeGroupCommand = async (output, context) => {
387
- if (output.statusCode !== 200 && output.statusCode >= 300) {
388
- return de_CommandError(output, context);
389
- }
390
- const contents = map({
391
- $metadata: deserializeMetadata(output),
392
- });
393
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
394
- const doc = take(data, {
395
- applicationArn: __expectString,
396
- attributeGroupArn: __expectString,
397
- });
398
- Object.assign(contents, doc);
399
- return contents;
400
- };
401
- export const de_DisassociateResourceCommand = async (output, context) => {
402
- if (output.statusCode !== 200 && output.statusCode >= 300) {
403
- return de_CommandError(output, context);
404
- }
405
- const contents = map({
406
- $metadata: deserializeMetadata(output),
407
- });
408
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
409
- const doc = take(data, {
410
- applicationArn: __expectString,
411
- resourceArn: __expectString,
412
- });
413
- Object.assign(contents, doc);
414
- return contents;
415
- };
416
- export const de_GetApplicationCommand = async (output, context) => {
417
- if (output.statusCode !== 200 && output.statusCode >= 300) {
418
- return de_CommandError(output, context);
419
- }
420
- const contents = map({
421
- $metadata: deserializeMetadata(output),
422
- });
423
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
424
- const doc = take(data, {
425
- applicationTag: _json,
426
- arn: __expectString,
427
- associatedResourceCount: __expectInt32,
428
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
429
- description: __expectString,
430
- id: __expectString,
431
- integrations: _json,
432
- lastUpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
433
- name: __expectString,
434
- tags: _json,
435
- });
436
- Object.assign(contents, doc);
437
- return contents;
438
- };
439
- export const de_GetAssociatedResourceCommand = async (output, context) => {
440
- if (output.statusCode !== 200 && output.statusCode >= 300) {
441
- return de_CommandError(output, context);
442
- }
443
- const contents = map({
444
- $metadata: deserializeMetadata(output),
445
- });
446
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
447
- const doc = take(data, {
448
- applicationTagResult: _json,
449
- options: _json,
450
- resource: (_) => de_Resource(_, context),
451
- });
452
- Object.assign(contents, doc);
453
- return contents;
454
- };
455
- export const de_GetAttributeGroupCommand = async (output, context) => {
456
- if (output.statusCode !== 200 && output.statusCode >= 300) {
457
- return de_CommandError(output, context);
458
- }
459
- const contents = map({
460
- $metadata: deserializeMetadata(output),
461
- });
462
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
463
- const doc = take(data, {
464
- arn: __expectString,
465
- attributes: __expectString,
466
- createdBy: __expectString,
467
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
468
- description: __expectString,
469
- id: __expectString,
470
- lastUpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
471
- name: __expectString,
472
- tags: _json,
473
- });
474
- Object.assign(contents, doc);
475
- return contents;
476
- };
477
- export const de_GetConfigurationCommand = async (output, context) => {
478
- if (output.statusCode !== 200 && output.statusCode >= 300) {
479
- return de_CommandError(output, context);
480
- }
481
- const contents = map({
482
- $metadata: deserializeMetadata(output),
483
- });
484
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
485
- const doc = take(data, {
486
- configuration: _json,
487
- });
488
- Object.assign(contents, doc);
489
- return contents;
490
- };
491
- export const de_ListApplicationsCommand = async (output, context) => {
492
- if (output.statusCode !== 200 && output.statusCode >= 300) {
493
- return de_CommandError(output, context);
494
- }
495
- const contents = map({
496
- $metadata: deserializeMetadata(output),
497
- });
498
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
499
- const doc = take(data, {
500
- applications: (_) => de_ApplicationSummaries(_, context),
501
- nextToken: __expectString,
502
- });
503
- Object.assign(contents, doc);
504
- return contents;
505
- };
506
- export const de_ListAssociatedAttributeGroupsCommand = async (output, context) => {
507
- if (output.statusCode !== 200 && output.statusCode >= 300) {
508
- return de_CommandError(output, context);
509
- }
510
- const contents = map({
511
- $metadata: deserializeMetadata(output),
512
- });
513
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
514
- const doc = take(data, {
515
- attributeGroups: _json,
516
- nextToken: __expectString,
517
- });
518
- Object.assign(contents, doc);
519
- return contents;
520
- };
521
- export const de_ListAssociatedResourcesCommand = async (output, context) => {
522
- if (output.statusCode !== 200 && output.statusCode >= 300) {
523
- return de_CommandError(output, context);
524
- }
525
- const contents = map({
526
- $metadata: deserializeMetadata(output),
527
- });
528
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
529
- const doc = take(data, {
530
- nextToken: __expectString,
531
- resources: _json,
532
- });
533
- Object.assign(contents, doc);
534
- return contents;
535
- };
536
- export const de_ListAttributeGroupsCommand = async (output, context) => {
537
- if (output.statusCode !== 200 && output.statusCode >= 300) {
538
- return de_CommandError(output, context);
539
- }
540
- const contents = map({
541
- $metadata: deserializeMetadata(output),
542
- });
543
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
544
- const doc = take(data, {
545
- attributeGroups: (_) => de_AttributeGroupSummaries(_, context),
546
- nextToken: __expectString,
547
- });
548
- Object.assign(contents, doc);
549
- return contents;
550
- };
551
- export const de_ListAttributeGroupsForApplicationCommand = async (output, context) => {
552
- if (output.statusCode !== 200 && output.statusCode >= 300) {
553
- return de_CommandError(output, context);
554
- }
555
- const contents = map({
556
- $metadata: deserializeMetadata(output),
557
- });
558
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
559
- const doc = take(data, {
560
- attributeGroupsDetails: _json,
561
- nextToken: __expectString,
562
- });
563
- Object.assign(contents, doc);
564
- return contents;
565
- };
566
- export const de_ListTagsForResourceCommand = async (output, context) => {
567
- if (output.statusCode !== 200 && output.statusCode >= 300) {
568
- return de_CommandError(output, context);
569
- }
570
- const contents = map({
571
- $metadata: deserializeMetadata(output),
572
- });
573
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
574
- const doc = take(data, {
575
- tags: _json,
576
- });
577
- Object.assign(contents, doc);
578
- return contents;
579
- };
580
- export const de_PutConfigurationCommand = async (output, context) => {
581
- if (output.statusCode !== 200 && output.statusCode >= 300) {
582
- return de_CommandError(output, context);
583
- }
584
- const contents = map({
585
- $metadata: deserializeMetadata(output),
586
- });
587
- await collectBody(output.body, context);
588
- return contents;
589
- };
590
- export const de_SyncResourceCommand = async (output, context) => {
591
- if (output.statusCode !== 200 && output.statusCode >= 300) {
592
- return de_CommandError(output, context);
593
- }
594
- const contents = map({
595
- $metadata: deserializeMetadata(output),
596
- });
597
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
598
- const doc = take(data, {
599
- actionTaken: __expectString,
600
- applicationArn: __expectString,
601
- resourceArn: __expectString,
602
- });
603
- Object.assign(contents, doc);
604
- return contents;
605
- };
606
- export const de_TagResourceCommand = async (output, context) => {
607
- if (output.statusCode !== 200 && output.statusCode >= 300) {
608
- return de_CommandError(output, context);
609
- }
610
- const contents = map({
611
- $metadata: deserializeMetadata(output),
612
- });
613
- await collectBody(output.body, context);
614
- return contents;
615
- };
616
- export const de_UntagResourceCommand = async (output, context) => {
617
- if (output.statusCode !== 200 && output.statusCode >= 300) {
618
- return de_CommandError(output, context);
619
- }
620
- const contents = map({
621
- $metadata: deserializeMetadata(output),
622
- });
623
- await collectBody(output.body, context);
624
- return contents;
625
- };
626
- export const de_UpdateApplicationCommand = async (output, context) => {
627
- if (output.statusCode !== 200 && output.statusCode >= 300) {
628
- return de_CommandError(output, context);
629
- }
630
- const contents = map({
631
- $metadata: deserializeMetadata(output),
632
- });
633
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
634
- const doc = take(data, {
635
- application: (_) => de_Application(_, context),
636
- });
637
- Object.assign(contents, doc);
638
- return contents;
639
- };
640
- export const de_UpdateAttributeGroupCommand = async (output, context) => {
641
- if (output.statusCode !== 200 && output.statusCode >= 300) {
642
- return de_CommandError(output, context);
643
- }
644
- const contents = map({
645
- $metadata: deserializeMetadata(output),
646
- });
647
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
648
- const doc = take(data, {
649
- attributeGroup: (_) => de_AttributeGroup(_, context),
650
- });
651
- Object.assign(contents, doc);
652
- return contents;
653
- };
654
- const de_CommandError = async (output, context) => {
655
- const parsedOutput = {
656
- ...output,
657
- body: await parseErrorBody(output.body, context),
658
- };
659
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
- switch (errorCode) {
661
- case "ConflictException":
662
- case "com.amazonaws.servicecatalogappregistry#ConflictException":
663
- throw await de_ConflictExceptionRes(parsedOutput, context);
664
- case "InternalServerException":
665
- case "com.amazonaws.servicecatalogappregistry#InternalServerException":
666
- throw await de_InternalServerExceptionRes(parsedOutput, context);
667
- case "ResourceNotFoundException":
668
- case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
669
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
670
- case "ServiceQuotaExceededException":
671
- case "com.amazonaws.servicecatalogappregistry#ServiceQuotaExceededException":
672
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
673
- case "ValidationException":
674
- case "com.amazonaws.servicecatalogappregistry#ValidationException":
675
- throw await de_ValidationExceptionRes(parsedOutput, context);
676
- case "ThrottlingException":
677
- case "com.amazonaws.servicecatalogappregistry#ThrottlingException":
678
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
679
- default:
680
- const parsedBody = parsedOutput.body;
681
- return throwDefaultError({
682
- output,
683
- parsedBody,
684
- errorCode,
685
- });
686
- }
687
- };
688
- const throwDefaultError = withBaseException(__BaseException);
689
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
690
- const contents = map({});
691
- const data = parsedOutput.body;
692
- const doc = take(data, {
693
- message: __expectString,
694
- });
695
- Object.assign(contents, doc);
696
- const exception = new ConflictException({
697
- $metadata: deserializeMetadata(parsedOutput),
698
- ...contents,
699
- });
700
- return __decorateServiceException(exception, parsedOutput.body);
701
- };
702
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
703
- const contents = map({});
704
- const data = parsedOutput.body;
705
- const doc = take(data, {
706
- message: __expectString,
707
- });
708
- Object.assign(contents, doc);
709
- const exception = new InternalServerException({
710
- $metadata: deserializeMetadata(parsedOutput),
711
- ...contents,
712
- });
713
- return __decorateServiceException(exception, parsedOutput.body);
714
- };
715
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
716
- const contents = map({});
717
- const data = parsedOutput.body;
718
- const doc = take(data, {
719
- message: __expectString,
720
- });
721
- Object.assign(contents, doc);
722
- const exception = new ResourceNotFoundException({
723
- $metadata: deserializeMetadata(parsedOutput),
724
- ...contents,
725
- });
726
- return __decorateServiceException(exception, parsedOutput.body);
727
- };
728
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
729
- const contents = map({});
730
- const data = parsedOutput.body;
731
- const doc = take(data, {
732
- message: __expectString,
733
- });
734
- Object.assign(contents, doc);
735
- const exception = new ServiceQuotaExceededException({
736
- $metadata: deserializeMetadata(parsedOutput),
737
- ...contents,
738
- });
739
- return __decorateServiceException(exception, parsedOutput.body);
740
- };
741
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
742
- const contents = map({});
743
- const data = parsedOutput.body;
744
- const doc = take(data, {
745
- message: __expectString,
746
- serviceCode: __expectString,
747
- });
748
- Object.assign(contents, doc);
749
- const exception = new ThrottlingException({
750
- $metadata: deserializeMetadata(parsedOutput),
751
- ...contents,
752
- });
753
- return __decorateServiceException(exception, parsedOutput.body);
754
- };
755
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
756
- const contents = map({});
757
- const data = parsedOutput.body;
758
- const doc = take(data, {
759
- message: __expectString,
760
- });
761
- Object.assign(contents, doc);
762
- const exception = new ValidationException({
763
- $metadata: deserializeMetadata(parsedOutput),
764
- ...contents,
765
- });
766
- return __decorateServiceException(exception, parsedOutput.body);
767
- };
768
- const de_Application = (output, context) => {
769
- return take(output, {
770
- applicationTag: _json,
771
- arn: __expectString,
772
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
773
- description: __expectString,
774
- id: __expectString,
775
- lastUpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
776
- name: __expectString,
777
- tags: _json,
778
- });
779
- };
780
- const de_ApplicationSummaries = (output, context) => {
781
- const retVal = (output || [])
782
- .filter((e) => e != null)
783
- .map((entry) => {
784
- return de_ApplicationSummary(entry, context);
785
- });
786
- return retVal;
787
- };
788
- const de_ApplicationSummary = (output, context) => {
789
- return take(output, {
790
- arn: __expectString,
791
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
792
- description: __expectString,
793
- id: __expectString,
794
- lastUpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
795
- name: __expectString,
796
- });
797
- };
798
- const de_AttributeGroup = (output, context) => {
799
- return take(output, {
800
- arn: __expectString,
801
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
802
- description: __expectString,
803
- id: __expectString,
804
- lastUpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
805
- name: __expectString,
806
- tags: _json,
807
- });
808
- };
809
- const de_AttributeGroupSummaries = (output, context) => {
810
- const retVal = (output || [])
811
- .filter((e) => e != null)
812
- .map((entry) => {
813
- return de_AttributeGroupSummary(entry, context);
814
- });
815
- return retVal;
816
- };
817
- const de_AttributeGroupSummary = (output, context) => {
818
- return take(output, {
819
- arn: __expectString,
820
- createdBy: __expectString,
821
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
822
- description: __expectString,
823
- id: __expectString,
824
- lastUpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
825
- name: __expectString,
826
- });
827
- };
828
- const de_Resource = (output, context) => {
829
- return take(output, {
830
- arn: __expectString,
831
- associationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
832
- integrations: _json,
833
- name: __expectString,
834
- });
835
- };
836
- const deserializeMetadata = (output) => ({
837
- httpStatusCode: output.statusCode,
838
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
839
- extendedRequestId: output.headers["x-amz-id-2"],
840
- cfId: output.headers["x-amz-cf-id"],
841
- });
842
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
843
- const _mR = "maxResults";
844
- const _nT = "nextToken";
845
- const _rTS = "resourceTagStatus";
846
- const _tK = "tagKeys";