Generates an ID for an asynchronous thread that is used to update a real-time synchronization node or a synchronization solution in Data Integration. The ID is used when you call the QueryDISyncTaskConfigProcessResult operation to obtain parameters that are asynchronously generated and used to update a real-time synchronization node or a synchronization solution in Data Integration.
DataWorks allows you to use only the UpdateDISyncTask operation to update a batch synchronization node in Data Integration. To update a real-time synchronization node or a synchronization solution, you must first call the GenerateDISyncTaskConfigForUpdating operation to generate the ID of an asynchronous thread and call the QueryDISyncTaskConfigProcessResult operation to obtain the asynchronously generated parameters based on the ID. Then, you can call the UpdateDISyncTask operation and use the parameters as request parameters to update a real-time synchronization node or a synchronization solution in Data Integration. DataWorks allows you to update real-time synchronization nodes and synchronization solutions in Data Integration only in asynchronous mode.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GenerateDISyncTaskConfigForUpdating |
The operation that you want to perform. |
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. This parameter specifies the DataWorks workspace to which the operation is applied. |
TaskType | String | Yes | DI_REALTIME |
The type of the object that you want to update in Data Integration in asynchronous mode. Valid values:
|
RegionId | String | Yes | cn-zhangjiakou |
The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system determines the value of this parameter based on the endpoint used to call the operation. |
TaskParam | String | Yes | { "steps": [ { "parameter": { "connection": [ { "table": [ "xyx" ] } ] }, "name": "Reader", "category": "reader" } ] } |
The script for updating the real-time synchronization node or synchronization solution in Data Integration. DataWorks allows you to add or remove tables for a real-time synchronization node or a synchronization solution in Data Integration only in asynchronous mode. The following types of real-time synchronization nodes and synchronization solutions are supported:
The SelectedTables parameter is used to specify tables that you want to synchronize from multiple databases. The Tables parameter is used to specify tables that you want to synchronize from a single database.
|
ClientToken | String | No | ABFUOEUOTRTRJKE |
The client token that is used to ensure the idempotence of the request. This parameter is used to prevent repeated operations that are caused by multiple calls. |
TaskId | Long | Yes | 100 |
The ID of the real-time synchronization node or synchronization solution.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
RequestId | String | 0bc1411515937635973**** |
The ID of the request. You can locate logs and troubleshoot issues based on the ID. |
Data | Object |
The information returned for the ID of the asynchronous thread. |
|
Status | String | true |
Indicates whether the ID of the asynchronous thread is generated. Valid values:
|
ProcessId | Long | 10 |
The ID of the asynchronous thread. You can call the QueryDISyncTaskConfigProcessResult operation to obtain the asynchronously generated parameters based on the ID. The parameters are used to update a real-time synchronization node or a synchronization solution in Data Integration. |
Message | String | XXX is invalid. |
The reason why the ID of the asynchronous thread fails to be generated. If the ID is successfully generated, the value null is returned. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=GenerateDISyncTaskConfigForUpdating
&ProjectId=10000
&TaskType=DI_REALTIME
&TaskParam={"steps":[{"parameter":{"connection":[{"table":["xyx"]}]},"name":"Reader","category":"reader"}]}
&ClientToken=ABFUOEUOTRTRJKE
&TaskId=100
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GenerateDISyncTaskConfigForUpdatingResponse>
<Success>true</Success>
<RequestId>0bc1411515937635973****</RequestId>
<Data>
<Status>true</Status>
<ProcessId>10</ProcessId>
<Message>XXX is invalid.</Message>
</Data>
</GenerateDISyncTaskConfigForUpdatingResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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 error message returned because one or more parameters are invalid. |
400 | Invalid.DI.Parameter.File.Existed | The file name already exists. | The error message returned because the specified file name already exists. |
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 has occurred in Data Integration. |
For a list of error codes, visit the API Error Center.