Skip to content

Commit

Permalink
feat(client-guardduty): Add support for new statistic types in GetFin…
Browse files Browse the repository at this point in the history
…dingsStatistics.
  • Loading branch information
awstools committed Sep 11, 2024
1 parent 33886e7 commit 85d62db
Show file tree
Hide file tree
Showing 10 changed files with 956 additions and 197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export interface CreatePublishingDestinationCommandOutput
__MetadataBearer {}

/**
* <p>Creates a publishing destination to export findings to. The resource to export findings to
* must exist before you use this operation.</p>
* <p>Creates a publishing destination where you can export your GuardDuty findings. Before you start exporting the
* findings, the destination resource must exist.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface GetDetectorCommandInput extends GetDetectorRequest {}
export interface GetDetectorCommandOutput extends GetDetectorResponse, __MetadataBearer {}

/**
* <p>Retrieves an Amazon GuardDuty detector specified by the detectorId.</p>
* <p>Retrieves a GuardDuty detector specified by the detectorId.</p>
* <p>There might be regional differences because some data sources might not be
* available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more
* information, see <a href="https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_regions.html">Regions and endpoints</a>.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export interface GetFindingsStatisticsCommandInput extends GetFindingsStatistics
export interface GetFindingsStatisticsCommandOutput extends GetFindingsStatisticsResponse, __MetadataBearer {}

/**
* <p>Lists Amazon GuardDuty findings statistics for the specified detector ID.</p>
* <p>Lists GuardDuty findings statistics for the specified detector ID.</p>
* <p>You must provide either <code>findingStatisticTypes</code> or
* <code>groupBy</code> parameter, and not both. You can use the <code>maxResults</code> and <code>orderBy</code>
* parameters only when using <code>groupBy</code>.</p>
* <p>There might be regional differences because some flags might not be available in all the Regions where GuardDuty
* is currently supported. For more information, see <a href="https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_regions.html">Regions and endpoints</a>.</p>
* @example
Expand All @@ -39,7 +42,7 @@ export interface GetFindingsStatisticsCommandOutput extends GetFindingsStatistic
* const client = new GuardDutyClient(config);
* const input = { // GetFindingsStatisticsRequest
* DetectorId: "STRING_VALUE", // required
* FindingStatisticTypes: [ // FindingStatisticTypes // required
* FindingStatisticTypes: [ // FindingStatisticTypes
* "COUNT_BY_SEVERITY",
* ],
* FindingCriteria: { // FindingCriteria
Expand Down Expand Up @@ -68,6 +71,9 @@ export interface GetFindingsStatisticsCommandOutput extends GetFindingsStatistic
* },
* },
* },
* GroupBy: "ACCOUNT" || "DATE" || "FINDING_TYPE" || "RESOURCE" || "SEVERITY",
* OrderBy: "ASC" || "DESC",
* MaxResults: Number("int"),
* };
* const command = new GetFindingsStatisticsCommand(input);
* const response = await client.send(command);
Expand All @@ -76,7 +82,46 @@ export interface GetFindingsStatisticsCommandOutput extends GetFindingsStatistic
* // CountBySeverity: { // CountBySeverity
* // "<keys>": Number("int"),
* // },
* // GroupedByAccount: [ // GroupedByAccount
* // { // AccountStatistics
* // AccountId: "STRING_VALUE",
* // LastGeneratedAt: new Date("TIMESTAMP"),
* // TotalFindings: Number("int"),
* // },
* // ],
* // GroupedByDate: [ // GroupedByDate
* // { // DateStatistics
* // Date: new Date("TIMESTAMP"),
* // LastGeneratedAt: new Date("TIMESTAMP"),
* // Severity: Number("double"),
* // TotalFindings: Number("int"),
* // },
* // ],
* // GroupedByFindingType: [ // GroupedByFindingType
* // { // FindingTypeStatistics
* // FindingType: "STRING_VALUE",
* // LastGeneratedAt: new Date("TIMESTAMP"),
* // TotalFindings: Number("int"),
* // },
* // ],
* // GroupedByResource: [ // GroupedByResource
* // { // ResourceStatistics
* // AccountId: "STRING_VALUE",
* // LastGeneratedAt: new Date("TIMESTAMP"),
* // ResourceId: "STRING_VALUE",
* // ResourceType: "STRING_VALUE",
* // TotalFindings: Number("int"),
* // },
* // ],
* // GroupedBySeverity: [ // GroupedBySeverity
* // { // SeverityStatistics
* // LastGeneratedAt: new Date("TIMESTAMP"),
* // Severity: Number("double"),
* // TotalFindings: Number("int"),
* // },
* // ],
* // },
* // NextToken: "STRING_VALUE",
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { GuardDutyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GuardDutyClient";
import { GetOrganizationStatisticsResponse } from "../models/models_0";
import { GetOrganizationStatisticsResponse } from "../models/models_1";
import { de_GetOrganizationStatisticsCommand, se_GetOrganizationStatisticsCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { GuardDutyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GuardDutyClient";
import { GetRemainingFreeTrialDaysRequest, GetRemainingFreeTrialDaysResponse } from "../models/models_0";
import { GetRemainingFreeTrialDaysRequest, GetRemainingFreeTrialDaysResponse } from "../models/models_1";
import { de_GetRemainingFreeTrialDaysCommand, se_GetRemainingFreeTrialDaysCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { GuardDutyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GuardDutyClient";
import { GetThreatIntelSetRequest, GetThreatIntelSetResponse } from "../models/models_0";
import { GetThreatIntelSetRequest, GetThreatIntelSetResponse } from "../models/models_1";
import { de_GetThreatIntelSetCommand, se_GetThreatIntelSetCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Loading

0 comments on commit 85d62db

Please sign in to comment.