getModelVersion method
Future<GetModelVersionResult>
getModelVersion({
- required String modelId,
- required ModelTypeEnum modelType,
- required String modelVersionNumber,
Gets the details of the specified model version.
May throw ValidationException. May throw ResourceNotFoundException. May throw InternalServerException. May throw AccessDeniedException.
Parameter modelId
:
The model ID.
Parameter modelType
:
The model type.
Parameter modelVersionNumber
:
The model version number.
Implementation
Future<GetModelVersionResult> getModelVersion({
required String modelId,
required ModelTypeEnum modelType,
required String modelVersionNumber,
}) async {
ArgumentError.checkNotNull(modelId, 'modelId');
_s.validateStringLength(
'modelId',
modelId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(modelType, 'modelType');
ArgumentError.checkNotNull(modelVersionNumber, 'modelVersionNumber');
_s.validateStringLength(
'modelVersionNumber',
modelVersionNumber,
3,
7,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.GetModelVersion'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'modelId': modelId,
'modelType': modelType.toValue(),
'modelVersionNumber': modelVersionNumber,
},
);
return GetModelVersionResult.fromJson(jsonResponse.body);
}