@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 31 lines 1.01 KB
Raw
1 import type * as WAFV2 from "@distilled.cloud/aws/wafv2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { IPSet } from "./IPSet.ts";
5
6 /**
7 * Runtime binding for `wafv2:GetIPSet` — read the bound {@link IPSet}'s
8 * current addresses; the name, scope, and id are injected automatically.
9 *
10 * Provide `WAFv2.GetIPSetHttp` on the hosting Lambda Function to satisfy
11 * the requirement.
12 * ### Managing IP Sets at Runtime
13 * **Example:** Read the Current Block List
14 * ```typescript
15 * // init — grants wafv2:GetIPSet on the IP set
16 * const getIPSet = yield* AWS.WAFv2.GetIPSet(blockList);
17 *
18 * // runtime
19 * const { IPSet } = yield* getIPSet();
20 * const addresses = IPSet?.Addresses ?? [];
21 * ```
22 *
23 * @binding
24 */
25 export interface GetIPSet extends Binding.Service<
26 GetIPSet,
27 "AWS.WAFv2.GetIPSet",
28 (ipSet: IPSet) => Effect.Effect<() => Effect.Effect<WAFV2.GetIPSetResponse, WAFV2.GetIPSetError>>
29 > {}
30
31 export const GetIPSet = Binding.Service<GetIPSet>("AWS.WAFv2.GetIPSet");