UpdateTaskAsync

Updated at:

Asynchronously updates a specified node and synchronizes the changes to DataStudio to create a new saved version.

Operation description

Request description

  • This API operation is asynchronous. You must call the GetUpdateTaskResult operation to poll the update result.

  • This API operation updates the information of a specified node, including but not limited to the node name, description, and owner.

  • The modifications are synchronized to Data Studio, and a new saved version is created in Data Studio.

  • You can configure detailed parameters such as the trigger mode, runtime environment configurations, and dependencies of the node.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Id

integer

Yes

The ID of the node to be updated. You can obtain the ID from the PagingInfo.Tasks[].Id parameter returned by the ListTasks operation.

10001

ClientUniqueCode

string

No

The client unique code of the node, which is used to uniquely identify the node. This parameter is used to implement asynchronous processing and idempotence. If you do not specify this parameter when you create the node, 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.

Workflow_0bc5213917368545132902xxxxxxxx

EnvType

string

No

The workspace environment. Valid values:

  • Prod: production

  • Dev: development

Valid values:

  • Prod :

    Production.

  • Dev :

    Development.

Prod

Name

string

No

The name.

name

Description

string

No

The description.

This is a description.

Owner

string

No

The account ID of the node owner. You can log on to the DataWorks console and move the pointer over the user profile picture in the upper-right corner of the top menu bar to view the account ID. If this parameter is left empty, the Alibaba Cloud account ID of the caller is used by default.

1000000000001

InstanceMode

string

No

The instance generation mode. Valid values:

  • T+1: Generates instances on the next day.

  • Immediately: Generates instances immediately. Note: Periodic instances are generated normally only if the scheduled time of the node is at least 10 minutes after the node is released. During the full instance generation period (22:00 to 24:00), real-time instance generation is not supported. You can submit and release nodes, but new nodes are not automatically converted into instances.

Valid values:

  • Immediately :

    Generates instances immediately.

  • T+1 :

    Generates instances on the next day.

T+1

Timeout

integer

No

The timeout period for node 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.

1

RerunMode

string

No

The configuration that specifies whether the node can be rerun. Valid values:

  • AllDenied: The node cannot be rerun regardless of whether it succeeds or fails.

  • FailureAllowed: The node can be rerun only if it fails.

  • AllAllowed: The node can be rerun regardless of whether it succeeds or fails.

Valid values:

  • AllDenied :

    The node cannot be rerun regardless of whether it succeeds or fails.

  • FailureAllowed :

    The node can be rerun only if it fails.

  • AllAllowed :

    The node can be rerun regardless of whether it succeeds or fails.

AllAllowed

RerunTimes

integer

No

The number of retries. This parameter takes effect only when the node 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 runtime 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 trigger mode of the node.

Cron

string

No

The cron expression. This parameter takes effect only when the Type parameter is set to Scheduler.

00 00 00 * * ?

CycleType

string

No

The scheduling cycle. This parameter takes effect when Type is set to Scheduler and the cron expression schedules the node for a specific hour. Default value: Daily. Valid values:

  • Daily: daily scheduling.

  • NotDaily: hourly scheduling.

Valid values:

  • Daily :

    Daily scheduling.

  • NotDaily :

    Hourly scheduling.

Daily

EndTime

string

No

The expiration time of the periodic trigger. This parameter takes effect only when the Type parameter is set to Scheduler. The format is yyyy-mm-dd hh:mm:ss.

9999-01-01 00:00:00

Recurrence

string

No

The running mode upon triggering. This parameter takes effect only when the Type parameter is set to Scheduler. Valid values:

  • Pause: pauses the node.

  • Skip: runs a dry-run instance.

  • Normal: runs the node normally.

Valid values:

  • Pause :

    Pauses the node.

  • Skip :

    Runs a dry-run instance.

  • Normal :

    Runs the node normally.

Normal

StartTime

string

No

The start time of the periodic trigger. This parameter takes effect only when the Type parameter is set to Scheduler. The format is yyyy-mm-dd hh:mm:ss.

1970-01-01 00:00:00

Type

string

No

The trigger type. Valid values:

  • Scheduler: triggered by a scheduling cycle.

  • Manual: triggered manually.

Valid values:

  • Scheduler :

    Triggered by a scheduling cycle.

  • Manual :

    Triggered manually.

Scheduler

RuntimeResource

object

No

The runtime environment configurations, such as the resource group information.

Cu

string

No

The CU consumption for the node runtime configuration.

0.25

Image

string

No

The image ID for the node runtime configuration.

i-xxxxxx

ResourceGroupId

string

No

The identifier of the scheduling resource group for the node runtime configuration.

63900680

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

The list of variable definitions.

Name

string

No

The name of the variable.

key1

Type

string

Yes

The type. Valid values:

  • Constant: constant.

  • PassThrough: output of a parameter node.

  • System: variable.

  • NodeOutput: script output.

Valid values:

  • Constant :

    Constant.

  • PassThrough :

    Output of a parameter node.

  • NodeOutput :

    Script output.

  • System :

    Variable.

Constant

Value

string

No

The value of the variable.

value1

Outputs

object

No

The output information.

TaskOutputs

array<object>

No

The list of node output definitions.

object

No

The list of node output definitions.

Output

string

No

The output identifier.

pre.odps_sql_demo_0

Variables

array<object>

No

The list of variable definitions.

object

No

The list of variable definitions.

Name

string

No

The name of the variable.

key1

Type

string

Yes

The type. Valid values:

  • Constant: constant.

  • PassThrough: output of a parameter node.

  • System: variable.

  • NodeOutput: script output.

Valid values:

  • Constant :

    Constant.

  • PassThrough :

    Output of a parameter node.

  • NodeOutput :

    Script output.

  • System :

    Variable.

Constant

Value

string

No

The value of the variable.

value1

Dependencies

array<object>

No

The dependency information.

object

No

The dependency information.

Type

string

Yes

The dependency type. Valid values:

  • CrossCycleDependsOnChildren: cross-cycle dependency on first-level child nodes

  • CrossCycleDependsOnSelf: cross-cycle dependency on the node itself

  • CrossCycleDependsOnOtherNode: cross-cycle dependency on other nodes

  • Normal: same-cycle dependency

Valid values:

  • CrossCycleDependsOnChildren :

    Cross-cycle dependency on first-level child nodes.

  • CrossCycleDependsOnOtherNode :

    Cross-cycle dependency on other nodes.

  • CrossCycleDependsOnSelf :

    Cross-cycle dependency on self.

  • Normal :

    Same-cycle dependency.

Normal

UpstreamOutput

string

No

The output identifier of the upstream node. This field is returned when the dependency is a same-cycle dependency and the input content is specified.

pre.odps_sql_demo_0

UpstreamTaskId

integer

No

The ID of the upstream node. This field is returned when the dependency is a cross-cycle dependency on other nodes or a same-cycle dependency and the input content is not specified. It is not returned in other cases.

1234

Tags

array<object>

No

The list of data asset tags to be associated.

object

No

The list of node tags.

Key

string

Yes

The tag key.

tagKey

Value

string

No

The tag value.

value

Response elements

Element

Type

Description

Example

object

OperationId

string

The ID of the asynchronous update operation. Pass this ID to the OperationId parameter of GetUpdateTaskResult to query the update result.

e15ad21c-b0e9-4792-8f55-b037xxxxxxxx

RequestId

string

The unique ID of the request. You can use this ID to troubleshoot issues if an error occurs.

10000001

Examples

Success response

JSON format

{
  "OperationId": "e15ad21c-b0e9-4792-8f55-b037xxxxxxxx",
  "RequestId": "10000001"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.