GenerateDISyncTaskConfigForUpdating
Asynchronously generates the JSON configuration for updating a synchronization task.
Operation description
DataWorks currently supports directly calling the UpdateDISyncTask operation to update data integration offline synchronization tasks. To update a data integration real-time synchronization task, you must first call the GenerateDISyncTaskConfigForUpdating and QueryDISyncTaskConfigProcessResult operations to asynchronously generate the parameters required for the update. Then, pass the generated parameters as input to the UpdateDISyncTask operation to update the real-time synchronization task. You can only use the asynchronous method to update data integration real-time synchronization tasks.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the workspace configuration page to obtain the workspace ID. This parameter determines the DataWorks workspace in which the API operation is called. |
10000 |
| TaskType |
string |
Yes |
The type of the Data Integration synchronization task to be updated asynchronously. Valid values:
Valid values:
|
DI_REALTIME |
| TaskParam |
string |
Yes |
The script statements for updating the synchronization task. Currently, the asynchronous method only supports adding or removing tables for data integration synchronization tasks. Only the following types of synchronization tasks can be updated:
In a synchronization task, SelectedTables is used to select tables in multi-database mode, and Tables is used to select tables in single-database mode.
|
{"steps":[{"parameter":{"connection":[{"table":["xyx"]}]},"name":"Reader","category":"reader"}]} |
| ClientToken |
string |
No |
The client token that is used to ensure idempotence. This parameter prevents duplicate operations caused by multiple calls. |
ABFUOEUOTRTRJKE |
| TaskId |
integer |
Yes |
The task ID.
|
100 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| RequestId |
string |
The request ID. You can use this ID to locate logs and troubleshoot issues. |
0bc1411515937635973**** |
| Data |
object |
The result of generating the asynchronous thread ID. |
|
| Status |
string |
The status of generating the asynchronous thread ID. Valid values:
|
true |
| ProcessId |
integer |
The asynchronous thread ID. You must use this ID to call the QueryDISyncTaskConfigProcessResult operation to obtain the parameters required for asynchronously updating the data integration synchronization task, and then use the parameters to update the task. |
10 |
| Message |
string |
The reason why the asynchronous thread ID failed to be generated. If the asynchronous thread ID is generated, this parameter is left empty. |
XXX is invalid. |
Examples
Success response
JSON format
{
"Success": true,
"RequestId": "0bc1411515937635973****",
"Data": {
"Status": "true",
"ProcessId": 10,
"Message": "XXX is invalid."
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.DI.Parameter | The parameter is invalid. | The parameter is invalid. |
| 400 | Invalid.DI.Parameter.File.Existed | The file name already exists. | The parameter is invalid. The file name already exists. |
| 500 | InternalError.DI.Parameter | A DI internal error occurred. | A Data Integration internal business error occurred. |
| 403 | Forbidden.DI.NoPrivilege | No access. | Access denied. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.