The best way to control Claude Code, Codex and more from any computer or phone

main
ts 38 lines 1.31 KB
Raw
1 import type * as iam from "@distilled.cloud/aws/iam";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
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 */
29 export interface GetAccountSummary extends Binding.Service<
30 GetAccountSummary,
31 "AWS.IAM.GetAccountSummary",
32 () => Effect.Effect<
33 (
34 request?: iam.GetAccountSummaryRequest,
35 ) => Effect.Effect<iam.GetAccountSummaryResponse, iam.GetAccountSummaryError>
36 >
37 > {}
38 export const GetAccountSummary = Binding.Service<GetAccountSummary>("AWS.IAM.GetAccountSummary");