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 DescribeRuleGroupMetadataRequest extends Omit<
7 NFW.DescribeRuleGroupMetadataRequest,
8 "RuleGroupArn" | "RuleGroupName" | "Type"
9> {}
10
11/**
12 * Runtime binding for `network-firewall:DescribeRuleGroupMetadata` — read
13 * the high-level metadata (type, capacity, last-modified time) of the bound
14 * {@link RuleGroup} without fetching the full rules definition; the rule
15 * group ARN is injected automatically.
16 *
17 * Provide `NetworkFirewall.DescribeRuleGroupMetadataHttp` on the hosting
18 * Lambda Function to satisfy the requirement.
19 * ### Reading Rule Group State
20 * **Example:** Read Rule Group Metadata
21 * ```typescript
22 * // init — grants network-firewall:DescribeRuleGroupMetadata on the rule group
23 * const describeRuleGroupMetadata =
24 * yield* AWS.NetworkFirewall.DescribeRuleGroupMetadata(ruleGroup);
25 *
26 * // runtime
27 * const { Capacity } = yield* describeRuleGroupMetadata();
28 * ```
29 *
30 * @binding
31 */
32export interface DescribeRuleGroupMetadata extends Binding.Service<
33 DescribeRuleGroupMetadata,
34 "AWS.NetworkFirewall.DescribeRuleGroupMetadata",
35 (
36 ruleGroup: RuleGroup,
37 ) => Effect.Effect<
38 (
39 request?: DescribeRuleGroupMetadataRequest,
40 ) => Effect.Effect<
41 NFW.DescribeRuleGroupMetadataResponse,
42 NFW.DescribeRuleGroupMetadataError
43 >
44 >
45> {}
46
47export const DescribeRuleGroupMetadata =
48 Binding.Service<DescribeRuleGroupMetadata>(
49 "AWS.NetworkFirewall.DescribeRuleGroupMetadata",
50 );