UpdatePipeline

Updated at:

Updates a pipeline.

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

agentloop:UpdatePipeline

none

*Pipeline

acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}

None None

Request syntax

PUT /agentspace/{agentSpace}/pipeline/{pipelineName} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

agentSpace

string

No

The name of the AgentSpace where the pipeline to be updated is located.

my-agent-space

pipelineName

string

No

The name of the pipeline to be updated.

my-pipeline

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

description

string

No

The description of the pipeline, which helps business users understand its purpose.

My pipeline

source

object

No

The data source of the pipeline. The OSS source is fixed after creation and can be omitted when updating an OSS pipeline. If provided, it must match the saved source. To change the source or processing chain, create a new OSS import.

{"type":"logstore","logstore":{"project":"my-sls-project","logstore":"agent-logs"},"inputFields":[{"name":"question","type":"text"}]}

type

string

No

The type of the data source. Valid values: logstore, dataset, trace, and oss. The trace value indicates the trace signal-driven processing mode. The server validates the validity of the enum values.

logstore

oss PipelineOssSource

No

The source can be omitted when updating an OSS pipeline. If provided, it must match the saved source configuration. When source.type is oss, the format, region, roleArn, and uri parameters in source.oss are required. formatOptions can be omitted or passed as an empty object {}. The initial version has no available configuration keys. Non-empty objects and other JSON types return a parameter error.

{"format":"lerobot","region":"cn-beijing","roleArn":"acs:ram::1234567890123456:role/oss-reader","uri":"oss://example-bucket/robot-datasets/example/"}

inputFields

array<object>

No

The input fields and their types. For OSS sources, fields are inferred from the file structure. Omit this field for OSS sources.

[{"name":"question","type":"text"}]

object

No

The input field.

name

string

No

The name of the field.

question

type

string

No

The type of the field. Valid values: text, long, double, and json.

text

logstore

object

No

The datasource config for Simple Log Service (SLS) Logstore.

{"project":"my-sls-project","logstore":"agent-logs"}

project

string

No

The name of the SLS project.

my-sls-project

logstore

string

No

The name of the SLS Logstore.

my-sls-logstore

query

string

No

The filtered query statement (SLS query and analysis syntax).

* | SELECT *

dataset

object

No

The datasource config for the dataset in the current AgentSpace.

{"dataset":"my-dataset","filter":"status = 'pending'"}

dataset

string

No

The name of the source dataset.

my-dataset

filter

string

No

The filter condition for the dataset data.

status = 'pending'

version

string

No

The version of the source dataset.

v1

trajectory

object

No

The trajectory data configuration. This parameter is optional and takes effect only when the type is trace. It obtains ATIF standard trajectory data from the trajectory scrubbing service and extends it based on features.

{"enrich":{"enabled":true,"columns":["input","output"]}}

enrich

object

No

The trajectory enrichment configuration. It mounts trajectory data into the scrubbing results based on trace_id. When writing to a dataset, the data is stored in the fixed column agent_trajectory, where the column value is the trajectory JSON content.

{"enabled":true,"columns":["input","output"]}

enabled

boolean

No

Specifies whether to enable trajectory enrichment.

false

columns

array

No

The list of enrichment columns. This parameter is retained for compatibility. The current implementation outputs a single fixed column named agent_trajectory, and this parameter no longer affects the output.

["input","output","session_id"]

string

No

The name of the trajectory column.

input

pipeline

object

No

The pipeline configuration for node orchestration. If provided, it overwrites the entire existing configuration.

nodes

array<object>

No

The list of nodes. Only pipelines with a saved OSS source can pass an empty array, and it must match the saved processing chain.

[{"id":"select-fields","type":"project","parameters":{}}]

array<object>

No

The configuration of a single node.

id

string

No

The ID of the node.

node-1

type

string

No

The type of the node.

transform

parameters

object

No

The parameters of the node. The parameters use a key-value structure and vary based on the node type.

any

No

The value of the node parameter.

value

sink

object

No

The pipeline destination (data write destination). If specified, the entire destination is overwritten.

type

string

No

The destination type, such as dataset.

Dataset

dataset

