| 1 | import type * as NFW from "@distilled.cloud/aws/network-firewall"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuleGroup } from "./RuleGroup.ts"; |
| 5 | |
| 6 | export interface DescribeRuleGroupRequest extends Omit< |
| 7 | NFW.DescribeRuleGroupRequest, |
| 8 | "RuleGroupArn" | "RuleGroupName" | "Type" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `network-firewall:DescribeRuleGroup` — read the bound |
| 13 | * {@link RuleGroup}'s definition (rules source, variables, capacity); the |
| 14 | * rule group ARN is injected automatically. |
| 15 | * |
| 16 | * Provide `NetworkFirewall.DescribeRuleGroupHttp` on the hosting Lambda |
| 17 | * Function to satisfy the requirement. |
| 18 | * ### Reading Rule Group State |
| 19 | * **Example:** Read the Rule Group Definition |
| 20 | * ```typescript |
| 21 | * // init — grants network-firewall:DescribeRuleGroup on the rule group |
| 22 | * const describeRuleGroup = |
| 23 | * yield* AWS.NetworkFirewall.DescribeRuleGroup(ruleGroup); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const { RuleGroup } = yield* describeRuleGroup(); |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface DescribeRuleGroup extends Binding.Service< |
| 32 | DescribeRuleGroup, |
| 33 | "AWS.NetworkFirewall.DescribeRuleGroup", |
| 34 | ( |
| 35 | ruleGroup: RuleGroup, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request?: DescribeRuleGroupRequest, |
| 39 | ) => Effect.Effect< |
| 40 | NFW.DescribeRuleGroupResponse, |
| 41 | NFW.DescribeRuleGroupError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const DescribeRuleGroup = Binding.Service<DescribeRuleGroup>( |
| 47 | "AWS.NetworkFirewall.DescribeRuleGroup", |
| 48 | ); |