UpdateTask

更新时间:
复制 MD 格式

Update a task. The changes are synchronized to Data Studio, which creates a new saved version.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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

  • Dev

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: the next day

  • Immediately Note: Scheduled instances are generated only if the scheduled time is at least 10 minutes after the publish time. Real-time instance generation is unavailable during the global instance generation period (23:30 to 24:00). You can publish nodes during this period, but instances for the new nodes will not be generated automatically.

T+1

Timeout

integer

No

Task execution timeout in seconds. Must be greater than 3600.

3600

RerunMode

string

No

The rerun mode. Valid values:

  • AllDenied: The task cannot be rerun.

  • FailureAllowed: The task can be rerun only after it fails.

  • AllAllowed: The task can always be rerun.

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: periodically triggered

  • Manual

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:

  • Pause

  • Skip

  • Normal

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 theyyyy-mm-dd hh:mm:ss format.

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 theyyyy-mm-dd hh:mm:ss format.

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: Schedules jobs on a daily basis.

  • NotDaily: Schedules jobs on an hourly basis.

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: constant value.

  • PassThrough: node output.

  • System: variable.

  • NodeOutput: script output.

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: constant value.

  • PassThrough: node output.

  • System: variable.

  • NodeOutput: script output.

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:

  • CrossCycleDependsOnChildren: Depends on level-1 downstream nodes across cycles

  • CrossCycleDependsOnSelf: Depends on itself across cycles.

  • CrossCycleDependsOnOtherNode: Depends on other nodes across cycles.

  • Normal: Depends on nodes in the same cycle.

Normal

UpstreamOutput

string

No

The output identifier of the upstream task. (This parameter is returned only if Normal is set and the node input is configured.)

pre.odps_sql_demo_0

UpstreamTaskId

integer

No

The ID of the upstream task. (This parameter is returned only if Normal or CrossCycleDependsOnOtherNode is set and the node input is not configured.)

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.