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 { RuleGroup } from "./RuleGroup.ts";
5
6export interface DescribeRuleGroupSummaryRequest extends Omit<
7 NFW.DescribeRuleGroupSummaryRequest,
8 "RuleGroupArn" | "RuleGroupName" | "Type"
9> {}
10
11/**
12 * Runtime binding for `network-firewall:DescribeRuleGroupSummary` — read a
13 * per-rule summary (SID, message, metadata) of the bound stateful
14 * {@link RuleGroup}; the rule group ARN is injected automatically. Only
15 * supported for `STATEFUL` rule groups.
16 *
17 * Provide `NetworkFirewall.DescribeRuleGroupSummaryHttp` on the hosting
18 * Lambda Function to satisfy the requirement.
19 * ### Reading Rule Group State
20 * **Example:** Summarize the Stateful Rules
21 * ```typescript
22 * // init — grants network-firewall:DescribeRuleGroupSummary on the rule group
23 * const describeRuleGroupSummary =
24 * yield* AWS.NetworkFirewall.DescribeRuleGroupSummary(ruleGroup);
25 *
26 * // runtime
27 * const { Summary } = yield* describeRuleGroupSummary();
28 * ```
29 *
30 * @binding
31 */
32export interface DescribeRuleGroupSummary extends Binding.Service<
33 DescribeRuleGroupSummary,
34 "AWS.NetworkFirewall.DescribeRuleGroupSummary",
35 (
36 ruleGroup: RuleGroup,
37 ) => Effect.Effect<
38 (
39 request?: DescribeRuleGroupSummaryRequest,
40 ) => Effect.Effect<
41 NFW.DescribeRuleGroupSummaryResponse,
42 NFW.DescribeRuleGroupSummaryError
43 >
44 >
45> {}
46
47export const DescribeRuleGroupSummary =
48 Binding.Service<DescribeRuleGroupSummary>(
49 "AWS.NetworkFirewall.DescribeRuleGroupSummary",
50 );