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:DetectModerationLabels` — detect unsafe or inappropriate content (explicit nudity, violence, etc.) in an image for content moderation.
7 *
8 * The binding takes no arguments and grants the function
9 * `rekognition:DetectModerationLabels` 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.DetectModerationLabelsHttp)`.
13 *
14 * ### Image Analysis
15 * **Example:** Moderate an Uploaded Image
16 * ```typescript
17 * // init
18 * const detectModerationLabels = yield* AWS.Rekognition.DetectModerationLabels();
19 *
20 * // runtime
21 * const result = yield* detectModerationLabels({
22 * Image: { Bytes: imageBytes },
23 * MinConfidence: 60,
24 * });
25 * const flagged = (result.ModerationLabels ?? []).length > 0;
26 * ```
27 *
28 * @binding
29 */
30export interface DetectModerationLabels extends Binding.Service<
31 DetectModerationLabels,
32 "AWS.Rekognition.DetectModerationLabels",
33 () => Effect.Effect<
34 (
35 request: rekognition.DetectModerationLabelsRequest,
36 ) => Effect.Effect<
37 rekognition.DetectModerationLabelsResponse,
38 rekognition.DetectModerationLabelsError
39 >
40 >
41> {}
42export const DetectModerationLabels = Binding.Service<DetectModerationLabels>(
43 "AWS.Rekognition.DetectModerationLabels",
44);