Skip to content

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).

// init
const deleteCollection = yield* AWS.Rekognition.DeleteCollection();
// runtime
yield* deleteCollection({ CollectionId: `tenant-${tenantId}` }).pipe(
Effect.catchTag("ResourceNotFoundException", () => Effect.void),
);