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

main
ts 41 lines 1.4 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:ListInsightsData`.
7 *
8 * An account-level operation (no resource argument) that reads the raw
9 * Insights events recorded for an insight source — empty when Insights has
10 * recorded no anomalies. Rate-limited by AWS to two requests per second,
11 * per account, per Region. Provide the implementation with
12 * `Effect.provide(AWS.CloudTrail.ListInsightsDataHttp)`.
13 * ### Reading Insights Events
14 * **Example:** List Insights Events
15 * ```typescript
16 * // init — account-level binding takes no resource
17 * const listInsightsData = yield* AWS.CloudTrail.ListInsightsData();
18 *
19 * // runtime
20 * const result = yield* listInsightsData({
21 * InsightSource: "s3.amazonaws.com",
22 * DataType: "InsightsEvents",
23 * MaxResults: 10,
24 * });
25 * console.log((result.Events ?? []).map((e) => e.EventName));
26 * ```
27 *
28 * @binding
29 */
30 export interface ListInsightsData extends Binding.Service<
31 ListInsightsData,
32 "AWS.CloudTrail.ListInsightsData",
33 () => Effect.Effect<
34 (
35 request: cloudtrail.ListInsightsDataRequest,
36 ) => Effect.Effect<cloudtrail.ListInsightsDataResponse, cloudtrail.ListInsightsDataError>
37 >
38 > {}
39 export const ListInsightsData = Binding.Service<ListInsightsData>(
40 "AWS.CloudTrail.ListInsightsData",
41 );