1import type * as WAFV2 from "@distilled.cloud/aws/wafv2";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import 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 */
25export interface GetIPSet extends Binding.Service<
26 GetIPSet,
27 "AWS.WAFv2.GetIPSet",
28 (
29 ipSet: IPSet,
30 ) => Effect.Effect<
31 () => Effect.Effect<WAFV2.GetIPSetResponse, WAFV2.GetIPSetError>
32 >
33> {}
34
35export const GetIPSet = Binding.Service<GetIPSet>("AWS.WAFv2.GetIPSet");