1import type * as rekognition from "@distilled.cloud/aws/rekognition";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `rekognition:StartFaceSearch` — start an asynchronous search of a stored video for faces matching a face collection.
7 *
8 * Rekognition Video jobs read the video from S3 and run asynchronously —
9 * poll the paired `Get*` binding with the returned `JobId`, or pass a
10 * `NotificationChannel` (SNS topic + IAM role the caller must be allowed
11 * to pass) to be notified on completion.
12 *
13 * The binding takes no arguments and grants the function
14 * `rekognition:StartFaceSearch` on `*` (Rekognition data-plane resources such
15 * as collections, users, and jobs are routinely created at runtime, so
16 * their identifiers are unknown at deploy time). Provide the
17 * implementation with `Effect.provide(AWS.Rekognition.StartFaceSearchHttp)`.
18 *
19 * ### Video Analysis
20 * **Example:** Start a Video Face Search
21 * ```typescript
22 * // init
23 * const startFaceSearch = yield* AWS.Rekognition.StartFaceSearch();
24 *
25 * // runtime
26 * const started = yield* startFaceSearch({
27 * Video: { S3Object: { Bucket: "videos", Name: "lobby.mp4" } },
28 * CollectionId: "tenant-42",
29 * });
30 * // started.JobId
31 * ```
32 *
33 * @binding
34 */
35export interface StartFaceSearch extends Binding.Service<
36 StartFaceSearch,
37 "AWS.Rekognition.StartFaceSearch",
38 () => Effect.Effect<
39 (
40 request: rekognition.StartFaceSearchRequest,
41 ) => Effect.Effect<
42 rekognition.StartFaceSearchResponse,
43 rekognition.StartFaceSearchError
44 >
45 >
46> {}
47export const StartFaceSearch = Binding.Service<StartFaceSearch>(
48 "AWS.Rekognition.StartFaceSearch",
49);