use of software.amazon.awssdk.services.rekognition.model.ListCollectionsRequest in project aws-doc-sdk-examples by awsdocs.
the class ListCollections method listAllCollections.
// snippet-start:[rekognition.java2.list_collections.main]
public static void listAllCollections(RekognitionClient rekClient) {
try {
ListCollectionsRequest listCollectionsRequest = ListCollectionsRequest.builder().maxResults(10).build();
ListCollectionsResponse response = rekClient.listCollections(listCollectionsRequest);
List<String> collectionIds = response.collectionIds();
for (String resultId : collectionIds) {
System.out.println(resultId);
}
} catch (RekognitionException e) {
System.out.println(e.getMessage());
System.exit(1);
}
}
Aggregations