| 1 | import type * as aa from "@distilled.cloud/aws/accessanalyzer"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Analyzer } from "./Analyzer.ts"; |
| 5 | |
| 6 | /** `GetFindingsStatistics` request with `analyzerArn` injected from the bound {@link Analyzer}. */ |
| 7 | export interface GetFindingsStatisticsRequest extends Omit< |
| 8 | aa.GetFindingsStatisticsRequest, |
| 9 | "analyzerArn" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `access-analyzer:GetFindingsStatistics`. |
| 14 | * |
| 15 | * Retrieves aggregate finding statistics for the analyzer (counts by resource |
| 16 | * type or unused-access age). Provide the implementation with |
| 17 | * `Effect.provide(AWS.AccessAnalyzer.GetFindingsStatisticsHttp)`. |
| 18 | * ### Reading Findings |
| 19 | * **Example:** Get Finding Statistics |
| 20 | * ```typescript |
| 21 | * const getStatistics = |
| 22 | * yield* AWS.AccessAnalyzer.GetFindingsStatistics(analyzer); |
| 23 | * const stats = yield* getStatistics(); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface GetFindingsStatistics extends Binding.Service< |
| 29 | GetFindingsStatistics, |
| 30 | "AWS.AccessAnalyzer.GetFindingsStatistics", |
| 31 | ( |
| 32 | analyzer: Analyzer, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: GetFindingsStatisticsRequest, |
| 36 | ) => Effect.Effect< |
| 37 | aa.GetFindingsStatisticsResponse, |
| 38 | aa.GetFindingsStatisticsError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | |
| 43 | export const GetFindingsStatistics = Binding.Service<GetFindingsStatistics>( |
| 44 | "AWS.AccessAnalyzer.GetFindingsStatistics", |
| 45 | ); |