GetServiceLastAccessedDetails
Source:
src/AWS/IAM/GetServiceLastAccessedDetails.ts
Runtime binding for iam:GetServiceLastAccessedDetails — poll and read the
access-advisor report started by GenerateServiceLastAccessedDetails:
job status plus, when COMPLETED, the per-service last-authenticated
timeline for the entity.
The JobId is produced at runtime, so the binding takes no arguments and
grants iam:GetServiceLastAccessedDetails on *. Provide the
implementation with
Effect.provide(AWS.IAM.GetServiceLastAccessedDetailsHttp).
Access Advisor
Section titled “Access Advisor”// initconst getServiceLastAccessedDetails = yield* IAM.GetServiceLastAccessedDetails();
// runtimeconst report = yield* getServiceLastAccessedDetails({ JobId: jobId });if (report.JobStatus === "COMPLETED") { const unused = report.ServicesLastAccessed?.filter( (s) => s.LastAuthenticated === undefined, );}