describeModelVersions method
Future<DescribeModelVersionsResult>
describeModelVersions({
- int? maxResults,
- String? modelId,
- ModelTypeEnum? modelType,
- String? modelVersionNumber,
- String? nextToken,
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 ValidationException. May throw ResourceNotFoundException. May throw InternalServerException. May throw AccessDeniedException.
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,
);
_s.validateStringLength(
'modelId',
modelId,
1,
64,
);
_s.validateStringLength(
'modelVersionNumber',
modelVersionNumber,
3,
7,
);
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.toValue(),
if (modelVersionNumber != null)
'modelVersionNumber': modelVersionNumber,
if (nextToken != null) 'nextToken': nextToken,
},
);
return DescribeModelVersionsResult.fromJson(jsonResponse.body);
}