Updates a specified workflow by using the full update method. Fields that can be synchronously updated to DataStudio include: owner, data source, schedule resource group, description, and trigger run mode (Normal, Skip, or Pause).
Operation description
DataWorks Basic Edition or a more advanced edition is required.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
Yes |
The workflow ID. |
1234 |
| EnvType |
string |
No |
The project environment. Valid values:
|
Prod |
| Name |
string |
Yes |
The name. |
My Workflow |
| Owner |
string |
Yes |
The account ID of the owner. |
1000 |
| Trigger |
object |
Yes |
The trigger configuration. |
|
| Type |
string |
Yes |
The trigger type. Valid values:
|
Scheduler |
| Cron |
string |
No |
The cron expression. This parameter takes effect only when type is set to Scheduler. |
00 00 00 * * ? |
| StartTime |
string |
No |
The effective period of the epoch trigger. This parameter takes effect only when type is set to Scheduler. Format: |
1970-01-01 00:00:00 |
| EndTime |
string |
No |
The time when the periodic trigger expires. This parameter takes effect only when type is set to Scheduler. Format: |
9999-01-01 00:00:00 |
| Description |
string |
No |
The description. |
test |
| Dependencies |
array<object> |
No |
The dependency information. |
|
|
object |
No |
|||
| Type |
string |
Yes |
The dependency type. Valid values:
|
Normal |
| UpstreamOutput |
string |
No |
The output identifier of the upstream node. This field is returned when the dependency type is |
pre.odps_sql_demo_0 |
| UpstreamTaskId |
integer |
No |
The ID of the upstream node. This field is returned when the dependency type is |
1234 |
| Parameters |
string |
No |
The parameter list. |
para1=$bizdate para2=$[yyyymmdd] |
| Tasks |
array<object> |
No |
The node list. |
|
|
array<object> |
No |
|||
| Id |
integer |
No |
The node ID. If this field is specified, the corresponding node is fully updated. If this field is not specified, a new node is created. |
1234 |
| Name |
string |
Yes |
The name of the node. |
SQL node |
| Description |
string |
No |
The description. |
Test |
| Type |
string |
Yes |
The node type. |
ODPS_SQL |
| Owner |
string |
Yes |
The account ID of the owner. |
1000 |
| BaseLineId |
integer |
No |
The baseline ID. |
1234 |
| Timeout |
integer |
No |
The timeout period for node execution, in seconds. |
3600 |
| RerunMode |
string |
Yes |
Specifies whether the node can be rerun. Valid values:
|
AllAllowed |
| RerunTimes |
integer |
No |
The number of retries. This parameter takes effect only when the node is configured to allow reruns. |
3 |
| RerunInterval |
integer |
No |
The retry time interval, in seconds. |
60 |
| Script |
object |
No |
The script information. |
|
| Content |
string |
No |
The script content. |
echo "helloWorld" |
| Parameters |
string |
No |
The list of script parameters. |
para1=$bizdate |
| Trigger |
object |
Yes |
The trigger configuration of the node. |
|
| Type |
string |
No |
The trigger type. Valid values:
|
Scheduler |
| Recurrence |
string |
Yes |
The run mode when triggered. This parameter takes effect only when type is set to Scheduler. Valid values:
|
Normal |
| RuntimeResource |
object |
Yes |
The runtime environment configuration, such as resource group information. |
|
| ResourceGroupId |
string |
Yes |
The identifier of the schedule resource group configured for the node. |
S_res_group_524258031846018_1684XXXXXXXXX |
| Image |
string |
No |
The image ID configured for the node. |
i-xxxxxx |
| Cu |
string |
No |
The CU consumption configured for the node. |
0.25 |
| DataSource |
object |
No |
The associated data source information. |
|
| Name |
string |
No |
The data source name. |
odps_test |
| Inputs |
object |
No |
The input information. If this field is empty, all Inputs configurations are deleted by default. |
|
| Variables |
array<object> |
No |
The list of variable definitions. If this field is not specified or is an empty array, all Inputs.Variables configurations are deleted by default. |
|
|
object |
No |
|||
| Name |
string |
No |
The name of the variable. |
key1 |
| Type |
string |
Yes |
The type. Valid values:
|
Constant |
| Value |
string |
No |
The value of the variable. |
value1 |
| Outputs |
object |
No |
The output information. If this field is empty, all Outputs configurations are deleted by default. |
|
| TaskOutputs |
array<object> |
No |
The list of node output definitions. If this field is not specified or is an empty array, all TaskOutputs configurations are deleted by default. |
|
|
object |
No |
|||
| Output |
string |
No |
The identifier of the output. |
pre.odps_sql_demo_0 |
| Variables |
array<object> |
No |
The list of variable definitions. If this field is not specified or is an empty array, all Outputs.Variables configurations are deleted by default. |
|
|
object |
No |
|||
| Name |
string |
No |
The name of the variable. |
key1 |
| Type |
string |
Yes |
The type. Valid values:
|
Constant |
| Value |
string |
No |
The value of the variable. |
value1 |
| Dependencies |
array<object> |
No |
The dependency information. If this field is not specified or is an empty array, all Dependencies configurations are deleted by default. |
|
|
object |
No |
|||
| Type |
string |
Yes |
The dependency type. Valid values:
|
Normal |
| UpstreamOutput |
string |
No |
The output identifier of the upstream node. This field is returned when the dependency type is |
pre.odps_sql_demo_0 |
| UpstreamTaskId |
integer |
No |
The ID of the upstream node. This field is returned when the dependency type is |
1234 |
| Tags |
array<object> |
No |
The list of node tags. If this field is not specified or is an empty array, all Tags configurations are deleted by default. |
|
|
object |
No |
|||
| Key |
string |
Yes |
The tag key. |
key1 |
| Value |
string |
No |
The tag value. |
value1 |
| ClientUniqueCode |
string |
No |
The client unique code of the node, used for asynchronous operations and idempotence. If not specified during creation, the system automatically generates one, and the code is uniquely bound to the resource ID. If this parameter is specified during update or deletion, it must be consistent with the client unique code used during creation. |
Task_0bc5213917368545132902xxxxxxxx |
| EnvType |
string |
No |
The project environment. Valid values:
|
Prod |
| Outputs |
object |
No |
The output information. |
|
| TaskOutputs |
array<object> |
No |
The list of workflow node output definitions. |
|
|
object |
No |
|||
| Output |
string |
No |
The output identifier. |
pre.odps_sql_demo_0 |
| Tags |
array<object> |
No |
The list of workflow tags. |
|
|
object |
No |
|||
| Key |
string |
Yes |
The tag key. |
key1 |
| Value |
string |
No |
The tag value. |
value1 |
| ClientUniqueCode |
string |
No |
The client unique code of the workflow, used for asynchronous operations and idempotence. If not specified during creation, the system automatically generates one, and the code is uniquely bound to the resource ID. If this parameter is specified during update or deletion, it must be consistent with the client unique code used during creation. |
Workflow_0bc5213917368545132902xxxxxxxx |
| InstanceMode |
string |
No |
The instance generation mode. Valid values:
|
T+1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID, which is used to locate logs and troubleshoot issues. |
22C97E95-F023-56B5-8852-B1A77A17XXXX |
| Success |
boolean |
Indicates whether the operation was successful. |
true |
Examples
Success response
JSON format
{
"RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.