Skip to content

GetCredentialReport

Source: src/AWS/IAM/GetCredentialReport.ts

Runtime binding for iam:GetCredentialReport — download the account-wide credential report started by GenerateCredentialReport. The report is base64-encoded CSV of per-user credential hygiene (password age, key rotation, MFA status); it contains no secret material.

Retrieval before a report exists surfaces the typed CredentialReportNotPresentException / CredentialReportNotReadyException tags. Account-singleton operation: the binding takes no arguments and grants iam:GetCredentialReport on *. Provide the implementation with Effect.provide(AWS.IAM.GetCredentialReportHttp).

// init
const getCredentialReport = yield* IAM.GetCredentialReport();
// runtime
const report = yield* getCredentialReport().pipe(
Effect.map((r) => new TextDecoder().decode(r.Content)),
Effect.catchTag("CredentialReportNotPresentException", () =>
Effect.succeed(undefined),
),
);