| 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 { FirewallPolicy } from "./FirewallPolicy.ts"; |
| 5 | |
| 6 | export interface DescribeFirewallPolicyRequest extends Omit< |
| 7 | NFW.DescribeFirewallPolicyRequest, |
| 8 | "FirewallPolicyArn" | "FirewallPolicyName" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `network-firewall:DescribeFirewallPolicy` — read the |
| 13 | * bound {@link FirewallPolicy}'s definition (rule group references, default |
| 14 | * actions, engine options); the policy ARN is injected automatically. |
| 15 | * |
| 16 | * Provide `NetworkFirewall.DescribeFirewallPolicyHttp` on the hosting Lambda |
| 17 | * Function to satisfy the requirement. |
| 18 | * ### Reading Policy State |
| 19 | * **Example:** Read the Policy Definition |
| 20 | * ```typescript |
| 21 | * // init — grants network-firewall:DescribeFirewallPolicy on the policy |
| 22 | * const describeFirewallPolicy = |
| 23 | * yield* AWS.NetworkFirewall.DescribeFirewallPolicy(policy); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const { FirewallPolicy } = yield* describeFirewallPolicy(); |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface DescribeFirewallPolicy extends Binding.Service< |
| 32 | DescribeFirewallPolicy, |
| 33 | "AWS.NetworkFirewall.DescribeFirewallPolicy", |
| 34 | ( |
| 35 | policy: FirewallPolicy, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request?: DescribeFirewallPolicyRequest, |
| 39 | ) => Effect.Effect< |
| 40 | NFW.DescribeFirewallPolicyResponse, |
| 41 | NFW.DescribeFirewallPolicyError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const DescribeFirewallPolicy = Binding.Service<DescribeFirewallPolicy>( |
| 47 | "AWS.NetworkFirewall.DescribeFirewallPolicy", |
| 48 | ); |