@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, 04:45 UTC

main
ts 44 lines 1.41 KB
Raw
1 import * as eventbridge from "@distilled.cloud/aws/eventbridge";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { EventBus } from "./EventBus.ts";
5
6 export interface DescribeEventBusRequest extends Omit<
7 eventbridge.DescribeEventBusRequest,
8 "Name"
9 > {}
10
11 /**
12 * Reads the configuration of an EventBridge event bus
13 * (`events:DescribeEventBus`).
14 *
15 * Bind this operation to an {@link EventBus} inside a function runtime to get
16 * a callable that automatically injects the bus name. Provide the
17 * `DescribeEventBusHttp` layer on the Function to satisfy the binding.
18 * ### Describing Event Buses
19 * **Example:** Describe the Bound Bus
20 * ```typescript
21 * // init — bind the bus (provide AWS.EventBridge.DescribeEventBusHttp on the Function)
22 * const describeEventBus = yield* AWS.EventBridge.DescribeEventBus(bus);
23 *
24 * // runtime — read the bus configuration
25 * const info = yield* describeEventBus();
26 * console.log(info.Arn, info.Policy);
27 * ```
28 *
29 * @binding
30 */
31 export interface DescribeEventBus extends Binding.Service<
32 DescribeEventBus,
33 "AWS.EventBridge.DescribeEventBus",
34 (
35 bus: EventBus,
36 ) => Effect.Effect<
37 (
38 request?: DescribeEventBusRequest,
39 ) => Effect.Effect<eventbridge.DescribeEventBusResponse, eventbridge.DescribeEventBusError>
40 >
41 > {}
42 export const DescribeEventBus = Binding.Service<DescribeEventBus>(
43 "AWS.EventBridge.DescribeEventBus",
44 );