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