use of software.amazon.awssdk.services.rekognition.model.DeleteFacesRequest in project aws-doc-sdk-examples by awsdocs.
the class DeleteFacesFromCollection method deleteFacesCollection.
// snippet-start:[rekognition.java2.delete_faces_collection.main]
public static void deleteFacesCollection(RekognitionClient rekClient, String collectionId, String faceId) {
try {
DeleteFacesRequest deleteFacesRequest = DeleteFacesRequest.builder().collectionId(collectionId).faceIds(faceId).build();
rekClient.deleteFaces(deleteFacesRequest);
System.out.println("The face was deleted from the collection.");
} catch (RekognitionException e) {
System.out.println(e.getMessage());
System.exit(1);
}
}
Aggregations