@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 36 lines 1.35 KB
Raw
1 import type * as rolesanywhere from "@distilled.cloud/aws/rolesanywhere";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `rolesanywhere:GetSubject`.
7 *
8 * Reads a *subject* — the audit record IAM Roles Anywhere keeps for each
9 * certificate identity that has requested credentials, including the
10 * certificates presented and the time of the last authentication attempt.
11 * Account-level operation — subjects are chosen per request at runtime, so
12 * the binding takes no resource argument. Provide the implementation with
13 * `Effect.provide(AWS.RolesAnywhere.GetSubjectHttp)`.
14 * ### Auditing Certificate Identities
15 * **Example:** Inspect a Subject's Credentials
16 * ```typescript
17 * // init — account-level binding, no resource argument
18 * const getSubject = yield* AWS.RolesAnywhere.GetSubject();
19 *
20 * // runtime
21 * const { subject } = yield* getSubject({ subjectId });
22 * const lastSeen = subject?.lastSeenAt;
23 * ```
24 *
25 * @binding
26 */
27 export interface GetSubject extends Binding.Service<
28 GetSubject,
29 "AWS.RolesAnywhere.GetSubject",
30 () => Effect.Effect<
31 (
32 request: rolesanywhere.ScalarSubjectRequest,
33 ) => Effect.Effect<rolesanywhere.SubjectDetailResponse, rolesanywhere.GetSubjectError>
34 >
35 > {}
36 export const GetSubject = Binding.Service<GetSubject>("AWS.RolesAnywhere.GetSubject");