-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-accessanalyzer): This release introduces the getFindingsS…
…tatistics API, enabling users to retrieve aggregated finding statistics for IAM Access Analyzer's external access and unused access analysis features. Updated service API and documentation.
- Loading branch information
awstools
committed
Feb 13, 2025
1 parent
53f15ec
commit 18ecb88
Showing
8 changed files
with
748 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
143 changes: 143 additions & 0 deletions
143
clients/client-accessanalyzer/src/commands/GetFindingsStatisticsCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
// smithy-typescript generated code | ||
import { getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { getSerdePlugin } from "@smithy/middleware-serde"; | ||
import { Command as $Command } from "@smithy/smithy-client"; | ||
import { MetadataBearer as __MetadataBearer } from "@smithy/types"; | ||
|
||
import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient"; | ||
import { commonParams } from "../endpoint/EndpointParameters"; | ||
import { GetFindingsStatisticsRequest, GetFindingsStatisticsResponse } from "../models/models_0"; | ||
import { de_GetFindingsStatisticsCommand, se_GetFindingsStatisticsCommand } from "../protocols/Aws_restJson1"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link GetFindingsStatisticsCommand}. | ||
*/ | ||
export interface GetFindingsStatisticsCommandInput extends GetFindingsStatisticsRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link GetFindingsStatisticsCommand}. | ||
*/ | ||
export interface GetFindingsStatisticsCommandOutput extends GetFindingsStatisticsResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Retrieves a list of aggregated finding statistics for an external access or unused | ||
* access analyzer.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { AccessAnalyzerClient, GetFindingsStatisticsCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import | ||
* // const { AccessAnalyzerClient, GetFindingsStatisticsCommand } = require("@aws-sdk/client-accessanalyzer"); // CommonJS import | ||
* const client = new AccessAnalyzerClient(config); | ||
* const input = { // GetFindingsStatisticsRequest | ||
* analyzerArn: "STRING_VALUE", // required | ||
* }; | ||
* const command = new GetFindingsStatisticsCommand(input); | ||
* const response = await client.send(command); | ||
* // { // GetFindingsStatisticsResponse | ||
* // findingsStatistics: [ // FindingsStatisticsList | ||
* // { // FindingsStatistics Union: only one key present | ||
* // externalAccessFindingsStatistics: { // ExternalAccessFindingsStatistics | ||
* // resourceTypeStatistics: { // ResourceTypeStatisticsMap | ||
* // "<keys>": { // ResourceTypeDetails | ||
* // totalActivePublic: Number("int"), | ||
* // totalActiveCrossAccount: Number("int"), | ||
* // }, | ||
* // }, | ||
* // totalActiveFindings: Number("int"), | ||
* // totalArchivedFindings: Number("int"), | ||
* // totalResolvedFindings: Number("int"), | ||
* // }, | ||
* // unusedAccessFindingsStatistics: { // UnusedAccessFindingsStatistics | ||
* // unusedAccessTypeStatistics: [ // UnusedAccessTypeStatisticsList | ||
* // { // UnusedAccessTypeStatistics | ||
* // unusedAccessType: "STRING_VALUE", | ||
* // total: Number("int"), | ||
* // }, | ||
* // ], | ||
* // topAccounts: [ // AccountAggregations | ||
* // { // FindingAggregationAccountDetails | ||
* // account: "STRING_VALUE", | ||
* // numberOfActiveFindings: Number("int"), | ||
* // details: { // FindingAggregationAccountDetailsMap | ||
* // "<keys>": Number("int"), | ||
* // }, | ||
* // }, | ||
* // ], | ||
* // totalActiveFindings: Number("int"), | ||
* // totalArchivedFindings: Number("int"), | ||
* // totalResolvedFindings: Number("int"), | ||
* // }, | ||
* // }, | ||
* // ], | ||
* // lastUpdatedAt: new Date("TIMESTAMP"), | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param GetFindingsStatisticsCommandInput - {@link GetFindingsStatisticsCommandInput} | ||
* @returns {@link GetFindingsStatisticsCommandOutput} | ||
* @see {@link GetFindingsStatisticsCommandInput} for command's `input` shape. | ||
* @see {@link GetFindingsStatisticsCommandOutput} for command's `response` shape. | ||
* @see {@link AccessAnalyzerClientResolvedConfig | config} for AccessAnalyzerClient's `config` shape. | ||
* | ||
* @throws {@link AccessDeniedException} (client fault) | ||
* <p>You do not have sufficient access to perform this action.</p> | ||
* | ||
* @throws {@link InternalServerException} (server fault) | ||
* <p>Internal server error.</p> | ||
* | ||
* @throws {@link ResourceNotFoundException} (client fault) | ||
* <p>The specified resource could not be found.</p> | ||
* | ||
* @throws {@link ThrottlingException} (client fault) | ||
* <p>Throttling limit exceeded error.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>Validation exception error.</p> | ||
* | ||
* @throws {@link AccessAnalyzerServiceException} | ||
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class GetFindingsStatisticsCommand extends $Command | ||
.classBuilder< | ||
GetFindingsStatisticsCommandInput, | ||
GetFindingsStatisticsCommandOutput, | ||
AccessAnalyzerClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep(commonParams) | ||
.m(function (this: any, Command: any, cs: any, config: AccessAnalyzerClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("AccessAnalyzer", "GetFindingsStatistics", {}) | ||
.n("AccessAnalyzerClient", "GetFindingsStatisticsCommand") | ||
.f(void 0, void 0) | ||
.ser(se_GetFindingsStatisticsCommand) | ||
.de(de_GetFindingsStatisticsCommand) | ||
.build() { | ||
/** @internal type navigation helper, not in runtime. */ | ||
protected declare static __types: { | ||
api: { | ||
input: GetFindingsStatisticsRequest; | ||
output: GetFindingsStatisticsResponse; | ||
}; | ||
sdk: { | ||
input: GetFindingsStatisticsCommandInput; | ||
output: GetFindingsStatisticsCommandOutput; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.