describeProjectVersions method
Lists and describes the versions of an Amazon Rekognition project. You can
specify up to 10 model or adapter versions in
ProjectVersionArns. If you don't specify a value,
descriptions for all model/adapter versions in the project are returned.
This operation requires permissions to perform the
rekognition:DescribeProjectVersions action.
May throw AccessDeniedException.
May throw InternalServerError.
May throw InvalidPaginationTokenException.
May throw InvalidParameterException.
May throw ProvisionedThroughputExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter projectArn :
The Amazon Resource Name (ARN) of the project that contains the
model/adapter you want to describe.
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), Amazon Rekognition returns a pagination token in the response.
You can use this pagination token to retrieve the next set of results.
Parameter versionNames :
A list of model or project version names that you want to describe. You
can add up to 10 model or project version names to the list. If you don't
specify a value, all project version descriptions are returned. A version
name is part of a project version ARN. For example,
my-model.2020-01-21T09.10.15 is the version name in the
following ARN.
arn:aws:rekognition:us-east-1:123456789012:project/getting-started/version/my-model.2020-01-21T09.10.15/1234567890123.
Implementation
Future<DescribeProjectVersionsResponse> describeProjectVersions({
required String projectArn,
int? maxResults,
String? nextToken,
List<String>? versionNames,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RekognitionService.DescribeProjectVersions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProjectArn': projectArn,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (versionNames != null) 'VersionNames': versionNames,
},
);
return DescribeProjectVersionsResponse.fromJson(jsonResponse.body);
}