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.
Parameters:
-
transform_id
(HashString)
–
The unique identifier of the machine learning transform.
-
task_run_id
(HashString)
–
A unique identifier for the task run.
Raises:
Source code in docs_src/capo_glue/_services/async_glue.py
| async def cancel_ml_task_run(
self,
transform_id: "capo_glue.types.hash_string.HashString",
task_run_id: "capo_glue.types.hash_string.HashString",
*,
config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> "capo_glue.types.cancel_ml_task_run_response.CancelMLTaskRunResponse":
"""<p>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 <code>CancelMLTaskRun</code> with a task run's parent transform's <code>TransformID</code> and the task run's <code>TaskRunId</code>. </p>
Args:
transform_id: <p>The unique identifier of the machine learning transform.</p>
task_run_id: <p>A unique identifier for the task run.</p>
Raises:
capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_glue.types.cancel_ml_task_run_request.CancelMLTaskRunRequest]",
) -> AsyncOperationResponse[
"capo_glue.types.cancel_ml_task_run_response.CancelMLTaskRunResponse"
]:
import capo_glue._operations.aws_glue.cancel_ml_task_run
(
output,
http_response,
) = await capo_glue._operations.aws_glue.cancel_ml_task_run.async_cancel_ml_task_run(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CancelMLTaskRun")
)
input_: capo_glue.types.cancel_ml_task_run_request.CancelMLTaskRunRequest = {
"transform_id": transform_id,
"task_run_id": task_run_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|