@aws-sdk/client-ssm-incidents 3.451.0 → 3.454.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 (37) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/SSMIncidents.js +4 -0
  3. package/dist-cjs/commands/BatchGetIncidentFindingsCommand.js +51 -0
  4. package/dist-cjs/commands/ListIncidentFindingsCommand.js +51 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/models/models_0.js +77 -67
  7. package/dist-cjs/pagination/ListIncidentFindingsPaginator.js +29 -0
  8. package/dist-cjs/pagination/index.js +1 -0
  9. package/dist-cjs/protocols/Aws_restJson1.js +199 -2
  10. package/dist-es/SSMIncidents.js +4 -0
  11. package/dist-es/commands/BatchGetIncidentFindingsCommand.js +47 -0
  12. package/dist-es/commands/ListIncidentFindingsCommand.js +47 -0
  13. package/dist-es/commands/index.js +2 -0
  14. package/dist-es/models/models_0.js +72 -62
  15. package/dist-es/pagination/ListIncidentFindingsPaginator.js +25 -0
  16. package/dist-es/pagination/index.js +1 -0
  17. package/dist-es/protocols/Aws_restJson1.js +193 -0
  18. package/dist-types/SSMIncidents.d.ts +14 -0
  19. package/dist-types/SSMIncidentsClient.d.ts +4 -2
  20. package/dist-types/commands/BatchGetIncidentFindingsCommand.d.ts +122 -0
  21. package/dist-types/commands/ListIncidentFindingsCommand.d.ts +101 -0
  22. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  23. package/dist-types/commands/index.d.ts +2 -0
  24. package/dist-types/models/models_0.d.ts +467 -157
  25. package/dist-types/pagination/ListIncidentFindingsPaginator.d.ts +7 -0
  26. package/dist-types/pagination/index.d.ts +1 -0
  27. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  28. package/dist-types/ts3.4/SSMIncidents.d.ts +34 -0
  29. package/dist-types/ts3.4/SSMIncidentsClient.d.ts +12 -0
  30. package/dist-types/ts3.4/commands/BatchGetIncidentFindingsCommand.d.ts +42 -0
  31. package/dist-types/ts3.4/commands/ListIncidentFindingsCommand.d.ts +42 -0
  32. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  33. package/dist-types/ts3.4/models/models_0.d.ts +114 -44
  34. package/dist-types/ts3.4/pagination/ListIncidentFindingsPaginator.d.ts +11 -0
  35. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  36. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  37. package/package.json +2 -2
@@ -1,4 +1,5 @@
1
1
  import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { BatchGetIncidentFindingsCommand, } from "./commands/BatchGetIncidentFindingsCommand";
2
3
  import { CreateReplicationSetCommand, } from "./commands/CreateReplicationSetCommand";
3
4
  import { CreateResponsePlanCommand, } from "./commands/CreateResponsePlanCommand";
4
5
  import { CreateTimelineEventCommand, } from "./commands/CreateTimelineEventCommand";
@@ -12,6 +13,7 @@ import { GetReplicationSetCommand, } from "./commands/GetReplicationSetCommand";
12
13
  import { GetResourcePoliciesCommand, } from "./commands/GetResourcePoliciesCommand";
13
14
  import { GetResponsePlanCommand, } from "./commands/GetResponsePlanCommand";
14
15
  import { GetTimelineEventCommand, } from "./commands/GetTimelineEventCommand";
16
+ import { ListIncidentFindingsCommand, } from "./commands/ListIncidentFindingsCommand";
15
17
  import { ListIncidentRecordsCommand, } from "./commands/ListIncidentRecordsCommand";
16
18
  import { ListRelatedItemsCommand, } from "./commands/ListRelatedItemsCommand";
17
19
  import { ListReplicationSetsCommand, } from "./commands/ListReplicationSetsCommand";
@@ -30,6 +32,7 @@ import { UpdateResponsePlanCommand, } from "./commands/UpdateResponsePlanCommand
30
32
  import { UpdateTimelineEventCommand, } from "./commands/UpdateTimelineEventCommand";
31
33
  import { SSMIncidentsClient } from "./SSMIncidentsClient";
