AWS.Rekognition reference
AssociateFaces
Section titled “AssociateFaces”Source:
src/AWS/Rekognition/AssociateFaces.ts
Runtime binding for rekognition:AssociateFaces — associate up to 100 indexed face IDs with a user.
The binding takes no arguments and grants the function
rekognition:AssociateFaces on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.AssociateFacesHttp).
AssociateFaces: User Search
Section titled “AssociateFaces: User Search”// initconst associateFaces = yield* AWS.Rekognition.AssociateFaces();
// runtimeconst result = yield* associateFaces({ CollectionId: "tenant-42", UserId: userId, FaceIds: [faceId],});// result.AssociatedFaces, result.UserStatusCompareFaces
Section titled “CompareFaces”Source:
src/AWS/Rekognition/CompareFaces.ts
Runtime binding for rekognition:CompareFaces — compare the largest face in a source image against faces in a target image and return match confidence.
The binding takes no arguments and grants the function
rekognition:CompareFaces on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.CompareFacesHttp).
CompareFaces: Image Analysis
Section titled “CompareFaces: Image Analysis”// initconst compareFaces = yield* AWS.Rekognition.CompareFaces();
// runtimeconst result = yield* compareFaces({ SourceImage: { S3Object: { Bucket: "photos", Name: "id-card.jpg" } }, TargetImage: { S3Object: { Bucket: "photos", Name: "selfie.jpg" } }, SimilarityThreshold: 90,});const matches = result.FaceMatches ?? [];CreateCollection
Section titled “CreateCollection”Source:
src/AWS/Rekognition/CreateCollection.ts
Runtime binding for rekognition:CreateCollection — create a face collection — e.g. one collection per application tenant, created at runtime.
The binding takes no arguments and grants the function
rekognition:CreateCollection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.CreateCollectionHttp).
CreateCollection: Face Collections
Section titled “CreateCollection: Face Collections”// initconst createCollection = yield* AWS.Rekognition.CreateCollection();
// runtimeconst created = yield* createCollection({ CollectionId: `tenant-${tenantId}` });// created.CollectionArn, created.FaceModelVersionCreateFaceLivenessSession
Section titled “CreateFaceLivenessSession”Source:
src/AWS/Rekognition/CreateFaceLivenessSession.ts
Runtime binding for rekognition:CreateFaceLivenessSession — create a Face Liveness session whose ID the client-side FaceLivenessDetector component uses to run the liveness check.
The binding takes no arguments and grants the function
rekognition:CreateFaceLivenessSession on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.CreateFaceLivenessSessionHttp).
CreateFaceLivenessSession: Face Liveness
Section titled “CreateFaceLivenessSession: Face Liveness”// initconst createFaceLivenessSession = yield* AWS.Rekognition.CreateFaceLivenessSession();
// runtimeconst session = yield* createFaceLivenessSession({ Settings: { AuditImagesLimit: 2 },});// hand session.SessionId to the front-end FaceLivenessDetectorCreateUser
Section titled “CreateUser”Source:
src/AWS/Rekognition/CreateUser.ts
Runtime binding for rekognition:CreateUser — create a user in a face collection to aggregate multiple face IDs of the same person.
The binding takes no arguments and grants the function
rekognition:CreateUser on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.CreateUserHttp).
CreateUser: User Search
Section titled “CreateUser: User Search”// initconst createUser = yield* AWS.Rekognition.CreateUser();
// runtimeyield* createUser({ CollectionId: "tenant-42", UserId: userId });DeleteCollection
Section titled “DeleteCollection”Source:
src/AWS/Rekognition/DeleteCollection.ts
Runtime binding for rekognition:DeleteCollection — delete a face collection and all faces stored in it.
The binding takes no arguments and grants the function
rekognition:DeleteCollection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DeleteCollectionHttp).
DeleteCollection: Face Collections
Section titled “DeleteCollection: Face Collections”// initconst deleteCollection = yield* AWS.Rekognition.DeleteCollection();
// runtimeyield* deleteCollection({ CollectionId: `tenant-${tenantId}` }).pipe( Effect.catchTag("ResourceNotFoundException", () => Effect.void),);DeleteFaces
Section titled “DeleteFaces”Source:
src/AWS/Rekognition/DeleteFaces.ts
Runtime binding for rekognition:DeleteFaces — delete faces from a face collection by face ID.
The binding takes no arguments and grants the function
rekognition:DeleteFaces on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DeleteFacesHttp).
DeleteFaces: Face Collections
Section titled “DeleteFaces: Face Collections”// initconst deleteFaces = yield* AWS.Rekognition.DeleteFaces();
// runtimeconst result = yield* deleteFaces({ CollectionId: "tenant-42", FaceIds: [faceId],});// result.DeletedFaces, result.UnsuccessfulFaceDeletionsDeleteUser
Section titled “DeleteUser”Source:
src/AWS/Rekognition/DeleteUser.ts
Runtime binding for rekognition:DeleteUser — delete a user from a face collection.
The binding takes no arguments and grants the function
rekognition:DeleteUser on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DeleteUserHttp).
DeleteUser: User Search
Section titled “DeleteUser: User Search”// initconst deleteUser = yield* AWS.Rekognition.DeleteUser();
// runtimeyield* deleteUser({ CollectionId: "tenant-42", UserId: userId }).pipe( Effect.catchTag("ResourceNotFoundException", () => Effect.void),);DescribeCollection
Section titled “DescribeCollection”Source:
src/AWS/Rekognition/DescribeCollection.ts
Runtime binding for rekognition:DescribeCollection — describe a face collection — face count, face model version, ARN, and creation time.
The binding takes no arguments and grants the function
rekognition:DescribeCollection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DescribeCollectionHttp).
DescribeCollection: Face Collections
Section titled “DescribeCollection: Face Collections”// initconst describeCollection = yield* AWS.Rekognition.DescribeCollection();
// runtimeconst info = yield* describeCollection({ CollectionId: "tenant-42" });// info.FaceCount, info.FaceModelVersionDescribeProjects
Section titled “DescribeProjects”Source:
src/AWS/Rekognition/DescribeProjects.ts
Runtime binding for rekognition:DescribeProjects — describe the Rekognition projects (Custom Labels projects and custom moderation adapters) in the account.
The binding takes no arguments and grants the function
rekognition:DescribeProjects on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DescribeProjectsHttp).
DescribeProjects: Custom Labels
Section titled “DescribeProjects: Custom Labels”// initconst describeProjects = yield* AWS.Rekognition.DescribeProjects();
// runtimeconst page = yield* describeProjects({ MaxResults: 10 });// page.ProjectDescriptionsDescribeProjectVersions
Section titled “DescribeProjectVersions”Source:
src/AWS/Rekognition/DescribeProjectVersions.ts
Runtime binding for rekognition:DescribeProjectVersions — describe the model versions of a Rekognition project — training status, evaluation results, and hosting status.
The binding takes no arguments and grants the function
rekognition:DescribeProjectVersions on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DescribeProjectVersionsHttp).
DescribeProjectVersions: Custom Labels
Section titled “DescribeProjectVersions: Custom Labels”// initconst describeProjectVersions = yield* AWS.Rekognition.DescribeProjectVersions();
// runtimeconst page = yield* describeProjectVersions({ ProjectArn: projectArn });// page.ProjectVersionDescriptionsDescribeStreamProcessor
Section titled “DescribeStreamProcessor”Source:
src/AWS/Rekognition/DescribeStreamProcessor.ts
Runtime binding for rekognition:DescribeStreamProcessor — describe a stream processor — status, input/output configuration, and settings.
The binding takes no arguments and grants the function
rekognition:DescribeStreamProcessor on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DescribeStreamProcessorHttp).
DescribeStreamProcessor: Stream Processors
Section titled “DescribeStreamProcessor: Stream Processors”// initconst describeStreamProcessor = yield* AWS.Rekognition.DescribeStreamProcessor();
// runtimeconst info = yield* describeStreamProcessor({ Name: "lobby-camera" });// info.Status, info.Input, info.OutputDetectCustomLabels
Section titled “DetectCustomLabels”Source:
src/AWS/Rekognition/DetectCustomLabels.ts
Runtime binding for rekognition:DetectCustomLabels — detect custom labels in an image using a trained and running Rekognition Custom Labels model version.
The binding takes no arguments and grants the function
rekognition:DetectCustomLabels on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DetectCustomLabelsHttp).
DetectCustomLabels: Custom Labels
Section titled “DetectCustomLabels: Custom Labels”// initconst detectCustomLabels = yield* AWS.Rekognition.DetectCustomLabels();
// runtimeconst result = yield* detectCustomLabels({ ProjectVersionArn: modelArn, Image: { Bytes: imageBytes }, MinConfidence: 70,});const labels = (result.CustomLabels ?? []).map((l) => l.Name);DetectFaces
Section titled “DetectFaces”Source:
src/AWS/Rekognition/DetectFaces.ts
Runtime binding for rekognition:DetectFaces — detect the 100 largest faces in an image and return facial landmarks, pose, and optional attributes (age range, emotions, etc.).
The binding takes no arguments and grants the function
rekognition:DetectFaces on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DetectFacesHttp).
DetectFaces: Image Analysis
Section titled “DetectFaces: Image Analysis”// initconst detectFaces = yield* AWS.Rekognition.DetectFaces();
// runtimeconst result = yield* detectFaces({ Image: { Bytes: imageBytes }, Attributes: ["ALL"],});const ages = (result.FaceDetails ?? []).map((f) => f.AgeRange);DetectLabels
Section titled “DetectLabels”Source:
src/AWS/Rekognition/DetectLabels.ts
Runtime binding for rekognition:DetectLabels — detect real-world
entities (objects, scenes, concepts) in a JPEG or PNG image.
Rekognition is a pure pay-per-call service with no resource to manage:
the binding takes no arguments and grants the function
rekognition:DetectLabels (the action has no resource-level IAM).
Pass the image as raw bytes (Image.Bytes) or as an S3 object
reference (Image.S3Object) — raw distilled types, no marshalling.
Provide the implementation with
Effect.provide(AWS.Rekognition.DetectLabelsHttp).
DetectLabels: Detecting Labels
Section titled “DetectLabels: Detecting Labels”// initconst detectLabels = yield* AWS.Rekognition.DetectLabels();
// runtimeconst result = yield* detectLabels({ Image: { Bytes: imageBytes }, MaxLabels: 10, MinConfidence: 50,});const names = (result.Labels ?? []).map((label) => label.Name);DetectModerationLabels
Section titled “DetectModerationLabels”Source:
src/AWS/Rekognition/DetectModerationLabels.ts
Runtime binding for rekognition:DetectModerationLabels — detect unsafe or inappropriate content (explicit nudity, violence, etc.) in an image for content moderation.
The binding takes no arguments and grants the function
rekognition:DetectModerationLabels on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DetectModerationLabelsHttp).
DetectModerationLabels: Image Analysis
Section titled “DetectModerationLabels: Image Analysis”// initconst detectModerationLabels = yield* AWS.Rekognition.DetectModerationLabels();
// runtimeconst result = yield* detectModerationLabels({ Image: { Bytes: imageBytes }, MinConfidence: 60,});const flagged = (result.ModerationLabels ?? []).length > 0;DetectProtectiveEquipment
Section titled “DetectProtectiveEquipment”Source:
src/AWS/Rekognition/DetectProtectiveEquipment.ts
Runtime binding for rekognition:DetectProtectiveEquipment — detect personal protective equipment (face covers, hand covers, head covers) worn by persons in an image.
The binding takes no arguments and grants the function
rekognition:DetectProtectiveEquipment on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DetectProtectiveEquipmentHttp).
DetectProtectiveEquipment: Image Analysis
Section titled “DetectProtectiveEquipment: Image Analysis”// initconst detectProtectiveEquipment = yield* AWS.Rekognition.DetectProtectiveEquipment();
// runtimeconst result = yield* detectProtectiveEquipment({ Image: { Bytes: imageBytes }, SummarizationAttributes: { MinConfidence: 80, RequiredEquipmentTypes: ["FACE_COVER"], },});DetectText
Section titled “DetectText”Source:
src/AWS/Rekognition/DetectText.ts
Runtime binding for rekognition:DetectText — detect and extract lines and words of text in an image.
The binding takes no arguments and grants the function
rekognition:DetectText on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DetectTextHttp).
DetectText: Image Analysis
Section titled “DetectText: Image Analysis”// initconst detectText = yield* AWS.Rekognition.DetectText();
// runtimeconst result = yield* detectText({ Image: { Bytes: imageBytes } });const lines = (result.TextDetections ?? []) .filter((t) => t.Type === "LINE") .map((t) => t.DetectedText);DisassociateFaces
Section titled “DisassociateFaces”Source:
src/AWS/Rekognition/DisassociateFaces.ts
Runtime binding for rekognition:DisassociateFaces — remove the association between face IDs and a user.
The binding takes no arguments and grants the function
rekognition:DisassociateFaces on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.DisassociateFacesHttp).
DisassociateFaces: User Search
Section titled “DisassociateFaces: User Search”// initconst disassociateFaces = yield* AWS.Rekognition.DisassociateFaces();
// runtimeconst result = yield* disassociateFaces({ CollectionId: "tenant-42", UserId: userId, FaceIds: [faceId],});GetCelebrityInfo
Section titled “GetCelebrityInfo”Source:
src/AWS/Rekognition/GetCelebrityInfo.ts
Runtime binding for rekognition:GetCelebrityInfo — get the name and additional links for a celebrity ID returned by RecognizeCelebrities.
The binding takes no arguments and grants the function
rekognition:GetCelebrityInfo on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetCelebrityInfoHttp).
GetCelebrityInfo: Image Analysis
Section titled “GetCelebrityInfo: Image Analysis”// initconst getCelebrityInfo = yield* AWS.Rekognition.GetCelebrityInfo();
// runtimeconst info = yield* getCelebrityInfo({ Id: celebrityId });// info.Name, info.Urls, info.KnownGenderGetCelebrityRecognition
Section titled “GetCelebrityRecognition”Source:
src/AWS/Rekognition/GetCelebrityRecognition.ts
Runtime binding for rekognition:GetCelebrityRecognition — get the results of an asynchronous celebrities detection job started by StartCelebrityRecognition.
The binding takes no arguments and grants the function
rekognition:GetCelebrityRecognition on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetCelebrityRecognitionHttp).
GetCelebrityRecognition: Video Analysis
Section titled “GetCelebrityRecognition: Video Analysis”// initconst getCelebrityRecognition = yield* AWS.Rekognition.GetCelebrityRecognition();
// runtimeconst results = yield* getCelebrityRecognition({ JobId: jobId });if (results.JobStatus === "SUCCEEDED") { // consume the detections}GetContentModeration
Section titled “GetContentModeration”Source:
src/AWS/Rekognition/GetContentModeration.ts
Runtime binding for rekognition:GetContentModeration — get the results of an asynchronous inappropriate or offensive content detection job started by StartContentModeration.
The binding takes no arguments and grants the function
rekognition:GetContentModeration on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetContentModerationHttp).
GetContentModeration: Video Analysis
Section titled “GetContentModeration: Video Analysis”// initconst getContentModeration = yield* AWS.Rekognition.GetContentModeration();
// runtimeconst results = yield* getContentModeration({ JobId: jobId });if (results.JobStatus === "SUCCEEDED") { // consume the detections}GetFaceDetection
Section titled “GetFaceDetection”Source:
src/AWS/Rekognition/GetFaceDetection.ts
Runtime binding for rekognition:GetFaceDetection — get the results of an asynchronous faces detection job started by StartFaceDetection.
The binding takes no arguments and grants the function
rekognition:GetFaceDetection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetFaceDetectionHttp).
GetFaceDetection: Video Analysis
Section titled “GetFaceDetection: Video Analysis”// initconst getFaceDetection = yield* AWS.Rekognition.GetFaceDetection();
// runtimeconst results = yield* getFaceDetection({ JobId: jobId });if (results.JobStatus === "SUCCEEDED") { // consume the detections}GetFaceLivenessSessionResults
Section titled “GetFaceLivenessSessionResults”Source:
src/AWS/Rekognition/GetFaceLivenessSessionResults.ts
Runtime binding for rekognition:GetFaceLivenessSessionResults — get the confidence score, status, and audit images of a completed Face Liveness session.
The binding takes no arguments and grants the function
rekognition:GetFaceLivenessSessionResults on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetFaceLivenessSessionResultsHttp).
GetFaceLivenessSessionResults: Face Liveness
Section titled “GetFaceLivenessSessionResults: Face Liveness”// initconst getFaceLivenessSessionResults = yield* AWS.Rekognition.GetFaceLivenessSessionResults();
// runtimeconst results = yield* getFaceLivenessSessionResults({ SessionId: sessionId,});const isLive = results.Status === "SUCCEEDED" && (results.Confidence ?? 0) > 80;GetFaceSearch
Section titled “GetFaceSearch”Source:
src/AWS/Rekognition/GetFaceSearch.ts
Runtime binding for rekognition:GetFaceSearch — get the results of an asynchronous video face search started by StartFaceSearch.
The binding takes no arguments and grants the function
rekognition:GetFaceSearch on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetFaceSearchHttp).
GetFaceSearch: Video Analysis
Section titled “GetFaceSearch: Video Analysis”// initconst getFaceSearch = yield* AWS.Rekognition.GetFaceSearch();
// runtimeconst results = yield* getFaceSearch({ JobId: jobId });const persons = results.Persons ?? [];GetLabelDetection
Section titled “GetLabelDetection”Source:
src/AWS/Rekognition/GetLabelDetection.ts
Runtime binding for rekognition:GetLabelDetection — get the results of an asynchronous labels detection job started by StartLabelDetection.
The binding takes no arguments and grants the function
rekognition:GetLabelDetection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetLabelDetectionHttp).
GetLabelDetection: Video Analysis
Section titled “GetLabelDetection: Video Analysis”// initconst getLabelDetection = yield* AWS.Rekognition.GetLabelDetection();
// runtimeconst results = yield* getLabelDetection({ JobId: jobId });if (results.JobStatus === "SUCCEEDED") { // consume the detections}GetMediaAnalysisJob
Section titled “GetMediaAnalysisJob”Source:
src/AWS/Rekognition/GetMediaAnalysisJob.ts
Runtime binding for rekognition:GetMediaAnalysisJob — get the status and results location of a media analysis job.
The binding takes no arguments and grants the function
rekognition:GetMediaAnalysisJob on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetMediaAnalysisJobHttp).
GetMediaAnalysisJob: Media Analysis Jobs
Section titled “GetMediaAnalysisJob: Media Analysis Jobs”// initconst getMediaAnalysisJob = yield* AWS.Rekognition.GetMediaAnalysisJob();
// runtimeconst job = yield* getMediaAnalysisJob({ JobId: jobId });// job.Status, job.Results?.S3ObjectGetPersonTracking
Section titled “GetPersonTracking”Source:
src/AWS/Rekognition/GetPersonTracking.ts
Runtime binding for rekognition:GetPersonTracking — get the results of an asynchronous the path of persons detection job started by StartPersonTracking.
The binding takes no arguments and grants the function
rekognition:GetPersonTracking on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetPersonTrackingHttp).
GetPersonTracking: Video Analysis
Section titled “GetPersonTracking: Video Analysis”// initconst getPersonTracking = yield* AWS.Rekognition.GetPersonTracking();
// runtimeconst results = yield* getPersonTracking({ JobId: jobId });if (results.JobStatus === "SUCCEEDED") { // consume the detections}GetSegmentDetection
Section titled “GetSegmentDetection”Source:
src/AWS/Rekognition/GetSegmentDetection.ts
Runtime binding for rekognition:GetSegmentDetection — get the results of an asynchronous technical cues and shot segments detection job started by StartSegmentDetection.
The binding takes no arguments and grants the function
rekognition:GetSegmentDetection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetSegmentDetectionHttp).
GetSegmentDetection: Video Analysis
Section titled “GetSegmentDetection: Video Analysis”// initconst getSegmentDetection = yield* AWS.Rekognition.GetSegmentDetection();
// runtimeconst results = yield* getSegmentDetection({ JobId: jobId });if (results.JobStatus === "SUCCEEDED") { // consume the detections}GetTextDetection
Section titled “GetTextDetection”Source:
src/AWS/Rekognition/GetTextDetection.ts
Runtime binding for rekognition:GetTextDetection — get the results of an asynchronous text detection job started by StartTextDetection.
The binding takes no arguments and grants the function
rekognition:GetTextDetection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.GetTextDetectionHttp).
GetTextDetection: Video Analysis
Section titled “GetTextDetection: Video Analysis”// initconst getTextDetection = yield* AWS.Rekognition.GetTextDetection();
// runtimeconst results = yield* getTextDetection({ JobId: jobId });if (results.JobStatus === "SUCCEEDED") { // consume the detections}IndexFaces
Section titled “IndexFaces”Source:
src/AWS/Rekognition/IndexFaces.ts
Runtime binding for rekognition:IndexFaces — detect faces in an image and add them to a face collection for later search.
The binding takes no arguments and grants the function
rekognition:IndexFaces on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.IndexFacesHttp).
IndexFaces: Face Collections
Section titled “IndexFaces: Face Collections”// initconst indexFaces = yield* AWS.Rekognition.IndexFaces();
// runtimeconst result = yield* indexFaces({ CollectionId: "tenant-42", Image: { S3Object: { Bucket: "photos", Name: "profile.jpg" } }, ExternalImageId: userId,});const faceIds = (result.FaceRecords ?? []).map((r) => r.Face?.FaceId);ListCollections
Section titled “ListCollections”Source:
src/AWS/Rekognition/ListCollections.ts
Runtime binding for rekognition:ListCollections — list the face collection IDs in the account.
The binding takes no arguments and grants the function
rekognition:ListCollections on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.ListCollectionsHttp).
ListCollections: Face Collections
Section titled “ListCollections: Face Collections”// initconst listCollections = yield* AWS.Rekognition.ListCollections();
// runtimeconst page = yield* listCollections({ MaxResults: 20 });// page.CollectionIds, page.NextTokenListFaces
Section titled “ListFaces”Source:
src/AWS/Rekognition/ListFaces.ts
Runtime binding for rekognition:ListFaces — list the metadata of faces stored in a face collection.
The binding takes no arguments and grants the function
rekognition:ListFaces on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.ListFacesHttp).
ListFaces: Face Collections
Section titled “ListFaces: Face Collections”// initconst listFaces = yield* AWS.Rekognition.ListFaces();
// runtimeconst page = yield* listFaces({ CollectionId: "tenant-42", MaxResults: 100 });// page.Faces, page.NextTokenListMediaAnalysisJobs
Section titled “ListMediaAnalysisJobs”Source:
src/AWS/Rekognition/ListMediaAnalysisJobs.ts
Runtime binding for rekognition:ListMediaAnalysisJobs — list the media analysis jobs in the account.
The binding takes no arguments and grants the function
rekognition:ListMediaAnalysisJobs on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.ListMediaAnalysisJobsHttp).
ListMediaAnalysisJobs: Media Analysis Jobs
Section titled “ListMediaAnalysisJobs: Media Analysis Jobs”// initconst listMediaAnalysisJobs = yield* AWS.Rekognition.ListMediaAnalysisJobs();
// runtimeconst page = yield* listMediaAnalysisJobs({ MaxResults: 10 });// page.MediaAnalysisJobsListStreamProcessors
Section titled “ListStreamProcessors”Source:
src/AWS/Rekognition/ListStreamProcessors.ts
Runtime binding for rekognition:ListStreamProcessors — list the stream processors in the account.
The binding takes no arguments and grants the function
rekognition:ListStreamProcessors on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.ListStreamProcessorsHttp).
ListStreamProcessors: Stream Processors
Section titled “ListStreamProcessors: Stream Processors”// initconst listStreamProcessors = yield* AWS.Rekognition.ListStreamProcessors();
// runtimeconst page = yield* listStreamProcessors({ MaxResults: 10 });// page.StreamProcessorsListUsers
Section titled “ListUsers”Source:
src/AWS/Rekognition/ListUsers.ts
Runtime binding for rekognition:ListUsers — list the users in a face collection.
The binding takes no arguments and grants the function
rekognition:ListUsers on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.ListUsersHttp).
ListUsers: User Search
Section titled “ListUsers: User Search”// initconst listUsers = yield* AWS.Rekognition.ListUsers();
// runtimeconst page = yield* listUsers({ CollectionId: "tenant-42" });const userIds = (page.Users ?? []).map((u) => u.UserId);RecognizeCelebrities
Section titled “RecognizeCelebrities”Source:
src/AWS/Rekognition/RecognizeCelebrities.ts
Runtime binding for rekognition:RecognizeCelebrities — recognize up to 64 celebrities in an image.
The binding takes no arguments and grants the function
rekognition:RecognizeCelebrities on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.RecognizeCelebritiesHttp).
RecognizeCelebrities: Image Analysis
Section titled “RecognizeCelebrities: Image Analysis”// initconst recognizeCelebrities = yield* AWS.Rekognition.RecognizeCelebrities();
// runtimeconst result = yield* recognizeCelebrities({ Image: { S3Object: { Bucket: "photos", Name: "red-carpet.jpg" } },});const names = (result.CelebrityFaces ?? []).map((c) => c.Name);SearchFaces
Section titled “SearchFaces”Source:
src/AWS/Rekognition/SearchFaces.ts
Runtime binding for rekognition:SearchFaces — search a face collection for faces matching a face ID already stored in the collection.
The binding takes no arguments and grants the function
rekognition:SearchFaces on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.SearchFacesHttp).
SearchFaces: Face Collections
Section titled “SearchFaces: Face Collections”// initconst searchFaces = yield* AWS.Rekognition.SearchFaces();
// runtimeconst result = yield* searchFaces({ CollectionId: "tenant-42", FaceId: faceId, FaceMatchThreshold: 95,});const matches = result.FaceMatches ?? [];SearchFacesByImage
Section titled “SearchFacesByImage”Source:
src/AWS/Rekognition/SearchFacesByImage.ts
Runtime binding for rekognition:SearchFacesByImage — search a face collection for faces matching the largest face in a supplied image.
The binding takes no arguments and grants the function
rekognition:SearchFacesByImage on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.SearchFacesByImageHttp).
SearchFacesByImage: Face Collections
Section titled “SearchFacesByImage: Face Collections”// initconst searchFacesByImage = yield* AWS.Rekognition.SearchFacesByImage();
// runtimeconst result = yield* searchFacesByImage({ CollectionId: "tenant-42", Image: { Bytes: imageBytes }, FaceMatchThreshold: 95,});const bestMatch = result.FaceMatches?.[0]?.Face?.ExternalImageId;SearchUsers
Section titled “SearchUsers”Source:
src/AWS/Rekognition/SearchUsers.ts
Runtime binding for rekognition:SearchUsers — search a face collection for users matching a face ID or user ID.
The binding takes no arguments and grants the function
rekognition:SearchUsers on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.SearchUsersHttp).
SearchUsers: User Search
Section titled “SearchUsers: User Search”// initconst searchUsers = yield* AWS.Rekognition.SearchUsers();
// runtimeconst result = yield* searchUsers({ CollectionId: "tenant-42", FaceId: faceId,});const matches = result.UserMatches ?? [];SearchUsersByImage
Section titled “SearchUsersByImage”Source:
src/AWS/Rekognition/SearchUsersByImage.ts
Runtime binding for rekognition:SearchUsersByImage — search a face collection for users matching the largest face in a supplied image.
The binding takes no arguments and grants the function
rekognition:SearchUsersByImage on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.SearchUsersByImageHttp).
SearchUsersByImage: User Search
Section titled “SearchUsersByImage: User Search”// initconst searchUsersByImage = yield* AWS.Rekognition.SearchUsersByImage();
// runtimeconst result = yield* searchUsersByImage({ CollectionId: "tenant-42", Image: { Bytes: imageBytes },});const bestUser = result.UserMatches?.[0]?.User?.UserId;StartCelebrityRecognition
Section titled “StartCelebrityRecognition”Source:
src/AWS/Rekognition/StartCelebrityRecognition.ts
Runtime binding for rekognition:StartCelebrityRecognition — start asynchronous detection of celebrities in a stored video.
Rekognition Video jobs read the video from S3 and run asynchronously —
poll the paired Get* binding with the returned JobId, or pass a
NotificationChannel (SNS topic + IAM role the caller must be allowed
to pass) to be notified on completion.
The binding takes no arguments and grants the function
rekognition:StartCelebrityRecognition on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartCelebrityRecognitionHttp).
StartCelebrityRecognition: Video Analysis
Section titled “StartCelebrityRecognition: Video Analysis”// initconst startCelebrityRecognition = yield* AWS.Rekognition.StartCelebrityRecognition();
// runtimeconst started = yield* startCelebrityRecognition({ Video: { S3Object: { Bucket: "videos", Name: "input.mp4" } },});// started.JobIdStartContentModeration
Section titled “StartContentModeration”Source:
src/AWS/Rekognition/StartContentModeration.ts
Runtime binding for rekognition:StartContentModeration — start asynchronous detection of inappropriate or offensive content in a stored video.
Rekognition Video jobs read the video from S3 and run asynchronously —
poll the paired Get* binding with the returned JobId, or pass a
NotificationChannel (SNS topic + IAM role the caller must be allowed
to pass) to be notified on completion.
The binding takes no arguments and grants the function
rekognition:StartContentModeration on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartContentModerationHttp).
StartContentModeration: Video Analysis
Section titled “StartContentModeration: Video Analysis”// initconst startContentModeration = yield* AWS.Rekognition.StartContentModeration();
// runtimeconst started = yield* startContentModeration({ Video: { S3Object: { Bucket: "videos", Name: "input.mp4" } },});// started.JobIdStartFaceDetection
Section titled “StartFaceDetection”Source:
src/AWS/Rekognition/StartFaceDetection.ts
Runtime binding for rekognition:StartFaceDetection — start asynchronous detection of faces in a stored video.
Rekognition Video jobs read the video from S3 and run asynchronously —
poll the paired Get* binding with the returned JobId, or pass a
NotificationChannel (SNS topic + IAM role the caller must be allowed
to pass) to be notified on completion.
The binding takes no arguments and grants the function
rekognition:StartFaceDetection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartFaceDetectionHttp).
StartFaceDetection: Video Analysis
Section titled “StartFaceDetection: Video Analysis”// initconst startFaceDetection = yield* AWS.Rekognition.StartFaceDetection();
// runtimeconst started = yield* startFaceDetection({ Video: { S3Object: { Bucket: "videos", Name: "input.mp4" } },});// started.JobIdStartFaceSearch
Section titled “StartFaceSearch”Source:
src/AWS/Rekognition/StartFaceSearch.ts
Runtime binding for rekognition:StartFaceSearch — start an asynchronous search of a stored video for faces matching a face collection.
Rekognition Video jobs read the video from S3 and run asynchronously —
poll the paired Get* binding with the returned JobId, or pass a
NotificationChannel (SNS topic + IAM role the caller must be allowed
to pass) to be notified on completion.
The binding takes no arguments and grants the function
rekognition:StartFaceSearch on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartFaceSearchHttp).
StartFaceSearch: Video Analysis
Section titled “StartFaceSearch: Video Analysis”// initconst startFaceSearch = yield* AWS.Rekognition.StartFaceSearch();
// runtimeconst started = yield* startFaceSearch({ Video: { S3Object: { Bucket: "videos", Name: "lobby.mp4" } }, CollectionId: "tenant-42",});// started.JobIdStartLabelDetection
Section titled “StartLabelDetection”Source:
src/AWS/Rekognition/StartLabelDetection.ts
Runtime binding for rekognition:StartLabelDetection — start asynchronous detection of labels (objects, scenes, activities) in a stored video.
Rekognition Video jobs read the video from S3 and run asynchronously —
poll the paired Get* binding with the returned JobId, or pass a
NotificationChannel (SNS topic + IAM role the caller must be allowed
to pass) to be notified on completion.
The binding takes no arguments and grants the function
rekognition:StartLabelDetection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartLabelDetectionHttp).
StartLabelDetection: Video Analysis
Section titled “StartLabelDetection: Video Analysis”// initconst startLabelDetection = yield* AWS.Rekognition.StartLabelDetection();
// runtimeconst started = yield* startLabelDetection({ Video: { S3Object: { Bucket: "videos", Name: "input.mp4" } },});// started.JobIdStartMediaAnalysisJob
Section titled “StartMediaAnalysisJob”Source:
src/AWS/Rekognition/StartMediaAnalysisJob.ts
Runtime binding for rekognition:StartMediaAnalysisJob — start an asynchronous media analysis job (e.g. bulk content moderation) over an S3 manifest of images.
The binding takes no arguments and grants the function
rekognition:StartMediaAnalysisJob on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartMediaAnalysisJobHttp).
StartMediaAnalysisJob: Media Analysis Jobs
Section titled “StartMediaAnalysisJob: Media Analysis Jobs”// initconst startMediaAnalysisJob = yield* AWS.Rekognition.StartMediaAnalysisJob();
// runtimeconst started = yield* startMediaAnalysisJob({ OperationsConfig: { DetectModerationLabels: { MinConfidence: 60 } }, Input: { S3Object: { Bucket: "media", Name: "manifest.jsonl" } }, OutputConfig: { S3Bucket: "media", S3KeyPrefix: "results/" },});// started.JobIdStartPersonTracking
Section titled “StartPersonTracking”Source:
src/AWS/Rekognition/StartPersonTracking.ts
Runtime binding for rekognition:StartPersonTracking — start asynchronous detection of the path of persons in a stored video.
Rekognition Video jobs read the video from S3 and run asynchronously —
poll the paired Get* binding with the returned JobId, or pass a
NotificationChannel (SNS topic + IAM role the caller must be allowed
to pass) to be notified on completion.
The binding takes no arguments and grants the function
rekognition:StartPersonTracking on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartPersonTrackingHttp).
StartPersonTracking: Video Analysis
Section titled “StartPersonTracking: Video Analysis”// initconst startPersonTracking = yield* AWS.Rekognition.StartPersonTracking();
// runtimeconst started = yield* startPersonTracking({ Video: { S3Object: { Bucket: "videos", Name: "input.mp4" } },});// started.JobIdStartProjectVersion
Section titled “StartProjectVersion”Source:
src/AWS/Rekognition/StartProjectVersion.ts
Runtime binding for rekognition:StartProjectVersion — start hosting a trained Custom Labels model version so it can serve DetectCustomLabels requests.
The binding takes no arguments and grants the function
rekognition:StartProjectVersion on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartProjectVersionHttp).
StartProjectVersion: Custom Labels
Section titled “StartProjectVersion: Custom Labels”// initconst startProjectVersion = yield* AWS.Rekognition.StartProjectVersion();
// runtimeconst started = yield* startProjectVersion({ ProjectVersionArn: modelArn, MinInferenceUnits: 1,});// started.StatusStartSegmentDetection
Section titled “StartSegmentDetection”Source:
src/AWS/Rekognition/StartSegmentDetection.ts
Runtime binding for rekognition:StartSegmentDetection — start asynchronous detection of technical cues and shot segments in a stored video.
Rekognition Video jobs read the video from S3 and run asynchronously —
poll the paired Get* binding with the returned JobId, or pass a
NotificationChannel (SNS topic + IAM role the caller must be allowed
to pass) to be notified on completion.
The binding takes no arguments and grants the function
rekognition:StartSegmentDetection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartSegmentDetectionHttp).
StartSegmentDetection: Video Analysis
Section titled “StartSegmentDetection: Video Analysis”// initconst startSegmentDetection = yield* AWS.Rekognition.StartSegmentDetection();
// runtimeconst started = yield* startSegmentDetection({ Video: { S3Object: { Bucket: "videos", Name: "input.mp4" } },});// started.JobIdStartStreamProcessor
Section titled “StartStreamProcessor”Source:
src/AWS/Rekognition/StartStreamProcessor.ts
Runtime binding for rekognition:StartStreamProcessor — start a stream processor that analyzes a Kinesis Video Stream (face search or connected-home label detection).
The binding takes no arguments and grants the function
rekognition:StartStreamProcessor on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartStreamProcessorHttp).
StartStreamProcessor: Stream Processors
Section titled “StartStreamProcessor: Stream Processors”// initconst startStreamProcessor = yield* AWS.Rekognition.StartStreamProcessor();
// runtimeconst started = yield* startStreamProcessor({ Name: "lobby-camera" });// started.SessionId (connected-home processors)StartTextDetection
Section titled “StartTextDetection”Source:
src/AWS/Rekognition/StartTextDetection.ts
Runtime binding for rekognition:StartTextDetection — start asynchronous detection of text in a stored video.
Rekognition Video jobs read the video from S3 and run asynchronously —
poll the paired Get* binding with the returned JobId, or pass a
NotificationChannel (SNS topic + IAM role the caller must be allowed
to pass) to be notified on completion.
The binding takes no arguments and grants the function
rekognition:StartTextDetection on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StartTextDetectionHttp).
StartTextDetection: Video Analysis
Section titled “StartTextDetection: Video Analysis”// initconst startTextDetection = yield* AWS.Rekognition.StartTextDetection();
// runtimeconst started = yield* startTextDetection({ Video: { S3Object: { Bucket: "videos", Name: "input.mp4" } },});// started.JobIdStopProjectVersion
Section titled “StopProjectVersion”Source:
src/AWS/Rekognition/StopProjectVersion.ts
Runtime binding for rekognition:StopProjectVersion — stop hosting a Custom Labels model version to stop incurring inference-unit charges.
The binding takes no arguments and grants the function
rekognition:StopProjectVersion on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StopProjectVersionHttp).
StopProjectVersion: Custom Labels
Section titled “StopProjectVersion: Custom Labels”// initconst stopProjectVersion = yield* AWS.Rekognition.StopProjectVersion();
// runtimeconst stopped = yield* stopProjectVersion({ ProjectVersionArn: modelArn });// stopped.StatusStopStreamProcessor
Section titled “StopStreamProcessor”Source:
src/AWS/Rekognition/StopStreamProcessor.ts
Runtime binding for rekognition:StopStreamProcessor — stop a running stream processor.
The binding takes no arguments and grants the function
rekognition:StopStreamProcessor on * (Rekognition data-plane resources such
as collections, users, and jobs are routinely created at runtime, so
their identifiers are unknown at deploy time). Provide the
implementation with Effect.provide(AWS.Rekognition.StopStreamProcessorHttp).
StopStreamProcessor: Stream Processors
Section titled “StopStreamProcessor: Stream Processors”// initconst stopStreamProcessor = yield* AWS.Rekognition.StopStreamProcessor();
// runtimeyield* stopStreamProcessor({ Name: "lobby-camera" });