All Products
Search
Document Center

DataWorks:UpdateTask

Last Updated:Jan 12, 2026

Update a task. The changes are synchronized to Data Studio, which creates a new saved version.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:*update
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
IdlongYes

The task ID.

1234
ClientUniqueCodestringNo

The unique code of the client. This code uniquely identifies a task. This parameter is used to create a task asynchronously and implement the idempotence of the task. If you do not specify this parameter when you create the task, the system automatically generates a unique code. The unique code is uniquely associated with the task ID. If you specify this parameter when you update or delete the task, the value of this parameter must be the unique code that is used to create the task.

Task_0bc5213917368545132902xxxxxxxx
EnvTypestringNo

The project environment.

  • Prod
  • Dev
Prod
NamestringNo

Name.

SQL node
DescriptionstringNo

The description of the task.

test
OwnerstringNo

The account ID of the task owner.

1000
InstanceModestringNo

The instance generation mode.

  • T+1: the next day
  • Immediately Note: Scheduled instances are generated only if the scheduled time is at least 10 minutes after the publish time. Real-time instance generation is unavailable during the global instance generation period (23:30 to 24:00). You can publish nodes during this period, but instances for the new nodes will not be generated automatically.
T+1
TimeoutintegerNo

Task execution timeout in seconds. Must be greater than 3600.

3600
RerunModestringNo

The rerun mode. Valid values:

  • AllDenied: The task cannot be rerun.
  • FailureAllowed: The task can be rerun only after it fails.
  • AllAllowed: The task can always be rerun.
AllAllowed
RerunTimesintegerNo

The number of times that the task is rerun. This parameter takes effect only if the RerunMode parameter is set to AllAllowed or FailureAllowed.

3
RerunIntervalintegerNo

The rerun interval. Unit: milliseconds. Must not exceed 1800000.

60
ScriptobjectNo

The run script information.

ContentdeprecatedstringNo

The script content.

echo "helloWorld"
ParametersstringNo

The script parameter list.

para1=$bizdate
TriggerobjectNo

The triggering method.

TypestringNo

The triggering type. Valid values:

  • Scheduler: periodically triggered
  • Manual
Scheduler
RecurrencestringNo

The running mode of the task after it is triggered. This parameter takes effect only if the Type parameter is set to Scheduler. Valid values:

  • Pause
  • Skip
  • Normal
Normal
CronstringNo

The Cron expression. This parameter takes effect only if the Type parameter is set to Scheduler.

00 00 00 * * ?
StartTimestringNo

The time when periodic triggering takes effect. This parameter takes effect only if the Type parameter is set to Scheduler. The value of this parameter is in theyyyy-mm-dd hh:mm:ss format.

1970-01-01 00:00:00
EndTimestringNo

The expiration time of periodic triggering. Takes effect only when type is set to Scheduler. The value of this parameter is in theyyyy-mm-dd hh:mm:ss format.

9999-01-01 00:00:00
CycleTypestringNo

Cycle type. This parameter takes effect only when Type is set to Scheduler and the cron expression specifies hourly scheduling. Default value: Daily

  • Daily: Schedules jobs on a daily basis.
  • NotDaily: Schedules jobs on an hourly basis.
Daily
RuntimeResourceobjectNo

Runtime environment configurations, such as resource group information.

ResourceGroupIdstringNo

The identifier of the scheduling resource group used in the task runtime configuration.

S_res_group_524258031846018_1684XXXXXXXXX
ImagestringNo

The image ID used in the task runtime configuration.

i-xxxxxx
CustringNo

The default number of compute units (CUs) configured for task running.

0.25
DataSourceobjectNo

The information about the associated data source.

NamestringNo

The name of the data source.

odps_test
InputsobjectNo

The input information.

Variablesarray<object>No

The variables.

VariableobjectNo
TypestringYes

The type. Valid values:

  • Constant: constant value.
  • PassThrough: node output.
  • System: variable.
  • NodeOutput: script output.
Constant
ValuestringNo

The value of the variable.

value1
NamestringNo

The name of the variable.

key1
OutputsobjectNo

The output information.

TaskOutputsarray<object>No

The task outputs.

TaskOutputobjectNo
OutputstringNo

The identifier of the output.

pre.odps_sql_demo_0
Variablesarray<object>No

The variables.

VariableobjectNo
TypestringYes

The type. Valid values:

  • Constant: constant value.
  • PassThrough: node output.
  • System: variable.
  • NodeOutput: script output.
Constant
ValuestringNo

The value of the variable.

value1
NamestringNo

The name of the variable.

key1
Dependenciesarray<object>No

The dependency information.

DependenciesobjectNo
TypestringYes

The dependency type. Valid values:

  • CrossCycleDependsOnChildren: Depends on level-1 downstream nodes across cycles
  • CrossCycleDependsOnSelf: Depends on itself across cycles.
  • CrossCycleDependsOnOtherNode: Depends on other nodes across cycles.
  • Normal: Depends on nodes in the same cycle.
Normal
UpstreamOutputstringNo

The output identifier of the upstream task. (This parameter is returned only if Normal is set and the node input is configured.)

pre.odps_sql_demo_0
UpstreamTaskIdlongNo

The ID of the upstream task. (This parameter is returned only if Normal or CrossCycleDependsOnOtherNode is set and the node input is not configured.)

1234
Tagsarray<object>No

The tags.

TagobjectNo
ValuestringNo

The value of a tag.

value1
KeystringYes

The key of a tag.

key1

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

22C97E95-F023-56B5-8852-B1A77A17XXXX
Successboolean

Indicates whether the request was successful.

true

Examples

Sample success responses

JSONformat

{
  "RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history