object

No

The destination dataset configuration.

agentSpace

string

No

The name of the AgentSpace to which the destination dataset belongs.

my-agent-space

dataset

string

No

The name of the destination dataset.

my-dataset

condition

object

No

The conditional routing configuration. This parameter is used only when sink.type is set to condition.

matchMode

string

No

The route matching mode. Currently, only all is supported.

all

routes

array<object>

No

The list of conditional routes.

array<object>

No

The conditional route.

id

string

No

The route ID.

refund

expression

string

No

The route expression in Search Processing Language (SPL). Only where, project, and extend are supported.

* | where intent = 'refund'

sink

object

No

The write destination of the route.

type

string

No

The route destination type. Currently, only dataset is supported.

dataset

dataset

object

No

The route destination dataset.

agentSpace

string

No

The name of the AgentSpace to which the destination dataset belongs.

my-agent-space

dataset

string

No

The name of the destination dataset.

refund-result

defaultSink

object

No

The default write destination used when no conditional route is matched.

type

string

No

The default destination type. Currently, only dataset is supported.

dataset

dataset

object

No

The default destination dataset.

agentSpace

string

No

The name of the AgentSpace to which the default destination dataset belongs.

my-agent-space

dataset

string

No

The name of the default destination dataset.

other-result

executePolicy

object

No

The execution policy is merged with the saved scheduling method. The scheduling mode is determined by the configuration during creation. Update requests must omit executePolicy.mode. Even if the passed value is the same as the original configuration, a 400 InvalidParameter error is returned. For OSS pipelines, the entire executePolicy can be omitted.

mode

string

No

The scheduling mode is determined by the configuration during creation. Update requests must omit executePolicy.mode. Even if the passed value is the same as the original configuration, a 400 InvalidParameter error is returned. The Scheduled example illustrates the scheduling modes that can be set during creation. You must omit mode when calling UpdatePipeline.

Scheduled

runOnce

object

No

The configuration for executing the pipeline only once.

{"fromTime":1735660800,"toTime":1735664400}

fromTime

integer

No

The start time of data processing. The value is a UNIX timestamp in milliseconds.

1735660800000

toTime

integer

No

The end time of data processing. The value is a UNIX timestamp in milliseconds.

1735747200000

continuous

object

No

The continuous execution configuration. This parameter is used when type is set to trace. The processing frequency is a fixed value managed by the server.

{"fromTime":1735660800}

fromTime

integer

No

The bootstrap history start time. The value is a UNIX timestamp in seconds, which has the same precision as runOnce/scheduled.fromTime. Millisecond values greater than or equal to 1e12 are automatically converted. The cursor starts from this time aligned to the grid and catches up window by window. After catching up, it switches to minute intervals. By default, it starts from the current time and processes only incremental data.

1735660800

scheduled

object

No

The timed scheduling configuration.

{"interval":"1h","fromTime":1735660800}

interval

string

No

The scheduling interval, such as 1h.

1h

fromTime

integer

No

The scheduling start time. The value is a UNIX timestamp in milliseconds.

1735660800000

clientToken

string

No

The idempotency token. It is a unique string generated by the client to ensure the idempotence of the update operation.

a1b2c3d4-1234-5678-90ab-cdef12345678

When updating a pipeline, pass only the fields that need to be modified. The scheduling mode is determined by the configuration during creation. Update requests must omit executePolicy.mode. Even if the passed value is the same as the original configuration, a 400 InvalidParameter error is returned.

For existing OSS pipelines, you can omit source, pipeline, sink, and executePolicy. If you send an OSS source, it must be consistent with the original configuration. When source.type is set to oss, format, region, roleArn, and uri in source.oss are all required. You can omit formatOptions or pass an empty object {}. The initial version has no available configuration keys. Non-empty objects and other JSON types will return a parameter error.

Complete request body for updating the description of an OSS pipeline

{
  "description": "Update the description of the OSS import task"
}

Response elements

Element

Type

Description

Example

object

The response data.

requestId

string

The request ID. You can use this ID to locate the request for troubleshooting.

9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M

Examples

Success response

JSON format

{
  "requestId": "9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.