@aws-sdk/client-detective 3.451.0 → 3.458.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -24
- package/dist-cjs/Detective.js +10 -0
- package/dist-cjs/commands/GetInvestigationCommand.js +51 -0
- package/dist-cjs/commands/ListIndicatorsCommand.js +51 -0
- package/dist-cjs/commands/ListInvestigationsCommand.js +51 -0
- package/dist-cjs/commands/StartInvestigationCommand.js +51 -0
- package/dist-cjs/commands/UpdateInvestigationStateCommand.js +51 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +43 -1
- package/dist-cjs/protocols/Aws_restJson1.js +394 -1
- package/dist-es/Detective.js +10 -0
- package/dist-es/commands/GetInvestigationCommand.js +47 -0
- package/dist-es/commands/ListIndicatorsCommand.js +47 -0
- package/dist-es/commands/ListInvestigationsCommand.js +47 -0
- package/dist-es/commands/StartInvestigationCommand.js +47 -0
- package/dist-es/commands/UpdateInvestigationStateCommand.js +47 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +42 -0
- package/dist-es/protocols/Aws_restJson1.js +382 -0
- package/dist-types/Detective.d.ts +35 -0
- package/dist-types/DetectiveClient.d.ts +7 -2
- package/dist-types/commands/CreateMembersCommand.d.ts +2 -2
- package/dist-types/commands/GetInvestigationCommand.d.ts +100 -0
- package/dist-types/commands/ListIndicatorsCommand.d.ts +144 -0
- package/dist-types/commands/ListInvestigationsCommand.d.ts +125 -0
- package/dist-types/commands/StartInvestigationCommand.d.ts +93 -0
- package/dist-types/commands/UpdateInvestigationStateCommand.d.ts +90 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +687 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
- package/dist-types/ts3.4/Detective.d.ts +85 -0
- package/dist-types/ts3.4/DetectiveClient.d.ts +30 -0
- package/dist-types/ts3.4/commands/GetInvestigationCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListIndicatorsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListInvestigationsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/StartInvestigationCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/UpdateInvestigationStateCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +186 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
- package/package.json +3 -3
|
@@ -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_ListInvestigationsCommand, se_ListInvestigationsCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListInvestigationsCommand 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, ListInvestigationsCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "DetectiveClient";
|
|
26
|
+
const commandName = "ListInvestigationsCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonDetective",
|
|
35
|
+
operation: "ListInvestigations",
|
|
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_ListInvestigationsCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_ListInvestigationsCommand(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_StartInvestigationCommand, se_StartInvestigationCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class StartInvestigationCommand 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, StartInvestigationCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "DetectiveClient";
|
|
26
|
+
const commandName = "StartInvestigationCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonDetective",
|
|
35
|
+
operation: "StartInvestigation",
|
|
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_StartInvestigationCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_StartInvestigationCommand(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_UpdateInvestigationStateCommand, se_UpdateInvestigationStateCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class UpdateInvestigationStateCommand 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, UpdateInvestigationStateCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "DetectiveClient";
|
|
26
|
+
const commandName = "UpdateInvestigationStateCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonDetective",
|
|
35
|
+
operation: "UpdateInvestigationState",
|
|
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_UpdateInvestigationStateCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_UpdateInvestigationStateCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -9,16 +9,21 @@ export * from "./DescribeOrganizationConfigurationCommand";
|
|
|
9
9
|
export * from "./DisableOrganizationAdminAccountCommand";
|
|
10
10
|
export * from "./DisassociateMembershipCommand";
|
|
11
11
|
export * from "./EnableOrganizationAdminAccountCommand";
|
|
12
|
+
export * from "./GetInvestigationCommand";
|
|
12
13
|
export * from "./GetMembersCommand";
|
|
13
14
|
export * from "./ListDatasourcePackagesCommand";
|
|
14
15
|
export * from "./ListGraphsCommand";
|
|
16
|
+
export * from "./ListIndicatorsCommand";
|
|
17
|
+
export * from "./ListInvestigationsCommand";
|
|
15
18
|
export * from "./ListInvitationsCommand";
|
|
16
19
|
export * from "./ListMembersCommand";
|
|
17
20
|
export * from "./ListOrganizationAdminAccountsCommand";
|
|
18
21
|
export * from "./ListTagsForResourceCommand";
|
|
19
22
|
export * from "./RejectInvitationCommand";
|
|
23
|
+
export * from "./StartInvestigationCommand";
|
|
20
24
|
export * from "./StartMonitoringMemberCommand";
|
|
21
25
|
export * from "./TagResourceCommand";
|
|
22
26
|
export * from "./UntagResourceCommand";
|
|
23
27
|
export * from "./UpdateDatasourcePackagesCommand";
|
|
28
|
+
export * from "./UpdateInvestigationStateCommand";
|
|
24
29
|
export * from "./UpdateOrganizationConfigurationCommand";
|
|
@@ -128,6 +128,48 @@ export class TooManyRequestsException extends __BaseException {
|
|
|
128
128
|
this.Message = opts.Message;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
+
export const EntityType = {
|
|
132
|
+
IAM_ROLE: "IAM_ROLE",
|
|
133
|
+
IAM_USER: "IAM_USER",
|
|
134
|
+
};
|
|
135
|
+
export const Severity = {
|
|
136
|
+
CRITICAL: "CRITICAL",
|
|
137
|
+
HIGH: "HIGH",
|
|
138
|
+
INFORMATIONAL: "INFORMATIONAL",
|
|
139
|
+
LOW: "LOW",
|
|
140
|
+
MEDIUM: "MEDIUM",
|
|
141
|
+
};
|
|
142
|
+
export const State = {
|
|
143
|
+
ACTIVE: "ACTIVE",
|
|
144
|
+
ARCHIVED: "ARCHIVED",
|
|
145
|
+
};
|
|
146
|
+
export const Status = {
|
|
147
|
+
FAILED: "FAILED",
|
|
148
|
+
RUNNING: "RUNNING",
|
|
149
|
+
SUCCESSFUL: "SUCCESSFUL",
|
|
150
|
+
};
|
|
151
|
+
export const IndicatorType = {
|
|
152
|
+
FLAGGED_IP_ADDRESS: "FLAGGED_IP_ADDRESS",
|
|
153
|
+
IMPOSSIBLE_TRAVEL: "IMPOSSIBLE_TRAVEL",
|
|
154
|
+
NEW_ASO: "NEW_ASO",
|
|
155
|
+
NEW_GEOLOCATION: "NEW_GEOLOCATION",
|
|
156
|
+
NEW_USER_AGENT: "NEW_USER_AGENT",
|
|
157
|
+
RELATED_FINDING: "RELATED_FINDING",
|
|
158
|
+
RELATED_FINDING_GROUP: "RELATED_FINDING_GROUP",
|
|
159
|
+
TTP_OBSERVED: "TTP_OBSERVED",
|
|
160
|
+
};
|
|
161
|
+
export const Reason = {
|
|
162
|
+
AWS_THREAT_INTELLIGENCE: "AWS_THREAT_INTELLIGENCE",
|
|
163
|
+
};
|
|
164
|
+
export const Field = {
|
|
165
|
+
CREATED_TIME: "CREATED_TIME",
|
|
166
|
+
SEVERITY: "SEVERITY",
|
|
167
|
+
STATUS: "STATUS",
|
|
168
|
+
};
|
|
169
|
+
export const SortOrder = {
|
|
170
|
+
ASC: "ASC",
|
|
171
|
+
DESC: "DESC",
|
|
172
|
+
};
|
|
131
173
|
export const AccountFilterSensitiveLog = (obj) => ({
|
|
132
174
|
...obj,
|
|
133
175
|
...(obj.EmailAddress && { EmailAddress: SENSITIVE_STRING }),
|
|
@@ -225,6 +225,27 @@ export const se_EnableOrganizationAdminAccountCommand = async (input, context) =
|
|
|
225
225
|
body,
|
|
226
226
|
});
|
|
227
227
|
};
|
|
228
|
+
export const se_GetInvestigationCommand = async (input, context) => {
|
|
229
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
230
|
+
const headers = {
|
|
231
|
+
"content-type": "application/json",
|
|
232
|
+
};
|
|
233
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/investigations/getInvestigation";
|
|
234
|
+
let body;
|
|
235
|
+
body = JSON.stringify(take(input, {
|
|
236
|
+
GraphArn: [],
|
|
237
|
+
InvestigationId: [],
|
|
238
|
+
}));
|
|
239
|
+
return new __HttpRequest({
|
|
240
|
+
protocol,
|
|
241
|
+
hostname,
|
|
242
|
+
port,
|
|
243
|
+
method: "POST",
|
|
244
|
+
headers,
|
|
245
|
+
path: resolvedPath,
|
|
246
|
+
body,
|
|
247
|
+
});
|
|
248
|
+
};
|
|
228
249
|
export const se_GetMembersCommand = async (input, context) => {
|
|
229
250
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
230
251
|
const headers = {
|
|
@@ -289,6 +310,54 @@ export const se_ListGraphsCommand = async (input, context) => {
|
|
|
289
310
|
body,
|
|
290
311
|
});
|
|
291
312
|
};
|
|
313
|
+
export const se_ListIndicatorsCommand = async (input, context) => {
|
|
314
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
315
|
+
const headers = {
|
|
316
|
+
"content-type": "application/json",
|
|
317
|
+
};
|
|
318
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/investigations/listIndicators";
|
|
319
|
+
let body;
|
|
320
|
+
body = JSON.stringify(take(input, {
|
|
321
|
+
GraphArn: [],
|
|
322
|
+
IndicatorType: [],
|
|
323
|
+
InvestigationId: [],
|
|
324
|
+
MaxResults: [],
|
|
325
|
+
NextToken: [],
|
|
326
|
+
}));
|
|
327
|
+
return new __HttpRequest({
|
|
328
|
+
protocol,
|
|
329
|
+
hostname,
|
|
330
|
+
port,
|
|
331
|
+
method: "POST",
|
|
332
|
+
headers,
|
|
333
|
+
path: resolvedPath,
|
|
334
|
+
body,
|
|
335
|
+
});
|
|
336
|
+
};
|
|
337
|
+
export const se_ListInvestigationsCommand = async (input, context) => {
|
|
338
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
339
|
+
const headers = {
|
|
340
|
+
"content-type": "application/json",
|
|
341
|
+
};
|
|
342
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/investigations/listInvestigations";
|
|
343
|
+
let body;
|
|
344
|
+
body = JSON.stringify(take(input, {
|
|
345
|
+
FilterCriteria: (_) => se_FilterCriteria(_, context),
|
|
346
|
+
GraphArn: [],
|
|
347
|
+
MaxResults: [],
|
|
348
|
+
NextToken: [],
|
|
349
|
+
SortCriteria: (_) => _json(_),
|
|
350
|
+
}));
|
|
351
|
+
return new __HttpRequest({
|
|
352
|
+
protocol,
|
|
353
|
+
hostname,
|
|
354
|
+
port,
|
|
355
|
+
method: "POST",
|
|
356
|
+
headers,
|
|
357
|
+
path: resolvedPath,
|
|
358
|
+
body,
|
|
359
|
+
});
|
|
360
|
+
};
|
|
292
361
|
export const se_ListInvitationsCommand = async (input, context) => {
|
|
293
362
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
294
363
|
const headers = {
|
|
@@ -389,6 +458,29 @@ export const se_RejectInvitationCommand = async (input, context) => {
|
|
|
389
458
|
body,
|
|
390
459
|
});
|
|
391
460
|
};
|
|
461
|
+
export const se_StartInvestigationCommand = async (input, context) => {
|
|
462
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
463
|
+
const headers = {
|
|
464
|
+
"content-type": "application/json",
|
|
465
|
+
};
|
|
466
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/investigations/startInvestigation";
|
|
467
|
+
let body;
|
|
468
|
+
body = JSON.stringify(take(input, {
|
|
469
|
+
EntityArn: [],
|
|
470
|
+
GraphArn: [],
|
|
471
|
+
ScopeEndTime: (_) => _.toISOString().split(".")[0] + "Z",
|
|
472
|
+
ScopeStartTime: (_) => _.toISOString().split(".")[0] + "Z",
|
|
473
|
+
}));
|
|
474
|
+
return new __HttpRequest({
|
|
475
|
+
protocol,
|
|
476
|
+
hostname,
|
|
477
|
+
port,
|
|
478
|
+
method: "POST",
|
|
479
|
+
headers,
|
|
480
|
+
path: resolvedPath,
|
|
481
|
+
body,
|
|
482
|
+
});
|
|
483
|
+
};
|
|
392
484
|
export const se_StartMonitoringMemberCommand = async (input, context) => {
|
|
393
485
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
394
486
|
const headers = {
|
|
@@ -475,6 +567,28 @@ export const se_UpdateDatasourcePackagesCommand = async (input, context) => {
|
|
|
475
567
|
body,
|
|
476
568
|
});
|
|
477
569
|
};
|
|
570
|
+
export const se_UpdateInvestigationStateCommand = async (input, context) => {
|
|
571
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
572
|
+
const headers = {
|
|
573
|
+
"content-type": "application/json",
|
|
574
|
+
};
|
|
575
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/investigations/updateInvestigationState";
|
|
576
|
+
let body;
|
|
577
|
+
body = JSON.stringify(take(input, {
|
|
578
|
+
GraphArn: [],
|
|
579
|
+
InvestigationId: [],
|
|
580
|
+
State: [],
|
|
581
|
+
}));
|
|
582
|
+
return new __HttpRequest({
|
|
583
|
+
protocol,
|
|
584
|
+
hostname,
|
|
585
|
+
port,
|
|
586
|
+
method: "POST",
|
|
587
|
+
headers,
|
|
588
|
+
path: resolvedPath,
|
|
589
|
+
body,
|
|
590
|
+
});
|
|
591
|
+
};
|
|
478
592
|
export const se_UpdateOrganizationConfigurationCommand = async (input, context) => {
|
|
479
593
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
480
594
|
const headers = {
|
|
@@ -954,6 +1068,60 @@ const de_EnableOrganizationAdminAccountCommandError = async (output, context) =>
|
|
|
954
1068
|
});
|
|
955
1069
|
}
|
|
956
1070
|
};
|
|
1071
|
+
export const de_GetInvestigationCommand = async (output, context) => {
|
|
1072
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1073
|
+
return de_GetInvestigationCommandError(output, context);
|
|
1074
|
+
}
|
|
1075
|
+
const contents = map({
|
|
1076
|
+
$metadata: deserializeMetadata(output),
|
|
1077
|
+
});
|
|
1078
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1079
|
+
const doc = take(data, {
|
|
1080
|
+
CreatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1081
|
+
EntityArn: __expectString,
|
|
1082
|
+
EntityType: __expectString,
|
|
1083
|
+
GraphArn: __expectString,
|
|
1084
|
+
InvestigationId: __expectString,
|
|
1085
|
+
ScopeEndTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1086
|
+
ScopeStartTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1087
|
+
Severity: __expectString,
|
|
1088
|
+
State: __expectString,
|
|
1089
|
+
Status: __expectString,
|
|
1090
|
+
});
|
|
1091
|
+
Object.assign(contents, doc);
|
|
1092
|
+
return contents;
|
|
1093
|
+
};
|
|
1094
|
+
const de_GetInvestigationCommandError = async (output, context) => {
|
|
1095
|
+
const parsedOutput = {
|
|
1096
|
+
...output,
|
|
1097
|
+
body: await parseErrorBody(output.body, context),
|
|
1098
|
+
};
|
|
1099
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1100
|
+
switch (errorCode) {
|
|
1101
|
+
case "AccessDeniedException":
|
|
1102
|
+
case "com.amazonaws.detective#AccessDeniedException":
|
|
1103
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1104
|
+
case "InternalServerException":
|
|
1105
|
+
case "com.amazonaws.detective#InternalServerException":
|
|
1106
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1107
|
+
case "ResourceNotFoundException":
|
|
1108
|
+
case "com.amazonaws.detective#ResourceNotFoundException":
|
|
1109
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1110
|
+
case "TooManyRequestsException":
|
|
1111
|
+
case "com.amazonaws.detective#TooManyRequestsException":
|
|
1112
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1113
|
+
case "ValidationException":
|
|
1114
|
+
case "com.amazonaws.detective#ValidationException":
|
|
1115
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1116
|
+
default:
|
|
1117
|
+
const parsedBody = parsedOutput.body;
|
|
1118
|
+
return throwDefaultError({
|
|
1119
|
+
output,
|
|
1120
|
+
parsedBody,
|
|
1121
|
+
errorCode,
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
957
1125
|
export const de_GetMembersCommand = async (output, context) => {
|
|
958
1126
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
959
1127
|
return de_GetMembersCommandError(output, context);
|
|
@@ -1080,6 +1248,100 @@ const de_ListGraphsCommandError = async (output, context) => {
|
|
|
1080
1248
|
});
|
|
1081
1249
|
}
|
|
1082
1250
|
};
|
|
1251
|
+
export const de_ListIndicatorsCommand = async (output, context) => {
|
|
1252
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1253
|
+
return de_ListIndicatorsCommandError(output, context);
|
|
1254
|
+
}
|
|
1255
|
+
const contents = map({
|
|
1256
|
+
$metadata: deserializeMetadata(output),
|
|
1257
|
+
});
|
|
1258
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1259
|
+
const doc = take(data, {
|
|
1260
|
+
GraphArn: __expectString,
|
|
1261
|
+
Indicators: _json,
|
|
1262
|
+
InvestigationId: __expectString,
|
|
1263
|
+
NextToken: __expectString,
|
|
1264
|
+
});
|
|
1265
|
+
Object.assign(contents, doc);
|
|
1266
|
+
return contents;
|
|
1267
|
+
};
|
|
1268
|
+
const de_ListIndicatorsCommandError = async (output, context) => {
|
|
1269
|
+
const parsedOutput = {
|
|
1270
|
+
...output,
|
|
1271
|
+
body: await parseErrorBody(output.body, context),
|
|
1272
|
+
};
|
|
1273
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1274
|
+
switch (errorCode) {
|
|
1275
|
+
case "AccessDeniedException":
|
|
1276
|
+
case "com.amazonaws.detective#AccessDeniedException":
|
|
1277
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1278
|
+
case "InternalServerException":
|
|
1279
|
+
case "com.amazonaws.detective#InternalServerException":
|
|
1280
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1281
|
+
case "ResourceNotFoundException":
|
|
1282
|
+
case "com.amazonaws.detective#ResourceNotFoundException":
|
|
1283
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1284
|
+
case "TooManyRequestsException":
|
|
1285
|
+
case "com.amazonaws.detective#TooManyRequestsException":
|
|
1286
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1287
|
+
case "ValidationException":
|
|
1288
|
+
case "com.amazonaws.detective#ValidationException":
|
|
1289
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1290
|
+
default:
|
|
1291
|
+
const parsedBody = parsedOutput.body;
|
|
1292
|
+
return throwDefaultError({
|
|
1293
|
+
output,
|
|
1294
|
+
parsedBody,
|
|
1295
|
+
errorCode,
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
};
|
|
1299
|
+
export const de_ListInvestigationsCommand = async (output, context) => {
|
|
1300
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1301
|
+
return de_ListInvestigationsCommandError(output, context);
|
|
1302
|
+
}
|
|
1303
|
+
const contents = map({
|
|
1304
|
+
$metadata: deserializeMetadata(output),
|
|
1305
|
+
});
|
|
1306
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1307
|
+
const doc = take(data, {
|
|
1308
|
+
InvestigationDetails: (_) => de_InvestigationDetails(_, context),
|
|
1309
|
+
NextToken: __expectString,
|
|
1310
|
+
});
|
|
1311
|
+
Object.assign(contents, doc);
|
|
1312
|
+
return contents;
|
|
1313
|
+
};
|
|
1314
|
+
const de_ListInvestigationsCommandError = async (output, context) => {
|
|
1315
|
+
const parsedOutput = {
|
|
1316
|
+
...output,
|
|
1317
|
+
body: await parseErrorBody(output.body, context),
|
|
1318
|
+
};
|
|
1319
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1320
|
+
switch (errorCode) {
|
|
1321
|
+
case "AccessDeniedException":
|
|
1322
|
+
case "com.amazonaws.detective#AccessDeniedException":
|
|
1323
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1324
|
+
case "InternalServerException":
|
|
1325
|
+
case "com.amazonaws.detective#InternalServerException":
|
|
1326
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1327
|
+
case "ResourceNotFoundException":
|
|
1328
|
+
case "com.amazonaws.detective#ResourceNotFoundException":
|
|
1329
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1330
|
+
case "TooManyRequestsException":
|
|
1331
|
+
case "com.amazonaws.detective#TooManyRequestsException":
|
|
1332
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1333
|
+
case "ValidationException":
|
|
1334
|
+
case "com.amazonaws.detective#ValidationException":
|
|
1335
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1336
|
+
default:
|
|
1337
|
+
const parsedBody = parsedOutput.body;
|
|
1338
|
+
return throwDefaultError({
|
|
1339
|
+
output,
|
|
1340
|
+
parsedBody,
|
|
1341
|
+
errorCode,
|
|
1342
|
+
});
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1083
1345
|
export const de_ListInvitationsCommand = async (output, context) => {
|
|
1084
1346
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1085
1347
|
return de_ListInvitationsCommandError(output, context);
|
|
@@ -1289,6 +1551,51 @@ const de_RejectInvitationCommandError = async (output, context) => {
|
|
|
1289
1551
|
});
|
|
1290
1552
|
}
|
|
1291
1553
|
};
|
|
1554
|
+
export const de_StartInvestigationCommand = async (output, context) => {
|
|
1555
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1556
|
+
return de_StartInvestigationCommandError(output, context);
|
|
1557
|
+
}
|
|
1558
|
+
const contents = map({
|
|
1559
|
+
$metadata: deserializeMetadata(output),
|
|
1560
|
+
});
|
|
1561
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1562
|
+
const doc = take(data, {
|
|
1563
|
+
InvestigationId: __expectString,
|
|
1564
|
+
});
|
|
1565
|
+
Object.assign(contents, doc);
|
|
1566
|
+
return contents;
|
|
1567
|
+
};
|
|
1568
|
+
const de_StartInvestigationCommandError = async (output, context) => {
|
|
1569
|
+
const parsedOutput = {
|
|
1570
|
+
...output,
|
|
1571
|
+
body: await parseErrorBody(output.body, context),
|
|
1572
|
+
};
|
|
1573
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1574
|
+
switch (errorCode) {
|
|
1575
|
+
case "AccessDeniedException":
|
|
1576
|
+
case "com.amazonaws.detective#AccessDeniedException":
|
|
1577
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1578
|
+
case "InternalServerException":
|
|
1579
|
+
case "com.amazonaws.detective#InternalServerException":
|
|
1580
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1581
|
+
case "ResourceNotFoundException":
|
|
1582
|
+
case "com.amazonaws.detective#ResourceNotFoundException":
|
|
1583
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1584
|
+
case "TooManyRequestsException":
|
|
1585
|
+
case "com.amazonaws.detective#TooManyRequestsException":
|
|
1586
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1587
|
+
case "ValidationException":
|
|
1588
|
+
case "com.amazonaws.detective#ValidationException":
|
|
1589
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1590
|
+
default:
|
|
1591
|
+
const parsedBody = parsedOutput.body;
|
|
1592
|
+
return throwDefaultError({
|
|
1593
|
+
output,
|
|
1594
|
+
parsedBody,
|
|
1595
|
+
errorCode,
|
|
1596
|
+
});
|
|
1597
|
+
}
|
|
1598
|
+
};
|
|
1292
1599
|
export const de_StartMonitoringMemberCommand = async (output, context) => {
|
|
1293
1600
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1294
1601
|
return de_StartMonitoringMemberCommandError(output, context);
|
|
@@ -1450,6 +1757,47 @@ const de_UpdateDatasourcePackagesCommandError = async (output, context) => {
|
|
|
1450
1757
|
});
|
|
1451
1758
|
}
|
|
1452
1759
|
};
|
|
1760
|
+
export const de_UpdateInvestigationStateCommand = async (output, context) => {
|
|
1761
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1762
|
+
return de_UpdateInvestigationStateCommandError(output, context);
|
|
1763
|
+
}
|
|
1764
|
+
const contents = map({
|
|
1765
|
+
$metadata: deserializeMetadata(output),
|
|
1766
|
+
});
|
|
1767
|
+
await collectBody(output.body, context);
|
|
1768
|
+
return contents;
|
|
1769
|
+
};
|
|
1770
|
+
const de_UpdateInvestigationStateCommandError = async (output, context) => {
|
|
1771
|
+
const parsedOutput = {
|
|
1772
|
+
...output,
|
|
1773
|
+
body: await parseErrorBody(output.body, context),
|
|
1774
|
+
};
|
|
1775
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1776
|
+
switch (errorCode) {
|
|
1777
|
+
case "AccessDeniedException":
|
|
1778
|
+
case "com.amazonaws.detective#AccessDeniedException":
|
|
1779
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1780
|
+
case "InternalServerException":
|
|
1781
|
+
case "com.amazonaws.detective#InternalServerException":
|
|
1782
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1783
|
+
case "ResourceNotFoundException":
|
|
1784
|
+
case "com.amazonaws.detective#ResourceNotFoundException":
|
|
1785
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1786
|
+
case "TooManyRequestsException":
|
|
1787
|
+
case "com.amazonaws.detective#TooManyRequestsException":
|
|
1788
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1789
|
+
case "ValidationException":
|
|
1790
|
+
case "com.amazonaws.detective#ValidationException":
|
|
1791
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1792
|
+
default:
|
|
1793
|
+
const parsedBody = parsedOutput.body;
|
|
1794
|
+
return throwDefaultError({
|
|
1795
|
+
output,
|
|
1796
|
+
parsedBody,
|
|
1797
|
+
errorCode,
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
};
|
|
1453
1801
|
export const de_UpdateOrganizationConfigurationCommand = async (output, context) => {
|
|
1454
1802
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1455
1803
|
return de_UpdateOrganizationConfigurationCommandError(output, context);
|
|
@@ -1587,6 +1935,21 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
1587
1935
|
});
|
|
1588
1936
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1589
1937
|
};
|
|
1938
|
+
const se_DateFilter = (input, context) => {
|
|
1939
|
+
return take(input, {
|
|
1940
|
+
EndInclusive: (_) => _.toISOString().split(".")[0] + "Z",
|
|
1941
|
+
StartInclusive: (_) => _.toISOString().split(".")[0] + "Z",
|
|
1942
|
+
});
|
|
1943
|
+
};
|
|
1944
|
+
const se_FilterCriteria = (input, context) => {
|
|
1945
|
+
return take(input, {
|
|
1946
|
+
CreatedTime: (_) => se_DateFilter(_, context),
|
|
1947
|
+
EntityArn: _json,
|
|
1948
|
+
Severity: _json,
|
|
1949
|
+
State: _json,
|
|
1950
|
+
Status: _json,
|
|
1951
|
+
});
|
|
1952
|
+
};
|
|
1590
1953
|
const de_Administrator = (output, context) => {
|
|
1591
1954
|
return take(output, {
|
|
1592
1955
|
AccountId: __expectString,
|
|
@@ -1646,6 +2009,25 @@ const de_GraphList = (output, context) => {
|
|
|
1646
2009
|
});
|
|
1647
2010
|
return retVal;
|
|
1648
2011
|
};
|
|
2012
|
+
const de_InvestigationDetail = (output, context) => {
|
|
2013
|
+
return take(output, {
|
|
2014
|
+
CreatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2015
|
+
EntityArn: __expectString,
|
|
2016
|
+
EntityType: __expectString,
|
|
2017
|
+
InvestigationId: __expectString,
|
|
2018
|
+
Severity: __expectString,
|
|
2019
|
+
State: __expectString,
|
|
2020
|
+
Status: __expectString,
|
|
2021
|
+
});
|
|
2022
|
+
};
|
|
2023
|
+
const de_InvestigationDetails = (output, context) => {
|
|
2024
|
+
const retVal = (output || [])
|
|
2025
|
+
.filter((e) => e != null)
|
|
2026
|
+
.map((entry) => {
|
|
2027
|
+
return de_InvestigationDetail(entry, context);
|
|
2028
|
+
});
|
|
2029
|
+
return retVal;
|
|
2030
|
+
};
|
|
1649
2031
|
const de_LastIngestStateChangeDates = (output, context) => {
|
|
1650
2032
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1651
2033
|
if (value === null) {
|