deleteTrial method
Deletes the specified trial. All trial components that make up the trial must be deleted first. Use the DescribeTrialComponent API to get the list of trial components.
May throw ResourceNotFound.
Parameter trialName
:
The name of the trial to delete.
Implementation
Future<DeleteTrialResponse> deleteTrial({
required String trialName,
}) async {
ArgumentError.checkNotNull(trialName, 'trialName');
_s.validateStringLength(
'trialName',
trialName,
1,
120,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.DeleteTrial'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TrialName': trialName,
},
);
return DeleteTrialResponse.fromJson(jsonResponse.body);
}