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:SearchUsersByImage` — search a face collection for users matching the largest face in a supplied image.
7 *
8 * The binding takes no arguments and grants the function
9 * `rekognition:SearchUsersByImage` on `*` (Rekognition data-plane resources such
10 * as collections, users, and jobs are routinely created at runtime, so
11 * their identifiers are unknown at deploy time). Provide the
12 * implementation with `Effect.provide(AWS.Rekognition.SearchUsersByImageHttp)`.
13 *
14 * ### User Search
15 * **Example:** Search Users by Image
16 * ```typescript
17 * // init
18 * const searchUsersByImage = yield* AWS.Rekognition.SearchUsersByImage();
19 *
20 * // runtime
21 * const result = yield* searchUsersByImage({
22 * CollectionId: "tenant-42",
23 * Image: { Bytes: imageBytes },
24 * });
25 * const bestUser = result.UserMatches?.[0]?.User?.UserId;
26 * ```
27 *
28 * @binding
29 */
30export interface SearchUsersByImage extends Binding.Service<
31 SearchUsersByImage,
32 "AWS.Rekognition.SearchUsersByImage",
33 () => Effect.Effect<
34 (
35 request: rekognition.SearchUsersByImageRequest,
36 ) => Effect.Effect<
37 rekognition.SearchUsersByImageResponse,
38 rekognition.SearchUsersByImageError
39 >
40 >
41> {}
42export const SearchUsersByImage = Binding.Service<SearchUsersByImage>(
43 "AWS.Rekognition.SearchUsersByImage",
44);