@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.47 KB
Raw
1 import type * as NFW from "@distilled.cloud/aws/network-firewall";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Firewall } from "./Firewall.ts";
5
6 export interface StartFlowCaptureRequest extends Omit<NFW.StartFlowCaptureRequest, "FirewallArn"> {}
7
8 /**
9 * Runtime binding for `network-firewall:StartFlowCapture` — begin a
10 * time-boxed capture of the flows the bound {@link Firewall} is tracking,
11 * according to the `FlowFilters` you define; the firewall ARN is injected
12 * automatically.
13 *
14 * Provide `NetworkFirewall.StartFlowCaptureHttp` on the hosting Lambda
15 * Function to satisfy the requirement.
16 * ### Flow Operations
17 * **Example:** Capture Flows to a Host
18 * ```typescript
19 * // init — grants network-firewall:StartFlowCapture on the firewall
20 * const startFlowCapture = yield* AWS.NetworkFirewall.StartFlowCapture(firewall);
21 *
22 * // runtime
23 * const { FlowOperationId } = yield* startFlowCapture({
24 * FlowFilters: [{ SourceAddress: { AddressDefinition: "10.0.1.10/32" } }],
25 * });
26 * ```
27 *
28 * @binding
29 */
30 export interface StartFlowCapture extends Binding.Service<
31 StartFlowCapture,
32 "AWS.NetworkFirewall.StartFlowCapture",
33 (
34 firewall: Firewall,
35 ) => Effect.Effect<
36 (
37 request: StartFlowCaptureRequest,
38 ) => Effect.Effect<NFW.StartFlowCaptureResponse, NFW.StartFlowCaptureError>
39 >
40 > {}
41
42 export const StartFlowCapture = Binding.Service<StartFlowCapture>(
43 "AWS.NetworkFirewall.StartFlowCapture",
44 );