32
34
  const commands = {
35
+ BatchGetIncidentFindingsCommand,
33
36
  CreateReplicationSetCommand,
34
37
  CreateResponsePlanCommand,
35
38
  CreateTimelineEventCommand,
@@ -43,6 +46,7 @@ const commands = {
43
46
  GetResourcePoliciesCommand,
44
47
  GetResponsePlanCommand,
45
48
  GetTimelineEventCommand,
49
+ ListIncidentFindingsCommand,
46
50
  ListIncidentRecordsCommand,
47
51
  ListRelatedItemsCommand,
48
52
  ListReplicationSetsCommand,
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_BatchGetIncidentFindingsCommand, se_BatchGetIncidentFindingsCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class BatchGetIncidentFindingsCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, BatchGetIncidentFindingsCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "SSMIncidentsClient";
26
+ const commandName = "BatchGetIncidentFindingsCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "SSMIncidents",
35
+ operation: "BatchGetIncidentFindings",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_BatchGetIncidentFindingsCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_BatchGetIncidentFindingsCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_ListIncidentFindingsCommand, se_ListIncidentFindingsCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ListIncidentFindingsCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListIncidentFindingsCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "SSMIncidentsClient";
26
+ const commandName = "ListIncidentFindingsCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "SSMIncidents",
35
+ operation: "ListIncidentFindings",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_ListIncidentFindingsCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_ListIncidentFindingsCommand(output, context);
46
+ }
47
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./BatchGetIncidentFindingsCommand";
1
2
  export * from "./CreateReplicationSetCommand";
2
3
  export * from "./CreateResponsePlanCommand";
3
4
  export * from "./CreateTimelineEventCommand";
@@ -11,6 +12,7 @@ export * from "./GetReplicationSetCommand";
11
12
  export * from "./GetResourcePoliciesCommand";
12
13
  export * from "./GetResponsePlanCommand";
13
14
  export * from "./GetTimelineEventCommand";
15
+ export * from "./ListIncidentFindingsCommand";
14
16
  export * from "./ListIncidentRecordsCommand";
15
17
  export * from "./ListRelatedItemsCommand";
16
18
  export * from "./ListReplicationSetsCommand";
@@ -53,6 +53,78 @@ export var AutomationExecution;
53
53
  return visitor._(value.$unknown[0], value.$unknown[1]);
54
54
  };
55
55
  })(AutomationExecution || (AutomationExecution = {}));
56
+ export var FindingDetails;
57
+ (function (FindingDetails) {
58
+ FindingDetails.visit = (value, visitor) => {
59
+ if (value.codeDeployDeployment !== undefined)
60
+ return visitor.codeDeployDeployment(value.codeDeployDeployment);
61
+ if (value.cloudFormationStackUpdate !== undefined)
62
+ return visitor.cloudFormationStackUpdate(value.cloudFormationStackUpdate);
63
+ return visitor._(value.$unknown[0], value.$unknown[1]);
64
+ };
65
+ })(FindingDetails || (FindingDetails = {}));
66
+ export class InternalServerException extends __BaseException {
67
+ constructor(opts) {
68
+ super({
69
+ name: "InternalServerException",
70
+ $fault: "server",
71
+ ...opts,
72
+ });
73
+ this.name = "InternalServerException";
74
+ this.$fault = "server";
75
+ Object.setPrototypeOf(this, InternalServerException.prototype);
76
+ }
77
+ }
78
+ export const ResourceType = {
79
+ INCIDENT_RECORD: "INCIDENT_RECORD",
80
+ REPLICATION_SET: "REPLICATION_SET",
81
+ RESOURCE_POLICY: "RESOURCE_POLICY",
82
+ RESPONSE_PLAN: "RESPONSE_PLAN",
83
+ TIMELINE_EVENT: "TIMELINE_EVENT",
84
+ };
85
+ export class ResourceNotFoundException extends __BaseException {
86
+ constructor(opts) {
87
+ super({
88
+ name: "ResourceNotFoundException",
89
+ $fault: "client",
90
+ ...opts,
91
+ });
92
+ this.name = "ResourceNotFoundException";
93
+ this.$fault = "client";
94
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
95
+ this.resourceIdentifier = opts.resourceIdentifier;
96
+ this.resourceType = opts.resourceType;
97
+ }
98
+ }
99
+ export const ServiceCode = {
100
+ SSM_INCIDENTS: "ssm-incidents",
101
+ };
102
+ export class ThrottlingException extends __BaseException {
103
+ constructor(opts) {
104
+ super({
105
+ name: "ThrottlingException",
106
+ $fault: "client",
107
+ ...opts,
108
+ });
109
+ this.name = "ThrottlingException";
110
+ this.$fault = "client";
111
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
112
+ this.serviceCode = opts.serviceCode;
113
+ this.quotaCode = opts.quotaCode;
114
+ }
115
+ }
116
+ export class ValidationException extends __BaseException {
117
+ constructor(opts) {
118
+ super({
119
+ name: "ValidationException",
120
+ $fault: "client",
121
+ ...opts,
122
+ });
123
+ this.name = "ValidationException";
124
+ this.$fault = "client";
125
+ Object.setPrototypeOf(this, ValidationException.prototype);
126
+ }
127
+ }
56
128
  export var ChatChannel;
