describeProjects method

Future<DescribeProjectsResponse> describeProjects({
  1. List<CustomizationFeature>? features,
  2. int? maxResults,
  3. String? nextToken,
  4. List<String>? projectNames,
})

Gets information about your Rekognition projects.

This operation requires permissions to perform the rekognition:DescribeProjects action.

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

Parameter features : Specifies the type of customization to filter projects by. If no value is specified, CUSTOM_LABELS is used as a default.

Parameter maxResults : The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.

Parameter nextToken : If the previous response was incomplete (because there is more results to retrieve), Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.

Parameter projectNames : A list of the projects that you want Rekognition to describe. If you don't specify a value, the response includes descriptions for all the projects in your AWS account.

Implementation

Future<DescribeProjectsResponse> describeProjects({
  List<CustomizationFeature>? features,
  int? maxResults,
  String? nextToken,
  List<String>? projectNames,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RekognitionService.DescribeProjects'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (features != null) 'Features': features.map((e) => e.value).toList(),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (projectNames != null) 'ProjectNames': projectNames,
    },
  );

  return DescribeProjectsResponse.fromJson(jsonResponse.body);
}