Update a task. The changes are synchronized to Data Studio, which creates a new saved version.
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 task ID. |
1234 |
| ClientUniqueCode |
string |
No |
The unique code of the client. This code uniquely identifies a task. This parameter is used to create a task asynchronously and implement the idempotence of the task. If you do not specify this parameter when you create the task, the system automatically generates a unique code. The unique code is uniquely associated with the task ID. If you specify this parameter when you update or delete the task, the value of this parameter must be the unique code that is used to create the task. |
Task_0bc5213917368545132902xxxxxxxx |
| EnvType |
string |
No |
The project environment.
|
Prod |
| Name |
string |
No |
Name. |
SQL node |
| Description |
string |
No |
The description of the task. |
test |
| Owner |
string |
No |
The account ID of the task owner. |
1000 |
| InstanceMode |
string |
No |
The instance generation mode.
|
T+1 |
| Timeout |
integer |
No |
Task execution timeout in seconds. Must be greater than 3600. |
3600 |
| RerunMode |
string |
No |
The rerun mode. Valid values:
|
AllAllowed |
| RerunTimes |
integer |
No |
The number of times that the task is rerun. This parameter takes effect only if the RerunMode parameter is set to AllAllowed or FailureAllowed. |
3 |
| RerunInterval |
integer |
No |
The rerun interval. Unit: milliseconds. Must not exceed 1800000. |
60000 |
| Script |
object |
No |
The run script information. |
|
Content
deprecated
|
string |
No |
The script content. |
echo "helloWorld" |
| Parameters |
string |
No |
The script parameter list. |
para1=$bizdate |
| Trigger |
object |
No |
The triggering method. |
|
| Type |
string |
No |
The triggering type. Valid values:
|
Scheduler |
| Recurrence |
string |
No |
The running mode of the task after it is triggered. This parameter takes effect only if the Type parameter is set to Scheduler. Valid values:
|
Normal |
| Cron |
string |
No |
The Cron expression. This parameter takes effect only if the Type parameter is set to Scheduler. |
00 00 00 * * ? |
| StartTime |
string |
No |
The time when periodic triggering takes effect. This parameter takes effect only if the Type parameter is set to Scheduler. The value of this parameter is in the |
1970-01-01 00:00:00 |
| EndTime |
string |
No |
The expiration time of periodic triggering. Takes effect only when type is set to Scheduler. The value of this parameter is in the |
9999-01-01 00:00:00 |
| CycleType |
string |
No |
Cycle type. This parameter takes effect only when Type is set to Scheduler and the cron expression specifies hourly scheduling. Default value: Daily
|
Daily |
| RuntimeResource |
object |
No |
Runtime environment configurations, such as resource group information. |
|
| ResourceGroupId |
string |
No |
The identifier of the scheduling resource group used in the task runtime configuration. |
S_res_group_524258031846018_1684XXXXXXXXX |
| Image |
string |
No |
The image ID used in the task runtime configuration. |
i-xxxxxx |
| Cu |
string |
No |
The default number of compute units (CUs) configured for task running. |
0.25 |
| DataSource |
object |
No |
The information about the associated data source. |
|
| Name |
string |
No |
The name of the data source. |
odps_test |
| Inputs |
object |
No |
The input information. |
|
| Variables |
array<object> |
No |
The variables. |
|
|
object |
No |
|||
| Type |
string |
Yes |
The type. Valid values:
|
Constant |
| Value |
string |
No |
The value of the variable. |
value1 |
| Name |
string |
No |
The name of the variable. |
key1 |
| Outputs |
object |
No |
The output information. |
|
| TaskOutputs |
array<object> |
No |
The task outputs. |
|
|
object |
No |
|||
| Output |
string |
No |
The identifier of the output. |
pre.odps_sql_demo_0 |
| Variables |
array<object> |
No |
The variables. |
|
|
object |
No |
|||
| Type |
string |
Yes |
The type. Valid values:
|
Constant |
| Value |
string |
No |
The value of the variable. |
value1 |
| Name |
string |
No |
The name of the variable. |
key1 |
| 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 task. (This parameter is returned only if |
pre.odps_sql_demo_0 |
| UpstreamTaskId |
integer |
No |
The ID of the upstream task. (This parameter is returned only if |
1234 |
| Tags |
array<object> |
No |
The tags. |
|
|
object |
No |
|||
| Value |
string |
No |
The value of a tag. |
value1 |
| Key |
string |
Yes |
The key of a tag. |
key1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
22C97E95-F023-56B5-8852-B1A77A17XXXX |
| Success |
boolean |
Indicates whether the request 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.