@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 39 lines 1.33 KB
Raw
1 import type * as cloudtrail from "@distilled.cloud/aws/cloudtrail";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `cloudtrail:LookupEvents`.
7 *
8 * An account-level operation (no resource argument) that searches the last
9 * 90 days of management events recorded in the region — the classic "who did
10 * what" audit read, available without any trail or event data store. Provide
11 * the implementation with `Effect.provide(AWS.CloudTrail.LookupEventsHttp)`.
12 * ### Reading Event History
13 * **Example:** Look Up Recent Events
14 * ```typescript
15 * // init — account-level binding takes no resource
16 * const lookupEvents = yield* AWS.CloudTrail.LookupEvents();
17 *
18 * // runtime
19 * const result = yield* lookupEvents({
20 * LookupAttributes: [
21 * { AttributeKey: "EventName", AttributeValue: "CreateBucket" },
22 * ],
23 * MaxResults: 10,
24 * });
25 * console.log(result.Events?.map((e) => e.EventName));
26 * ```
27 *
28 * @binding
29 */
30 export interface LookupEvents extends Binding.Service<
31 LookupEvents,
32 "AWS.CloudTrail.LookupEvents",
33 () => Effect.Effect<
34 (
35 request?: cloudtrail.LookupEventsRequest,
36 ) => Effect.Effect<cloudtrail.LookupEventsResponse, cloudtrail.LookupEventsError>
37 >
38 > {}
39 export const LookupEvents = Binding.Service<LookupEvents>("AWS.CloudTrail.LookupEvents");