Updates a sync node.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateDISyncTask |
The operation that you want to perform. |
FileId | Long | Yes | 1000000 |
The ID of the sync node to be updated. You can call the ListFiles operation to query the ID of the node. |
ProjectId | Long | Yes | 10000 |
The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the workspace ID. You must set this parameter to specify the DataWorks workspace in which the node resides. |
RegionId | String | Yes | cn-zhangjiakou |
The ID of the region in which the DataWorks workspace resides. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation. |
TaskContent | String | Yes | {"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"}]}} |
The updated configuration of the sync node. This operation is equivalent to node update by using the code editor in the DataWorks console. For more information, see Create a sync node by using the code editor. You can call the UpdateDISyncTask operation to update only batch sync nodes. If you do not need to update the configuration of the sync node, leave this parameter empty. |
TaskParam | String | Yes | {"ResourceGroup":"S_res_group_XXX_XXXX"} |
The setting that updates the resource group used by the node. The value must be in the JSON format. Only the ResourceGroup field is supported. This field specifies the identifier of the resource group for Data Integration that is used by the node. To query the identifier of the resource group, call the ListResourceGroup operation. If you do not need to update the resource group for the sync node, leave this parameter empty. |
TaskType | String | Yes | DI_OFFLINE |
The type of the sync node. You can call the UpdateDISyncTask operation to update only batch sync nodes. The value must be DI_OFFLINE. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | Struct |
The information that indicates whether the sync node was updated. |
|
Message | String | ResourceGroup:[S_res_group_XXX] is invalid. |
The reason why the sync node failed to be updated. If the sync node was updated, this parameter is left empty. |
Status | String | success |
Indicates whether the sync node was updated. Valid values:
|
RequestId | String | 0bc1411515937635973**** |
The ID of the request. You can locate logs and troubleshoot issues based on the ID. |
Success | Boolean | true |
Indicates whether the request was successful. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=UpdateDISyncTask
&FileId=1000000
&ProjectId=10000
&RegionId=cn-zhangjiakou
&TaskContent={"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"}]}}
&TaskParam={"ResourceGroup":"S_res_group_XXX_XXXX"}
&TaskType=DI_OFFLINE
&<Common request parameters>
Sample success responses
XML
format
<RequestId>0bc1411515937635973****</RequestId>
<Data>
<Status>success</Status>
<Message>ResourceGroup:[S_res_group_XXX] is invalid.</Message>
</Data>
<Success>true</Success>
JSON
format
{
"RequestId": "0bc1411515937635973****",
"Data": {
"Status": "success",
"Message": "ResourceGroup:[S_res_group_XXX] is invalid."
},
"Success": true
}
Error codes
Http status code | Error code | Error message | Description |
---|---|---|---|
403 | Forbidden.DI.NoPrivilege | No access. | The error message returned because you do not have the required permissions. |
500 | InternalError.DI.Parameter | A DI internal error occurred. | The error message returned because an internal error in Data Integration occurred. |
400 | Invalid.DI.Parameter | The parameter is invalid. | The error code returned because one or more parameters are invalid. |
For a list of error codes, visit the API Error Center.