@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.4 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 DescribeFirewallRequest extends Omit<
7 NFW.DescribeFirewallRequest,
8 "FirewallArn" | "FirewallName"
9 > {}
10
11 /**
12 * Runtime binding for `network-firewall:DescribeFirewall` — read the bound
13 * {@link Firewall}'s configuration and status (sync states, endpoint ids,
14 * capacity usage); the firewall ARN is injected automatically.
15 *
16 * Provide `NetworkFirewall.DescribeFirewallHttp` on the hosting Lambda
17 * Function to satisfy the requirement.
18 * ### Reading Firewall State
19 * **Example:** Read the Firewall Status
20 * ```typescript
21 * // init — grants network-firewall:DescribeFirewall on the firewall
22 * const describeFirewall = yield* AWS.NetworkFirewall.DescribeFirewall(firewall);
23 *
24 * // runtime
25 * const { FirewallStatus } = yield* describeFirewall();
26 * ```
27 *
28 * @binding
29 */
30 export interface DescribeFirewall extends Binding.Service<
31 DescribeFirewall,
32 "AWS.NetworkFirewall.DescribeFirewall",
33 (
34 firewall: Firewall,
35 ) => Effect.Effect<
36 (
37 request?: DescribeFirewallRequest,
38 ) => Effect.Effect<NFW.DescribeFirewallResponse, NFW.DescribeFirewallError>
39 >
40 > {}
41
42 export const DescribeFirewall = Binding.Service<DescribeFirewall>(
43 "AWS.NetworkFirewall.DescribeFirewall",
44 );