| 1 | import type * as iam from "@distilled.cloud/aws/iam"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `iam:GenerateCredentialReport` — kick off generation of |
| 7 | * the account-wide credential report (per-user password/key/MFA hygiene as |
| 8 | * CSV). Pair with {@link GetCredentialReport} to retrieve the report once the |
| 9 | * returned `State` is `COMPLETE`. |
| 10 | * |
| 11 | * Account-singleton operation: the binding takes no arguments and grants |
| 12 | * `iam:GenerateCredentialReport` on `*`. Provide the implementation with |
| 13 | * `Effect.provide(AWS.IAM.GenerateCredentialReportHttp)`. |
| 14 | * |
| 15 | * ### Credential Reports |
| 16 | * **Example:** Start a Credential Report |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const generateCredentialReport = yield* IAM.GenerateCredentialReport(); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { State } = yield* generateCredentialReport(); |
| 23 | * // "STARTED" | "INPROGRESS" | "COMPLETE" |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface GenerateCredentialReport extends Binding.Service< |
| 29 | GenerateCredentialReport, |
| 30 | "AWS.IAM.GenerateCredentialReport", |
| 31 | () => Effect.Effect< |
| 32 | ( |
| 33 | request?: iam.GenerateCredentialReportRequest, |
| 34 | ) => Effect.Effect< |
| 35 | iam.GenerateCredentialReportResponse, |
| 36 | iam.GenerateCredentialReportError |
| 37 | > |
| 38 | > |
| 39 | > {} |
| 40 | export const GenerateCredentialReport = |
| 41 | Binding.Service<GenerateCredentialReport>("AWS.IAM.GenerateCredentialReport"); |