Skip to content

GetSubject

Source: src/AWS/RolesAnywhere/GetSubject.ts

Runtime binding for rolesanywhere:GetSubject.

Reads a subject — the audit record IAM Roles Anywhere keeps for each certificate identity that has requested credentials, including the certificates presented and the time of the last authentication attempt. Account-level operation — subjects are chosen per request at runtime, so the binding takes no resource argument. Provide the implementation with Effect.provide(AWS.RolesAnywhere.GetSubjectHttp).

// init — account-level binding, no resource argument
const getSubject = yield* AWS.RolesAnywhere.GetSubject();
// runtime
const { subject } = yield* getSubject({ subjectId });
const lastSeen = subject?.lastSeenAt;