UpdateTaskAsync
Asynchronously updates a specified node and synchronizes the changes to DataStudio to create a new saved version.
Operation description
Request description
This API operation is asynchronous. You must call the GetUpdateTaskResult operation to poll the update result.
This API operation updates the information of a specified node, including but not limited to the node name, description, and owner.
The modifications are synchronized to Data Studio, and a new saved version is created in Data Studio.
You can configure detailed parameters such as the trigger mode, runtime environment configurations, and dependencies of the node.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
Yes |
The ID of the node to be updated. You can obtain the ID from the PagingInfo.Tasks[].Id parameter returned by the ListTasks operation. |
10001 |
| ClientUniqueCode |
string |
No |
The client unique code of the node, which is used to uniquely identify the node. This parameter is used to implement asynchronous processing and idempotence. If you do not specify this parameter when you create the node, the system automatically generates a client unique code and uniquely binds it to the resource ID. If you specify this parameter when you update or delete the resource, the value must be the same as the client unique code used when the resource was created. |
Workflow_0bc5213917368545132902xxxxxxxx |
| EnvType |
string |
No |
The workspace environment. Valid values:
Valid values:
|
Prod |
| Name |
string |
No |
The name. |
name |
| Description |
string |
No |
The description. |
This is a description. |
| Owner |
string |
No |
The account ID of the node owner. You can log on to the DataWorks console and move the pointer over the user profile picture in the upper-right corner of the top menu bar to view the account ID. If this parameter is left empty, the Alibaba Cloud account ID of the caller is used by default. |
1000000000001 |
| InstanceMode |
string |
No |
The instance generation mode. Valid values:
Valid values:
|
T+1 |
| Timeout |
integer |
No |
The timeout period for node execution, in seconds. The scheduling system uses this configuration in whole hours. The number of seconds you specify is rounded down to the nearest hour. |
1 |
| RerunMode |
string |
No |
The configuration that specifies whether the node can be rerun. Valid values:
Valid values:
|
AllAllowed |
| RerunTimes |
integer |
No |
The number of retries. This parameter takes effect only when the node is configured to be rerunnable. |
3 |
| RerunInterval |
integer |
No |
The retry time interval, in milliseconds. The value cannot exceed 1800000. |
60000 |
| Script |
object |
No |
The runtime script information. |
|
Content
deprecated
|
string |
No |
The script content. |
echo "helloWorld" |
| Parameters |
string |
No |
The list of script parameters. |
para1=$bizdate |
| Trigger |
object |
No |
The trigger mode of the node. |
|
| Cron |
string |
No |
The cron expression. This parameter takes effect only when the Type parameter is set to Scheduler. |
00 00 00 * * ? |
| CycleType |
string |
No |
The scheduling cycle. This parameter takes effect when
Valid values:
|
Daily |
| EndTime |
string |
No |
The expiration time of the periodic trigger. This parameter takes effect only when the Type parameter is set to Scheduler. The format is |
9999-01-01 00:00:00 |
| Recurrence |
string |
No |
The running mode upon triggering. This parameter takes effect only when the Type parameter is set to Scheduler. Valid values:
Valid values:
|
Normal |
| StartTime |
string |
No |
The start time of the periodic trigger. This parameter takes effect only when the Type parameter is set to Scheduler. The format is |
1970-01-01 00:00:00 |
| Type |
string |
No |
The trigger type. Valid values:
Valid values:
|
Scheduler |
| RuntimeResource |
object |
No |
The runtime environment configurations, such as the resource group information. |
|
| Cu |
string |
No |
The CU consumption for the node runtime configuration. |
0.25 |
| Image |
string |
No |
The image ID for the node runtime configuration. |
i-xxxxxx |
| ResourceGroupId |
string |
No |
The identifier of the scheduling resource group for the node runtime configuration. |
63900680 |
| DataSource |
object |
No |
The associated data source information. |
|
| Name |
string |
No |
The name of the data source. |
odps_test |
| Inputs |
object |
No |
The input information. |
|
| Variables |
array<object> |
No |
The list of variable definitions. |
|
|
object |
No |
The list of variable definitions. |
||
| Name |
string |
No |
The name of the variable. |
key1 |
| Type |
string |
Yes |
The type. Valid values:
Valid values:
|
Constant |
| Value |
string |
No |
The value of the variable. |
value1 |
| Outputs |
object |
No |
The output information. |
|
| TaskOutputs |
array<object> |
No |
The list of node output definitions. |
|
|
object |
No |
The list of node output definitions. |
||
| Output |
string |
No |
The output identifier. |
pre.odps_sql_demo_0 |
| Variables |
array<object> |
No |
The list of variable definitions. |
|
|
object |
No |
The list of variable definitions. |
||
| Name |
string |
No |
The name of the variable. |
key1 |
| Type |
string |
Yes |
The type. Valid values:
Valid values:
|
Constant |
| Value |
string |
No |
The value of the variable. |
value1 |
| Dependencies |
array<object> |
No |
The dependency information. |
|
|
object |
No |
The dependency information. |
||
| Type |
string |
Yes |
The dependency type. Valid values:
Valid values:
|
Normal |
| UpstreamOutput |
string |
No |
The output identifier of the upstream node. This field is returned when the dependency is a same-cycle dependency and the input content is specified. |
pre.odps_sql_demo_0 |
| UpstreamTaskId |
integer |
No |
The ID of the upstream node. This field is returned when the dependency is a cross-cycle dependency on other nodes or a same-cycle dependency and the input content is not specified. It is not returned in other cases. |
1234 |
| Tags |
array<object> |
No |
The list of data asset tags to be associated. |
|
|
object |
No |
The list of node tags. |
||
| Key |
string |
Yes |
The tag key. |
tagKey |
| Value |
string |
No |
The tag value. |
value |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| OperationId |
string |
The ID of the asynchronous update operation. Pass this ID to the |
e15ad21c-b0e9-4792-8f55-b037xxxxxxxx |
| RequestId |
string |
The unique ID of the request. You can use this ID to troubleshoot issues if an error occurs. |
10000001 |
Examples
Success response
JSON format
{
"OperationId": "e15ad21c-b0e9-4792-8f55-b037xxxxxxxx",
"RequestId": "10000001"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.