- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CancelMLTaskRunCommand
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
.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, CancelMLTaskRunCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, CancelMLTaskRunCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // CancelMLTaskRunRequest
TransformId: "STRING_VALUE", // required
TaskRunId: "STRING_VALUE", // required
};
const command = new CancelMLTaskRunCommand(input);
const response = await client.send(command);
// { // CancelMLTaskRunResponse
// TransformId: "STRING_VALUE",
// TaskRunId: "STRING_VALUE",
// Status: "STARTING" || "RUNNING" || "STOPPING" || "STOPPED" || "SUCCEEDED" || "FAILED" || "TIMEOUT",
// };
CancelMLTaskRunCommand Input
See CancelMLTaskRunCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
TaskRunId Required | string | undefined | A unique identifier for the task run. |
TransformId Required | string | undefined | The unique identifier of the machine learning transform. |
CancelMLTaskRunCommand Output
See CancelMLTaskRunCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Status | TaskStatusType | undefined | The status for this run. |
TaskRunId | string | undefined | The unique identifier for the task run. |
TransformId | string | undefined | The unique identifier of the machine learning transform. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotFoundException | client | A specified entity does not exist |
InternalServiceException | server | An internal service error occurred. |
InvalidInputException | client | The input provided was not valid. |
OperationTimeoutException | client | The operation timed out. |
GlueServiceException | Base exception class for all service exceptions from Glue service. |