UpdateTask
Updates a specified task. The modifications are synchronized to Data Studio, and a new saved version is created.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
Yes |
The ID of the task to update. You can obtain the ID from the PagingInfo.Tasks[].Id parameter returned by the ListTasks operation. |
1234 |
| ClientUniqueCode |
string |
No |
The client unique code of the task, which is used to uniquely identify the task. This parameter is used to implement asynchronous processing and idempotence. If you do not specify this parameter when you create the task, 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. |
Task_0bc5213917368545132902xxxxxxxx |
| EnvType |
string |
No |
The project environment. Valid values:
Valid values:
|
Prod |
| Name |
string |
No |
The name. |
SQL node |
| Description |
string |
No |
The description. |
test |
| Owner |
string |
No |
The account ID of the task owner. |
1000 |
| InstanceMode |
string |
No |
The instance generation mode. Valid values:
Valid values:
|
T+1 |
| Timeout |
integer |
No |
The timeout period for task 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. |
3600 |
| RerunMode |
string |
No |
Specifies whether the task can be rerun. Valid values:
Valid values:
|
AllAllowed |
| RerunTimes |
integer |
No |
The number of retries. This parameter takes effect only when the task 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 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 task trigger method. |
|
| Type |
string |
No |
The trigger type. Valid values:
Valid values:
|
Scheduler |
| Recurrence |
string |
No |
The running mode when the task is triggered. This parameter takes effect only when Type is set to Scheduler. Valid values:
Valid values:
|
Normal |
| Cron |
string |
No |
The cron expression. This parameter takes effect only when Type is set to Scheduler. |
00 00 00 * * ? |
| StartTime |
string |
No |
The start time of the periodic trigger. This parameter takes effect only when Type is set to Scheduler. The format is |
1970-01-01 00:00:00 |
| EndTime |
string |
No |
The expiration time of the periodic trigger. This parameter takes effect only when Type is set to Scheduler. The format is yyyy-mm-dd hh:mm:ss. |
9999-01-01 00:00:00 |
| CycleType |
string |
No |
The cycle type. This parameter takes effect when Type is set to Scheduler and the cron expression specifies scheduling at a specific hour. Valid values:
Valid values:
|
Daily |
| RuntimeResource |
object |
No |
The runtime environment configuration, such as the resource group information. |
|
| ResourceGroupId |
string |
No |
The identifier of the scheduling resource group configured for task execution. |
S_res_group_524258031846018_1684XXXXXXXXX |
| Image |
string |
No |
The ID of the image configured for task execution. |
i-xxxxxx |
| Cu |
string |
No |
The number of compute units (CUs) consumed by the task execution configuration. |
0.25 |
| 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 |
|||
| Type |
string |
Yes |
The type. Valid values:
Valid values:
|
Constant |
| Value |
string |
No |
The variable value. |
value1 |
| Name |
string |
No |
The variable name. |
key1 |
| Outputs |
object |
No |
The output information. |
|
| TaskOutputs |
array<object> |
No |
The list of task output definitions. |
|
|
object |
No |
|||
| Output |
string |
No |
The output identifier. |
pre.odps_sql_demo_0 |
| Variables |
array<object> |
No |
The list of variable definitions. |
|
|
object |
No |
|||
| Type |
string |
Yes |
The type. Valid values:
Valid values:
|
Constant |
| Value |
string |
No |
The variable value. |
value1 |
| Name |
string |
No |
The variable name. |
key1 |
| Dependencies |
array<object> |
No |
The dependency information. |
|
|
object |
No |
|||
| Type |
string |
Yes |
The dependency type. Valid values:
Valid values:
|
Normal |
| UpstreamOutput |
string |
No |
The output identifier of the upstream task. This field is returned when the dependency type is same-cycle dependency and the input content is configured. |
pre.odps_sql_demo_0 |
| UpstreamTaskId |
integer |
No |
The ID of the upstream task. This field is returned when the dependency type is cross-cycle dependency on other nodes or same-cycle dependency without input content configured. This field is not returned in other cases. |
1234 |
| Tags |
array<object> |
No |
The list of task tags. |
|
|
object |
No |
|||
| Value |
string |
No |
The tag value. |
value1 |
| Key |
string |
Yes |
The tag key. |
key1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. You can use the ID to locate logs and troubleshoot issues. |
22C97E95-F023-56B5-8852-B1A77A17XXXX |
| Success |
boolean |
Indicates whether the task was updated successfully. |
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.