All Products
Search
Document Center

DataWorks:UpdateDISyncTask

Last Updated:Sep 04, 2025

Updates a data synchronization task.

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:*get
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdlongYes

The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace page to obtain the workspace ID. You must configure this parameter to specify the DataWorks workspace to which the API operation is applied.

10000
TaskTypestringYes

The type of the data synchronization task. Set the value to DI_OFFLINE. You can call the UpdateDISyncTask operation to update only batch synchronization tasks.

DI_OFFLINE
TaskContentstringYes

The updated configurations of the data synchronization task. Calling this API operation to update a data synchronization task is equivalent to updating a data synchronization task by using the code editor in the DataWorks console. For more information, see Create a synchronization task by using the code editor. You can call the UpdateDISyncTask operation to update only batch synchronization tasks. If you do not need to update the configurations of the data synchronization task, leave this parameter empty.

{"type":"job","version":"2.0","steps":[{"stepType":"mysql","parameter":{"envType":1,"datasource":"mysql_pub","column":["id","name","create_time","age","score","t_01"],"connection":[{"datasource":"mysql_pub","table":["u_pk"]}],"where":"","splitPk":"id","encoding":"UTF-8"},"name":"Reader","category":"reader"},{"stepType":"odps","parameter":{"partition":"pt=${bizdate}","truncate":true,"datasource":"odps_first","envType":1,"column":["id","name","create_time","age","score","t_01"],"emptyAsNull":false,"tableComment":"null","table":"u_pk"},"name":"Writer","category":"writer"}],"setting":{"executeMode":null,"errorLimit":{"record":""},"speed":{"concurrent":2,"throttle":false}},"order":{"hops":[{"from":"Reader","to":"Writer"}]}}
TaskParamstringYes

The configuration parameters of the data synchronization task. You must configure this parameter in the JSON format.

  • ResourceGroup: the identifier of the resource group for Data Integration that is used by the data synchronization task. You can call the ListResourceGroups operation to query the identifier of the resource group.
  • Cu: the specifications occupied by the data synchronization task in the serverless resource group. The value of this parameter must be a multiple of 0.5.
{"ResourceGroup":"S_res_group_XXX_XXXX"}
FileIdlongYes

The ID of the data synchronization task. You can call the ListFiles operation to query the ID.

1000000

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
RequestIdstring

The request ID. You can locate logs and troubleshoot issues based on the ID.

0bc1411515937635973****
Dataobject

The information that indicates whether the data synchronization task is updated.

Statusstring

The update status of the data synchronization task. Valid values:

  • success
  • fail
success
Messagestring

The error message returned if the data synchronization task fails to be updated. If the data synchronization task is successfully updated, the value null is returned for this parameter.

ResourceGroup:[S_res_group_XXX] is invalid.

Examples

Sample success responses

JSONformat

{ "Success": true, "RequestId": "0bc1411515937635973****", "Data": { "Status": "success", "Message": "ResourceGroup:[S_res_group_XXX] is invalid." } }

Error codes

HTTP status codeError codeError message
400Invalid.DI.ParameterThe parameter is invalid.
403Forbidden.DI.NoPrivilegeNo access.
500InternalError.DI.ParameterA DI internal error occurred.

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

Change history

Change timeSummary of changesOperation
2025-04-24The Error code has changedView Change Details