| 1 | import type * as securitylake from "@distilled.cloud/aws/securitylake"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { DataLake } from "./DataLake.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `securitylake:GetDataLakeSources`. |
| 8 | * |
| 9 | * Returns a snapshot of which log sources are collecting (per account and |
| 10 | * source, with `COLLECTING` / `MISCONFIGURED` / `NOT_COLLECTING` statuses) so |
| 11 | * a monitoring Function can verify ingestion health. Bind the account's |
| 12 | * {@link DataLake}. |
| 13 | * Provide the implementation with |
| 14 | * `Effect.provide(AWS.SecurityLake.GetDataLakeSourcesHttp)`. |
| 15 | * ### Monitoring the data lake |
| 16 | * **Example:** Check source collection status |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const getSources = yield* AWS.SecurityLake.GetDataLakeSources(lake); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { dataLakeSources } = yield* getSources(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface GetDataLakeSources extends Binding.Service< |
| 28 | GetDataLakeSources, |
| 29 | "AWS.SecurityLake.GetDataLakeSources", |
| 30 | ( |
| 31 | lake: DataLake, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request?: securitylake.GetDataLakeSourcesRequest, |
| 35 | ) => Effect.Effect< |
| 36 | securitylake.GetDataLakeSourcesResponse, |
| 37 | securitylake.GetDataLakeSourcesError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const GetDataLakeSources = Binding.Service<GetDataLakeSources>( |
| 42 | "AWS.SecurityLake.GetDataLakeSources", |
| 43 | ); |