Updates a data synchronization task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. You can obtain the ID on the Workspace page of the DataWorks console. |
10000 |
| TaskType |
string |
Yes |
The type of the synchronization task. Only batch synchronization tasks are supported. Set the value to DI_OFFLINE. |
DI_OFFLINE |
| TaskContent |
string |
No |
The updated task configuration. This parameter uses the same format as the code editor in the DataWorks console. Only batch synchronization tasks are supported. Leave this parameter empty if no configuration update is required. |
{"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_source","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"}]}} |
| TaskParam |
string |
No |
The task configuration parameters in JSON format.
|
{"ResourceGroup":"Serverless_res_group_XXX_XXXX", "Cu":1.5} |
| FileId |
integer |
Yes |
The synchronization task ID. Call ListFiles to query the ID. |
1000000 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned result. |
||
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| RequestId |
string |
The request ID, used for troubleshooting. |
0bc1411515937635973**** |
| Data |
object |
The update result. |
|
| Status |
string |
The update status. Valid values:
|
success |
| Message |
string |
The error message returned on failure. Returns null on success. |
ResourceGroup:[S_res_group_XXX] is invalid. |
Examples
Success response
JSON format
{
"Success": true,
"RequestId": "0bc1411515937635973****",
"Data": {
"Status": "success",
"Message": "ResourceGroup:[S_res_group_XXX] is invalid."
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.DI.Parameter | The parameter is invalid. | |
| 500 | InternalError.DI.Parameter | A DI internal error occurred. | |
| 403 | Forbidden.DI.NoPrivilege | No access. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.