Update a task. The changes are synchronized to Data Studio, which creates a new saved version.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| dataworks:* | update | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Id | long | 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. | 60 |
| Script | object | No | The run script information. | |
Contentdeprecated | 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. | |
| Variable | 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. | |
| TaskOutput | object | No | ||
| Output | string | No | The identifier of the output. | pre.odps_sql_demo_0 |
| Variables | array<object> | No | The variables. | |
| Variable | 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. | |
| Dependencies | 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 | long | No | The ID of the upstream task. (This parameter is returned only if | 1234 |
| Tags | array<object> | No | The tags. | |
| Tag | object | No | ||
| Value | string | No | The value of a tag. | value1 |
| Key | string | Yes | The key of a tag. | key1 |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
"Success": true
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
