StopTask
Source:
src/AWS/ECS/StopTask.ts
Runtime binding for ecs:StopTask.
Bind this operation to a Cluster inside a function runtime to get a
callable that stops a running task in the bound cluster. The cluster ARN is
injected automatically and the host is granted ecs:StopTask on the
cluster’s tasks.
Stopping Tasks
Section titled “Stopping Tasks”const stopTask = yield* AWS.ECS.StopTask(cluster);
const response = yield* stopTask({ task: taskArn, reason: "drained by worker",});