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

main
ts 45 lines 1.58 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:GetCredentialReport` — download the account-wide
7 * credential report started by {@link GenerateCredentialReport}. The report is
8 * base64-encoded CSV of per-user credential hygiene (password age, key
9 * rotation, MFA status); it contains no secret material.
10 *
11 * Retrieval before a report exists surfaces the typed
12 * `CredentialReportNotPresentException` / `CredentialReportNotReadyException`
13 * tags. Account-singleton operation: the binding takes no arguments and
14 * grants `iam:GetCredentialReport` on `*`. Provide the implementation with
15 * `Effect.provide(AWS.IAM.GetCredentialReportHttp)`.
16 *
17 * ### Credential Reports
18 * **Example:** Retrieve the Credential Report
19 * ```typescript
20 * // init
21 * const getCredentialReport = yield* IAM.GetCredentialReport();
22 *
23 * // runtime
24 * const report = yield* getCredentialReport().pipe(
25 * Effect.map((r) => new TextDecoder().decode(r.Content)),
26 * Effect.catchTag("CredentialReportNotPresentException", () =>
27 * Effect.succeed(undefined),
28 * ),
29 * );
30 * ```
31 *
32 * @binding
33 */
34 export interface GetCredentialReport extends Binding.Service<
35 GetCredentialReport,
36 "AWS.IAM.GetCredentialReport",
37 () => Effect.Effect<
38 (
39 request?: iam.GetCredentialReportRequest,
40 ) => Effect.Effect<iam.GetCredentialReportResponse, iam.GetCredentialReportError>
41 >
42 > {}
43 export const GetCredentialReport = Binding.Service<GetCredentialReport>(
44 "AWS.IAM.GetCredentialReport",
45 );