@aws-sdk/client-ssm-incidents 3.490.0 → 3.495.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist-cjs/SSMIncidents.js +1 -73
  2. package/dist-cjs/SSMIncidentsClient.js +1 -43
  3. package/dist-cjs/commands/BatchGetIncidentFindingsCommand.js +1 -28
  4. package/dist-cjs/commands/CreateReplicationSetCommand.js +1 -28
  5. package/dist-cjs/commands/CreateResponsePlanCommand.js +1 -28
  6. package/dist-cjs/commands/CreateTimelineEventCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteIncidentRecordCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteReplicationSetCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteResourcePolicyCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteResponsePlanCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteTimelineEventCommand.js +1 -28
  12. package/dist-cjs/commands/GetIncidentRecordCommand.js +1 -28
  13. package/dist-cjs/commands/GetReplicationSetCommand.js +1 -28
  14. package/dist-cjs/commands/GetResourcePoliciesCommand.js +1 -28
  15. package/dist-cjs/commands/GetResponsePlanCommand.js +1 -28
  16. package/dist-cjs/commands/GetTimelineEventCommand.js +1 -28
  17. package/dist-cjs/commands/ListIncidentFindingsCommand.js +1 -28
  18. package/dist-cjs/commands/ListIncidentRecordsCommand.js +1 -28
  19. package/dist-cjs/commands/ListRelatedItemsCommand.js +1 -28
  20. package/dist-cjs/commands/ListReplicationSetsCommand.js +1 -28
  21. package/dist-cjs/commands/ListResponsePlansCommand.js +1 -28
  22. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  23. package/dist-cjs/commands/ListTimelineEventsCommand.js +1 -28
  24. package/dist-cjs/commands/PutResourcePolicyCommand.js +1 -28
  25. package/dist-cjs/commands/StartIncidentCommand.js +1 -28
  26. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  27. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  28. package/dist-cjs/commands/UpdateDeletionProtectionCommand.js +1 -28
  29. package/dist-cjs/commands/UpdateIncidentRecordCommand.js +1 -28
  30. package/dist-cjs/commands/UpdateRelatedItemsCommand.js +1 -28
  31. package/dist-cjs/commands/UpdateReplicationSetCommand.js +1 -28
  32. package/dist-cjs/commands/UpdateResponsePlanCommand.js +1 -28
  33. package/dist-cjs/commands/UpdateTimelineEventCommand.js +1 -28
  34. package/dist-cjs/commands/index.js +1 -34
  35. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  36. package/dist-cjs/extensionConfiguration.js +1 -2
  37. package/dist-cjs/index.js +3539 -12
  38. package/dist-cjs/models/SSMIncidentsServiceException.js +1 -12
  39. package/dist-cjs/models/index.js +1 -4
  40. package/dist-cjs/models/models_0.js +1 -285
  41. package/dist-cjs/pagination/GetResourcePoliciesPaginator.js +1 -7
  42. package/dist-cjs/pagination/Interfaces.js +1 -2
  43. package/dist-cjs/pagination/ListIncidentFindingsPaginator.js +1 -7
  44. package/dist-cjs/pagination/ListIncidentRecordsPaginator.js +1 -7
  45. package/dist-cjs/pagination/ListRelatedItemsPaginator.js +1 -7
  46. package/dist-cjs/pagination/ListReplicationSetsPaginator.js +1 -7
  47. package/dist-cjs/pagination/ListResponsePlansPaginator.js +1 -7
  48. package/dist-cjs/pagination/ListTimelineEventsPaginator.js +1 -7
  49. package/dist-cjs/pagination/index.js +1 -11
  50. package/dist-cjs/protocols/Aws_restJson1.js +1 -2250
  51. package/dist-cjs/runtimeExtensions.js +1 -22
  52. package/dist-cjs/waiters/index.js +1 -5
  53. package/dist-cjs/waiters/waitForWaitForReplicationSetActive.js +1 -63
  54. package/dist-cjs/waiters/waitForWaitForReplicationSetDeleted.js +1 -48
  55. package/package.json +41 -41