57
129
  (function (ChatChannel) {
58
130
  ChatChannel.visit = (value, visitor) => {
@@ -75,13 +147,6 @@ export var Condition;
75
147
  return visitor._(value.$unknown[0], value.$unknown[1]);
76
148
  };
77
149
  })(Condition || (Condition = {}));
78
- export const ResourceType = {
79
- INCIDENT_RECORD: "INCIDENT_RECORD",
80
- REPLICATION_SET: "REPLICATION_SET",
81
- RESOURCE_POLICY: "RESOURCE_POLICY",
82
- RESPONSE_PLAN: "RESPONSE_PLAN",
83
- TIMELINE_EVENT: "TIMELINE_EVENT",
84
- };
85
150
  export class ConflictException extends __BaseException {
86
151
  constructor(opts) {
87
152
  super({
@@ -97,21 +162,6 @@ export class ConflictException extends __BaseException {
97
162
  this.retryAfter = opts.retryAfter;
98
163
  }
99
164
  }
100
- export class InternalServerException extends __BaseException {
101
- constructor(opts) {
102
- super({
103
- name: "InternalServerException",
104
- $fault: "server",
105
- ...opts,
106
- });
107
- this.name = "InternalServerException";
108
- this.$fault = "server";
109
- Object.setPrototypeOf(this, InternalServerException.prototype);
110
- }
111
- }
112
- export const ServiceCode = {
113
- SSM_INCIDENTS: "ssm-incidents",
114
- };
115
165
  export class ServiceQuotaExceededException extends __BaseException {
116
166
  constructor(opts) {
117
167
  super({
@@ -128,32 +178,6 @@ export class ServiceQuotaExceededException extends __BaseException {
128
178
  this.quotaCode = opts.quotaCode;
129
179
  }
130
180
  }
131
- export class ThrottlingException extends __BaseException {
132
- constructor(opts) {
133
- super({
134
- name: "ThrottlingException",
135
- $fault: "client",
136
- ...opts,
137
- });
138
- this.name = "ThrottlingException";
139
- this.$fault = "client";
140
- Object.setPrototypeOf(this, ThrottlingException.prototype);
141
- this.serviceCode = opts.serviceCode;
142
- this.quotaCode = opts.quotaCode;
143
- }
144
- }
145
- export class ValidationException extends __BaseException {
146
- constructor(opts) {
147
- super({
148
- name: "ValidationException",
149
- $fault: "client",
150
- ...opts,
151
- });
152
- this.name = "ValidationException";
153
- this.$fault = "client";
154
- Object.setPrototypeOf(this, ValidationException.prototype);
155
- }
156
- }
157
181
  export var NotificationTargetItem;
158
182
  (function (NotificationTargetItem) {
159
183
  NotificationTargetItem.visit = (value, visitor) => {
@@ -170,20 +194,6 @@ export var Integration;
170
194
  return visitor._(value.$unknown[0], value.$unknown[1]);
171
195
  };
172
196
  })(Integration || (Integration = {}));
173
- export class ResourceNotFoundException extends __BaseException {
174
- constructor(opts) {
175
- super({
176
- name: "ResourceNotFoundException",
177
- $fault: "client",
178
- ...opts,
179
- });
180
- this.name = "ResourceNotFoundException";
181
- this.$fault = "client";
182
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
183
- this.resourceIdentifier = opts.resourceIdentifier;
184
- this.resourceType = opts.resourceType;
185
- }
186
- }
187
197
  export var EventReference;
188
198
  (function (EventReference) {
189
199
  EventReference.visit = (value, visitor) => {
@@ -0,0 +1,25 @@
1
+ import { ListIncidentFindingsCommand, } from "../commands/ListIncidentFindingsCommand";
2
+ import { SSMIncidentsClient } from "../SSMIncidentsClient";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListIncidentFindingsCommand(input), ...args);
5
+ };
6
+ export async function* paginateListIncidentFindings(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof SSMIncidentsClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected SSMIncidents | SSMIncidentsClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./GetResourcePoliciesPaginator";
2
2
  export * from "./Interfaces";
3
+ export * from "./ListIncidentFindingsPaginator";
3
4
  export * from "./ListIncidentRecordsPaginator";
4
5
  export * from "./ListRelatedItemsPaginator";
5
6
  export * from "./ListReplicationSetsPaginator";
@@ -4,6 +4,27 @@ import { _json, collectBody, decorateServiceException as __decorateServiceExcept
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { AccessDeniedException, Condition, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  import { SSMIncidentsServiceException as __BaseException } from "../models/SSMIncidentsServiceException";
7
+ export const se_BatchGetIncidentFindingsCommand = async (input, context) => {
8
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const headers = {
10
+ "content-type": "application/json",
11
+ };
12
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/batchGetIncidentFindings";
13
+ let body;
14
+ body = JSON.stringify(take(input, {
15
+ findingIds: (_) => _json(_),
16
+ incidentRecordArn: [],
17
+ }));
18
+ return new __HttpRequest({
19
+ protocol,
20
+ hostname,
21
+ port,
22
+ method: "POST",
23
+ headers,
24
+ path: resolvedPath,
25
+ body,
26
+ });
27
+ };
7
28
  export const se_CreateReplicationSetCommand = async (input, context) => {
8
29
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
30
  const headers = {
@@ -282,6 +303,28 @@ export const se_GetTimelineEventCommand = async (input, context) => {
282
303
  body,
283
304
  });
284
305
  };
306
+ export const se_ListIncidentFindingsCommand = async (input, context) => {
307
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
308
+ const headers = {
309
+ "content-type": "application/json",
310
+ };
311
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listIncidentFindings";
312
+ let body;
313
+ body = JSON.stringify(take(input, {
314
+ incidentRecordArn: [],
315
+ maxResults: [],
316
+ nextToken: [],
317
+ }));
318
+ return new __HttpRequest({
319
+ protocol,
320
+ hostname,
321
+ port,
322
+ method: "POST",
323
+ headers,
324
+ path: resolvedPath,
325
+ body,
326
+ });
327
+ };
285
328
  export const se_ListIncidentRecordsCommand = async (input, context) => {
286
329
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
287
330
  const headers = {
@@ -650,6 +693,52 @@ export const se_UpdateTimelineEventCommand = async (input, context) => {
650
693
  body,
651
694
  });
652
695
  };
696
+ export const de_BatchGetIncidentFindingsCommand = async (output, context) => {
697
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
698
+ return de_BatchGetIncidentFindingsCommandError(output, context);
699
+ }
700
+ const contents = map({
701
+ $metadata: deserializeMetadata(output),
702
+ });
703
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
704
+ const doc = take(data, {
705
+ errors: _json,
706
+ findings: (_) => de_FindingList(_, context),
707
+ });
708
+ Object.assign(contents, doc);
709
+ return contents;
710
+ };
711
+ const de_BatchGetIncidentFindingsCommandError = async (output, context) => {
712
+ const parsedOutput = {
713
+ ...output,
714
+ body: await parseErrorBody(output.body, context),
715
+ };
716
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
717
+ switch (errorCode) {
718
+ case "AccessDeniedException":
719
+ case "com.amazonaws.ssmincidents#AccessDeniedException":
720
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
721
+ case "InternalServerException":
722
+ case "com.amazonaws.ssmincidents#InternalServerException":
723
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
724
+ case "ResourceNotFoundException":
725
+ case "com.amazonaws.ssmincidents#ResourceNotFoundException":
726
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
727
+ case "ThrottlingException":
728
+ case "com.amazonaws.ssmincidents#ThrottlingException":
729
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
730
+ case "ValidationException":
731
+ case "com.amazonaws.ssmincidents#ValidationException":
732
+ throw await de_ValidationExceptionRes(parsedOutput, context);
733
+ default:
734
+ const parsedBody = parsedOutput.body;
735
+ return throwDefaultError({
736
+ output,
737
+ parsedBody,
738
+ errorCode,
739
+ });
740
+ }
741
+ };
653
742
  export const de_CreateReplicationSetCommand = async (output, context) => {
654
743
  if (output.statusCode !== 201 && output.statusCode >= 300) {
655
744
  return de_CreateReplicationSetCommandError(output, context);
@@ -1224,6 +1313,52 @@ const de_GetTimelineEventCommandError = async (output, context) => {
1224
1313
  });
1225
1314
  }
1226
1315
  };
1316
+ export const de_ListIncidentFindingsCommand = async (output, context) => {
1317
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1318
+ return de_ListIncidentFindingsCommandError(output, context);
1319
+ }
1320
+ const contents = map({
1321
+ $metadata: deserializeMetadata(output),
1322
+ });
1323
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1324
+ const doc = take(data, {
1325
+ findings: (_) => de_FindingSummaryList(_, context),
1326
+ nextToken: __expectString,
1327
+ });
1328
+ Object.assign(contents, doc);
1329
+ return contents;
1330
+ };
1331
+ const de_ListIncidentFindingsCommandError = async (output, context) => {
1332
+ const parsedOutput = {
1333
+ ...output,
1334
+ body: await parseErrorBody(output.body, context),
1335
+ };
1336
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1337
+ switch (errorCode) {
1338
+ case "AccessDeniedException":
1339
+ case "com.amazonaws.ssmincidents#AccessDeniedException":
1340
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1341
+ case "InternalServerException":
1342
+ case "com.amazonaws.ssmincidents#InternalServerException":
1343
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1344
+ case "ResourceNotFoundException":
1345
+ case "com.amazonaws.ssmincidents#ResourceNotFoundException":
1346
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1347
+ case "ThrottlingException":
1348
+ case "com.amazonaws.ssmincidents#ThrottlingException":
1349
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1350
+ case "ValidationException":
1351
+ case "com.amazonaws.ssmincidents#ValidationException":
1352
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1353
+ default:
1354
+ const parsedBody = parsedOutput.body;
1355
+ return throwDefaultError({
1356
+ output,
1357
+ parsedBody,
1358
+ errorCode,
1359
+ });
1360
+ }
1361
+ };
1227
1362
  export const de_ListIncidentRecordsCommand = async (output, context) => {
1228
1363
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1229
1364
  return de_ListIncidentRecordsCommandError(output, context);
@@ -2061,6 +2196,21 @@ const se_TriggerDetails = (input, context) => {
2061
2196
  triggerArn: [],
2062
2197
  });
2063
2198
  };
2199
+ const de_CloudFormationStackUpdate = (output, context) => {
2200
+ return take(output, {
2201
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2202
+ stackArn: __expectString,
2203
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2204
+ });
2205
+ };
2206
+ const de_CodeDeployDeployment = (output, context) => {
2207
+ return take(output, {
2208
+ deploymentGroupArn: __expectString,
2209
+ deploymentId: __expectString,
2210
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2211
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2212
+ });
2213
+ };
2064
2214
  const de_EventSummary = (output, context) => {
2065
2215
  return take(output, {
2066
2216
  eventId: __expectString,
@@ -2079,6 +2229,49 @@ const de_EventSummaryList = (output, context) => {
2079
2229
  });
2080
2230
  return retVal;
2081
2231
  };
2232
+ const de_Finding = (output, context) => {
2233
+ return take(output, {
2234
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2235
+ details: (_) => de_FindingDetails(__expectUnion(_), context),
2236
+ id: __expectString,
2237
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2238
+ });
2239
+ };
2240
+ const de_FindingDetails = (output, context) => {
2241
+ if (output.cloudFormationStackUpdate != null) {
2242
+ return {
2243
+ cloudFormationStackUpdate: de_CloudFormationStackUpdate(output.cloudFormationStackUpdate, context),
2244
+ };
2245
+ }
2246
+ if (output.codeDeployDeployment != null) {
2247
+ return {
2248
+ codeDeployDeployment: de_CodeDeployDeployment(output.codeDeployDeployment, context),
2249
+ };
2250
+ }
2251
+ return { $unknown: Object.entries(output)[0] };
2252
+ };
2253
+ const de_FindingList = (output, context) => {
2254
+ const retVal = (output || [])
2255
+ .filter((e) => e != null)
2256
+ .map((entry) => {
2257
+ return de_Finding(entry, context);
2258
+ });
2259
+ return retVal;
2260
+ };
2261
+ const de_FindingSummary = (output, context) => {
2262
+ return take(output, {
2263
+ id: __expectString,
2264
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2265
+ });
2266
+ };
2267
+ const de_FindingSummaryList = (output, context) => {
2268
+ const retVal = (output || [])
2269
+ .filter((e) => e != null)
2270
+ .map((entry) => {
2271
+ return de_FindingSummary(entry, context);
2272
+ });
2273
+ return retVal;
2274
+ };
2082
2275
  const de_IncidentRecord = (output, context) => {
2083
2276
  return take(output, {
2084
2277
  arn: __expectString,
@@ -1,4 +1,5 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
+ import { BatchGetIncidentFindingsCommandInput, BatchGetIncidentFindingsCommandOutput } from "./commands/BatchGetIncidentFindingsCommand";
2
3
  import { CreateReplicationSetCommandInput, CreateReplicationSetCommandOutput } from "./commands/CreateReplicationSetCommand";
3
4
  import { CreateResponsePlanCommandInput, CreateResponsePlanCommandOutput } from "./commands/CreateResponsePlanCommand";
4
5
  import { CreateTimelineEventCommandInput, CreateTimelineEventCommandOutput } from "./commands/CreateTimelineEventCommand";
@@ -12,6 +13,7 @@ import { GetReplicationSetCommandInput, GetReplicationSetCommandOutput } from ".
12
13
  import { GetResourcePoliciesCommandInput, GetResourcePoliciesCommandOutput } from "./commands/GetResourcePoliciesCommand";
13
14
  import { GetResponsePlanCommandInput, GetResponsePlanCommandOutput } from "./commands/GetResponsePlanCommand";
14
15
  import { GetTimelineEventCommandInput, GetTimelineEventCommandOutput } from "./commands/GetTimelineEventCommand";
16
+ import { ListIncidentFindingsCommandInput, ListIncidentFindingsCommandOutput } from "./commands/ListIncidentFindingsCommand";
15
17
  import { ListIncidentRecordsCommandInput, ListIncidentRecordsCommandOutput } from "./commands/ListIncidentRecordsCommand";
16
18
  import { ListRelatedItemsCommandInput, ListRelatedItemsCommandOutput } from "./commands/ListRelatedItemsCommand";
17
19
  import { ListReplicationSetsCommandInput, ListReplicationSetsCommandOutput } from "./commands/ListReplicationSetsCommand";
@@ -30,6 +32,12 @@ import { UpdateResponsePlanCommandInput, UpdateResponsePlanCommandOutput } from
30
32
  import { UpdateTimelineEventCommandInput, UpdateTimelineEventCommandOutput } from "./commands/UpdateTimelineEventCommand";
31
33
  import { SSMIncidentsClient } from "./SSMIncidentsClient";
32
34
  export interface SSMIncidents {
35
+ /**
36
+ * @see {@link BatchGetIncidentFindingsCommand}
37
+ */
38
+ batchGetIncidentFindings(args: BatchGetIncidentFindingsCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetIncidentFindingsCommandOutput>;
39
+ batchGetIncidentFindings(args: BatchGetIncidentFindingsCommandInput, cb: (err: any, data?: BatchGetIncidentFindingsCommandOutput) => void): void;
40
+ batchGetIncidentFindings(args: BatchGetIncidentFindingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetIncidentFindingsCommandOutput) => void): void;
33
41
  /**
34
42
  * @see {@link CreateReplicationSetCommand}
35
43
  */
@@ -108,6 +116,12 @@ export interface SSMIncidents {
108
116
  getTimelineEvent(args: GetTimelineEventCommandInput, options?: __HttpHandlerOptions): Promise<GetTimelineEventCommandOutput>;
109
117
  getTimelineEvent(args: GetTimelineEventCommandInput, cb: (err: any, data?: GetTimelineEventCommandOutput) => void): void;
110
118
  getTimelineEvent(args: GetTimelineEventCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetTimelineEventCommandOutput) => void): void;
119
+ /**
120
+ * @see {@link ListIncidentFindingsCommand}
121
+ */
122
+ listIncidentFindings(args: ListIncidentFindingsCommandInput, options?: __HttpHandlerOptions): Promise<ListIncidentFindingsCommandOutput>;
123
+ listIncidentFindings(args: ListIncidentFindingsCommandInput, cb: (err: any, data?: ListIncidentFindingsCommandOutput) => void): void;
124
+ listIncidentFindings(args: ListIncidentFindingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListIncidentFindingsCommandOutput) => void): void;
111
125
  /**
112
126
  * @see {@link ListIncidentRecordsCommand}
113
127
  */
@@ -8,6 +8,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"
8
8
  import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
9
9
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
10
10
  import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
11
+ import { BatchGetIncidentFindingsCommandInput, BatchGetIncidentFindingsCommandOutput } from "./commands/BatchGetIncidentFindingsCommand";
11
12
  import { CreateReplicationSetCommandInput, CreateReplicationSetCommandOutput } from "./commands/CreateReplicationSetCommand";
12
13
  import { CreateResponsePlanCommandInput, CreateResponsePlanCommandOutput } from "./commands/CreateResponsePlanCommand";
13
14
  import { CreateTimelineEventCommandInput, CreateTimelineEventCommandOutput } from "./commands/CreateTimelineEventCommand";
@@ -21,6 +22,7 @@ import { GetReplicationSetCommandInput, GetReplicationSetCommandOutput } from ".
21
22
  import { GetResourcePoliciesCommandInput, GetResourcePoliciesCommandOutput } from "./commands/GetResourcePoliciesCommand";
22
23
  import { GetResponsePlanCommandInput, GetResponsePlanCommandOutput } from "./commands/GetResponsePlanCommand";
23
24
  import { GetTimelineEventCommandInput, GetTimelineEventCommandOutput } from "./commands/GetTimelineEventCommand";
25
+ import { ListIncidentFindingsCommandInput, ListIncidentFindingsCommandOutput } from "./commands/ListIncidentFindingsCommand";
24
26
  import { ListIncidentRecordsCommandInput, ListIncidentRecordsCommandOutput } from "./commands/ListIncidentRecordsCommand";
25
27
  import { ListRelatedItemsCommandInput, ListRelatedItemsCommandOutput } from "./commands/ListRelatedItemsCommand";
26
28
  import { ListReplicationSetsCommandInput, ListReplicationSetsCommandOutput } from "./commands/ListReplicationSetsCommand";
@@ -43,11 +45,11 @@ export { __Client };
43
45
  /**
44
46
  * @public
45
47
  */
46
- export type ServiceInputTypes = CreateReplicationSetCommandInput | CreateResponsePlanCommandInput | CreateTimelineEventCommandInput | DeleteIncidentRecordCommandInput | DeleteReplicationSetCommandInput | DeleteResourcePolicyCommandInput | DeleteResponsePlanCommandInput | DeleteTimelineEventCommandInput | GetIncidentRecordCommandInput | GetReplicationSetCommandInput | GetResourcePoliciesCommandInput | GetResponsePlanCommandInput | GetTimelineEventCommandInput | ListIncidentRecordsCommandInput | ListRelatedItemsCommandInput | ListReplicationSetsCommandInput | ListResponsePlansCommandInput | ListTagsForResourceCommandInput | ListTimelineEventsCommandInput | PutResourcePolicyCommandInput | StartIncidentCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateDeletionProtectionCommandInput | UpdateIncidentRecordCommandInput | UpdateRelatedItemsCommandInput | UpdateReplicationSetCommandInput | UpdateResponsePlanCommandInput | UpdateTimelineEventCommandInput;
48
+ export type ServiceInputTypes = BatchGetIncidentFindingsCommandInput | CreateReplicationSetCommandInput | CreateResponsePlanCommandInput | CreateTimelineEventCommandInput | DeleteIncidentRecordCommandInput | DeleteReplicationSetCommandInput | DeleteResourcePolicyCommandInput | DeleteResponsePlanCommandInput | DeleteTimelineEventCommandInput | GetIncidentRecordCommandInput | GetReplicationSetCommandInput | GetResourcePoliciesCommandInput | GetResponsePlanCommandInput | GetTimelineEventCommandInput | ListIncidentFindingsCommandInput | ListIncidentRecordsCommandInput | ListRelatedItemsCommandInput | ListReplicationSetsCommandInput | ListResponsePlansCommandInput | ListTagsForResourceCommandInput | ListTimelineEventsCommandInput | PutResourcePolicyCommandInput | StartIncidentCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateDeletionProtectionCommandInput | UpdateIncidentRecordCommandInput | UpdateRelatedItemsCommandInput | UpdateReplicationSetCommandInput | UpdateResponsePlanCommandInput | UpdateTimelineEventCommandInput;
47
49
  /**
48
50
  * @public
49
51
  */
50
- export type ServiceOutputTypes = CreateReplicationSetCommandOutput | CreateResponsePlanCommandOutput | CreateTimelineEventCommandOutput | DeleteIncidentRecordCommandOutput | DeleteReplicationSetCommandOutput | DeleteResourcePolicyCommandOutput | DeleteResponsePlanCommandOutput | DeleteTimelineEventCommandOutput | GetIncidentRecordCommandOutput | GetReplicationSetCommandOutput | GetResourcePoliciesCommandOutput | GetResponsePlanCommandOutput | GetTimelineEventCommandOutput | ListIncidentRecordsCommandOutput | ListRelatedItemsCommandOutput | ListReplicationSetsCommandOutput | ListResponsePlansCommandOutput | ListTagsForResourceCommandOutput | ListTimelineEventsCommandOutput | PutResourcePolicyCommandOutput | StartIncidentCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateDeletionProtectionCommandOutput | UpdateIncidentRecordCommandOutput | UpdateRelatedItemsCommandOutput | UpdateReplicationSetCommandOutput | UpdateResponsePlanCommandOutput | UpdateTimelineEventCommandOutput;
52
+ export type ServiceOutputTypes = BatchGetIncidentFindingsCommandOutput | CreateReplicationSetCommandOutput | CreateResponsePlanCommandOutput | CreateTimelineEventCommandOutput | DeleteIncidentRecordCommandOutput | DeleteReplicationSetCommandOutput | DeleteResourcePolicyCommandOutput | DeleteResponsePlanCommandOutput | DeleteTimelineEventCommandOutput | GetIncidentRecordCommandOutput | GetReplicationSetCommandOutput | GetResourcePoliciesCommandOutput | GetResponsePlanCommandOutput | GetTimelineEventCommandOutput | ListIncidentFindingsCommandOutput | ListIncidentRecordsCommandOutput | ListRelatedItemsCommandOutput | ListReplicationSetsCommandOutput | ListResponsePlansCommandOutput | ListTagsForResourceCommandOutput | ListTimelineEventsCommandOutput | PutResourcePolicyCommandOutput | StartIncidentCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateDeletionProtectionCommandOutput | UpdateIncidentRecordCommandOutput | UpdateRelatedItemsCommandOutput | UpdateReplicationSetCommandOutput | UpdateResponsePlanCommandOutput | UpdateTimelineEventCommandOutput;
51
53
  /**
52
54
  * @public
53
55
  */