Skip to content

Commit f64188c

Browse files
author
awstools
committed
feat(client-guardduty): Add UnprocessedDataSources to CreateDetectorResponse which specifies the data sources that couldn't be enabled during the CreateDetector request. In addition, update documentations.
1 parent d0d60da commit f64188c

File tree

8 files changed

+761
-452
lines changed

8 files changed

+761
-452
lines changed

clients/client-guardduty/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
AWS SDK for JavaScript GuardDuty Client for Node.js, Browser and React Native.
1111

1212
<p>Amazon GuardDuty is a continuous security monitoring service that analyzes and processes
13-
the following data sources: VPC Flow Logs, AWS CloudTrail management event logs, CloudTrail S3 data event
13+
the following data sources: VPC flow logs, Amazon Web Services CloudTrail management event logs, CloudTrail S3 data event
1414
logs, EKS audit logs, and DNS logs.
1515
It uses threat intelligence
1616
feeds (such as lists of malicious IPs and domains) and machine learning to identify

clients/client-guardduty/src/GuardDuty.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ import { GuardDutyClient } from "./GuardDutyClient";
282282

283283
/**
284284
* <p>Amazon GuardDuty is a continuous security monitoring service that analyzes and processes
285-
* the following data sources: VPC Flow Logs, AWS CloudTrail management event logs, CloudTrail S3 data event
285+
* the following data sources: VPC flow logs, Amazon Web Services CloudTrail management event logs, CloudTrail S3 data event
286286
* logs, EKS audit logs, and DNS logs.
287287
* It uses threat intelligence
288288
* feeds (such as lists of malicious IPs and domains) and machine learning to identify
@@ -893,7 +893,8 @@ export class GuardDuty extends GuardDutyClient {
893893
}
894894

895895
/**
896-
* <p>Returns a list of malware scans.</p>
896+
* <p>Returns a list of malware scans. Each member account can view the malware scans for their
897+
* own accounts. An administrator can view the malware scans for all the member accounts.</p>
897898
*/
898899
public describeMalwareScans(
899900
args: DescribeMalwareScansCommandInput,
@@ -1090,8 +1091,7 @@ export class GuardDuty extends GuardDutyClient {
10901091
}
10911092

10921093
/**
1093-
* <p>Disassociates GuardDuty member accounts (to the current GuardDuty administrator account)
1094-
* specified by the account IDs.</p>
1094+
* <p>Disassociates GuardDuty member accounts (to the current administrator account) specified by the account IDs.</p>
10951095
*/
10961096
public disassociateMembers(
10971097
args: DisassociateMembersCommandInput,

clients/client-guardduty/src/GuardDutyClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ export interface GuardDutyClientResolvedConfig extends GuardDutyClientResolvedCo
502502

503503
/**
504504
* <p>Amazon GuardDuty is a continuous security monitoring service that analyzes and processes
505-
* the following data sources: VPC Flow Logs, AWS CloudTrail management event logs, CloudTrail S3 data event
505+
* the following data sources: VPC flow logs, Amazon Web Services CloudTrail management event logs, CloudTrail S3 data event
506506
* logs, EKS audit logs, and DNS logs.
507507
* It uses threat intelligence
508508
* feeds (such as lists of malicious IPs and domains) and machine learning to identify

clients/client-guardduty/src/commands/DescribeMalwareScansCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export interface DescribeMalwareScansCommandInput extends DescribeMalwareScansRe
2828
export interface DescribeMalwareScansCommandOutput extends DescribeMalwareScansResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Returns a list of malware scans.</p>
31+
* <p>Returns a list of malware scans. Each member account can view the malware scans for their
32+
* own accounts. An administrator can view the malware scans for all the member accounts.</p>
3233
* @example
3334
* Use a bare-bones client and the command you need to make an API call.
3435
* ```javascript

clients/client-guardduty/src/commands/DisassociateMembersCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export interface DisassociateMembersCommandInput extends DisassociateMembersRequ
2828
export interface DisassociateMembersCommandOutput extends DisassociateMembersResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Disassociates GuardDuty member accounts (to the current GuardDuty administrator account)
32-
* specified by the account IDs.</p>
31+
* <p>Disassociates GuardDuty member accounts (to the current administrator account) specified by the account IDs.</p>
3332
* @example
3433
* Use a bare-bones client and the command you need to make an API call.
3534
* ```javascript

clients/client-guardduty/src/models/models_0.ts

Lines changed: 99 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export interface MalwareProtectionDataSourceFreeTrial {
193193
*/
194194
export interface DataSourcesFreeTrial {
195195
/**
196-
* <p>Describes whether any AWS CloudTrail management event logs are enabled as data sources.</p>
196+
* <p>Describes whether any Amazon Web Services CloudTrail management event logs are enabled as data sources.</p>
197197
*/
198198
CloudTrail?: DataSourceFreeTrial;
199199

@@ -1029,11 +1029,67 @@ export interface CreateDetectorRequest {
10291029
Tags?: Record<string, string>;
10301030
}
10311031

1032+
/**
1033+
* <p>Describes the configuration of scanning EBS volumes as a data source.</p>
1034+
*/
1035+
export interface EbsVolumesResult {
1036+
/**
1037+
* <p>Describes whether scanning EBS volumes is enabled as a data source.</p>
1038+
*/
1039+
Status?: DataSourceStatus | string;
1040+
1041+
/**
1042+
* <p>Specifies the reason why scanning EBS volumes (Malware Protection) was not enabled as a data source.</p>
1043+
*/
1044+
Reason?: string;
1045+
}
1046+
1047+
/**
1048+
* <p>An object that contains information on the status of whether Malware Protection for EC2 instances with findings will be enabled as a data source.</p>
1049+
*/
1050+
export interface ScanEc2InstanceWithFindingsResult {
1051+
/**
1052+
* <p>Describes the configuration of scanning EBS volumes as a data source.</p>
1053+
*/
1054+
EbsVolumes?: EbsVolumesResult;
1055+
}
1056+
1057+
/**
1058+
* <p>An object that contains information on the status of all Malware Protection data sources.</p>
1059+
*/
1060+
export interface MalwareProtectionConfigurationResult {
1061+
/**
1062+
* <p>Describes the configuration of Malware Protection for EC2 instances with findings.</p>
1063+
*/
1064+
ScanEc2InstanceWithFindings?: ScanEc2InstanceWithFindingsResult;
1065+
1066+
/**
1067+
* <p>The GuardDuty Malware Protection service role.</p>
1068+
*/
1069+
ServiceRole?: string;
1070+
}
1071+
1072+
/**
1073+
* <p>Specifies the names of the data sources that couldn't be enabled.</p>
1074+
*/
1075+
export interface UnprocessedDataSourcesResult {
1076+
/**
1077+
* <p>An object that contains information on the status of all Malware Protection data sources.</p>
1078+
*/
1079+
MalwareProtection?: MalwareProtectionConfigurationResult;
1080+
}
1081+
10321082
export interface CreateDetectorResponse {
10331083
/**
10341084
* <p>The unique ID of the created detector.</p>
10351085
*/
10361086
DetectorId?: string;
1087+
1088+
/**
1089+
* <p>Specifies the data sources that couldn't be enabled when GuardDuty was enabled for the
1090+
* first time.</p>
1091+
*/
1092+
UnprocessedDataSources?: UnprocessedDataSourcesResult;
10371093
}
10381094

10391095
export enum FilterAction {
@@ -1557,41 +1613,6 @@ export interface KubernetesConfigurationResult {
15571613
AuditLogs: KubernetesAuditLogsConfigurationResult | undefined;
15581614
}
15591615

1560-
/**
1561-
* <p>Describes the configuration of scanning EBS volumes as a data source.</p>
1562-
*/
1563-
export interface EbsVolumesResult {
1564-
/**
1565-
* <p>Describes whether scanning EBS volumes is enabled as a data source.</p>
1566-
*/
1567-
Status?: DataSourceStatus | string;
1568-
}
1569-
1570-
/**
1571-
* <p>An object that contains information on the status of whether Malware Protection for EC2 instances with findings will be enabled as a data source.</p>
1572-
*/
1573-
export interface ScanEc2InstanceWithFindingsResult {
1574-
/**
1575-
* <p>Describes the configuration of scanning EBS volumes as a data source.</p>
1576-
*/
1577-
EbsVolumes?: EbsVolumesResult;
1578-
}
1579-
1580-
/**
1581-
* <p>An object that contains information on the status of all Malware Protection data sources.</p>
1582-
*/
1583-
export interface MalwareProtectionConfigurationResult {
1584-
/**
1585-
* <p>Describes the configuration of Malware Protection for EC2 instances with findings.</p>
1586-
*/
1587-
ScanEc2InstanceWithFindings?: ScanEc2InstanceWithFindingsResult;
1588-
1589-
/**
1590-
* <p>The GuardDuty Malware Protection service role.</p>
1591-
*/
1592-
ServiceRole?: string;
1593-
}
1594-
15951616
/**
15961617
* <p>Describes whether S3 data event logs will be enabled as a data source.</p>
15971618
*/
@@ -1800,7 +1821,10 @@ export interface FilterCondition {
18001821
}
18011822

18021823
/**
1803-
* <p>Represents a condition that when matched will be added to the response of the operation.</p>
1824+
* <p>Represents a condition that when matched will be added to the response of the operation.
1825+
* Irrespective of using any filter criteria, an administrator account can view the scan
1826+
* entries for all of its member accounts.
1827+
* However, each member account can view the scan entries only for their own account.</p>
18041828
*/
18051829
export interface FilterCriterion {
18061830
/**
@@ -3569,7 +3593,7 @@ export interface GetMalwareScanSettingsResponse {
35693593
ScanResourceCriteria?: ScanResourceCriteria;
35703594

35713595
/**
3572-
* <p>An enum value representing possible snapshot preservations.</p>
3596+
* <p>An enum value representing possible snapshot preservation settings.</p>
35733597
*/
35743598
EbsSnapshotPreservation?: EbsSnapshotPreservation | string;
35753599
}
@@ -4366,7 +4390,12 @@ export interface ListMembersRequest {
43664390

43674391
/**
43684392
* <p>Specifies whether to only return associated members or to return all members (including
4369-
* members who haven't been invited yet or have been disassociated).</p>
4393+
* members who haven't been invited yet or have been disassociated).
4394+
* Member accounts must have been previously associated with the GuardDuty administrator account using <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_CreateMembers.html">
4395+
* <code>Create
4396+
* Members</code>
4397+
* </a>.
4398+
* </p>
43704399
*/
43714400
OnlyAssociated?: string;
43724401
}
@@ -4713,7 +4742,7 @@ export interface UpdateMalwareScanSettingsRequest {
47134742
ScanResourceCriteria?: ScanResourceCriteria;
47144743

47154744
/**
4716-
* <p>An enum value representing possible snapshot preservations.</p>
4745+
* <p>An enum value representing possible snapshot preservation settings.</p>
47174746
*/
47184747
EbsSnapshotPreservation?: EbsSnapshotPreservation | string;
47194748
}
@@ -5249,6 +5278,36 @@ export const CreateDetectorRequestFilterSensitiveLog = (obj: CreateDetectorReque
52495278
...obj,
52505279
});
52515280

5281+
/**
5282+
* @internal
5283+
*/
5284+
export const EbsVolumesResultFilterSensitiveLog = (obj: EbsVolumesResult): any => ({
5285+
...obj,
5286+
});
5287+
5288+
/**
5289+
* @internal
5290+
*/
5291+
export const ScanEc2InstanceWithFindingsResultFilterSensitiveLog = (obj: ScanEc2InstanceWithFindingsResult): any => ({
5292+
...obj,
5293+
});
5294+
5295+
/**
5296+
* @internal
5297+
*/
5298+
export const MalwareProtectionConfigurationResultFilterSensitiveLog = (
5299+
obj: MalwareProtectionConfigurationResult
5300+
): any => ({
5301+
...obj,
5302+
});
5303+
5304+
/**
5305+
* @internal
5306+
*/
5307+
export const UnprocessedDataSourcesResultFilterSensitiveLog = (obj: UnprocessedDataSourcesResult): any => ({
5308+
...obj,
5309+
});
5310+
52525311
/**
52535312
* @internal
52545313
*/
@@ -5393,29 +5452,6 @@ export const KubernetesConfigurationResultFilterSensitiveLog = (obj: KubernetesC
53935452
...obj,
53945453
});
53955454

5396-
/**
5397-
* @internal
5398-
*/
5399-
export const EbsVolumesResultFilterSensitiveLog = (obj: EbsVolumesResult): any => ({
5400-
...obj,
5401-
});
5402-
5403-
/**
5404-
* @internal
5405-
*/
5406-
export const ScanEc2InstanceWithFindingsResultFilterSensitiveLog = (obj: ScanEc2InstanceWithFindingsResult): any => ({
5407-
...obj,
5408-
});
5409-
5410-
/**
5411-
* @internal
5412-
*/
5413-
export const MalwareProtectionConfigurationResultFilterSensitiveLog = (
5414-
obj: MalwareProtectionConfigurationResult
5415-
): any => ({
5416-
...obj,
5417-
});
5418-
54195455
/**
54205456
* @internal
54215457
*/

clients/client-guardduty/src/protocols/Aws_restJson1.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ import {
307307
Total,
308308
TriggerDetails,
309309
UnprocessedAccount,
310+
UnprocessedDataSourcesResult,
310311
UsageAccountResult,
311312
UsageCriteria,
312313
UsageDataSourceResult,
@@ -2197,6 +2198,12 @@ export const deserializeAws_restJson1CreateDetectorCommand = async (
21972198
if (data.detectorId != null) {
21982199
contents.DetectorId = __expectString(data.detectorId);
21992200
}
2201+
if (data.unprocessedDataSources != null) {
2202+
contents.UnprocessedDataSources = deserializeAws_restJson1UnprocessedDataSourcesResult(
2203+
data.unprocessedDataSources,
2204+
context
2205+
);
2206+
}
22002207
return contents;
22012208
};
22022209

@@ -5828,6 +5835,7 @@ const deserializeAws_restJson1EbsVolumeScanDetails = (output: any, context: __Se
58285835

58295836
const deserializeAws_restJson1EbsVolumesResult = (output: any, context: __SerdeContext): EbsVolumesResult => {
58305837
return {
5838+
Reason: __expectString(output.reason),
58315839
Status: __expectString(output.status),
58325840
} as any;
58335841
};
@@ -7084,6 +7092,18 @@ const deserializeAws_restJson1UnprocessedAccounts = (output: any, context: __Ser
70847092
return retVal;
70857093
};
70867094

7095+
const deserializeAws_restJson1UnprocessedDataSourcesResult = (
7096+
output: any,
7097+
context: __SerdeContext
7098+
): UnprocessedDataSourcesResult => {
7099+
return {
7100+
MalwareProtection:
7101+
output.malwareProtection != null
7102+
? deserializeAws_restJson1MalwareProtectionConfigurationResult(output.malwareProtection, context)
7103+
: undefined,
7104+
} as any;
7105+
};
7106+
70877107
const deserializeAws_restJson1UsageAccountResult = (output: any, context: __SerdeContext): UsageAccountResult => {
70887108
return {
70897109
AccountId: __expectString(output.accountId),

0 commit comments

Comments
 (0)