@aws-sdk/client-guardduty 3.105.0 → 3.111.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/CHANGELOG.md +27 -0
- package/README.md +15 -13
- package/dist-cjs/GuardDuty.js +60 -0
- package/dist-cjs/commands/AcceptAdministratorInvitationCommand.js +36 -0
- package/dist-cjs/commands/DisassociateFromAdministratorAccountCommand.js +36 -0
- package/dist-cjs/commands/GetAdministratorAccountCommand.js +36 -0
- package/dist-cjs/commands/GetRemainingFreeTrialDaysCommand.js +36 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/models/models_0.js +97 -13
- package/dist-cjs/protocols/Aws_restJson1.js +364 -5
- package/dist-es/GuardDuty.js +60 -0
- package/dist-es/commands/AcceptAdministratorInvitationCommand.js +39 -0
- package/dist-es/commands/DisassociateFromAdministratorAccountCommand.js +39 -0
- package/dist-es/commands/GetAdministratorAccountCommand.js +39 -0
- package/dist-es/commands/GetRemainingFreeTrialDaysCommand.js +39 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +64 -8
- package/dist-es/protocols/Aws_restJson1.js +451 -2
- package/dist-types/GuardDuty.d.ts +47 -11
- package/dist-types/GuardDutyClient.d.ts +14 -8
- package/dist-types/commands/AcceptAdministratorInvitationCommand.d.ts +35 -0
- package/dist-types/commands/AcceptInvitationCommand.d.ts +2 -0
- package/dist-types/commands/DisassociateFromAdministratorAccountCommand.d.ts +35 -0
- package/dist-types/commands/DisassociateFromMasterAccountCommand.d.ts +2 -0
- package/dist-types/commands/DisassociateMembersCommand.d.ts +1 -2
- package/dist-types/commands/GetAdministratorAccountCommand.d.ts +36 -0
- package/dist-types/commands/GetMasterAccountCommand.d.ts +2 -0
- package/dist-types/commands/GetRemainingFreeTrialDaysCommand.d.ts +35 -0
- package/dist-types/commands/GetUsageStatisticsCommand.d.ts +3 -3
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +258 -8
- package/dist-types/protocols/Aws_restJson1.d.ts +12 -0
- package/dist-types/ts3.4/GuardDuty.d.ts +20 -0
- package/dist-types/ts3.4/GuardDutyClient.d.ts +6 -2
- package/dist-types/ts3.4/commands/AcceptAdministratorInvitationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DisassociateFromAdministratorAccountCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetAdministratorAccountCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetRemainingFreeTrialDaysCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +157 -7
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +29 -29
|
@@ -1,13 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.deserializeAws_restJson1UpdateThreatIntelSetCommand = exports.deserializeAws_restJson1UpdatePublishingDestinationCommand = exports.deserializeAws_restJson1UpdateOrganizationConfigurationCommand = exports.deserializeAws_restJson1UpdateMemberDetectorsCommand = exports.deserializeAws_restJson1UpdateIPSetCommand = exports.deserializeAws_restJson1UpdateFindingsFeedbackCommand = exports.deserializeAws_restJson1UpdateFilterCommand = exports.deserializeAws_restJson1UpdateDetectorCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1UnarchiveFindingsCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopMonitoringMembersCommand = exports.deserializeAws_restJson1StartMonitoringMembersCommand = exports.deserializeAws_restJson1ListThreatIntelSetsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListPublishingDestinationsCommand = void 0;
|
|
3
|
+
exports.serializeAws_restJson1StartMonitoringMembersCommand = exports.serializeAws_restJson1ListThreatIntelSetsCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListPublishingDestinationsCommand = exports.serializeAws_restJson1ListOrganizationAdminAccountsCommand = exports.serializeAws_restJson1ListMembersCommand = exports.serializeAws_restJson1ListIPSetsCommand = exports.serializeAws_restJson1ListInvitationsCommand = exports.serializeAws_restJson1ListFindingsCommand = exports.serializeAws_restJson1ListFiltersCommand = exports.serializeAws_restJson1ListDetectorsCommand = exports.serializeAws_restJson1InviteMembersCommand = exports.serializeAws_restJson1GetUsageStatisticsCommand = exports.serializeAws_restJson1GetThreatIntelSetCommand = exports.serializeAws_restJson1GetRemainingFreeTrialDaysCommand = exports.serializeAws_restJson1GetMembersCommand = exports.serializeAws_restJson1GetMemberDetectorsCommand = exports.serializeAws_restJson1GetMasterAccountCommand = exports.serializeAws_restJson1GetIPSetCommand = exports.serializeAws_restJson1GetInvitationsCountCommand = exports.serializeAws_restJson1GetFindingsStatisticsCommand = exports.serializeAws_restJson1GetFindingsCommand = exports.serializeAws_restJson1GetFilterCommand = exports.serializeAws_restJson1GetDetectorCommand = exports.serializeAws_restJson1GetAdministratorAccountCommand = exports.serializeAws_restJson1EnableOrganizationAdminAccountCommand = exports.serializeAws_restJson1DisassociateMembersCommand = exports.serializeAws_restJson1DisassociateFromMasterAccountCommand = exports.serializeAws_restJson1DisassociateFromAdministratorAccountCommand = exports.serializeAws_restJson1DisableOrganizationAdminAccountCommand = exports.serializeAws_restJson1DescribePublishingDestinationCommand = exports.serializeAws_restJson1DescribeOrganizationConfigurationCommand = exports.serializeAws_restJson1DeleteThreatIntelSetCommand = exports.serializeAws_restJson1DeletePublishingDestinationCommand = exports.serializeAws_restJson1DeleteMembersCommand = exports.serializeAws_restJson1DeleteIPSetCommand = exports.serializeAws_restJson1DeleteInvitationsCommand = exports.serializeAws_restJson1DeleteFilterCommand = exports.serializeAws_restJson1DeleteDetectorCommand = exports.serializeAws_restJson1DeclineInvitationsCommand = exports.serializeAws_restJson1CreateThreatIntelSetCommand = exports.serializeAws_restJson1CreateSampleFindingsCommand = exports.serializeAws_restJson1CreatePublishingDestinationCommand = exports.serializeAws_restJson1CreateMembersCommand = exports.serializeAws_restJson1CreateIPSetCommand = exports.serializeAws_restJson1CreateFilterCommand = exports.serializeAws_restJson1CreateDetectorCommand = exports.serializeAws_restJson1ArchiveFindingsCommand = exports.serializeAws_restJson1AcceptInvitationCommand = exports.serializeAws_restJson1AcceptAdministratorInvitationCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1GetUsageStatisticsCommand = exports.deserializeAws_restJson1GetThreatIntelSetCommand = exports.deserializeAws_restJson1GetRemainingFreeTrialDaysCommand = exports.deserializeAws_restJson1GetMembersCommand = exports.deserializeAws_restJson1GetMemberDetectorsCommand = exports.deserializeAws_restJson1GetMasterAccountCommand = exports.deserializeAws_restJson1GetIPSetCommand = exports.deserializeAws_restJson1GetInvitationsCountCommand = exports.deserializeAws_restJson1GetFindingsStatisticsCommand = exports.deserializeAws_restJson1GetFindingsCommand = exports.deserializeAws_restJson1GetFilterCommand = exports.deserializeAws_restJson1GetDetectorCommand = exports.deserializeAws_restJson1GetAdministratorAccountCommand = exports.deserializeAws_restJson1EnableOrganizationAdminAccountCommand = exports.deserializeAws_restJson1DisassociateMembersCommand = exports.deserializeAws_restJson1DisassociateFromMasterAccountCommand = exports.deserializeAws_restJson1DisassociateFromAdministratorAccountCommand = exports.deserializeAws_restJson1DisableOrganizationAdminAccountCommand = exports.deserializeAws_restJson1DescribePublishingDestinationCommand = exports.deserializeAws_restJson1DescribeOrganizationConfigurationCommand = exports.deserializeAws_restJson1DeleteThreatIntelSetCommand = exports.deserializeAws_restJson1DeletePublishingDestinationCommand = exports.deserializeAws_restJson1DeleteMembersCommand = exports.deserializeAws_restJson1DeleteIPSetCommand = exports.deserializeAws_restJson1DeleteInvitationsCommand = exports.deserializeAws_restJson1DeleteFilterCommand = exports.deserializeAws_restJson1DeleteDetectorCommand = exports.deserializeAws_restJson1DeclineInvitationsCommand = exports.deserializeAws_restJson1CreateThreatIntelSetCommand = exports.deserializeAws_restJson1CreateSampleFindingsCommand = exports.deserializeAws_restJson1CreatePublishingDestinationCommand = exports.deserializeAws_restJson1CreateMembersCommand = exports.deserializeAws_restJson1CreateIPSetCommand = exports.deserializeAws_restJson1CreateFilterCommand = exports.deserializeAws_restJson1CreateDetectorCommand = exports.deserializeAws_restJson1ArchiveFindingsCommand = exports.deserializeAws_restJson1AcceptInvitationCommand = exports.deserializeAws_restJson1AcceptAdministratorInvitationCommand = exports.serializeAws_restJson1UpdateThreatIntelSetCommand = exports.serializeAws_restJson1UpdatePublishingDestinationCommand = exports.serializeAws_restJson1UpdateOrganizationConfigurationCommand = exports.serializeAws_restJson1UpdateMemberDetectorsCommand = exports.serializeAws_restJson1UpdateIPSetCommand = exports.serializeAws_restJson1UpdateFindingsFeedbackCommand = exports.serializeAws_restJson1UpdateFilterCommand = exports.serializeAws_restJson1UpdateDetectorCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1UnarchiveFindingsCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopMonitoringMembersCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateThreatIntelSetCommand = exports.deserializeAws_restJson1UpdatePublishingDestinationCommand = exports.deserializeAws_restJson1UpdateOrganizationConfigurationCommand = exports.deserializeAws_restJson1UpdateMemberDetectorsCommand = exports.deserializeAws_restJson1UpdateIPSetCommand = exports.deserializeAws_restJson1UpdateFindingsFeedbackCommand = exports.deserializeAws_restJson1UpdateFilterCommand = exports.deserializeAws_restJson1UpdateDetectorCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1UnarchiveFindingsCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopMonitoringMembersCommand = exports.deserializeAws_restJson1StartMonitoringMembersCommand = exports.deserializeAws_restJson1ListThreatIntelSetsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListPublishingDestinationsCommand = exports.deserializeAws_restJson1ListOrganizationAdminAccountsCommand = exports.deserializeAws_restJson1ListMembersCommand = exports.deserializeAws_restJson1ListIPSetsCommand = exports.deserializeAws_restJson1ListInvitationsCommand = exports.deserializeAws_restJson1ListFindingsCommand = exports.deserializeAws_restJson1ListFiltersCommand = exports.deserializeAws_restJson1ListDetectorsCommand = exports.deserializeAws_restJson1InviteMembersCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
9
9
|
const GuardDutyServiceException_1 = require("../models/GuardDutyServiceException");
|
|
10
10
|
const models_0_1 = require("../models/models_0");
|
|
11
|
+
const serializeAws_restJson1AcceptAdministratorInvitationCommand = async (input, context) => {
|
|
12
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
13
|
+
const headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/administrator";
|
|
17
|
+
if (input.DetectorId !== undefined) {
|
|
18
|
+
const labelValue = input.DetectorId;
|
|
19
|
+
if (labelValue.length <= 0) {
|
|
20
|
+
throw new Error("Empty value provided for input HTTP label: DetectorId.");
|
|
21
|
+
}
|
|
22
|
+
resolvedPath = resolvedPath.replace("{DetectorId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
throw new Error("No value provided for input HTTP label: DetectorId.");
|
|
26
|
+
}
|
|
27
|
+
let body;
|
|
28
|
+
body = JSON.stringify({
|
|
29
|
+
...(input.AdministratorId !== undefined &&
|
|
30
|
+
input.AdministratorId !== null && { administratorId: input.AdministratorId }),
|
|
31
|
+
...(input.InvitationId !== undefined && input.InvitationId !== null && { invitationId: input.InvitationId }),
|
|
32
|
+
});
|
|
33
|
+
return new protocol_http_1.HttpRequest({
|
|
34
|
+
protocol,
|
|
35
|
+
hostname,
|
|
36
|
+
port,
|
|
37
|
+
method: "POST",
|
|
38
|
+
headers,
|
|
39
|
+
path: resolvedPath,
|
|
40
|
+
body,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
exports.serializeAws_restJson1AcceptAdministratorInvitationCommand = serializeAws_restJson1AcceptAdministratorInvitationCommand;
|
|
11
44
|
const serializeAws_restJson1AcceptInvitationCommand = async (input, context) => {
|
|
12
45
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
13
46
|
const headers = {
|
|
@@ -656,6 +689,33 @@ const serializeAws_restJson1DisableOrganizationAdminAccountCommand = async (inpu
|
|
|
656
689
|
});
|
|
657
690
|
};
|
|
658
691
|
exports.serializeAws_restJson1DisableOrganizationAdminAccountCommand = serializeAws_restJson1DisableOrganizationAdminAccountCommand;
|
|
692
|
+
const serializeAws_restJson1DisassociateFromAdministratorAccountCommand = async (input, context) => {
|
|
693
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
694
|
+
const headers = {};
|
|
695
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
696
|
+
"/detector/{DetectorId}/administrator/disassociate";
|
|
697
|
+
if (input.DetectorId !== undefined) {
|
|
698
|
+
const labelValue = input.DetectorId;
|
|
699
|
+
if (labelValue.length <= 0) {
|
|
700
|
+
throw new Error("Empty value provided for input HTTP label: DetectorId.");
|
|
701
|
+
}
|
|
702
|
+
resolvedPath = resolvedPath.replace("{DetectorId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
703
|
+
}
|
|
704
|
+
else {
|
|
705
|
+
throw new Error("No value provided for input HTTP label: DetectorId.");
|
|
706
|
+
}
|
|
707
|
+
let body;
|
|
708
|
+
return new protocol_http_1.HttpRequest({
|
|
709
|
+
protocol,
|
|
710
|
+
hostname,
|
|
711
|
+
port,
|
|
712
|
+
method: "POST",
|
|
713
|
+
headers,
|
|
714
|
+
path: resolvedPath,
|
|
715
|
+
body,
|
|
716
|
+
});
|
|
717
|
+
};
|
|
718
|
+
exports.serializeAws_restJson1DisassociateFromAdministratorAccountCommand = serializeAws_restJson1DisassociateFromAdministratorAccountCommand;
|
|
659
719
|
const serializeAws_restJson1DisassociateFromMasterAccountCommand = async (input, context) => {
|
|
660
720
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
661
721
|
const headers = {};
|
|
@@ -738,6 +798,32 @@ const serializeAws_restJson1EnableOrganizationAdminAccountCommand = async (input
|
|
|
738
798
|
});
|
|
739
799
|
};
|
|
740
800
|
exports.serializeAws_restJson1EnableOrganizationAdminAccountCommand = serializeAws_restJson1EnableOrganizationAdminAccountCommand;
|
|
801
|
+
const serializeAws_restJson1GetAdministratorAccountCommand = async (input, context) => {
|
|
802
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
803
|
+
const headers = {};
|
|
804
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/administrator";
|
|
805
|
+
if (input.DetectorId !== undefined) {
|
|
806
|
+
const labelValue = input.DetectorId;
|
|
807
|
+
if (labelValue.length <= 0) {
|
|
808
|
+
throw new Error("Empty value provided for input HTTP label: DetectorId.");
|
|
809
|
+
}
|
|
810
|
+
resolvedPath = resolvedPath.replace("{DetectorId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
811
|
+
}
|
|
812
|
+
else {
|
|
813
|
+
throw new Error("No value provided for input HTTP label: DetectorId.");
|
|
814
|
+
}
|
|
815
|
+
let body;
|
|
816
|
+
return new protocol_http_1.HttpRequest({
|
|
817
|
+
protocol,
|
|
818
|
+
hostname,
|
|
819
|
+
port,
|
|
820
|
+
method: "GET",
|
|
821
|
+
headers,
|
|
822
|
+
path: resolvedPath,
|
|
823
|
+
body,
|
|
824
|
+
});
|
|
825
|
+
};
|
|
826
|
+
exports.serializeAws_restJson1GetAdministratorAccountCommand = serializeAws_restJson1GetAdministratorAccountCommand;
|
|
741
827
|
const serializeAws_restJson1GetDetectorCommand = async (input, context) => {
|
|
742
828
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
743
829
|
const headers = {};
|
|
@@ -1020,6 +1106,39 @@ const serializeAws_restJson1GetMembersCommand = async (input, context) => {
|
|
|
1020
1106
|
});
|
|
1021
1107
|
};
|
|
1022
1108
|
exports.serializeAws_restJson1GetMembersCommand = serializeAws_restJson1GetMembersCommand;
|
|
1109
|
+
const serializeAws_restJson1GetRemainingFreeTrialDaysCommand = async (input, context) => {
|
|
1110
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1111
|
+
const headers = {
|
|
1112
|
+
"content-type": "application/json",
|
|
1113
|
+
};
|
|
1114
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1115
|
+
"/detector/{DetectorId}/freeTrial/daysRemaining";
|
|
1116
|
+
if (input.DetectorId !== undefined) {
|
|
1117
|
+
const labelValue = input.DetectorId;
|
|
1118
|
+
if (labelValue.length <= 0) {
|
|
1119
|
+
throw new Error("Empty value provided for input HTTP label: DetectorId.");
|
|
1120
|
+
}
|
|
1121
|
+
resolvedPath = resolvedPath.replace("{DetectorId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1122
|
+
}
|
|
1123
|
+
else {
|
|
1124
|
+
throw new Error("No value provided for input HTTP label: DetectorId.");
|
|
1125
|
+
}
|
|
1126
|
+
let body;
|
|
1127
|
+
body = JSON.stringify({
|
|
1128
|
+
...(input.AccountIds !== undefined &&
|
|
1129
|
+
input.AccountIds !== null && { accountIds: serializeAws_restJson1AccountIds(input.AccountIds, context) }),
|
|
1130
|
+
});
|
|
1131
|
+
return new protocol_http_1.HttpRequest({
|
|
1132
|
+
protocol,
|
|
1133
|
+
hostname,
|
|
1134
|
+
port,
|
|
1135
|
+
method: "POST",
|
|
1136
|
+
headers,
|
|
1137
|
+
path: resolvedPath,
|
|
1138
|
+
body,
|
|
1139
|
+
});
|
|
1140
|
+
};
|
|
1141
|
+
exports.serializeAws_restJson1GetRemainingFreeTrialDaysCommand = serializeAws_restJson1GetRemainingFreeTrialDaysCommand;
|
|
1023
1142
|
const serializeAws_restJson1GetThreatIntelSetCommand = async (input, context) => {
|
|
1024
1143
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1025
1144
|
const headers = {};
|
|
@@ -1895,6 +2014,42 @@ const serializeAws_restJson1UpdateThreatIntelSetCommand = async (input, context)
|
|
|
1895
2014
|
});
|
|
1896
2015
|
};
|
|
1897
2016
|
exports.serializeAws_restJson1UpdateThreatIntelSetCommand = serializeAws_restJson1UpdateThreatIntelSetCommand;
|
|
2017
|
+
const deserializeAws_restJson1AcceptAdministratorInvitationCommand = async (output, context) => {
|
|
2018
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2019
|
+
return deserializeAws_restJson1AcceptAdministratorInvitationCommandError(output, context);
|
|
2020
|
+
}
|
|
2021
|
+
const contents = {
|
|
2022
|
+
$metadata: deserializeMetadata(output),
|
|
2023
|
+
};
|
|
2024
|
+
await collectBody(output.body, context);
|
|
2025
|
+
return Promise.resolve(contents);
|
|
2026
|
+
};
|
|
2027
|
+
exports.deserializeAws_restJson1AcceptAdministratorInvitationCommand = deserializeAws_restJson1AcceptAdministratorInvitationCommand;
|
|
2028
|
+
const deserializeAws_restJson1AcceptAdministratorInvitationCommandError = async (output, context) => {
|
|
2029
|
+
const parsedOutput = {
|
|
2030
|
+
...output,
|
|
2031
|
+
body: await parseBody(output.body, context),
|
|
2032
|
+
};
|
|
2033
|
+
let response;
|
|
2034
|
+
let errorCode = "UnknownError";
|
|
2035
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2036
|
+
switch (errorCode) {
|
|
2037
|
+
case "BadRequestException":
|
|
2038
|
+
case "com.amazonaws.guardduty#BadRequestException":
|
|
2039
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2040
|
+
case "InternalServerErrorException":
|
|
2041
|
+
case "com.amazonaws.guardduty#InternalServerErrorException":
|
|
2042
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2043
|
+
default:
|
|
2044
|
+
const parsedBody = parsedOutput.body;
|
|
2045
|
+
response = new GuardDutyServiceException_1.GuardDutyServiceException({
|
|
2046
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2047
|
+
$fault: "client",
|
|
2048
|
+
$metadata: deserializeMetadata(output),
|
|
2049
|
+
});
|
|
2050
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2051
|
+
}
|
|
2052
|
+
};
|
|
1898
2053
|
const deserializeAws_restJson1AcceptInvitationCommand = async (output, context) => {
|
|
1899
2054
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1900
2055
|
return deserializeAws_restJson1AcceptInvitationCommandError(output, context);
|
|
@@ -2683,6 +2838,42 @@ const deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = asyn
|
|
|
2683
2838
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2684
2839
|
}
|
|
2685
2840
|
};
|
|
2841
|
+
const deserializeAws_restJson1DisassociateFromAdministratorAccountCommand = async (output, context) => {
|
|
2842
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2843
|
+
return deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError(output, context);
|
|
2844
|
+
}
|
|
2845
|
+
const contents = {
|
|
2846
|
+
$metadata: deserializeMetadata(output),
|
|
2847
|
+
};
|
|
2848
|
+
await collectBody(output.body, context);
|
|
2849
|
+
return Promise.resolve(contents);
|
|
2850
|
+
};
|
|
2851
|
+
exports.deserializeAws_restJson1DisassociateFromAdministratorAccountCommand = deserializeAws_restJson1DisassociateFromAdministratorAccountCommand;
|
|
2852
|
+
const deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError = async (output, context) => {
|
|
2853
|
+
const parsedOutput = {
|
|
2854
|
+
...output,
|
|
2855
|
+
body: await parseBody(output.body, context),
|
|
2856
|
+
};
|
|
2857
|
+
let response;
|
|
2858
|
+
let errorCode = "UnknownError";
|
|
2859
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2860
|
+
switch (errorCode) {
|
|
2861
|
+
case "BadRequestException":
|
|
2862
|
+
case "com.amazonaws.guardduty#BadRequestException":
|
|
2863
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2864
|
+
case "InternalServerErrorException":
|
|
2865
|
+
case "com.amazonaws.guardduty#InternalServerErrorException":
|
|
2866
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
2867
|
+
default:
|
|
2868
|
+
const parsedBody = parsedOutput.body;
|
|
2869
|
+
response = new GuardDutyServiceException_1.GuardDutyServiceException({
|
|
2870
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2871
|
+
$fault: "client",
|
|
2872
|
+
$metadata: deserializeMetadata(output),
|
|
2873
|
+
});
|
|
2874
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2875
|
+
}
|
|
2876
|
+
};
|
|
2686
2877
|
const deserializeAws_restJson1DisassociateFromMasterAccountCommand = async (output, context) => {
|
|
2687
2878
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2688
2879
|
return deserializeAws_restJson1DisassociateFromMasterAccountCommandError(output, context);
|
|
@@ -2795,6 +2986,46 @@ const deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = async
|
|
|
2795
2986
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2796
2987
|
}
|
|
2797
2988
|
};
|
|
2989
|
+
const deserializeAws_restJson1GetAdministratorAccountCommand = async (output, context) => {
|
|
2990
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2991
|
+
return deserializeAws_restJson1GetAdministratorAccountCommandError(output, context);
|
|
2992
|
+
}
|
|
2993
|
+
const contents = {
|
|
2994
|
+
$metadata: deserializeMetadata(output),
|
|
2995
|
+
Administrator: undefined,
|
|
2996
|
+
};
|
|
2997
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2998
|
+
if (data.administrator !== undefined && data.administrator !== null) {
|
|
2999
|
+
contents.Administrator = deserializeAws_restJson1Administrator(data.administrator, context);
|
|
3000
|
+
}
|
|
3001
|
+
return Promise.resolve(contents);
|
|
3002
|
+
};
|
|
3003
|
+
exports.deserializeAws_restJson1GetAdministratorAccountCommand = deserializeAws_restJson1GetAdministratorAccountCommand;
|
|
3004
|
+
const deserializeAws_restJson1GetAdministratorAccountCommandError = async (output, context) => {
|
|
3005
|
+
const parsedOutput = {
|
|
3006
|
+
...output,
|
|
3007
|
+
body: await parseBody(output.body, context),
|
|
3008
|
+
};
|
|
3009
|
+
let response;
|
|
3010
|
+
let errorCode = "UnknownError";
|
|
3011
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3012
|
+
switch (errorCode) {
|
|
3013
|
+
case "BadRequestException":
|
|
3014
|
+
case "com.amazonaws.guardduty#BadRequestException":
|
|
3015
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3016
|
+
case "InternalServerErrorException":
|
|
3017
|
+
case "com.amazonaws.guardduty#InternalServerErrorException":
|
|
3018
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3019
|
+
default:
|
|
3020
|
+
const parsedBody = parsedOutput.body;
|
|
3021
|
+
response = new GuardDutyServiceException_1.GuardDutyServiceException({
|
|
3022
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3023
|
+
$fault: "client",
|
|
3024
|
+
$metadata: deserializeMetadata(output),
|
|
3025
|
+
});
|
|
3026
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3027
|
+
}
|
|
3028
|
+
};
|
|
2798
3029
|
const deserializeAws_restJson1GetDetectorCommand = async (output, context) => {
|
|
2799
3030
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2800
3031
|
return deserializeAws_restJson1GetDetectorCommandError(output, context);
|
|
@@ -3223,6 +3454,50 @@ const deserializeAws_restJson1GetMembersCommandError = async (output, context) =
|
|
|
3223
3454
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3224
3455
|
}
|
|
3225
3456
|
};
|
|
3457
|
+
const deserializeAws_restJson1GetRemainingFreeTrialDaysCommand = async (output, context) => {
|
|
3458
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3459
|
+
return deserializeAws_restJson1GetRemainingFreeTrialDaysCommandError(output, context);
|
|
3460
|
+
}
|
|
3461
|
+
const contents = {
|
|
3462
|
+
$metadata: deserializeMetadata(output),
|
|
3463
|
+
Accounts: undefined,
|
|
3464
|
+
UnprocessedAccounts: undefined,
|
|
3465
|
+
};
|
|
3466
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3467
|
+
if (data.accounts !== undefined && data.accounts !== null) {
|
|
3468
|
+
contents.Accounts = deserializeAws_restJson1AccountFreeTrialInfos(data.accounts, context);
|
|
3469
|
+
}
|
|
3470
|
+
if (data.unprocessedAccounts !== undefined && data.unprocessedAccounts !== null) {
|
|
3471
|
+
contents.UnprocessedAccounts = deserializeAws_restJson1UnprocessedAccounts(data.unprocessedAccounts, context);
|
|
3472
|
+
}
|
|
3473
|
+
return Promise.resolve(contents);
|
|
3474
|
+
};
|
|
3475
|
+
exports.deserializeAws_restJson1GetRemainingFreeTrialDaysCommand = deserializeAws_restJson1GetRemainingFreeTrialDaysCommand;
|
|
3476
|
+
const deserializeAws_restJson1GetRemainingFreeTrialDaysCommandError = async (output, context) => {
|
|
3477
|
+
const parsedOutput = {
|
|
3478
|
+
...output,
|
|
3479
|
+
body: await parseBody(output.body, context),
|
|
3480
|
+
};
|
|
3481
|
+
let response;
|
|
3482
|
+
let errorCode = "UnknownError";
|
|
3483
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3484
|
+
switch (errorCode) {
|
|
3485
|
+
case "BadRequestException":
|
|
3486
|
+
case "com.amazonaws.guardduty#BadRequestException":
|
|
3487
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3488
|
+
case "InternalServerErrorException":
|
|
3489
|
+
case "com.amazonaws.guardduty#InternalServerErrorException":
|
|
3490
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
3491
|
+
default:
|
|
3492
|
+
const parsedBody = parsedOutput.body;
|
|
3493
|
+
response = new GuardDutyServiceException_1.GuardDutyServiceException({
|
|
3494
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3495
|
+
$fault: "client",
|
|
3496
|
+
$metadata: deserializeMetadata(output),
|
|
3497
|
+
});
|
|
3498
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3499
|
+
}
|
|
3500
|
+
};
|
|
3226
3501
|
const deserializeAws_restJson1GetThreatIntelSetCommand = async (output, context) => {
|
|
3227
3502
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3228
3503
|
return deserializeAws_restJson1GetThreatIntelSetCommandError(output, context);
|
|
@@ -4572,6 +4847,25 @@ const deserializeAws_restJson1AccessKeyDetails = (output, context) => {
|
|
|
4572
4847
|
UserType: (0, smithy_client_1.expectString)(output.userType),
|
|
4573
4848
|
};
|
|
4574
4849
|
};
|
|
4850
|
+
const deserializeAws_restJson1AccountFreeTrialInfo = (output, context) => {
|
|
4851
|
+
return {
|
|
4852
|
+
AccountId: (0, smithy_client_1.expectString)(output.accountId),
|
|
4853
|
+
DataSources: output.dataSources !== undefined && output.dataSources !== null
|
|
4854
|
+
? deserializeAws_restJson1DataSourcesFreeTrial(output.dataSources, context)
|
|
4855
|
+
: undefined,
|
|
4856
|
+
};
|
|
4857
|
+
};
|
|
4858
|
+
const deserializeAws_restJson1AccountFreeTrialInfos = (output, context) => {
|
|
4859
|
+
const retVal = (output || [])
|
|
4860
|
+
.filter((e) => e != null)
|
|
4861
|
+
.map((entry) => {
|
|
4862
|
+
if (entry === null) {
|
|
4863
|
+
return null;
|
|
4864
|
+
}
|
|
4865
|
+
return deserializeAws_restJson1AccountFreeTrialInfo(entry, context);
|
|
4866
|
+
});
|
|
4867
|
+
return retVal;
|
|
4868
|
+
};
|
|
4575
4869
|
const deserializeAws_restJson1AccountLevelPermissions = (output, context) => {
|
|
4576
4870
|
return {
|
|
4577
4871
|
BlockPublicAccess: output.blockPublicAccess !== undefined && output.blockPublicAccess !== null
|
|
@@ -4616,8 +4910,30 @@ const deserializeAws_restJson1AdminAccounts = (output, context) => {
|
|
|
4616
4910
|
});
|
|
4617
4911
|
return retVal;
|
|
4618
4912
|
};
|
|
4913
|
+
const deserializeAws_restJson1Administrator = (output, context) => {
|
|
4914
|
+
return {
|
|
4915
|
+
AccountId: (0, smithy_client_1.expectString)(output.accountId),
|
|
4916
|
+
InvitationId: (0, smithy_client_1.expectString)(output.invitationId),
|
|
4917
|
+
InvitedAt: (0, smithy_client_1.expectString)(output.invitedAt),
|
|
4918
|
+
RelationshipStatus: (0, smithy_client_1.expectString)(output.relationshipStatus),
|
|
4919
|
+
};
|
|
4920
|
+
};
|
|
4921
|
+
const deserializeAws_restJson1AffectedResources = (output, context) => {
|
|
4922
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
4923
|
+
if (value === null) {
|
|
4924
|
+
return acc;
|
|
4925
|
+
}
|
|
4926
|
+
return {
|
|
4927
|
+
...acc,
|
|
4928
|
+
[key]: (0, smithy_client_1.expectString)(value),
|
|
4929
|
+
};
|
|
4930
|
+
}, {});
|
|
4931
|
+
};
|
|
4619
4932
|
const deserializeAws_restJson1AwsApiCallAction = (output, context) => {
|
|
4620
4933
|
return {
|
|
4934
|
+
AffectedResources: output.affectedResources !== undefined && output.affectedResources !== null
|
|
4935
|
+
? deserializeAws_restJson1AffectedResources(output.affectedResources, context)
|
|
4936
|
+
: undefined,
|
|
4621
4937
|
Api: (0, smithy_client_1.expectString)(output.api),
|
|
4622
4938
|
CallerType: (0, smithy_client_1.expectString)(output.callerType),
|
|
4623
4939
|
DomainDetails: output.domainDetails !== undefined && output.domainDetails !== null
|
|
@@ -4764,6 +5080,30 @@ const deserializeAws_restJson1DataSourceConfigurationsResult = (output, context)
|
|
|
4764
5080
|
: undefined,
|
|
4765
5081
|
};
|
|
4766
5082
|
};
|
|
5083
|
+
const deserializeAws_restJson1DataSourceFreeTrial = (output, context) => {
|
|
5084
|
+
return {
|
|
5085
|
+
FreeTrialDaysRemaining: (0, smithy_client_1.expectInt32)(output.freeTrialDaysRemaining),
|
|
5086
|
+
};
|
|
5087
|
+
};
|
|
5088
|
+
const deserializeAws_restJson1DataSourcesFreeTrial = (output, context) => {
|
|
5089
|
+
return {
|
|
5090
|
+
CloudTrail: output.cloudTrail !== undefined && output.cloudTrail !== null
|
|
5091
|
+
? deserializeAws_restJson1DataSourceFreeTrial(output.cloudTrail, context)
|
|
5092
|
+
: undefined,
|
|
5093
|
+
DnsLogs: output.dnsLogs !== undefined && output.dnsLogs !== null
|
|
5094
|
+
? deserializeAws_restJson1DataSourceFreeTrial(output.dnsLogs, context)
|
|
5095
|
+
: undefined,
|
|
5096
|
+
FlowLogs: output.flowLogs !== undefined && output.flowLogs !== null
|
|
5097
|
+
? deserializeAws_restJson1DataSourceFreeTrial(output.flowLogs, context)
|
|
5098
|
+
: undefined,
|
|
5099
|
+
Kubernetes: output.kubernetes !== undefined && output.kubernetes !== null
|
|
5100
|
+
? deserializeAws_restJson1KubernetesDataSourceFreeTrial(output.kubernetes, context)
|
|
5101
|
+
: undefined,
|
|
5102
|
+
S3Logs: output.s3Logs !== undefined && output.s3Logs !== null
|
|
5103
|
+
? deserializeAws_restJson1DataSourceFreeTrial(output.s3Logs, context)
|
|
5104
|
+
: undefined,
|
|
5105
|
+
};
|
|
5106
|
+
};
|
|
4767
5107
|
const deserializeAws_restJson1DefaultServerSideEncryption = (output, context) => {
|
|
4768
5108
|
return {
|
|
4769
5109
|
EncryptionType: (0, smithy_client_1.expectString)(output.encryptionType),
|
|
@@ -4812,7 +5152,9 @@ const deserializeAws_restJson1DNSLogsConfigurationResult = (output, context) =>
|
|
|
4812
5152
|
};
|
|
4813
5153
|
const deserializeAws_restJson1DnsRequestAction = (output, context) => {
|
|
4814
5154
|
return {
|
|
5155
|
+
Blocked: (0, smithy_client_1.expectBoolean)(output.blocked),
|
|
4815
5156
|
Domain: (0, smithy_client_1.expectString)(output.domain),
|
|
5157
|
+
Protocol: (0, smithy_client_1.expectString)(output.protocol),
|
|
4816
5158
|
};
|
|
4817
5159
|
};
|
|
4818
5160
|
const deserializeAws_restJson1DomainDetails = (output, context) => {
|
|
@@ -5059,6 +5401,13 @@ const deserializeAws_restJson1KubernetesConfigurationResult = (output, context)
|
|
|
5059
5401
|
: undefined,
|
|
5060
5402
|
};
|
|
5061
5403
|
};
|
|
5404
|
+
const deserializeAws_restJson1KubernetesDataSourceFreeTrial = (output, context) => {
|
|
5405
|
+
return {
|
|
5406
|
+
AuditLogs: output.auditLogs !== undefined && output.auditLogs !== null
|
|
5407
|
+
? deserializeAws_restJson1DataSourceFreeTrial(output.auditLogs, context)
|
|
5408
|
+
: undefined,
|
|
5409
|
+
};
|
|
5410
|
+
};
|
|
5062
5411
|
const deserializeAws_restJson1KubernetesDetails = (output, context) => {
|
|
5063
5412
|
return {
|
|
5064
5413
|
KubernetesUserDetails: output.kubernetesUserDetails !== undefined && output.kubernetesUserDetails !== null
|
|
@@ -5115,6 +5464,7 @@ const deserializeAws_restJson1Master = (output, context) => {
|
|
|
5115
5464
|
const deserializeAws_restJson1Member = (output, context) => {
|
|
5116
5465
|
return {
|
|
5117
5466
|
AccountId: (0, smithy_client_1.expectString)(output.accountId),
|
|
5467
|
+
AdministratorId: (0, smithy_client_1.expectString)(output.administratorId),
|
|
5118
5468
|
DetectorId: (0, smithy_client_1.expectString)(output.detectorId),
|
|
5119
5469
|
Email: (0, smithy_client_1.expectString)(output.email),
|
|
5120
5470
|
InvitedAt: (0, smithy_client_1.expectString)(output.invitedAt),
|
|
@@ -5326,8 +5676,8 @@ const deserializeAws_restJson1PrivateIpAddresses = (output, context) => {
|
|
|
5326
5676
|
};
|
|
5327
5677
|
const deserializeAws_restJson1ProductCode = (output, context) => {
|
|
5328
5678
|
return {
|
|
5329
|
-
Code: (0, smithy_client_1.expectString)(output.
|
|
5330
|
-
ProductType: (0, smithy_client_1.expectString)(output.
|
|
5679
|
+
Code: (0, smithy_client_1.expectString)(output.productCodeId),
|
|
5680
|
+
ProductType: (0, smithy_client_1.expectString)(output.productCodeType),
|
|
5331
5681
|
};
|
|
5332
5682
|
};
|
|
5333
5683
|
const deserializeAws_restJson1ProductCodes = (output, context) => {
|
|
@@ -5463,6 +5813,9 @@ const deserializeAws_restJson1Service = (output, context) => {
|
|
|
5463
5813
|
Action: output.action !== undefined && output.action !== null
|
|
5464
5814
|
? deserializeAws_restJson1Action(output.action, context)
|
|
5465
5815
|
: undefined,
|
|
5816
|
+
AdditionalInfo: output.additionalInfo !== undefined && output.additionalInfo !== null
|
|
5817
|
+
? deserializeAws_restJson1ServiceAdditionalInfo(output.additionalInfo, context)
|
|
5818
|
+
: undefined,
|
|
5466
5819
|
Archived: (0, smithy_client_1.expectBoolean)(output.archived),
|
|
5467
5820
|
Count: (0, smithy_client_1.expectInt32)(output.count),
|
|
5468
5821
|
DetectorId: (0, smithy_client_1.expectString)(output.detectorId),
|
|
@@ -5476,6 +5829,12 @@ const deserializeAws_restJson1Service = (output, context) => {
|
|
|
5476
5829
|
UserFeedback: (0, smithy_client_1.expectString)(output.userFeedback),
|
|
5477
5830
|
};
|
|
5478
5831
|
};
|
|
5832
|
+
const deserializeAws_restJson1ServiceAdditionalInfo = (output, context) => {
|
|
5833
|
+
return {
|
|
5834
|
+
Type: (0, smithy_client_1.expectString)(output.type),
|
|
5835
|
+
Value: (0, smithy_client_1.expectString)(output.value),
|
|
5836
|
+
};
|
|
5837
|
+
};
|
|
5479
5838
|
const deserializeAws_restJson1SourceIps = (output, context) => {
|
|
5480
5839
|
const retVal = (output || [])
|
|
5481
5840
|
.filter((e) => e != null)
|
package/dist-es/GuardDuty.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
|
+
import { AcceptAdministratorInvitationCommand, } from "./commands/AcceptAdministratorInvitationCommand";
|
|
2
3
|
import { AcceptInvitationCommand, } from "./commands/AcceptInvitationCommand";
|
|
3
4
|
import { ArchiveFindingsCommand, } from "./commands/ArchiveFindingsCommand";
|
|
4
5
|
import { CreateDetectorCommand, } from "./commands/CreateDetectorCommand";
|
|
@@ -19,9 +20,11 @@ import { DeleteThreatIntelSetCommand, } from "./commands/DeleteThreatIntelSetCom
|
|
|
19
20
|
import { DescribeOrganizationConfigurationCommand, } from "./commands/DescribeOrganizationConfigurationCommand";
|
|
20
21
|
import { DescribePublishingDestinationCommand, } from "./commands/DescribePublishingDestinationCommand";
|
|
21
22
|
import { DisableOrganizationAdminAccountCommand, } from "./commands/DisableOrganizationAdminAccountCommand";
|
|
23
|
+
import { DisassociateFromAdministratorAccountCommand, } from "./commands/DisassociateFromAdministratorAccountCommand";
|
|
22
24
|
import { DisassociateFromMasterAccountCommand, } from "./commands/DisassociateFromMasterAccountCommand";
|
|
23
25
|
import { DisassociateMembersCommand, } from "./commands/DisassociateMembersCommand";
|
|
24
26
|
import { EnableOrganizationAdminAccountCommand, } from "./commands/EnableOrganizationAdminAccountCommand";
|
|
27
|
+
import { GetAdministratorAccountCommand, } from "./commands/GetAdministratorAccountCommand";
|
|
25
28
|
import { GetDetectorCommand } from "./commands/GetDetectorCommand";
|
|
26
29
|
import { GetFilterCommand } from "./commands/GetFilterCommand";
|
|
27
30
|
import { GetFindingsCommand } from "./commands/GetFindingsCommand";
|
|
@@ -31,6 +34,7 @@ import { GetIPSetCommand } from "./commands/GetIPSetCommand";
|
|
|
31
34
|
import { GetMasterAccountCommand, } from "./commands/GetMasterAccountCommand";
|
|
32
35
|
import { GetMemberDetectorsCommand, } from "./commands/GetMemberDetectorsCommand";
|
|
33
36
|
import { GetMembersCommand } from "./commands/GetMembersCommand";
|
|
37
|
+
import { GetRemainingFreeTrialDaysCommand, } from "./commands/GetRemainingFreeTrialDaysCommand";
|
|
34
38
|
import { GetThreatIntelSetCommand, } from "./commands/GetThreatIntelSetCommand";
|
|
35
39
|
import { GetUsageStatisticsCommand, } from "./commands/GetUsageStatisticsCommand";
|
|
36
40
|
import { InviteMembersCommand, } from "./commands/InviteMembersCommand";
|
|
@@ -63,6 +67,20 @@ var GuardDuty = (function (_super) {
|
|
|
63
67
|
function GuardDuty() {
|
|
64
68
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
65
69
|
}
|
|
70
|
+
GuardDuty.prototype.acceptAdministratorInvitation = function (args, optionsOrCb, cb) {
|
|
71
|
+
var command = new AcceptAdministratorInvitationCommand(args);
|
|
72
|
+
if (typeof optionsOrCb === "function") {
|
|
73
|
+
this.send(command, optionsOrCb);
|
|
74
|
+
}
|
|
75
|
+
else if (typeof cb === "function") {
|
|
76
|
+
if (typeof optionsOrCb !== "object")
|
|
77
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
78
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return this.send(command, optionsOrCb);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
66
84
|
GuardDuty.prototype.acceptInvitation = function (args, optionsOrCb, cb) {
|
|
67
85
|
var command = new AcceptInvitationCommand(args);
|
|
68
86
|
if (typeof optionsOrCb === "function") {
|
|
@@ -343,6 +361,20 @@ var GuardDuty = (function (_super) {
|
|
|
343
361
|
return this.send(command, optionsOrCb);
|
|
344
362
|
}
|
|
345
363
|
};
|
|
364
|
+
GuardDuty.prototype.disassociateFromAdministratorAccount = function (args, optionsOrCb, cb) {
|
|
365
|
+
var command = new DisassociateFromAdministratorAccountCommand(args);
|
|
366
|
+
if (typeof optionsOrCb === "function") {
|
|
367
|
+
this.send(command, optionsOrCb);
|
|
368
|
+
}
|
|
369
|
+
else if (typeof cb === "function") {
|
|
370
|
+
if (typeof optionsOrCb !== "object")
|
|
371
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
372
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
return this.send(command, optionsOrCb);
|
|
376
|
+
}
|
|
377
|
+
};
|
|
346
378
|
GuardDuty.prototype.disassociateFromMasterAccount = function (args, optionsOrCb, cb) {
|
|
347
379
|
var command = new DisassociateFromMasterAccountCommand(args);
|
|
348
380
|
if (typeof optionsOrCb === "function") {
|
|
@@ -385,6 +417,20 @@ var GuardDuty = (function (_super) {
|
|
|
385
417
|
return this.send(command, optionsOrCb);
|
|
386
418
|
}
|
|
387
419
|
};
|
|
420
|
+
GuardDuty.prototype.getAdministratorAccount = function (args, optionsOrCb, cb) {
|
|
421
|
+
var command = new GetAdministratorAccountCommand(args);
|
|
422
|
+
if (typeof optionsOrCb === "function") {
|
|
423
|
+
this.send(command, optionsOrCb);
|
|
424
|
+
}
|
|
425
|
+
else if (typeof cb === "function") {
|
|
426
|
+
if (typeof optionsOrCb !== "object")
|
|
427
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
428
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
return this.send(command, optionsOrCb);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
388
434
|
GuardDuty.prototype.getDetector = function (args, optionsOrCb, cb) {
|
|
389
435
|
var command = new GetDetectorCommand(args);
|
|
390
436
|
if (typeof optionsOrCb === "function") {
|
|
@@ -511,6 +557,20 @@ var GuardDuty = (function (_super) {
|
|
|
511
557
|
return this.send(command, optionsOrCb);
|
|
512
558
|
}
|
|
513
559
|
};
|
|
560
|
+
GuardDuty.prototype.getRemainingFreeTrialDays = function (args, optionsOrCb, cb) {
|
|
561
|
+
var command = new GetRemainingFreeTrialDaysCommand(args);
|
|
562
|
+
if (typeof optionsOrCb === "function") {
|
|
563
|
+
this.send(command, optionsOrCb);
|
|
564
|
+
}
|
|
565
|
+
else if (typeof cb === "function") {
|
|
566
|
+
if (typeof optionsOrCb !== "object")
|
|
567
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
568
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
569
|
+
}
|
|
570
|
+
else {
|
|
571
|
+
return this.send(command, optionsOrCb);
|
|
572
|
+
}
|
|
573
|
+
};
|
|
514
574
|
GuardDuty.prototype.getThreatIntelSet = function (args, optionsOrCb, cb) {
|
|
515
575
|
var command = new GetThreatIntelSetCommand(args);
|
|
516
576
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { AcceptAdministratorInvitationRequest, AcceptAdministratorInvitationResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1AcceptAdministratorInvitationCommand, serializeAws_restJson1AcceptAdministratorInvitationCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var AcceptAdministratorInvitationCommand = (function (_super) {
|
|
7
|
+
__extends(AcceptAdministratorInvitationCommand, _super);
|
|
8
|
+
function AcceptAdministratorInvitationCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
AcceptAdministratorInvitationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "GuardDutyClient";
|
|
18
|
+
var commandName = "AcceptAdministratorInvitationCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: AcceptAdministratorInvitationRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: AcceptAdministratorInvitationResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
AcceptAdministratorInvitationCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1AcceptAdministratorInvitationCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
AcceptAdministratorInvitationCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1AcceptAdministratorInvitationCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return AcceptAdministratorInvitationCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { AcceptAdministratorInvitationCommand };
|