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: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 */
34export interface GetCredentialReport extends Binding.Service<
35 GetCredentialReport,
36 "AWS.IAM.GetCredentialReport",
37 () => Effect.Effect<
38 (
39 request?: iam.GetCredentialReportRequest,
40 ) => Effect.Effect<
41 iam.GetCredentialReportResponse,
42 iam.GetCredentialReportError
43 >
44 >
45> {}
46export const GetCredentialReport = Binding.Service<GetCredentialReport>(
47 "AWS.IAM.GetCredentialReport",
48);