| 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 { Firewall } from "./Firewall.ts"; |
| 5 | |
| 6 | export interface StartAnalysisReportRequest extends Omit< |
| 7 | NFW.StartAnalysisReportRequest, |
| 8 | "FirewallArn" | "FirewallName" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `network-firewall:StartAnalysisReport` — generate a |
| 13 | * traffic analysis report (`TLS_SNI` or `HTTP_HOST`) for the bound |
| 14 | * {@link Firewall}; the firewall ARN is injected automatically. The |
| 15 | * firewall's analysis settings must have the analysis type enabled. |
| 16 | * |
| 17 | * Provide `NetworkFirewall.StartAnalysisReportHttp` on the hosting Lambda |
| 18 | * Function to satisfy the requirement. |
| 19 | * ### Analysis Reports |
| 20 | * **Example:** Start a TLS SNI Analysis Report |
| 21 | * ```typescript |
| 22 | * // init — grants network-firewall:StartAnalysisReport on the firewall |
| 23 | * const startAnalysisReport = |
| 24 | * yield* AWS.NetworkFirewall.StartAnalysisReport(firewall); |
| 25 | * |
| 26 | * // runtime |
| 27 | * const { AnalysisReportId } = yield* startAnalysisReport({ |
| 28 | * AnalysisType: "TLS_SNI", |
| 29 | * }); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface StartAnalysisReport extends Binding.Service< |
| 35 | StartAnalysisReport, |
| 36 | "AWS.NetworkFirewall.StartAnalysisReport", |
| 37 | ( |
| 38 | firewall: Firewall, |
| 39 | ) => Effect.Effect< |
| 40 | ( |
| 41 | request: StartAnalysisReportRequest, |
| 42 | ) => Effect.Effect< |
| 43 | NFW.StartAnalysisReportResponse, |
| 44 | NFW.StartAnalysisReportError |
| 45 | > |
| 46 | > |
| 47 | > {} |
| 48 | |
| 49 | export const StartAnalysisReport = Binding.Service<StartAnalysisReport>( |
| 50 | "AWS.NetworkFirewall.StartAnalysisReport", |
| 51 | ); |