1import type * as iam from "@distilled.cloud/aws/iam";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `iam:GetAccountSummary` — read IAM entity usage and
7 * quota counters for the account (`Users`, `Roles`, `PoliciesQuota`, `MFADevices`,
8 * `AccountMFAEnabled`, …). The quick health snapshot behind quota alarms and
9 * security dashboards.
10 *
11 * Account-singleton operation: the binding takes no arguments and grants
12 * `iam:GetAccountSummary` on `*`. Provide the implementation with
13 * `Effect.provide(AWS.IAM.GetAccountSummaryHttp)`.
14 *
15 * ### Account Auditing
16 * **Example:** Alarm When Nearing the Role Quota
17 * ```typescript
18 * // init
19 * const getAccountSummary = yield* IAM.GetAccountSummary();
20 *
21 * // runtime
22 * const { SummaryMap } = yield* getAccountSummary();
23 * const nearQuota =
24 * (SummaryMap?.Roles ?? 0) > 0.9 * (SummaryMap?.RolesQuota ?? Infinity);
25 * ```
26 *
27 * @binding
28 */
29export interface GetAccountSummary extends Binding.Service<
30 GetAccountSummary,
31 "AWS.IAM.GetAccountSummary",
32 () => Effect.Effect<
33 (
34 request?: iam.GetAccountSummaryRequest,
35 ) => Effect.Effect<
36 iam.GetAccountSummaryResponse,
37 iam.GetAccountSummaryError
38 >
39 >
40> {}
41export const GetAccountSummary = Binding.Service<GetAccountSummary>(
42 "AWS.IAM.GetAccountSummary",
43);