Search in sources :

Example 1 with DeleteCollectionResponse

use of software.amazon.awssdk.services.rekognition.model.DeleteCollectionResponse in project aws-doc-sdk-examples by awsdocs.

the class DeleteCollection method deleteMyCollection.

// snippet-start:[rekognition.java2.delete_collection.main]
public static void deleteMyCollection(RekognitionClient rekClient, String collectionId) {
    try {
        DeleteCollectionRequest deleteCollectionRequest = DeleteCollectionRequest.builder().collectionId(collectionId).build();
        DeleteCollectionResponse deleteCollectionResponse = rekClient.deleteCollection(deleteCollectionRequest);
        System.out.println(collectionId + ": " + deleteCollectionResponse.statusCode().toString());
    } catch (RekognitionException e) {
        System.out.println(e.getMessage());
        System.exit(1);
    }
}
Also used : DeleteCollectionRequest(software.amazon.awssdk.services.rekognition.model.DeleteCollectionRequest) RekognitionException(software.amazon.awssdk.services.rekognition.model.RekognitionException) DeleteCollectionResponse(software.amazon.awssdk.services.rekognition.model.DeleteCollectionResponse)

Aggregations

DeleteCollectionRequest (software.amazon.awssdk.services.rekognition.model.DeleteCollectionRequest)1 DeleteCollectionResponse (software.amazon.awssdk.services.rekognition.model.DeleteCollectionResponse)1 RekognitionException (software.amazon.awssdk.services.rekognition.model.RekognitionException)1