describeCollection method

Future<DescribeCollectionResponse> describeCollection({
  1. required String collectionId,
})

Describes the specified collection. You can use DescribeCollection to get information, such as the number of faces indexed into a collection and the version of the model used by the collection for face detection.

For more information, see Describing a Collection in the Amazon Rekognition Developer Guide.

May throw InvalidParameterException. May throw AccessDeniedException. May throw InternalServerError. May throw ThrottlingException. May throw ProvisionedThroughputExceededException. May throw ResourceNotFoundException.

Parameter collectionId : The ID of the collection to describe.

Implementation

Future<DescribeCollectionResponse> describeCollection({
  required String collectionId,
}) async {
  ArgumentError.checkNotNull(collectionId, 'collectionId');
  _s.validateStringLength(
    'collectionId',
    collectionId,
    1,
    255,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RekognitionService.DescribeCollection'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CollectionId': collectionId,
    },
  );

  return DescribeCollectionResponse.fromJson(jsonResponse.body);
}