describeModelVersions method
Gets all of the model versions for the specified model type or for the specified model type and model ID. You can also get details for a single, specified model version.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results to return.
Parameter modelId :
The model ID.
Parameter modelType :
The model type.
Parameter modelVersionNumber :
The model version number.
Parameter nextToken :
The next token from the previous results.
Implementation
Future<DescribeModelVersionsResult> describeModelVersions({
int? maxResults,
String? modelId,
ModelTypeEnum? modelType,
String? modelVersionNumber,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
10,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.DescribeModelVersions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'maxResults': maxResults,
if (modelId != null) 'modelId': modelId,
if (modelType != null) 'modelType': modelType.value,
if (modelVersionNumber != null)
'modelVersionNumber': modelVersionNumber,
if (nextToken != null) 'nextToken': nextToken,
},
);
return DescribeModelVersionsResult.fromJson(jsonResponse.body);
}