| 1 | import type * as detective from "@distilled.cloud/aws/detective"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Graph } from "./Graph.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `detective:UpdateDatasourcePackages`. |
| 8 | * |
| 9 | * Starts ingest for additional data source packages (e.g. `EKS_AUDIT`, |
| 10 | * `ASFF_SECURITYHUB_FINDING`) on the behavior graph. Enabling a package is |
| 11 | * irreversible through this API and affects Detective billing. The graph ARN |
| 12 | * is injected from the bound {@link Graph}. |
| 13 | * Provide the implementation with |
| 14 | * `Effect.provide(AWS.Detective.UpdateDatasourcePackagesHttp)`. |
| 15 | * ### Managing Data Source Packages |
| 16 | * **Example:** Enable EKS Audit Ingest |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const updateDatasourcePackages = |
| 20 | * yield* AWS.Detective.UpdateDatasourcePackages(graph); |
| 21 | * |
| 22 | * // runtime |
| 23 | * yield* updateDatasourcePackages({ DatasourcePackages: ["EKS_AUDIT"] }); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface UpdateDatasourcePackages extends Binding.Service< |
| 29 | UpdateDatasourcePackages, |
| 30 | "AWS.Detective.UpdateDatasourcePackages", |
| 31 | ( |
| 32 | graph: Graph, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request: Omit<detective.UpdateDatasourcePackagesRequest, "GraphArn">, |
| 36 | ) => Effect.Effect< |
| 37 | detective.UpdateDatasourcePackagesResponse, |
| 38 | detective.UpdateDatasourcePackagesError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | export const UpdateDatasourcePackages = |
| 43 | Binding.Service<UpdateDatasourcePackages>( |
| 44 | "AWS.Detective.UpdateDatasourcePackages", |
| 45 | ); |