|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { GetFindingsStatisticsRequest, GetFindingsStatisticsResponse } from "../models/models_0"; |
| 10 | +import { de_GetFindingsStatisticsCommand, se_GetFindingsStatisticsCommand } from "../protocols/Aws_restJson1"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export type { __MetadataBearer }; |
| 16 | +export { $Command }; |
| 17 | +/** |
| 18 | + * @public |
| 19 | + * |
| 20 | + * The input for {@link GetFindingsStatisticsCommand}. |
| 21 | + */ |
| 22 | +export interface GetFindingsStatisticsCommandInput extends GetFindingsStatisticsRequest {} |
| 23 | +/** |
| 24 | + * @public |
| 25 | + * |
| 26 | + * The output of {@link GetFindingsStatisticsCommand}. |
| 27 | + */ |
| 28 | +export interface GetFindingsStatisticsCommandOutput extends GetFindingsStatisticsResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p>Retrieves a list of aggregated finding statistics for an external access or unused |
| 32 | + * access analyzer.</p> |
| 33 | + * @example |
| 34 | + * Use a bare-bones client and the command you need to make an API call. |
| 35 | + * ```javascript |
| 36 | + * import { AccessAnalyzerClient, GetFindingsStatisticsCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import |
| 37 | + * // const { AccessAnalyzerClient, GetFindingsStatisticsCommand } = require("@aws-sdk/client-accessanalyzer"); // CommonJS import |
| 38 | + * const client = new AccessAnalyzerClient(config); |
| 39 | + * const input = { // GetFindingsStatisticsRequest |
| 40 | + * analyzerArn: "STRING_VALUE", // required |
| 41 | + * }; |
| 42 | + * const command = new GetFindingsStatisticsCommand(input); |
| 43 | + * const response = await client.send(command); |
| 44 | + * // { // GetFindingsStatisticsResponse |
| 45 | + * // findingsStatistics: [ // FindingsStatisticsList |
| 46 | + * // { // FindingsStatistics Union: only one key present |
| 47 | + * // externalAccessFindingsStatistics: { // ExternalAccessFindingsStatistics |
| 48 | + * // resourceTypeStatistics: { // ResourceTypeStatisticsMap |
| 49 | + * // "<keys>": { // ResourceTypeDetails |
| 50 | + * // totalActivePublic: Number("int"), |
| 51 | + * // totalActiveCrossAccount: Number("int"), |
| 52 | + * // }, |
| 53 | + * // }, |
| 54 | + * // totalActiveFindings: Number("int"), |
| 55 | + * // totalArchivedFindings: Number("int"), |
| 56 | + * // totalResolvedFindings: Number("int"), |
| 57 | + * // }, |
| 58 | + * // unusedAccessFindingsStatistics: { // UnusedAccessFindingsStatistics |
| 59 | + * // unusedAccessTypeStatistics: [ // UnusedAccessTypeStatisticsList |
| 60 | + * // { // UnusedAccessTypeStatistics |
| 61 | + * // unusedAccessType: "STRING_VALUE", |
| 62 | + * // total: Number("int"), |
| 63 | + * // }, |
| 64 | + * // ], |
| 65 | + * // topAccounts: [ // AccountAggregations |
| 66 | + * // { // FindingAggregationAccountDetails |
| 67 | + * // account: "STRING_VALUE", |
| 68 | + * // numberOfActiveFindings: Number("int"), |
| 69 | + * // details: { // FindingAggregationAccountDetailsMap |
| 70 | + * // "<keys>": Number("int"), |
| 71 | + * // }, |
| 72 | + * // }, |
| 73 | + * // ], |
| 74 | + * // totalActiveFindings: Number("int"), |
| 75 | + * // totalArchivedFindings: Number("int"), |
| 76 | + * // totalResolvedFindings: Number("int"), |
| 77 | + * // }, |
| 78 | + * // }, |
| 79 | + * // ], |
| 80 | + * // lastUpdatedAt: new Date("TIMESTAMP"), |
| 81 | + * // }; |
| 82 | + * |
| 83 | + * ``` |
| 84 | + * |
| 85 | + * @param GetFindingsStatisticsCommandInput - {@link GetFindingsStatisticsCommandInput} |
| 86 | + * @returns {@link GetFindingsStatisticsCommandOutput} |
| 87 | + * @see {@link GetFindingsStatisticsCommandInput} for command's `input` shape. |
| 88 | + * @see {@link GetFindingsStatisticsCommandOutput} for command's `response` shape. |
| 89 | + * @see {@link AccessAnalyzerClientResolvedConfig | config} for AccessAnalyzerClient's `config` shape. |
| 90 | + * |
| 91 | + * @throws {@link AccessDeniedException} (client fault) |
| 92 | + * <p>You do not have sufficient access to perform this action.</p> |
| 93 | + * |
| 94 | + * @throws {@link InternalServerException} (server fault) |
| 95 | + * <p>Internal server error.</p> |
| 96 | + * |
| 97 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 98 | + * <p>The specified resource could not be found.</p> |
| 99 | + * |
| 100 | + * @throws {@link ThrottlingException} (client fault) |
| 101 | + * <p>Throttling limit exceeded error.</p> |
| 102 | + * |
| 103 | + * @throws {@link ValidationException} (client fault) |
| 104 | + * <p>Validation exception error.</p> |
| 105 | + * |
| 106 | + * @throws {@link AccessAnalyzerServiceException} |
| 107 | + * <p>Base exception class for all service exceptions from AccessAnalyzer service.</p> |
| 108 | + * |
| 109 | + * @public |
| 110 | + */ |
| 111 | +export class GetFindingsStatisticsCommand extends $Command |
| 112 | + .classBuilder< |
| 113 | + GetFindingsStatisticsCommandInput, |
| 114 | + GetFindingsStatisticsCommandOutput, |
| 115 | + AccessAnalyzerClientResolvedConfig, |
| 116 | + ServiceInputTypes, |
| 117 | + ServiceOutputTypes |
| 118 | + >() |
| 119 | + .ep(commonParams) |
| 120 | + .m(function (this: any, Command: any, cs: any, config: AccessAnalyzerClientResolvedConfig, o: any) { |
| 121 | + return [ |
| 122 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 123 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 124 | + ]; |
| 125 | + }) |
| 126 | + .s("AccessAnalyzer", "GetFindingsStatistics", {}) |
| 127 | + .n("AccessAnalyzerClient", "GetFindingsStatisticsCommand") |
| 128 | + .f(void 0, void 0) |
| 129 | + .ser(se_GetFindingsStatisticsCommand) |
| 130 | + .de(de_GetFindingsStatisticsCommand) |
| 131 | + .build() { |
| 132 | + /** @internal type navigation helper, not in runtime. */ |
| 133 | + protected declare static __types: { |
| 134 | + api: { |
| 135 | + input: GetFindingsStatisticsRequest; |
| 136 | + output: GetFindingsStatisticsResponse; |
| 137 | + }; |
| 138 | + sdk: { |
| 139 | + input: GetFindingsStatisticsCommandInput; |
| 140 | + output: GetFindingsStatisticsCommandOutput; |
| 141 | + }; |
| 142 | + }; |
| 143 | +} |
0 commit comments