Skip to content

UpdateTaskExecution

Source: src/AWS/DataSync/UpdateTaskExecution.ts

Runtime binding for datasync:UpdateTaskExecution.

Modifies an in-flight execution of the bound Task. The only mutable option is BytesPerSecond — throttle (or unthrottle with -1) a running transfer without cancelling it. The execution must be launching, preparing, transferring, or verifying. Address it with the ARN returned by StartTaskExecution; access is granted on the bound task’s executions. Provide the implementation with Effect.provide(AWS.DataSync.UpdateTaskExecutionHttp).

// init — bind the operation to the task
const updateTaskExecution = yield* AWS.DataSync.UpdateTaskExecution(task);
// runtime — cap the transfer at 1 MiB/s
yield* updateTaskExecution({
TaskExecutionArn: executionArn,
Options: { BytesPerSecond: 1024 * 1024 },
});