@@ -1,2250 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListResponsePlansCommand = exports.de_ListReplicationSetsCommand = exports.de_ListRelatedItemsCommand = exports.de_ListIncidentRecordsCommand = exports.de_ListIncidentFindingsCommand = exports.de_GetTimelineEventCommand = exports.de_GetResponsePlanCommand = exports.de_GetResourcePoliciesCommand = exports.de_GetReplicationSetCommand = exports.de_GetIncidentRecordCommand = exports.de_DeleteTimelineEventCommand = exports.de_DeleteResponsePlanCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteReplicationSetCommand = exports.de_DeleteIncidentRecordCommand = exports.de_CreateTimelineEventCommand = exports.de_CreateResponsePlanCommand = exports.de_CreateReplicationSetCommand = exports.de_BatchGetIncidentFindingsCommand = exports.se_UpdateTimelineEventCommand = exports.se_UpdateResponsePlanCommand = exports.se_UpdateReplicationSetCommand = exports.se_UpdateRelatedItemsCommand = exports.se_UpdateIncidentRecordCommand = exports.se_UpdateDeletionProtectionCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartIncidentCommand = exports.se_PutResourcePolicyCommand = exports.se_ListTimelineEventsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListResponsePlansCommand = exports.se_ListReplicationSetsCommand = exports.se_ListRelatedItemsCommand = exports.se_ListIncidentRecordsCommand = exports.se_ListIncidentFindingsCommand = exports.se_GetTimelineEventCommand = exports.se_GetResponsePlanCommand = exports.se_GetResourcePoliciesCommand = exports.se_GetReplicationSetCommand = exports.se_GetIncidentRecordCommand = exports.se_DeleteTimelineEventCommand = exports.se_DeleteResponsePlanCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteReplicationSetCommand = exports.se_DeleteIncidentRecordCommand = exports.se_CreateTimelineEventCommand = exports.se_CreateResponsePlanCommand = exports.se_CreateReplicationSetCommand = exports.se_BatchGetIncidentFindingsCommand = void 0;
4
- exports.de_UpdateTimelineEventCommand = exports.de_UpdateResponsePlanCommand = exports.de_UpdateReplicationSetCommand = exports.de_UpdateRelatedItemsCommand = exports.de_UpdateIncidentRecordCommand = exports.de_UpdateDeletionProtectionCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartIncidentCommand = exports.de_PutResourcePolicyCommand = exports.de_ListTimelineEventsCommand = exports.de_ListTagsForResourceCommand = void 0;
5
- const core_1 = require("@aws-sdk/core");
6
- const core_2 = require("@smithy/core");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const uuid_1 = require("uuid");
9
- const models_0_1 = require("../models/models_0");
10
- const SSMIncidentsServiceException_1 = require("../models/SSMIncidentsServiceException");
11
- const se_BatchGetIncidentFindingsCommand = async (input, context) => {
12
- const b = (0, core_2.requestBuilder)(input, context);
13
- const headers = {
14
- "content-type": "application/json",
15
- };
16
- b.bp("/batchGetIncidentFindings");
17
- let body;
18
- body = JSON.stringify((0, smithy_client_1.take)(input, {
19
- findingIds: (_) => (0, smithy_client_1._json)(_),
20
- incidentRecordArn: [],
21
- }));
22
- b.m("POST").h(headers).b(body);
23
- return b.build();
24
- };
25
- exports.se_BatchGetIncidentFindingsCommand = se_BatchGetIncidentFindingsCommand;
26
- const se_CreateReplicationSetCommand = async (input, context) => {
27
- const b = (0, core_2.requestBuilder)(input, context);
28
- const headers = {
29
- "content-type": "application/json",
30
- };
31
- b.bp("/createReplicationSet");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1.take)(input, {
34
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
35
- regions: (_) => (0, smithy_client_1._json)(_),
36
- tags: (_) => (0, smithy_client_1._json)(_),
37
- }));
38
- b.m("POST").h(headers).b(body);
39
- return b.build();
40
- };
41
- exports.se_CreateReplicationSetCommand = se_CreateReplicationSetCommand;
42
- const se_CreateResponsePlanCommand = async (input, context) => {
43
- const b = (0, core_2.requestBuilder)(input, context);
44
- const headers = {
45
- "content-type": "application/json",
46
- };
47
- b.bp("/createResponsePlan");
48
- let body;
49
- body = JSON.stringify((0, smithy_client_1.take)(input, {
50
- actions: (_) => (0, smithy_client_1._json)(_),
51
- chatChannel: (_) => (0, smithy_client_1._json)(_),
52
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
53
- displayName: [],
54
- engagements: (_) => (0, smithy_client_1._json)(_),
55
- incidentTemplate: (_) => (0, smithy_client_1._json)(_),
56
- integrations: (_) => (0, smithy_client_1._json)(_),
57
- name: [],
58
- tags: (_) => (0, smithy_client_1._json)(_),
59
- }));
60
- b.m("POST").h(headers).b(body);
61
- return b.build();
62
- };
63
- exports.se_CreateResponsePlanCommand = se_CreateResponsePlanCommand;
64
- const se_CreateTimelineEventCommand = async (input, context) => {
65
- const b = (0, core_2.requestBuilder)(input, context);
66
- const headers = {
67
- "content-type": "application/json",
68
- };
69
- b.bp("/createTimelineEvent");
70
- let body;
71
- body = JSON.stringify((0, smithy_client_1.take)(input, {
72
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
73
- eventData: [],
74
- eventReferences: (_) => (0, smithy_client_1._json)(_),
75
- eventTime: (_) => Math.round(_.getTime() / 1000),
76
- eventType: [],
77
- incidentRecordArn: [],
78
- }));
79
- b.m("POST").h(headers).b(body);
80
- return b.build();
81
- };
82
- exports.se_CreateTimelineEventCommand = se_CreateTimelineEventCommand;
83
- const se_DeleteIncidentRecordCommand = async (input, context) => {
84
- const b = (0, core_2.requestBuilder)(input, context);
85
- const headers = {
86
- "content-type": "application/json",
87
- };
88
- b.bp("/deleteIncidentRecord");
89
- let body;
90
- body = JSON.stringify((0, smithy_client_1.take)(input, {
91
- arn: [],
92
- }));
93
- b.m("POST").h(headers).b(body);
94
- return b.build();
95
- };
96
- exports.se_DeleteIncidentRecordCommand = se_DeleteIncidentRecordCommand;
97
- const se_DeleteReplicationSetCommand = async (input, context) => {
98
- const b = (0, core_2.requestBuilder)(input, context);
99
- const headers = {};
100
- b.bp("/deleteReplicationSet");
101
- const query = (0, smithy_client_1.map)({
102
- [_a]: [, (0, smithy_client_1.expectNonNull)(input[_a], `arn`)],
103
- });
104
- let body;
105
- b.m("POST").h(headers).q(query).b(body);
106
- return b.build();
107
- };
108
- exports.se_DeleteReplicationSetCommand = se_DeleteReplicationSetCommand;
109
- const se_DeleteResourcePolicyCommand = async (input, context) => {
110
- const b = (0, core_2.requestBuilder)(input, context);
111
- const headers = {
112
- "content-type": "application/json",
113
- };
114
- b.bp("/deleteResourcePolicy");
115
- let body;
116
- body = JSON.stringify((0, smithy_client_1.take)(input, {
117
- policyId: [],
118
- resourceArn: [],
119
- }));
120
- b.m("POST").h(headers).b(body);
121
- return b.build();
122
- };
123
- exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
124
- const se_DeleteResponsePlanCommand = async (input, context) => {
125
- const b = (0, core_2.requestBuilder)(input, context);
126
- const headers = {
127
- "content-type": "application/json",
128
- };
129
- b.bp("/deleteResponsePlan");
130
- let body;
131
- body = JSON.stringify((0, smithy_client_1.take)(input, {
132
- arn: [],
133
- }));
134
- b.m("POST").h(headers).b(body);
135
- return b.build();
136
- };
137
- exports.se_DeleteResponsePlanCommand = se_DeleteResponsePlanCommand;
138
- const se_DeleteTimelineEventCommand = async (input, context) => {
139
- const b = (0, core_2.requestBuilder)(input, context);
140
- const headers = {
141
- "content-type": "application/json",
142
- };
143
- b.bp("/deleteTimelineEvent");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1.take)(input, {
146
- eventId: [],
147
- incidentRecordArn: [],
148
- }));
149
- b.m("POST").h(headers).b(body);
150
- return b.build();
151
- };
152
- exports.se_DeleteTimelineEventCommand = se_DeleteTimelineEventCommand;
153
- const se_GetIncidentRecordCommand = async (input, context) => {
154
- const b = (0, core_2.requestBuilder)(input, context);
155
- const headers = {};
156
- b.bp("/getIncidentRecord");
157
- const query = (0, smithy_client_1.map)({
158
- [_a]: [, (0, smithy_client_1.expectNonNull)(input[_a], `arn`)],
159
- });
160
- let body;
161
- b.m("GET").h(headers).q(query).b(body);
162
- return b.build();
163
- };
164
- exports.se_GetIncidentRecordCommand = se_GetIncidentRecordCommand;
165
- const se_GetReplicationSetCommand = async (input, context) => {
166
- const b = (0, core_2.requestBuilder)(input, context);
167
- const headers = {};
168
- b.bp("/getReplicationSet");
169
- const query = (0, smithy_client_1.map)({
170
- [_a]: [, (0, smithy_client_1.expectNonNull)(input[_a], `arn`)],
171
- });
172
- let body;
173
- b.m("GET").h(headers).q(query).b(body);
174
- return b.build();
175
- };
176
- exports.se_GetReplicationSetCommand = se_GetReplicationSetCommand;
177
- const se_GetResourcePoliciesCommand = async (input, context) => {
178
- const b = (0, core_2.requestBuilder)(input, context);
179
- const headers = {
180
- "content-type": "application/json",
181
- };
182
- b.bp("/getResourcePolicies");
183
- const query = (0, smithy_client_1.map)({
184
- [_rA]: [, (0, smithy_client_1.expectNonNull)(input[_rA], `resourceArn`)],
185
- });
186
- let body;
187
- body = JSON.stringify((0, smithy_client_1.take)(input, {
188
- maxResults: [],
189
- nextToken: [],
190
- }));
191
- b.m("POST").h(headers).q(query).b(body);
192
- return b.build();
193
- };
194
- exports.se_GetResourcePoliciesCommand = se_GetResourcePoliciesCommand;
195
- const se_GetResponsePlanCommand = async (input, context) => {
196
- const b = (0, core_2.requestBuilder)(input, context);
197
- const headers = {};
198
- b.bp("/getResponsePlan");
199
- const query = (0, smithy_client_1.map)({
200
- [_a]: [, (0, smithy_client_1.expectNonNull)(input[_a], `arn`)],
201
- });
202
- let body;
203
- b.m("GET").h(headers).q(query).b(body);
204
- return b.build();
205
- };
206
- exports.se_GetResponsePlanCommand = se_GetResponsePlanCommand;
207
- const se_GetTimelineEventCommand = async (input, context) => {
208
- const b = (0, core_2.requestBuilder)(input, context);
209
- const headers = {};
210
- b.bp("/getTimelineEvent");
211
- const query = (0, smithy_client_1.map)({
212
- [_iRA]: [, (0, smithy_client_1.expectNonNull)(input[_iRA], `incidentRecordArn`)],
213
- [_eI]: [, (0, smithy_client_1.expectNonNull)(input[_eI], `eventId`)],
214
- });
215
- let body;
216
- b.m("GET").h(headers).q(query).b(body);
217
- return b.build();
218
- };
219
- exports.se_GetTimelineEventCommand = se_GetTimelineEventCommand;
220
- const se_ListIncidentFindingsCommand = async (input, context) => {
221
- const b = (0, core_2.requestBuilder)(input, context);
222
- const headers = {
223
- "content-type": "application/json",
224
- };
225
- b.bp("/listIncidentFindings");
226
- let body;
227
- body = JSON.stringify((0, smithy_client_1.take)(input, {
228
- incidentRecordArn: [],
229
- maxResults: [],
230
- nextToken: [],
231
- }));
232
- b.m("POST").h(headers).b(body);
233
- return b.build();
234
- };
235
- exports.se_ListIncidentFindingsCommand = se_ListIncidentFindingsCommand;
236
- const se_ListIncidentRecordsCommand = async (input, context) => {
237
- const b = (0, core_2.requestBuilder)(input, context);
238
- const headers = {
239
- "content-type": "application/json",
240
- };
241
- b.bp("/listIncidentRecords");
242
- let body;
243
- body = JSON.stringify((0, smithy_client_1.take)(input, {
244
- filters: (_) => se_FilterList(_, context),
245
- maxResults: [],
246
- nextToken: [],
247
- }));
248
- b.m("POST").h(headers).b(body);
249
- return b.build();
250
- };
251
- exports.se_ListIncidentRecordsCommand = se_ListIncidentRecordsCommand;
252
- const se_ListRelatedItemsCommand = async (input, context) => {
253
- const b = (0, core_2.requestBuilder)(input, context);
254
- const headers = {
255
- "content-type": "application/json",
256
- };
257
- b.bp("/listRelatedItems");
258
- let body;
259
- body = JSON.stringify((0, smithy_client_1.take)(input, {
260
- incidentRecordArn: [],
261
- maxResults: [],
262
- nextToken: [],
263
- }));
264
- b.m("POST").h(headers).b(body);
265
- return b.build();
266
- };
267
- exports.se_ListRelatedItemsCommand = se_ListRelatedItemsCommand;
268
- const se_ListReplicationSetsCommand = async (input, context) => {
269
- const b = (0, core_2.requestBuilder)(input, context);
270
- const headers = {
271
- "content-type": "application/json",
272
- };
273
- b.bp("/listReplicationSets");
274
- let body;
275
- body = JSON.stringify((0, smithy_client_1.take)(input, {
276
- maxResults: [],
277
- nextToken: [],
278
- }));
279
- b.m("POST").h(headers).b(body);
280
- return b.build();
281
- };
282
- exports.se_ListReplicationSetsCommand = se_ListReplicationSetsCommand;
283
- const se_ListResponsePlansCommand = async (input, context) => {
284
- const b = (0, core_2.requestBuilder)(input, context);
285
- const headers = {
286
- "content-type": "application/json",
287
- };
288
- b.bp("/listResponsePlans");
289
- let body;
290
- body = JSON.stringify((0, smithy_client_1.take)(input, {
291
- maxResults: [],
292
- nextToken: [],
293
- }));
294
- b.m("POST").h(headers).b(body);
295
- return b.build();
296
- };
297
- exports.se_ListResponsePlansCommand = se_ListResponsePlansCommand;
298
- const se_ListTagsForResourceCommand = async (input, context) => {
299
- const b = (0, core_2.requestBuilder)(input, context);
300
- const headers = {};
301
- b.bp("/tags/{resourceArn}");
302
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
303
- let body;
304
- b.m("GET").h(headers).b(body);
305
- return b.build();
306
- };
307
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
308
- const se_ListTimelineEventsCommand = async (input, context) => {
309
- const b = (0, core_2.requestBuilder)(input, context);
310
- const headers = {
311
- "content-type": "application/json",
312
- };
313
- b.bp("/listTimelineEvents");
314
- let body;
315
- body = JSON.stringify((0, smithy_client_1.take)(input, {
316
- filters: (_) => se_FilterList(_, context),
317
- incidentRecordArn: [],
318
- maxResults: [],
319
- nextToken: [],
320
- sortBy: [],
321
- sortOrder: [],
322
- }));
323
- b.m("POST").h(headers).b(body);
324
- return b.build();
325
- };
326
- exports.se_ListTimelineEventsCommand = se_ListTimelineEventsCommand;
327
- const se_PutResourcePolicyCommand = async (input, context) => {
328
- const b = (0, core_2.requestBuilder)(input, context);
329
- const headers = {
330
- "content-type": "application/json",
331
- };
332
- b.bp("/putResourcePolicy");
333
- let body;
334
- body = JSON.stringify((0, smithy_client_1.take)(input, {
335
- policy: [],
336
- resourceArn: [],
337
- }));
338
- b.m("POST").h(headers).b(body);
339
- return b.build();
340
- };
341
- exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
342
- const se_StartIncidentCommand = async (input, context) => {
343
- const b = (0, core_2.requestBuilder)(input, context);
344
- const headers = {
345
- "content-type": "application/json",
346
- };
347
- b.bp("/startIncident");
348
- let body;
349
- body = JSON.stringify((0, smithy_client_1.take)(input, {
350
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
351
- impact: [],
352
- relatedItems: (_) => (0, smithy_client_1._json)(_),
353
- responsePlanArn: [],
354
- title: [],
355
- triggerDetails: (_) => se_TriggerDetails(_, context),
356
- }));
357
- b.m("POST").h(headers).b(body);
358
- return b.build();
359
- };
360
- exports.se_StartIncidentCommand = se_StartIncidentCommand;
361
- const se_TagResourceCommand = async (input, context) => {
362
- const b = (0, core_2.requestBuilder)(input, context);
363
- const headers = {
364
- "content-type": "application/json",
365
- };
366
- b.bp("/tags/{resourceArn}");
367
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
368
- let body;
369
- body = JSON.stringify((0, smithy_client_1.take)(input, {
370
- tags: (_) => (0, smithy_client_1._json)(_),
371
- }));
372
- b.m("POST").h(headers).b(body);
373
- return b.build();
374
- };
375
- exports.se_TagResourceCommand = se_TagResourceCommand;
376
- const se_UntagResourceCommand = async (input, context) => {
377
- const b = (0, core_2.requestBuilder)(input, context);
378
- const headers = {};
379
- b.bp("/tags/{resourceArn}");
380
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
381
- const query = (0, smithy_client_1.map)({
382
- [_tK]: [
383
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
384
- () => (input[_tK] || []).map((_entry) => _entry),
385
- ],
386
- });
387
- let body;
388
- b.m("DELETE").h(headers).q(query).b(body);
389
- return b.build();
390
- };
391
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
392
- const se_UpdateDeletionProtectionCommand = async (input, context) => {
393
- const b = (0, core_2.requestBuilder)(input, context);
394
- const headers = {
395
- "content-type": "application/json",
396
- };
397
- b.bp("/updateDeletionProtection");
398
- let body;
399
- body = JSON.stringify((0, smithy_client_1.take)(input, {
400
- arn: [],
401
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
402
- deletionProtected: [],
403
- }));
404
- b.m("POST").h(headers).b(body);
405
- return b.build();
406
- };
407
- exports.se_UpdateDeletionProtectionCommand = se_UpdateDeletionProtectionCommand;
408
- const se_UpdateIncidentRecordCommand = async (input, context) => {
409
- const b = (0, core_2.requestBuilder)(input, context);
410
- const headers = {
411
- "content-type": "application/json",
412
- };
413
- b.bp("/updateIncidentRecord");
414
- let body;
415
- body = JSON.stringify((0, smithy_client_1.take)(input, {
416
- arn: [],
417
- chatChannel: (_) => (0, smithy_client_1._json)(_),
418
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
419
- impact: [],
420
- notificationTargets: (_) => (0, smithy_client_1._json)(_),
421
- status: [],
422
- summary: [],
423
- title: [],
424
- }));
425
- b.m("POST").h(headers).b(body);
426
- return b.build();
427
- };
428
- exports.se_UpdateIncidentRecordCommand = se_UpdateIncidentRecordCommand;
429
- const se_UpdateRelatedItemsCommand = async (input, context) => {
430
- const b = (0, core_2.requestBuilder)(input, context);
431
- const headers = {
432
- "content-type": "application/json",
433
- };
434
- b.bp("/updateRelatedItems");
435
- let body;
436
- body = JSON.stringify((0, smithy_client_1.take)(input, {
437
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
438
- incidentRecordArn: [],
439
- relatedItemsUpdate: (_) => (0, smithy_client_1._json)(_),
440
- }));
441
- b.m("POST").h(headers).b(body);
442
- return b.build();
443
- };
444
- exports.se_UpdateRelatedItemsCommand = se_UpdateRelatedItemsCommand;
445
- const se_UpdateReplicationSetCommand = async (input, context) => {
446
- const b = (0, core_2.requestBuilder)(input, context);
447
- const headers = {
448
- "content-type": "application/json",
449
- };
450
- b.bp("/updateReplicationSet");
451
- let body;
452
- body = JSON.stringify((0, smithy_client_1.take)(input, {
453
- actions: (_) => (0, smithy_client_1._json)(_),
454
- arn: [],
455
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
456
- }));
457
- b.m("POST").h(headers).b(body);
458
- return b.build();
459
- };
460
- exports.se_UpdateReplicationSetCommand = se_UpdateReplicationSetCommand;
461
- const se_UpdateResponsePlanCommand = async (input, context) => {
462
- const b = (0, core_2.requestBuilder)(input, context);
463
- const headers = {
464
- "content-type": "application/json",
465
- };
466
- b.bp("/updateResponsePlan");
467
- let body;
468
- body = JSON.stringify((0, smithy_client_1.take)(input, {
469
- actions: (_) => (0, smithy_client_1._json)(_),
470
- arn: [],
471
- chatChannel: (_) => (0, smithy_client_1._json)(_),
472
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
473
- displayName: [],
474
- engagements: (_) => (0, smithy_client_1._json)(_),
475
- incidentTemplateDedupeString: [],
476
- incidentTemplateImpact: [],
477
- incidentTemplateNotificationTargets: (_) => (0, smithy_client_1._json)(_),
478
- incidentTemplateSummary: [],
479
- incidentTemplateTags: (_) => (0, smithy_client_1._json)(_),
480
- incidentTemplateTitle: [],
481
- integrations: (_) => (0, smithy_client_1._json)(_),
482
- }));
483
- b.m("POST").h(headers).b(body);
484
- return b.build();
485
- };
486
- exports.se_UpdateResponsePlanCommand = se_UpdateResponsePlanCommand;
487
- const se_UpdateTimelineEventCommand = async (input, context) => {
488
- const b = (0, core_2.requestBuilder)(input, context);
489
- const headers = {
490
- "content-type": "application/json",
491
- };
492
- b.bp("/updateTimelineEvent");
493
- let body;
494
- body = JSON.stringify((0, smithy_client_1.take)(input, {
495
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
496
- eventData: [],
497
- eventId: [],
498
- eventReferences: (_) => (0, smithy_client_1._json)(_),
499
- eventTime: (_) => Math.round(_.getTime() / 1000),
500
- eventType: [],
501
- incidentRecordArn: [],
502
- }));
503
- b.m("POST").h(headers).b(body);
504
- return b.build();
505
- };
506
- exports.se_UpdateTimelineEventCommand = se_UpdateTimelineEventCommand;
507
- const de_BatchGetIncidentFindingsCommand = async (output, context) => {
508
- if (output.statusCode !== 200 && output.statusCode >= 300) {
509
- return de_BatchGetIncidentFindingsCommandError(output, context);
510
- }
511
- const contents = (0, smithy_client_1.map)({
512
- $metadata: deserializeMetadata(output),
513
- });
514
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
515
- const doc = (0, smithy_client_1.take)(data, {
516
- errors: smithy_client_1._json,
517
- findings: (_) => de_FindingList(_, context),
518
- });
519
- Object.assign(contents, doc);
520
- return contents;
521
- };
522
- exports.de_BatchGetIncidentFindingsCommand = de_BatchGetIncidentFindingsCommand;
523
- const de_BatchGetIncidentFindingsCommandError = async (output, context) => {
524
- const parsedOutput = {
525
- ...output,
526
- body: await parseErrorBody(output.body, context),
527
- };
528
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
529
- switch (errorCode) {
530
- case "AccessDeniedException":
531
- case "com.amazonaws.ssmincidents#AccessDeniedException":
532
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
533
- case "InternalServerException":
534
- case "com.amazonaws.ssmincidents#InternalServerException":
535
- throw await de_InternalServerExceptionRes(parsedOutput, context);
536
- case "ResourceNotFoundException":
537
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
538
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
539
- case "ThrottlingException":
540
- case "com.amazonaws.ssmincidents#ThrottlingException":
541
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
542
- case "ValidationException":
543
- case "com.amazonaws.ssmincidents#ValidationException":
544
- throw await de_ValidationExceptionRes(parsedOutput, context);
545
- default:
546
- const parsedBody = parsedOutput.body;
547
- return throwDefaultError({
548
- output,
549
- parsedBody,
550
- errorCode,
551
- });
552
- }
553
- };
554
- const de_CreateReplicationSetCommand = async (output, context) => {
555
- if (output.statusCode !== 201 && output.statusCode >= 300) {
556
- return de_CreateReplicationSetCommandError(output, context);
557
- }
558
- const contents = (0, smithy_client_1.map)({
559
- $metadata: deserializeMetadata(output),
560
- });
561
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
562
- const doc = (0, smithy_client_1.take)(data, {
563
- arn: smithy_client_1.expectString,
564
- });
565
- Object.assign(contents, doc);
566
- return contents;
567
- };
568
- exports.de_CreateReplicationSetCommand = de_CreateReplicationSetCommand;
569
- const de_CreateReplicationSetCommandError = async (output, context) => {
570
- const parsedOutput = {
571
- ...output,
572
- body: await parseErrorBody(output.body, context),
573
- };
574
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
575
- switch (errorCode) {
576
- case "AccessDeniedException":
577
- case "com.amazonaws.ssmincidents#AccessDeniedException":
578
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
579
- case "ConflictException":
580
- case "com.amazonaws.ssmincidents#ConflictException":
581
- throw await de_ConflictExceptionRes(parsedOutput, context);
582
- case "InternalServerException":
583
- case "com.amazonaws.ssmincidents#InternalServerException":
584
- throw await de_InternalServerExceptionRes(parsedOutput, context);
585
- case "ServiceQuotaExceededException":
586
- case "com.amazonaws.ssmincidents#ServiceQuotaExceededException":
587
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
588
- case "ThrottlingException":
589
- case "com.amazonaws.ssmincidents#ThrottlingException":
590
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
591
- case "ValidationException":
592
- case "com.amazonaws.ssmincidents#ValidationException":
593
- throw await de_ValidationExceptionRes(parsedOutput, context);
594
- default:
595
- const parsedBody = parsedOutput.body;
596
- return throwDefaultError({
597
- output,
598
- parsedBody,
599
- errorCode,
600
- });
601
- }
602
- };
603
- const de_CreateResponsePlanCommand = async (output, context) => {
604
- if (output.statusCode !== 201 && output.statusCode >= 300) {
605
- return de_CreateResponsePlanCommandError(output, context);
606
- }
607
- const contents = (0, smithy_client_1.map)({
608
- $metadata: deserializeMetadata(output),
609
- });
610
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
611
- const doc = (0, smithy_client_1.take)(data, {
612
- arn: smithy_client_1.expectString,
613
- });
614
- Object.assign(contents, doc);
615
- return contents;
616
- };
617
- exports.de_CreateResponsePlanCommand = de_CreateResponsePlanCommand;
618
- const de_CreateResponsePlanCommandError = async (output, context) => {
619
- const parsedOutput = {
620
- ...output,
621
- body: await parseErrorBody(output.body, context),
622
- };
623
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
624
- switch (errorCode) {
625
- case "AccessDeniedException":
626
- case "com.amazonaws.ssmincidents#AccessDeniedException":
627
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
628
- case "ConflictException":
629
- case "com.amazonaws.ssmincidents#ConflictException":
630
- throw await de_ConflictExceptionRes(parsedOutput, context);
631
- case "InternalServerException":
632
- case "com.amazonaws.ssmincidents#InternalServerException":
633
- throw await de_InternalServerExceptionRes(parsedOutput, context);
634
- case "ResourceNotFoundException":
635
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
636
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
637
- case "ThrottlingException":
638
- case "com.amazonaws.ssmincidents#ThrottlingException":
639
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
640
- case "ValidationException":
641
- case "com.amazonaws.ssmincidents#ValidationException":
642
- throw await de_ValidationExceptionRes(parsedOutput, context);
643
- default:
644
- const parsedBody = parsedOutput.body;
645
- return throwDefaultError({
646
- output,
647
- parsedBody,
648
- errorCode,
649
- });
650
- }
651
- };
652
- const de_CreateTimelineEventCommand = async (output, context) => {
653
- if (output.statusCode !== 201 && output.statusCode >= 300) {
654
- return de_CreateTimelineEventCommandError(output, context);
655
- }
656
- const contents = (0, smithy_client_1.map)({
657
- $metadata: deserializeMetadata(output),
658
- });
659
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
660
- const doc = (0, smithy_client_1.take)(data, {
661
- eventId: smithy_client_1.expectString,
662
- incidentRecordArn: smithy_client_1.expectString,
663
- });
664
- Object.assign(contents, doc);
665
- return contents;
666
- };
667
- exports.de_CreateTimelineEventCommand = de_CreateTimelineEventCommand;
668
- const de_CreateTimelineEventCommandError = async (output, context) => {
669
- const parsedOutput = {
670
- ...output,
671
- body: await parseErrorBody(output.body, context),
672
- };
673
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
674
- switch (errorCode) {
675
- case "AccessDeniedException":
676
- case "com.amazonaws.ssmincidents#AccessDeniedException":
677
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
678
- case "ConflictException":
679
- case "com.amazonaws.ssmincidents#ConflictException":
680
- throw await de_ConflictExceptionRes(parsedOutput, context);
681
- case "InternalServerException":
682
- case "com.amazonaws.ssmincidents#InternalServerException":
683
- throw await de_InternalServerExceptionRes(parsedOutput, context);
684
- case "ResourceNotFoundException":
685
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
686
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
687
- case "ThrottlingException":
688
- case "com.amazonaws.ssmincidents#ThrottlingException":
689
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
690
- case "ValidationException":
691
- case "com.amazonaws.ssmincidents#ValidationException":
692
- throw await de_ValidationExceptionRes(parsedOutput, context);
693
- default:
694
- const parsedBody = parsedOutput.body;
695
- return throwDefaultError({
696
- output,
697
- parsedBody,
698
- errorCode,
699
- });
700
- }
701
- };
702
- const de_DeleteIncidentRecordCommand = async (output, context) => {
703
- if (output.statusCode !== 204 && output.statusCode >= 300) {
704
- return de_DeleteIncidentRecordCommandError(output, context);
705
- }
706
- const contents = (0, smithy_client_1.map)({
707
- $metadata: deserializeMetadata(output),
708
- });
709
- await (0, smithy_client_1.collectBody)(output.body, context);
710
- return contents;
711
- };
712
- exports.de_DeleteIncidentRecordCommand = de_DeleteIncidentRecordCommand;
713
- const de_DeleteIncidentRecordCommandError = async (output, context) => {
714
- const parsedOutput = {
715
- ...output,
716
- body: await parseErrorBody(output.body, context),
717
- };
718
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
719
- switch (errorCode) {
720
- case "AccessDeniedException":
721
- case "com.amazonaws.ssmincidents#AccessDeniedException":
722
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
723
- case "InternalServerException":
724
- case "com.amazonaws.ssmincidents#InternalServerException":
725
- throw await de_InternalServerExceptionRes(parsedOutput, context);
726
- case "ThrottlingException":
727
- case "com.amazonaws.ssmincidents#ThrottlingException":
728
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
729
- case "ValidationException":
730
- case "com.amazonaws.ssmincidents#ValidationException":
731
- throw await de_ValidationExceptionRes(parsedOutput, context);
732
- default:
733
- const parsedBody = parsedOutput.body;
734
- return throwDefaultError({
735
- output,
736
- parsedBody,
737
- errorCode,
738
- });
739
- }
740
- };
741
- const de_DeleteReplicationSetCommand = async (output, context) => {
742
- if (output.statusCode !== 204 && output.statusCode >= 300) {
743
- return de_DeleteReplicationSetCommandError(output, context);
744
- }
745
- const contents = (0, smithy_client_1.map)({
746
- $metadata: deserializeMetadata(output),
747
- });
748
- await (0, smithy_client_1.collectBody)(output.body, context);
749
- return contents;
750
- };
751
- exports.de_DeleteReplicationSetCommand = de_DeleteReplicationSetCommand;
752
- const de_DeleteReplicationSetCommandError = async (output, context) => {
753
- const parsedOutput = {
754
- ...output,
755
- body: await parseErrorBody(output.body, context),
756
- };
757
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
758
- switch (errorCode) {
759
- case "AccessDeniedException":
760
- case "com.amazonaws.ssmincidents#AccessDeniedException":
761
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
762
- case "InternalServerException":
763
- case "com.amazonaws.ssmincidents#InternalServerException":
764
- throw await de_InternalServerExceptionRes(parsedOutput, context);
765
- case "ResourceNotFoundException":
766
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
767
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
768
- case "ThrottlingException":
769
- case "com.amazonaws.ssmincidents#ThrottlingException":
770
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
771
- case "ValidationException":
772
- case "com.amazonaws.ssmincidents#ValidationException":
773
- throw await de_ValidationExceptionRes(parsedOutput, context);
774
- default:
775
- const parsedBody = parsedOutput.body;
776
- return throwDefaultError({
777
- output,
778
- parsedBody,
779
- errorCode,
780
- });
781
- }
782
- };
783
- const de_DeleteResourcePolicyCommand = async (output, context) => {
784
- if (output.statusCode !== 200 && output.statusCode >= 300) {
785
- return de_DeleteResourcePolicyCommandError(output, context);
786
- }
787
- const contents = (0, smithy_client_1.map)({
788
- $metadata: deserializeMetadata(output),
789
- });
790
- await (0, smithy_client_1.collectBody)(output.body, context);
791
- return contents;
792
- };
793
- exports.de_DeleteResourcePolicyCommand = de_DeleteResourcePolicyCommand;
794
- const de_DeleteResourcePolicyCommandError = async (output, context) => {
795
- const parsedOutput = {
796
- ...output,
797
- body: await parseErrorBody(output.body, context),
798
- };
799
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
800
- switch (errorCode) {
801
- case "AccessDeniedException":
802
- case "com.amazonaws.ssmincidents#AccessDeniedException":
803
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
804
- case "InternalServerException":
805
- case "com.amazonaws.ssmincidents#InternalServerException":
806
- throw await de_InternalServerExceptionRes(parsedOutput, context);
807
- case "ResourceNotFoundException":
808
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
809
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
810
- case "ThrottlingException":
811
- case "com.amazonaws.ssmincidents#ThrottlingException":
812
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
813
- case "ValidationException":
814
- case "com.amazonaws.ssmincidents#ValidationException":
815
- throw await de_ValidationExceptionRes(parsedOutput, context);
816
- default:
817
- const parsedBody = parsedOutput.body;
818
- return throwDefaultError({
819
- output,
820
- parsedBody,
821
- errorCode,
822
- });
823
- }
824
- };
825
- const de_DeleteResponsePlanCommand = async (output, context) => {
826
- if (output.statusCode !== 204 && output.statusCode >= 300) {
827
- return de_DeleteResponsePlanCommandError(output, context);
828
- }
829
- const contents = (0, smithy_client_1.map)({
830
- $metadata: deserializeMetadata(output),
831
- });
832
- await (0, smithy_client_1.collectBody)(output.body, context);
833
- return contents;
834
- };
835
- exports.de_DeleteResponsePlanCommand = de_DeleteResponsePlanCommand;
836
- const de_DeleteResponsePlanCommandError = async (output, context) => {
837
- const parsedOutput = {
838
- ...output,
839
- body: await parseErrorBody(output.body, context),
840
- };
841
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
842
- switch (errorCode) {
843
- case "AccessDeniedException":
844
- case "com.amazonaws.ssmincidents#AccessDeniedException":
845
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
846
- case "InternalServerException":
847
- case "com.amazonaws.ssmincidents#InternalServerException":
848
- throw await de_InternalServerExceptionRes(parsedOutput, context);
849
- case "ThrottlingException":
850
- case "com.amazonaws.ssmincidents#ThrottlingException":
851
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
852
- case "ValidationException":
853
- case "com.amazonaws.ssmincidents#ValidationException":
854
- throw await de_ValidationExceptionRes(parsedOutput, context);
855
- default:
856
- const parsedBody = parsedOutput.body;
857
- return throwDefaultError({
858
- output,
859
- parsedBody,
860
- errorCode,
861
- });
862
- }
863
- };
864
- const de_DeleteTimelineEventCommand = async (output, context) => {
865
- if (output.statusCode !== 204 && output.statusCode >= 300) {
866
- return de_DeleteTimelineEventCommandError(output, context);
867
- }
868
- const contents = (0, smithy_client_1.map)({
869
- $metadata: deserializeMetadata(output),
870
- });
871
- await (0, smithy_client_1.collectBody)(output.body, context);
872
- return contents;
873
- };
874
- exports.de_DeleteTimelineEventCommand = de_DeleteTimelineEventCommand;
875
- const de_DeleteTimelineEventCommandError = async (output, context) => {
876
- const parsedOutput = {
877
- ...output,
878
- body: await parseErrorBody(output.body, context),
879
- };
880
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
881
- switch (errorCode) {
882
- case "AccessDeniedException":
883
- case "com.amazonaws.ssmincidents#AccessDeniedException":
884
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
885
- case "InternalServerException":
886
- case "com.amazonaws.ssmincidents#InternalServerException":
887
- throw await de_InternalServerExceptionRes(parsedOutput, context);
888
- case "ThrottlingException":
889
- case "com.amazonaws.ssmincidents#ThrottlingException":
890
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
891
- case "ValidationException":
892
- case "com.amazonaws.ssmincidents#ValidationException":
893
- throw await de_ValidationExceptionRes(parsedOutput, context);
894
- default:
895
- const parsedBody = parsedOutput.body;
896
- return throwDefaultError({
897
- output,
898
- parsedBody,
899
- errorCode,
900
- });
901
- }
902
- };
903
- const de_GetIncidentRecordCommand = async (output, context) => {
904
- if (output.statusCode !== 200 && output.statusCode >= 300) {
905
- return de_GetIncidentRecordCommandError(output, context);
906
- }
907
- const contents = (0, smithy_client_1.map)({
908
- $metadata: deserializeMetadata(output),
909
- });
910
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
911
- const doc = (0, smithy_client_1.take)(data, {
912
- incidentRecord: (_) => de_IncidentRecord(_, context),
913
- });
914
- Object.assign(contents, doc);
915
- return contents;
916
- };
917
- exports.de_GetIncidentRecordCommand = de_GetIncidentRecordCommand;
918
- const de_GetIncidentRecordCommandError = async (output, context) => {
919
- const parsedOutput = {
920
- ...output,
921
- body: await parseErrorBody(output.body, context),
922
- };
923
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
- switch (errorCode) {
925
- case "AccessDeniedException":
926
- case "com.amazonaws.ssmincidents#AccessDeniedException":
927
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
928
- case "InternalServerException":
929
- case "com.amazonaws.ssmincidents#InternalServerException":
930
- throw await de_InternalServerExceptionRes(parsedOutput, context);
931
- case "ResourceNotFoundException":
932
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
933
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
934
- case "ThrottlingException":
935
- case "com.amazonaws.ssmincidents#ThrottlingException":
936
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
937
- case "ValidationException":
938
- case "com.amazonaws.ssmincidents#ValidationException":
939
- throw await de_ValidationExceptionRes(parsedOutput, context);
940
- default:
941
- const parsedBody = parsedOutput.body;
942
- return throwDefaultError({
943
- output,
944
- parsedBody,
945
- errorCode,
946
- });
947
- }
948
- };
949
- const de_GetReplicationSetCommand = async (output, context) => {
950
- if (output.statusCode !== 200 && output.statusCode >= 300) {
951
- return de_GetReplicationSetCommandError(output, context);
952
- }
953
- const contents = (0, smithy_client_1.map)({
954
- $metadata: deserializeMetadata(output),
955
- });
956
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
957
- const doc = (0, smithy_client_1.take)(data, {
958
- replicationSet: (_) => de_ReplicationSet(_, context),
959
- });
960
- Object.assign(contents, doc);
961
- return contents;
962
- };
963
- exports.de_GetReplicationSetCommand = de_GetReplicationSetCommand;
964
- const de_GetReplicationSetCommandError = async (output, context) => {
965
- const parsedOutput = {
966
- ...output,
967
- body: await parseErrorBody(output.body, context),
968
- };
969
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
970
- switch (errorCode) {
971
- case "AccessDeniedException":
972
- case "com.amazonaws.ssmincidents#AccessDeniedException":
973
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
974
- case "InternalServerException":
975
- case "com.amazonaws.ssmincidents#InternalServerException":
976
- throw await de_InternalServerExceptionRes(parsedOutput, context);
977
- case "ResourceNotFoundException":
978
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
979
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
980
- case "ThrottlingException":
981
- case "com.amazonaws.ssmincidents#ThrottlingException":
982
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
983
- case "ValidationException":
984
- case "com.amazonaws.ssmincidents#ValidationException":
985
- throw await de_ValidationExceptionRes(parsedOutput, context);
986
- default:
987
- const parsedBody = parsedOutput.body;
988
- return throwDefaultError({
989
- output,
990
- parsedBody,
991
- errorCode,
992
- });
993
- }
994
- };
995
- const de_GetResourcePoliciesCommand = async (output, context) => {
996
- if (output.statusCode !== 200 && output.statusCode >= 300) {
997
- return de_GetResourcePoliciesCommandError(output, context);
998
- }
999
- const contents = (0, smithy_client_1.map)({
1000
- $metadata: deserializeMetadata(output),
1001
- });
1002
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1003
- const doc = (0, smithy_client_1.take)(data, {
1004
- nextToken: smithy_client_1.expectString,
1005
- resourcePolicies: smithy_client_1._json,
1006
- });
1007
- Object.assign(contents, doc);
1008
- return contents;
1009
- };
1010
- exports.de_GetResourcePoliciesCommand = de_GetResourcePoliciesCommand;
1011
- const de_GetResourcePoliciesCommandError = async (output, context) => {
1012
- const parsedOutput = {
1013
- ...output,
1014
- body: await parseErrorBody(output.body, context),
1015
- };
1016
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1017
- switch (errorCode) {
1018
- case "AccessDeniedException":
1019
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1020
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1021
- case "InternalServerException":
1022
- case "com.amazonaws.ssmincidents#InternalServerException":
1023
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1024
- case "ResourceNotFoundException":
1025
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1026
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1027
- case "ThrottlingException":
1028
- case "com.amazonaws.ssmincidents#ThrottlingException":
1029
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1030
- case "ValidationException":
1031
- case "com.amazonaws.ssmincidents#ValidationException":
1032
- throw await de_ValidationExceptionRes(parsedOutput, context);
1033
- default:
1034
- const parsedBody = parsedOutput.body;
1035
- return throwDefaultError({
1036
- output,
1037
- parsedBody,
1038
- errorCode,
1039
- });
1040
- }
1041
- };
1042
- const de_GetResponsePlanCommand = async (output, context) => {
1043
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1044
- return de_GetResponsePlanCommandError(output, context);
1045
- }
1046
- const contents = (0, smithy_client_1.map)({
1047
- $metadata: deserializeMetadata(output),
1048
- });
1049
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1050
- const doc = (0, smithy_client_1.take)(data, {
1051
- actions: smithy_client_1._json,
1052
- arn: smithy_client_1.expectString,
1053
- chatChannel: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1054
- displayName: smithy_client_1.expectString,
1055
- engagements: smithy_client_1._json,
1056
- incidentTemplate: smithy_client_1._json,
1057
- integrations: smithy_client_1._json,
1058
- name: smithy_client_1.expectString,
1059
- });
1060
- Object.assign(contents, doc);
1061
- return contents;
1062
- };
1063
- exports.de_GetResponsePlanCommand = de_GetResponsePlanCommand;
1064
- const de_GetResponsePlanCommandError = async (output, context) => {
1065
- const parsedOutput = {
1066
- ...output,
1067
- body: await parseErrorBody(output.body, context),
1068
- };
1069
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1070
- switch (errorCode) {
1071
- case "AccessDeniedException":
1072
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1073
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1074
- case "InternalServerException":
1075
- case "com.amazonaws.ssmincidents#InternalServerException":
1076
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1077
- case "ResourceNotFoundException":
1078
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1079
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1080
- case "ThrottlingException":
1081
- case "com.amazonaws.ssmincidents#ThrottlingException":
1082
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1083
- case "ValidationException":
1084
- case "com.amazonaws.ssmincidents#ValidationException":
1085
- throw await de_ValidationExceptionRes(parsedOutput, context);
1086
- default:
1087
- const parsedBody = parsedOutput.body;
1088
- return throwDefaultError({
1089
- output,
1090
- parsedBody,
1091
- errorCode,
1092
- });
1093
- }
1094
- };
1095
- const de_GetTimelineEventCommand = async (output, context) => {
1096
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1097
- return de_GetTimelineEventCommandError(output, context);
1098
- }
1099
- const contents = (0, smithy_client_1.map)({
1100
- $metadata: deserializeMetadata(output),
1101
- });
1102
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1103
- const doc = (0, smithy_client_1.take)(data, {
1104
- event: (_) => de_TimelineEvent(_, context),
1105
- });
1106
- Object.assign(contents, doc);
1107
- return contents;
1108
- };
1109
- exports.de_GetTimelineEventCommand = de_GetTimelineEventCommand;
1110
- const de_GetTimelineEventCommandError = async (output, context) => {
1111
- const parsedOutput = {
1112
- ...output,
1113
- body: await parseErrorBody(output.body, context),
1114
- };
1115
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1116
- switch (errorCode) {
1117
- case "AccessDeniedException":
1118
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1119
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1120
- case "InternalServerException":
1121
- case "com.amazonaws.ssmincidents#InternalServerException":
1122
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1123
- case "ResourceNotFoundException":
1124
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1125
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1126
- case "ThrottlingException":
1127
- case "com.amazonaws.ssmincidents#ThrottlingException":
1128
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1129
- case "ValidationException":
1130
- case "com.amazonaws.ssmincidents#ValidationException":
1131
- throw await de_ValidationExceptionRes(parsedOutput, context);
1132
- default:
1133
- const parsedBody = parsedOutput.body;
1134
- return throwDefaultError({
1135
- output,
1136
- parsedBody,
1137
- errorCode,
1138
- });
1139
- }
1140
- };
1141
- const de_ListIncidentFindingsCommand = async (output, context) => {
1142
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1143
- return de_ListIncidentFindingsCommandError(output, context);
1144
- }
1145
- const contents = (0, smithy_client_1.map)({
1146
- $metadata: deserializeMetadata(output),
1147
- });
1148
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1149
- const doc = (0, smithy_client_1.take)(data, {
1150
- findings: (_) => de_FindingSummaryList(_, context),
1151
- nextToken: smithy_client_1.expectString,
1152
- });
1153
- Object.assign(contents, doc);
1154
- return contents;
1155
- };
1156
- exports.de_ListIncidentFindingsCommand = de_ListIncidentFindingsCommand;
1157
- const de_ListIncidentFindingsCommandError = async (output, context) => {
1158
- const parsedOutput = {
1159
- ...output,
1160
- body: await parseErrorBody(output.body, context),
1161
- };
1162
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1163
- switch (errorCode) {
1164
- case "AccessDeniedException":
1165
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1166
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1167
- case "InternalServerException":
1168
- case "com.amazonaws.ssmincidents#InternalServerException":
1169
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1170
- case "ResourceNotFoundException":
1171
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1172
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1173
- case "ThrottlingException":
1174
- case "com.amazonaws.ssmincidents#ThrottlingException":
1175
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1176
- case "ValidationException":
1177
- case "com.amazonaws.ssmincidents#ValidationException":
1178
- throw await de_ValidationExceptionRes(parsedOutput, context);
1179
- default:
1180
- const parsedBody = parsedOutput.body;
1181
- return throwDefaultError({
1182
- output,
1183
- parsedBody,
1184
- errorCode,
1185
- });
1186
- }
1187
- };
1188
- const de_ListIncidentRecordsCommand = async (output, context) => {
1189
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1190
- return de_ListIncidentRecordsCommandError(output, context);
1191
- }
1192
- const contents = (0, smithy_client_1.map)({
1193
- $metadata: deserializeMetadata(output),
1194
- });
1195
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1196
- const doc = (0, smithy_client_1.take)(data, {
1197
- incidentRecordSummaries: (_) => de_IncidentRecordSummaryList(_, context),
1198
- nextToken: smithy_client_1.expectString,
1199
- });
1200
- Object.assign(contents, doc);
1201
- return contents;
1202
- };
1203
- exports.de_ListIncidentRecordsCommand = de_ListIncidentRecordsCommand;
1204
- const de_ListIncidentRecordsCommandError = async (output, context) => {
1205
- const parsedOutput = {
1206
- ...output,
1207
- body: await parseErrorBody(output.body, context),
1208
- };
1209
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1210
- switch (errorCode) {
1211
- case "AccessDeniedException":
1212
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1213
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1214
- case "InternalServerException":
1215
- case "com.amazonaws.ssmincidents#InternalServerException":
1216
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1217
- case "ThrottlingException":
1218
- case "com.amazonaws.ssmincidents#ThrottlingException":
1219
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1220
- case "ValidationException":
1221
- case "com.amazonaws.ssmincidents#ValidationException":
1222
- throw await de_ValidationExceptionRes(parsedOutput, context);
1223
- default:
1224
- const parsedBody = parsedOutput.body;
1225
- return throwDefaultError({
1226
- output,
1227
- parsedBody,
1228
- errorCode,
1229
- });
1230
- }
1231
- };
1232
- const de_ListRelatedItemsCommand = async (output, context) => {
1233
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1234
- return de_ListRelatedItemsCommandError(output, context);
1235
- }
1236
- const contents = (0, smithy_client_1.map)({
1237
- $metadata: deserializeMetadata(output),
1238
- });
1239
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1240
- const doc = (0, smithy_client_1.take)(data, {
1241
- nextToken: smithy_client_1.expectString,
1242
- relatedItems: smithy_client_1._json,
1243
- });
1244
- Object.assign(contents, doc);
1245
- return contents;
1246
- };
1247
- exports.de_ListRelatedItemsCommand = de_ListRelatedItemsCommand;
1248
- const de_ListRelatedItemsCommandError = async (output, context) => {
1249
- const parsedOutput = {
1250
- ...output,
1251
- body: await parseErrorBody(output.body, context),
1252
- };
1253
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1254
- switch (errorCode) {
1255
- case "AccessDeniedException":
1256
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1257
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1258
- case "InternalServerException":
1259
- case "com.amazonaws.ssmincidents#InternalServerException":
1260
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1261
- case "ThrottlingException":
1262
- case "com.amazonaws.ssmincidents#ThrottlingException":
1263
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1264
- case "ValidationException":
1265
- case "com.amazonaws.ssmincidents#ValidationException":
1266
- throw await de_ValidationExceptionRes(parsedOutput, context);
1267
- default:
1268
- const parsedBody = parsedOutput.body;
1269
- return throwDefaultError({
1270
- output,
1271
- parsedBody,
1272
- errorCode,
1273
- });
1274
- }
1275
- };
1276
- const de_ListReplicationSetsCommand = async (output, context) => {
1277
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1278
- return de_ListReplicationSetsCommandError(output, context);
1279
- }
1280
- const contents = (0, smithy_client_1.map)({
1281
- $metadata: deserializeMetadata(output),
1282
- });
1283
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1284
- const doc = (0, smithy_client_1.take)(data, {
1285
- nextToken: smithy_client_1.expectString,
1286
- replicationSetArns: smithy_client_1._json,
1287
- });
1288
- Object.assign(contents, doc);
1289
- return contents;
1290
- };
1291
- exports.de_ListReplicationSetsCommand = de_ListReplicationSetsCommand;
1292
- const de_ListReplicationSetsCommandError = async (output, context) => {
1293
- const parsedOutput = {
1294
- ...output,
1295
- body: await parseErrorBody(output.body, context),
1296
- };
1297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1298
- switch (errorCode) {
1299
- case "AccessDeniedException":
1300
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1301
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1302
- case "InternalServerException":
1303
- case "com.amazonaws.ssmincidents#InternalServerException":
1304
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1305
- case "ThrottlingException":
1306
- case "com.amazonaws.ssmincidents#ThrottlingException":
1307
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1308
- case "ValidationException":
1309
- case "com.amazonaws.ssmincidents#ValidationException":
1310
- throw await de_ValidationExceptionRes(parsedOutput, context);
1311
- default:
1312
- const parsedBody = parsedOutput.body;
1313
- return throwDefaultError({
1314
- output,
1315
- parsedBody,
1316
- errorCode,
1317
- });
1318
- }
1319
- };
1320
- const de_ListResponsePlansCommand = async (output, context) => {
1321
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1322
- return de_ListResponsePlansCommandError(output, context);
1323
- }
1324
- const contents = (0, smithy_client_1.map)({
1325
- $metadata: deserializeMetadata(output),
1326
- });
1327
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1328
- const doc = (0, smithy_client_1.take)(data, {
1329
- nextToken: smithy_client_1.expectString,
1330
- responsePlanSummaries: smithy_client_1._json,
1331
- });
1332
- Object.assign(contents, doc);
1333
- return contents;
1334
- };
1335
- exports.de_ListResponsePlansCommand = de_ListResponsePlansCommand;
1336
- const de_ListResponsePlansCommandError = async (output, context) => {
1337
- const parsedOutput = {
1338
- ...output,
1339
- body: await parseErrorBody(output.body, context),
1340
- };
1341
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1342
- switch (errorCode) {
1343
- case "AccessDeniedException":
1344
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1345
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1346
- case "InternalServerException":
1347
- case "com.amazonaws.ssmincidents#InternalServerException":
1348
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1349
- case "ThrottlingException":
1350
- case "com.amazonaws.ssmincidents#ThrottlingException":
1351
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1352
- case "ValidationException":
1353
- case "com.amazonaws.ssmincidents#ValidationException":
1354
- throw await de_ValidationExceptionRes(parsedOutput, context);
1355
- default:
1356
- const parsedBody = parsedOutput.body;
1357
- return throwDefaultError({
1358
- output,
1359
- parsedBody,
1360
- errorCode,
1361
- });
1362
- }
1363
- };
1364
- const de_ListTagsForResourceCommand = async (output, context) => {
1365
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1366
- return de_ListTagsForResourceCommandError(output, context);
1367
- }
1368
- const contents = (0, smithy_client_1.map)({
1369
- $metadata: deserializeMetadata(output),
1370
- });
1371
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1372
- const doc = (0, smithy_client_1.take)(data, {
1373
- tags: smithy_client_1._json,
1374
- });
1375
- Object.assign(contents, doc);
1376
- return contents;
1377
- };
1378
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1379
- const de_ListTagsForResourceCommandError = async (output, context) => {
1380
- const parsedOutput = {
1381
- ...output,
1382
- body: await parseErrorBody(output.body, context),
1383
- };
1384
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1385
- switch (errorCode) {
1386
- case "AccessDeniedException":
1387
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1388
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1389
- case "InternalServerException":
1390
- case "com.amazonaws.ssmincidents#InternalServerException":
1391
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1392
- case "ResourceNotFoundException":
1393
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1394
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1395
- case "ThrottlingException":
1396
- case "com.amazonaws.ssmincidents#ThrottlingException":
1397
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1398
- case "ValidationException":
1399
- case "com.amazonaws.ssmincidents#ValidationException":
1400
- throw await de_ValidationExceptionRes(parsedOutput, context);
1401
- default:
1402
- const parsedBody = parsedOutput.body;
1403
- return throwDefaultError({
1404
- output,
1405
- parsedBody,
1406
- errorCode,
1407
- });
1408
- }
1409
- };
1410
- const de_ListTimelineEventsCommand = async (output, context) => {
1411
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1412
- return de_ListTimelineEventsCommandError(output, context);
1413
- }
1414
- const contents = (0, smithy_client_1.map)({
1415
- $metadata: deserializeMetadata(output),
1416
- });
1417
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1418
- const doc = (0, smithy_client_1.take)(data, {
1419
- eventSummaries: (_) => de_EventSummaryList(_, context),
1420
- nextToken: smithy_client_1.expectString,
1421
- });
1422
- Object.assign(contents, doc);
1423
- return contents;
1424
- };
1425
- exports.de_ListTimelineEventsCommand = de_ListTimelineEventsCommand;
1426
- const de_ListTimelineEventsCommandError = async (output, context) => {
1427
- const parsedOutput = {
1428
- ...output,
1429
- body: await parseErrorBody(output.body, context),
1430
- };
1431
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1432
- switch (errorCode) {
1433
- case "AccessDeniedException":
1434
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1435
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1436
- case "InternalServerException":
1437
- case "com.amazonaws.ssmincidents#InternalServerException":
1438
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1439
- case "ThrottlingException":
1440
- case "com.amazonaws.ssmincidents#ThrottlingException":
1441
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1442
- case "ValidationException":
1443
- case "com.amazonaws.ssmincidents#ValidationException":
1444
- throw await de_ValidationExceptionRes(parsedOutput, context);
1445
- default:
1446
- const parsedBody = parsedOutput.body;
1447
- return throwDefaultError({
1448
- output,
1449
- parsedBody,
1450
- errorCode,
1451
- });
1452
- }
1453
- };
1454
- const de_PutResourcePolicyCommand = async (output, context) => {
1455
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1456
- return de_PutResourcePolicyCommandError(output, context);
1457
- }
1458
- const contents = (0, smithy_client_1.map)({
1459
- $metadata: deserializeMetadata(output),
1460
- });
1461
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1462
- const doc = (0, smithy_client_1.take)(data, {
1463
- policyId: smithy_client_1.expectString,
1464
- });
1465
- Object.assign(contents, doc);
1466
- return contents;
1467
- };
1468
- exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
1469
- const de_PutResourcePolicyCommandError = async (output, context) => {
1470
- const parsedOutput = {
1471
- ...output,
1472
- body: await parseErrorBody(output.body, context),
1473
- };
1474
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1475
- switch (errorCode) {
1476
- case "AccessDeniedException":
1477
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1478
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1479
- case "InternalServerException":
1480
- case "com.amazonaws.ssmincidents#InternalServerException":
1481
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1482
- case "ResourceNotFoundException":
1483
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1484
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1485
- case "ThrottlingException":
1486
- case "com.amazonaws.ssmincidents#ThrottlingException":
1487
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1488
- case "ValidationException":
1489
- case "com.amazonaws.ssmincidents#ValidationException":
1490
- throw await de_ValidationExceptionRes(parsedOutput, context);
1491
- default:
1492
- const parsedBody = parsedOutput.body;
1493
- return throwDefaultError({
1494
- output,
1495
- parsedBody,
1496
- errorCode,
1497
- });
1498
- }
1499
- };
1500
- const de_StartIncidentCommand = async (output, context) => {
1501
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1502
- return de_StartIncidentCommandError(output, context);
1503
- }
1504
- const contents = (0, smithy_client_1.map)({
1505
- $metadata: deserializeMetadata(output),
1506
- });
1507
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1508
- const doc = (0, smithy_client_1.take)(data, {
1509
- incidentRecordArn: smithy_client_1.expectString,
1510
- });
1511
- Object.assign(contents, doc);
1512
- return contents;
1513
- };
1514
- exports.de_StartIncidentCommand = de_StartIncidentCommand;
1515
- const de_StartIncidentCommandError = async (output, context) => {
1516
- const parsedOutput = {
1517
- ...output,
1518
- body: await parseErrorBody(output.body, context),
1519
- };
1520
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1521
- switch (errorCode) {
1522
- case "AccessDeniedException":
1523
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1524
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1525
- case "ConflictException":
1526
- case "com.amazonaws.ssmincidents#ConflictException":
1527
- throw await de_ConflictExceptionRes(parsedOutput, context);
1528
- case "InternalServerException":
1529
- case "com.amazonaws.ssmincidents#InternalServerException":
1530
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1531
- case "ResourceNotFoundException":
1532
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1533
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1534
- case "ThrottlingException":
1535
- case "com.amazonaws.ssmincidents#ThrottlingException":
1536
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1537
- case "ValidationException":
1538
- case "com.amazonaws.ssmincidents#ValidationException":
1539
- throw await de_ValidationExceptionRes(parsedOutput, context);
1540
- default:
1541
- const parsedBody = parsedOutput.body;
1542
- return throwDefaultError({
1543
- output,
1544
- parsedBody,
1545
- errorCode,
1546
- });
1547
- }
1548
- };
1549
- const de_TagResourceCommand = async (output, context) => {
1550
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1551
- return de_TagResourceCommandError(output, context);
1552
- }
1553
- const contents = (0, smithy_client_1.map)({
1554
- $metadata: deserializeMetadata(output),
1555
- });
1556
- await (0, smithy_client_1.collectBody)(output.body, context);
1557
- return contents;
1558
- };
1559
- exports.de_TagResourceCommand = de_TagResourceCommand;
1560
- const de_TagResourceCommandError = async (output, context) => {
1561
- const parsedOutput = {
1562
- ...output,
1563
- body: await parseErrorBody(output.body, context),
1564
- };
1565
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1566
- switch (errorCode) {
1567
- case "AccessDeniedException":
1568
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1569
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1570
- case "ConflictException":
1571
- case "com.amazonaws.ssmincidents#ConflictException":
1572
- throw await de_ConflictExceptionRes(parsedOutput, context);
1573
- case "InternalServerException":
1574
- case "com.amazonaws.ssmincidents#InternalServerException":
1575
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1576
- case "ResourceNotFoundException":
1577
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1578
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1579
- case "ServiceQuotaExceededException":
1580
- case "com.amazonaws.ssmincidents#ServiceQuotaExceededException":
1581
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1582
- case "ThrottlingException":
1583
- case "com.amazonaws.ssmincidents#ThrottlingException":
1584
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1585
- case "ValidationException":
1586
- case "com.amazonaws.ssmincidents#ValidationException":
1587
- throw await de_ValidationExceptionRes(parsedOutput, context);
1588
- default:
1589
- const parsedBody = parsedOutput.body;
1590
- return throwDefaultError({
1591
- output,
1592
- parsedBody,
1593
- errorCode,
1594
- });
1595
- }
1596
- };
1597
- const de_UntagResourceCommand = async (output, context) => {
1598
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1599
- return de_UntagResourceCommandError(output, context);
1600
- }
1601
- const contents = (0, smithy_client_1.map)({
1602
- $metadata: deserializeMetadata(output),
1603
- });
1604
- await (0, smithy_client_1.collectBody)(output.body, context);
1605
- return contents;
1606
- };
1607
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1608
- const de_UntagResourceCommandError = async (output, context) => {
1609
- const parsedOutput = {
1610
- ...output,
1611
- body: await parseErrorBody(output.body, context),
1612
- };
1613
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1614
- switch (errorCode) {
1615
- case "AccessDeniedException":
1616
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1617
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1618
- case "ConflictException":
1619
- case "com.amazonaws.ssmincidents#ConflictException":
1620
- throw await de_ConflictExceptionRes(parsedOutput, context);
1621
- case "InternalServerException":
1622
- case "com.amazonaws.ssmincidents#InternalServerException":
1623
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1624
- case "ResourceNotFoundException":
1625
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1626
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1627
- case "ThrottlingException":
1628
- case "com.amazonaws.ssmincidents#ThrottlingException":
1629
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1630
- case "ValidationException":
1631
- case "com.amazonaws.ssmincidents#ValidationException":
1632
- throw await de_ValidationExceptionRes(parsedOutput, context);
1633
- default:
1634
- const parsedBody = parsedOutput.body;
1635
- return throwDefaultError({
1636
- output,
1637
- parsedBody,
1638
- errorCode,
1639
- });
1640
- }
1641
- };
1642
- const de_UpdateDeletionProtectionCommand = async (output, context) => {
1643
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1644
- return de_UpdateDeletionProtectionCommandError(output, context);
1645
- }
1646
- const contents = (0, smithy_client_1.map)({
1647
- $metadata: deserializeMetadata(output),
1648
- });
1649
- await (0, smithy_client_1.collectBody)(output.body, context);
1650
- return contents;
1651
- };
1652
- exports.de_UpdateDeletionProtectionCommand = de_UpdateDeletionProtectionCommand;
1653
- const de_UpdateDeletionProtectionCommandError = async (output, context) => {
1654
- const parsedOutput = {
1655
- ...output,
1656
- body: await parseErrorBody(output.body, context),
1657
- };
1658
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1659
- switch (errorCode) {
1660
- case "AccessDeniedException":
1661
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1662
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1663
- case "InternalServerException":
1664
- case "com.amazonaws.ssmincidents#InternalServerException":
1665
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1666
- case "ResourceNotFoundException":
1667
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1668
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1669
- case "ThrottlingException":
1670
- case "com.amazonaws.ssmincidents#ThrottlingException":
1671
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1672
- case "ValidationException":
1673
- case "com.amazonaws.ssmincidents#ValidationException":
1674
- throw await de_ValidationExceptionRes(parsedOutput, context);
1675
- default:
1676
- const parsedBody = parsedOutput.body;
1677
- return throwDefaultError({
1678
- output,
1679
- parsedBody,
1680
- errorCode,
1681
- });
1682
- }
1683
- };
1684
- const de_UpdateIncidentRecordCommand = async (output, context) => {
1685
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1686
- return de_UpdateIncidentRecordCommandError(output, context);
1687
- }
1688
- const contents = (0, smithy_client_1.map)({
1689
- $metadata: deserializeMetadata(output),
1690
- });
1691
- await (0, smithy_client_1.collectBody)(output.body, context);
1692
- return contents;
1693
- };
1694
- exports.de_UpdateIncidentRecordCommand = de_UpdateIncidentRecordCommand;
1695
- const de_UpdateIncidentRecordCommandError = async (output, context) => {
1696
- const parsedOutput = {
1697
- ...output,
1698
- body: await parseErrorBody(output.body, context),
1699
- };
1700
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1701
- switch (errorCode) {
1702
- case "AccessDeniedException":
1703
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1704
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1705
- case "ConflictException":
1706
- case "com.amazonaws.ssmincidents#ConflictException":
1707
- throw await de_ConflictExceptionRes(parsedOutput, context);
1708
- case "InternalServerException":
1709
- case "com.amazonaws.ssmincidents#InternalServerException":
1710
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1711
- case "ResourceNotFoundException":
1712
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1713
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1714
- case "ThrottlingException":
1715
- case "com.amazonaws.ssmincidents#ThrottlingException":
1716
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1717
- case "ValidationException":
1718
- case "com.amazonaws.ssmincidents#ValidationException":
1719
- throw await de_ValidationExceptionRes(parsedOutput, context);
1720
- default:
1721
- const parsedBody = parsedOutput.body;
1722
- return throwDefaultError({
1723
- output,
1724
- parsedBody,
1725
- errorCode,
1726
- });
1727
- }
1728
- };
1729
- const de_UpdateRelatedItemsCommand = async (output, context) => {
1730
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1731
- return de_UpdateRelatedItemsCommandError(output, context);
1732
- }
1733
- const contents = (0, smithy_client_1.map)({
1734
- $metadata: deserializeMetadata(output),
1735
- });
1736
- await (0, smithy_client_1.collectBody)(output.body, context);
1737
- return contents;
1738
- };
1739
- exports.de_UpdateRelatedItemsCommand = de_UpdateRelatedItemsCommand;
1740
- const de_UpdateRelatedItemsCommandError = async (output, context) => {
1741
- const parsedOutput = {
1742
- ...output,
1743
- body: await parseErrorBody(output.body, context),
1744
- };
1745
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1746
- switch (errorCode) {
1747
- case "AccessDeniedException":
1748
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1749
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1750
- case "ConflictException":
1751
- case "com.amazonaws.ssmincidents#ConflictException":
1752
- throw await de_ConflictExceptionRes(parsedOutput, context);
1753
- case "InternalServerException":
1754
- case "com.amazonaws.ssmincidents#InternalServerException":
1755
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1756
- case "ResourceNotFoundException":
1757
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1758
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1759
- case "ThrottlingException":
1760
- case "com.amazonaws.ssmincidents#ThrottlingException":
1761
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1762
- case "ValidationException":
1763
- case "com.amazonaws.ssmincidents#ValidationException":
1764
- throw await de_ValidationExceptionRes(parsedOutput, context);
1765
- default:
1766
- const parsedBody = parsedOutput.body;
1767
- return throwDefaultError({
1768
- output,
1769
- parsedBody,
1770
- errorCode,
1771
- });
1772
- }
1773
- };
1774
- const de_UpdateReplicationSetCommand = async (output, context) => {
1775
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1776
- return de_UpdateReplicationSetCommandError(output, context);
1777
- }
1778
- const contents = (0, smithy_client_1.map)({
1779
- $metadata: deserializeMetadata(output),
1780
- });
1781
- await (0, smithy_client_1.collectBody)(output.body, context);
1782
- return contents;
1783
- };
1784
- exports.de_UpdateReplicationSetCommand = de_UpdateReplicationSetCommand;
1785
- const de_UpdateReplicationSetCommandError = async (output, context) => {
1786
- const parsedOutput = {
1787
- ...output,
1788
- body: await parseErrorBody(output.body, context),
1789
- };
1790
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1791
- switch (errorCode) {
1792
- case "AccessDeniedException":
1793
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1794
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1795
- case "ConflictException":
1796
- case "com.amazonaws.ssmincidents#ConflictException":
1797
- throw await de_ConflictExceptionRes(parsedOutput, context);
1798
- case "InternalServerException":
1799
- case "com.amazonaws.ssmincidents#InternalServerException":
1800
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1801
- case "ResourceNotFoundException":
1802
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1803
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1804
- case "ThrottlingException":
1805
- case "com.amazonaws.ssmincidents#ThrottlingException":
1806
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1807
- case "ValidationException":
1808
- case "com.amazonaws.ssmincidents#ValidationException":
1809
- throw await de_ValidationExceptionRes(parsedOutput, context);
1810
- default:
1811
- const parsedBody = parsedOutput.body;
1812
- return throwDefaultError({
1813
- output,
1814
- parsedBody,
1815
- errorCode,
1816
- });
1817
- }
1818
- };
1819
- const de_UpdateResponsePlanCommand = async (output, context) => {
1820
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1821
- return de_UpdateResponsePlanCommandError(output, context);
1822
- }
1823
- const contents = (0, smithy_client_1.map)({
1824
- $metadata: deserializeMetadata(output),
1825
- });
1826
- await (0, smithy_client_1.collectBody)(output.body, context);
1827
- return contents;
1828
- };
1829
- exports.de_UpdateResponsePlanCommand = de_UpdateResponsePlanCommand;
1830
- const de_UpdateResponsePlanCommandError = async (output, context) => {
1831
- const parsedOutput = {
1832
- ...output,
1833
- body: await parseErrorBody(output.body, context),
1834
- };
1835
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1836
- switch (errorCode) {
1837
- case "AccessDeniedException":
1838
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1839
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1840
- case "ConflictException":
1841
- case "com.amazonaws.ssmincidents#ConflictException":
1842
- throw await de_ConflictExceptionRes(parsedOutput, context);
1843
- case "InternalServerException":
1844
- case "com.amazonaws.ssmincidents#InternalServerException":
1845
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1846
- case "ResourceNotFoundException":
1847
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1848
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1849
- case "ThrottlingException":
1850
- case "com.amazonaws.ssmincidents#ThrottlingException":
1851
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1852
- case "ValidationException":
1853
- case "com.amazonaws.ssmincidents#ValidationException":
1854
- throw await de_ValidationExceptionRes(parsedOutput, context);
1855
- default:
1856
- const parsedBody = parsedOutput.body;
1857
- return throwDefaultError({
1858
- output,
1859
- parsedBody,
1860
- errorCode,
1861
- });
1862
- }
1863
- };
1864
- const de_UpdateTimelineEventCommand = async (output, context) => {
1865
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1866
- return de_UpdateTimelineEventCommandError(output, context);
1867
- }
1868
- const contents = (0, smithy_client_1.map)({
1869
- $metadata: deserializeMetadata(output),
1870
- });
1871
- await (0, smithy_client_1.collectBody)(output.body, context);
1872
- return contents;
1873
- };
1874
- exports.de_UpdateTimelineEventCommand = de_UpdateTimelineEventCommand;
1875
- const de_UpdateTimelineEventCommandError = async (output, context) => {
1876
- const parsedOutput = {
1877
- ...output,
1878
- body: await parseErrorBody(output.body, context),
1879
- };
1880
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1881
- switch (errorCode) {
1882
- case "AccessDeniedException":
1883
- case "com.amazonaws.ssmincidents#AccessDeniedException":
1884
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1885
- case "ConflictException":
1886
- case "com.amazonaws.ssmincidents#ConflictException":
1887
- throw await de_ConflictExceptionRes(parsedOutput, context);
1888
- case "InternalServerException":
1889
- case "com.amazonaws.ssmincidents#InternalServerException":
1890
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1891
- case "ResourceNotFoundException":
1892
- case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1893
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1894
- case "ThrottlingException":
1895
- case "com.amazonaws.ssmincidents#ThrottlingException":
1896
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1897
- case "ValidationException":
1898
- case "com.amazonaws.ssmincidents#ValidationException":
1899
- throw await de_ValidationExceptionRes(parsedOutput, context);
1900
- default:
1901
- const parsedBody = parsedOutput.body;
1902
- return throwDefaultError({
1903
- output,
1904
- parsedBody,
1905
- errorCode,
1906
- });
1907
- }
1908
- };
1909
- const throwDefaultError = (0, smithy_client_1.withBaseException)(SSMIncidentsServiceException_1.SSMIncidentsServiceException);
1910
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1911
- const contents = (0, smithy_client_1.map)({});
1912
- const data = parsedOutput.body;
1913
- const doc = (0, smithy_client_1.take)(data, {
1914
- message: smithy_client_1.expectString,
1915
- });
1916
- Object.assign(contents, doc);
1917
- const exception = new models_0_1.AccessDeniedException({
1918
- $metadata: deserializeMetadata(parsedOutput),
1919
- ...contents,
1920
- });
1921
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1922
- };
1923
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1924
- const contents = (0, smithy_client_1.map)({});
1925
- const data = parsedOutput.body;
1926
- const doc = (0, smithy_client_1.take)(data, {
1927
- message: smithy_client_1.expectString,
1928
- resourceIdentifier: smithy_client_1.expectString,
1929
- resourceType: smithy_client_1.expectString,
1930
- retryAfter: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1931
- });
1932
- Object.assign(contents, doc);
1933
- const exception = new models_0_1.ConflictException({
1934
- $metadata: deserializeMetadata(parsedOutput),
1935
- ...contents,
1936
- });
1937
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1938
- };
1939
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1940
- const contents = (0, smithy_client_1.map)({});
1941
- const data = parsedOutput.body;
1942
- const doc = (0, smithy_client_1.take)(data, {
1943
- message: smithy_client_1.expectString,
1944
- });
1945
- Object.assign(contents, doc);
1946
- const exception = new models_0_1.InternalServerException({
1947
- $metadata: deserializeMetadata(parsedOutput),
1948
- ...contents,
1949
- });
1950
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1951
- };
1952
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1953
- const contents = (0, smithy_client_1.map)({});
1954
- const data = parsedOutput.body;
1955
- const doc = (0, smithy_client_1.take)(data, {
1956
- message: smithy_client_1.expectString,
1957
- resourceIdentifier: smithy_client_1.expectString,
1958
- resourceType: smithy_client_1.expectString,
1959
- });
1960
- Object.assign(contents, doc);
1961
- const exception = new models_0_1.ResourceNotFoundException({
1962
- $metadata: deserializeMetadata(parsedOutput),
1963
- ...contents,
1964
- });
1965
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1966
- };
1967
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1968
- const contents = (0, smithy_client_1.map)({});
1969
- const data = parsedOutput.body;
1970
- const doc = (0, smithy_client_1.take)(data, {
1971
- message: smithy_client_1.expectString,
1972
- quotaCode: smithy_client_1.expectString,
1973
- resourceIdentifier: smithy_client_1.expectString,
1974
- resourceType: smithy_client_1.expectString,
1975
- serviceCode: smithy_client_1.expectString,
1976
- });
1977
- Object.assign(contents, doc);
1978
- const exception = new models_0_1.ServiceQuotaExceededException({
1979
- $metadata: deserializeMetadata(parsedOutput),
1980
- ...contents,
1981
- });
1982
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1983
- };
1984
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1985
- const contents = (0, smithy_client_1.map)({});
1986
- const data = parsedOutput.body;
1987
- const doc = (0, smithy_client_1.take)(data, {
1988
- message: smithy_client_1.expectString,
1989
- quotaCode: smithy_client_1.expectString,
1990
- serviceCode: smithy_client_1.expectString,
1991
- });
1992
- Object.assign(contents, doc);
1993
- const exception = new models_0_1.ThrottlingException({
1994
- $metadata: deserializeMetadata(parsedOutput),
1995
- ...contents,
1996
- });
1997
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1998
- };
1999
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2000
- const contents = (0, smithy_client_1.map)({});
2001
- const data = parsedOutput.body;
2002
- const doc = (0, smithy_client_1.take)(data, {
2003
- message: smithy_client_1.expectString,
2004
- });
2005
- Object.assign(contents, doc);
2006
- const exception = new models_0_1.ValidationException({
2007
- $metadata: deserializeMetadata(parsedOutput),
2008
- ...contents,
2009
- });
2010
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2011
- };
2012
- const se_Condition = (input, context) => {
2013
- return models_0_1.Condition.visit(input, {
2014
- after: (value) => ({ after: Math.round(value.getTime() / 1000) }),
2015
- before: (value) => ({ before: Math.round(value.getTime() / 1000) }),
2016
- equals: (value) => ({ equals: (0, smithy_client_1._json)(value) }),
2017
- _: (name, value) => ({ name: value }),
2018
- });
2019
- };
2020
- const se_Filter = (input, context) => {
2021
- return (0, smithy_client_1.take)(input, {
2022
- condition: (_) => se_Condition(_, context),
2023
- key: [],
2024
- });
2025
- };
2026
- const se_FilterList = (input, context) => {
2027
- return input
2028
- .filter((e) => e != null)
2029
- .map((entry) => {
2030
- return se_Filter(entry, context);
2031
- });
2032
- };
2033
- const se_TriggerDetails = (input, context) => {
2034
- return (0, smithy_client_1.take)(input, {
2035
- rawData: [],
2036
- source: [],
2037
- timestamp: (_) => Math.round(_.getTime() / 1000),
2038
- triggerArn: [],
2039
- });
2040
- };
2041
- const de_CloudFormationStackUpdate = (output, context) => {
2042
- return (0, smithy_client_1.take)(output, {
2043
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2044
- stackArn: smithy_client_1.expectString,
2045
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2046
- });
2047
- };
2048
- const de_CodeDeployDeployment = (output, context) => {
2049
- return (0, smithy_client_1.take)(output, {
2050
- deploymentGroupArn: smithy_client_1.expectString,
2051
- deploymentId: smithy_client_1.expectString,
2052
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2053
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2054
- });
2055
- };
2056
- const de_EventSummary = (output, context) => {
2057
- return (0, smithy_client_1.take)(output, {
2058
- eventId: smithy_client_1.expectString,
2059
- eventReferences: smithy_client_1._json,
2060
- eventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2061
- eventType: smithy_client_1.expectString,
2062
- eventUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2063
- incidentRecordArn: smithy_client_1.expectString,
2064
- });
2065
- };
2066
- const de_EventSummaryList = (output, context) => {
2067
- const retVal = (output || [])
2068
- .filter((e) => e != null)
2069
- .map((entry) => {
2070
- return de_EventSummary(entry, context);
2071
- });
2072
- return retVal;
2073
- };
2074
- const de_Finding = (output, context) => {
2075
- return (0, smithy_client_1.take)(output, {
2076
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2077
- details: (_) => de_FindingDetails((0, core_1.awsExpectUnion)(_), context),
2078
- id: smithy_client_1.expectString,
2079
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2080
- });
2081
- };
2082
- const de_FindingDetails = (output, context) => {
2083
- if (output.cloudFormationStackUpdate != null) {
2084
- return {
2085
- cloudFormationStackUpdate: de_CloudFormationStackUpdate(output.cloudFormationStackUpdate, context),
2086
- };
2087
- }
2088
- if (output.codeDeployDeployment != null) {
2089
- return {
2090
- codeDeployDeployment: de_CodeDeployDeployment(output.codeDeployDeployment, context),
2091
- };
2092
- }
2093
- return { $unknown: Object.entries(output)[0] };
2094
- };
2095
- const de_FindingList = (output, context) => {
2096
- const retVal = (output || [])
2097
- .filter((e) => e != null)
2098
- .map((entry) => {
2099
- return de_Finding(entry, context);
2100
- });
2101
- return retVal;
2102
- };
2103
- const de_FindingSummary = (output, context) => {
2104
- return (0, smithy_client_1.take)(output, {
2105
- id: smithy_client_1.expectString,
2106
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2107
- });
2108
- };
2109
- const de_FindingSummaryList = (output, context) => {
2110
- const retVal = (output || [])
2111
- .filter((e) => e != null)
2112
- .map((entry) => {
2113
- return de_FindingSummary(entry, context);
2114
- });
2115
- return retVal;
2116
- };
2117
- const de_IncidentRecord = (output, context) => {
2118
- return (0, smithy_client_1.take)(output, {
2119
- arn: smithy_client_1.expectString,
2120
- automationExecutions: smithy_client_1._json,
2121
- chatChannel: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
2122
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2123
- dedupeString: smithy_client_1.expectString,
2124
- impact: smithy_client_1.expectInt32,
2125
- incidentRecordSource: smithy_client_1._json,
2126
- lastModifiedBy: smithy_client_1.expectString,
2127
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2128
- notificationTargets: smithy_client_1._json,
2129
- resolvedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2130
- status: smithy_client_1.expectString,
2131
- summary: smithy_client_1.expectString,
2132
- title: smithy_client_1.expectString,
2133
- });
2134
- };
2135
- const de_IncidentRecordSummary = (output, context) => {
2136
- return (0, smithy_client_1.take)(output, {
2137
- arn: smithy_client_1.expectString,
2138
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2139
- impact: smithy_client_1.expectInt32,
2140
- incidentRecordSource: smithy_client_1._json,
2141
- resolvedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2142
- status: smithy_client_1.expectString,
2143
- title: smithy_client_1.expectString,
2144
- });
2145
- };
2146
- const de_IncidentRecordSummaryList = (output, context) => {
2147
- const retVal = (output || [])
2148
- .filter((e) => e != null)
2149
- .map((entry) => {
2150
- return de_IncidentRecordSummary(entry, context);
2151
- });
2152
- return retVal;
2153
- };
2154
- const de_RegionInfo = (output, context) => {
2155
- return (0, smithy_client_1.take)(output, {
2156
- sseKmsKeyId: smithy_client_1.expectString,
2157
- status: smithy_client_1.expectString,
2158
- statusMessage: smithy_client_1.expectString,
2159
- statusUpdateDateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2160
- });
2161
- };
2162
- const de_RegionInfoMap = (output, context) => {
2163
- return Object.entries(output).reduce((acc, [key, value]) => {
2164
- if (value === null) {
2165
- return acc;
2166
- }
2167
- acc[key] = de_RegionInfo(value, context);
2168
- return acc;
2169
- }, {});
2170
- };
2171
- const de_ReplicationSet = (output, context) => {
2172
- return (0, smithy_client_1.take)(output, {
2173
- arn: smithy_client_1.expectString,
2174
- createdBy: smithy_client_1.expectString,
2175
- createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2176
- deletionProtected: smithy_client_1.expectBoolean,
2177
- lastModifiedBy: smithy_client_1.expectString,
2178
- lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2179
- regionMap: (_) => de_RegionInfoMap(_, context),
2180
- status: smithy_client_1.expectString,
2181
- });
2182
- };
2183
- const de_TimelineEvent = (output, context) => {
2184
- return (0, smithy_client_1.take)(output, {
2185
- eventData: smithy_client_1.expectString,
2186
- eventId: smithy_client_1.expectString,
2187
- eventReferences: smithy_client_1._json,
2188
- eventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2189
- eventType: smithy_client_1.expectString,
2190
- eventUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2191
- incidentRecordArn: smithy_client_1.expectString,
2192
- });
2193
- };
2194
- const deserializeMetadata = (output) => ({
2195
- httpStatusCode: output.statusCode,
2196
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2197
- extendedRequestId: output.headers["x-amz-id-2"],
2198
- cfId: output.headers["x-amz-cf-id"],
2199
- });
2200
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2201
- const isSerializableHeaderValue = (value) => value !== undefined &&
2202
- value !== null &&
2203
- value !== "" &&
2204
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2205
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2206
- const _a = "arn";
2207
- const _eI = "eventId";
2208
- const _iRA = "incidentRecordArn";
2209
- const _rA = "resourceArn";
2210
- const _tK = "tagKeys";
2211
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2212
- if (encoded.length) {
2213
- return JSON.parse(encoded);
2214
- }
2215
- return {};
2216
- });
2217
- const parseErrorBody = async (errorBody, context) => {
2218
- const value = await parseBody(errorBody, context);
2219
- value.message = value.message ?? value.Message;
2220
- return value;
2221
- };
2222
- const loadRestJsonErrorCode = (output, data) => {
2223
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2224
- const sanitizeErrorCode = (rawValue) => {
2225
- let cleanValue = rawValue;
2226
- if (typeof cleanValue === "number") {
2227
- cleanValue = cleanValue.toString();
2228
- }
2229
- if (cleanValue.indexOf(",") >= 0) {
2230
- cleanValue = cleanValue.split(",")[0];
2231
- }
2232
- if (cleanValue.indexOf(":") >= 0) {
2233
- cleanValue = cleanValue.split(":")[0];
2234
- }
2235
- if (cleanValue.indexOf("#") >= 0) {
2236
- cleanValue = cleanValue.split("#")[1];
2237
- }
2238
- return cleanValue;
2239
- };
2240
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2241
- if (headerKey !== undefined) {
2242
- return sanitizeErrorCode(output.headers[headerKey]);
2243
- }
2244
- if (data.code !== undefined) {
2245
- return sanitizeErrorCode(data.code);
2246
- }
2247
- if (data["__type"] !== undefined) {
2248
- return sanitizeErrorCode(data["__type"]);
2249
- }
2250
- };
1
+ module.exports = require("../index.js");