UpdateTaskExecutionCommand

Updates the configuration of a running DataSync task execution.

Currently, the only Option that you can modify with UpdateTaskExecution is BytesPerSecond  , which throttles bandwidth for a running or queued task execution.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DataSyncClient, UpdateTaskExecutionCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, UpdateTaskExecutionCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // UpdateTaskExecutionRequest
  TaskExecutionArn: "STRING_VALUE", // required
  Options: { // Options
    VerifyMode: "POINT_IN_TIME_CONSISTENT" || "ONLY_FILES_TRANSFERRED" || "NONE",
    OverwriteMode: "ALWAYS" || "NEVER",
    Atime: "NONE" || "BEST_EFFORT",
    Mtime: "NONE" || "PRESERVE",
    Uid: "NONE" || "INT_VALUE" || "NAME" || "BOTH",
    Gid: "NONE" || "INT_VALUE" || "NAME" || "BOTH",
    PreserveDeletedFiles: "PRESERVE" || "REMOVE",
    PreserveDevices: "NONE" || "PRESERVE",
    PosixPermissions: "NONE" || "PRESERVE",
    BytesPerSecond: Number("long"),
    TaskQueueing: "ENABLED" || "DISABLED",
    LogLevel: "OFF" || "BASIC" || "TRANSFER",
    TransferMode: "CHANGED" || "ALL",
    SecurityDescriptorCopyFlags: "NONE" || "OWNER_DACL" || "OWNER_DACL_SACL",
    ObjectTags: "PRESERVE" || "NONE",
  },
};
const command = new UpdateTaskExecutionCommand(input);
const response = await client.send(command);
// {};

UpdateTaskExecutionCommand Input

See UpdateTaskExecutionCommandInput for more details

Parameter
Type
Description
Options
Required
Options | undefined

Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.

Each option has a default value. Unless you need to, you don't have to configure any option before calling StartTaskExecution .

You also can override your task options for each task execution. For example, you might want to adjust the LogLevel for an individual execution.

TaskExecutionArn
Required
string | undefined

Specifies the Amazon Resource Name (ARN) of the task execution that you're updating.

UpdateTaskExecutionCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InternalException
server

This exception is thrown when an error occurs in the DataSync service.

InvalidRequestException
client

This exception is thrown when the client submits a malformed request.

DataSyncServiceException
Base exception class for all service exceptions from DataSync service.