cancelMLTaskRun method
Cancels (stops) a task run. Machine learning task runs are asynchronous
tasks that Glue runs on your behalf as part of various machine learning
workflows. You can cancel a machine learning task run at any time by
calling CancelMLTaskRun with a task run's parent transform's
TransformID and the task run's TaskRunId.
May throw EntityNotFoundException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
Parameter taskRunId :
A unique identifier for the task run.
Parameter transformId :
The unique identifier of the machine learning transform.
Implementation
Future<CancelMLTaskRunResponse> cancelMLTaskRun({
required String taskRunId,
required String transformId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.CancelMLTaskRun'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TaskRunId': taskRunId,
'TransformId': transformId,
},
);
return CancelMLTaskRunResponse.fromJson(jsonResponse.body);
}