Search in sources :

Example 1 with DescribeCollectionRequest

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

the class DescribeCollection method describeColl.

// snippet-start:[rekognition.java2.describe_collection.main]
public static void describeColl(RekognitionClient rekClient, String collectionName) {
    try {
        DescribeCollectionRequest describeCollectionRequest = DescribeCollectionRequest.builder().collectionId(collectionName).build();
        DescribeCollectionResponse describeCollectionResponse = rekClient.describeCollection(describeCollectionRequest);
        System.out.println("Collection Arn : " + describeCollectionResponse.collectionARN());
        System.out.println("Created : " + describeCollectionResponse.creationTimestamp().toString());
    } catch (RekognitionException e) {
        System.out.println(e.getMessage());
        System.exit(1);
    }
}
Also used : DescribeCollectionRequest(software.amazon.awssdk.services.rekognition.model.DescribeCollectionRequest) DescribeCollectionResponse(software.amazon.awssdk.services.rekognition.model.DescribeCollectionResponse) RekognitionException(software.amazon.awssdk.services.rekognition.model.RekognitionException)

Aggregations

DescribeCollectionRequest (software.amazon.awssdk.services.rekognition.model.DescribeCollectionRequest)1 DescribeCollectionResponse (software.amazon.awssdk.services.rekognition.model.DescribeCollectionResponse)1 RekognitionException (software.amazon.awssdk.services.rekognition.model.RekognitionException)1