All Products
Search
Document Center

ApsaraVideo Live:UpdateLivePullToPush

Last Updated:Aug 05, 2025

You can call the UpdateLivePullToPush operation to update a pull-to-push task.

Operation description

  • Before a task starts, you can update the SourceType, Region, and DstUrl parameters.

  • If a task is running, including when it is in the abnormal retry state, you can update only the CallbackUrl and RepeatTime parameters. The update takes effect immediately.

  • If a task is stopped, you can update all parameters except for SourceType, Region, and DstUrl.

  • If a task is stopped, you can update all parameters except for SourceType, Region, or DstUrl.

QPS limit

The queries per second (QPS) limit for a single user on this operation is 10 calls per second. If the limit is exceeded, API calls are throttled. This may affect your business. We recommend that you call this operation within this limit.

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 support 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

live:UpdateLivePullToPush

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-beijing

TaskId

string

Yes

The task ID.

fd245384-4067-4f91-9d75-9666a6bc****

Region

string

Yes

The region where the task is started. Valid values:

  • ap-southeast-1 (Singapore)

  • ap-southeast-5 (Indonesia)

  • cn-beijing (Beijing)

  • cn-shanghai (Shanghai)

cn-shanghai

StartTime

string

No

The start time of the task.

Note
  • The time must be in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in Coordinated Universal Time (UTC).

  • If the task is running, the update is invalid.

2024-08-23T15:30:00Z

EndTime

string

No

The end time of the task.

Note
  • The time must be in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

  • The value of EndTime must be later than the value of StartTime.

  • The value of EndTime must be later than the current time.

  • If the task is stopped, the update is invalid.

2024-08-27T14:30:00Z

SourceUrls

array

No

The list of source stream URLs.

Note
  • If the source is a live stream, you can specify only one complete live stream URL.

  • If the source is a video on demand (VOD) file or a file from a third-party URL, you can specify up to 30 URLs.

  • For live stream sources, the RTMP, RTSP, SRT, and HTTP-FLV protocols are supported.

  • For VOD sources, specify the media asset IDs of ApsaraVideo VOD.

  • For sources from third-party URLs, the MP4 and HTTP-FLV protocols are supported.

  • The update takes effect immediately for live stream sources. For video file sources, the update takes effect after the current video finishes playing. After the update takes effect, the new video list is played from the beginning.

  • You must update the parameter when the task is stopped. The update takes effect after the task is restarted.

changedtesturl

string

No

The source stream URL.

Note
  • If the source is a live stream, you can specify only one complete live stream URL.

  • If the source is a VOD file or a file from a third-party URL, you can specify up to 30 URLs.

  • For live stream sources, the RTMP, RTSP, SRT, and HTTP-FLV protocols are supported.

  • For VOD sources, specify the media asset IDs of ApsaraVideo VOD.

  • For sources from third-party URLs, the MP4 and HTTP-FLV protocols are supported.

  • The update takes effect immediately for live stream sources. For video file sources, the update takes effect after the current video finishes playing. After the update takes effect, the new video list is played from the beginning.

  • You must update the parameter when the task is stopped. The update takes effect after the task is restarted.

rtmp://pulltest.****.aliyunlive.com/pulltest493/pulltest-w434

RepeatNumber

integer

No

The number of times to repeat the playback after the video is played. Valid values:

  • 0 (default): The video is not repeatedly played.

  • -1: The video is played in a loop.

  • Other positive integers: the number of times to repeat the playback.

Note
  • This parameter is applicable only to VOD files or third-party video streams.

  • The update takes effect immediately.

0

Offset

integer

No

The playback offset. This parameter specifies the start time for playback. Unit: seconds. The value must be greater than 0.

Note
  • The playback starts from the specified offset relative to the first frame.

  • This parameter is applicable only to VOD files or third-party video streams.

  • This parameter is valid only when the first video in the list is played.

  • You must update the parameter when the task is stopped. The update takes effect after the task is restarted.

2

CallbackUrl

string

No

The webhook address. The default value is empty.

Note
  • The address that is used to receive task-related callbacks.

  • The maximum length is 2,000 characters.

  • If you do not specify this parameter, task-related events are not sent.

  • The update takes effect only when the next event is triggered.

https://callback*****.com

FileIndex

integer

No

The video index. The default value is 0.

Note

You must update the parameter when the task is stopped. The update takes effect after the task is restarted.

0

Response parameters

Parameter

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68*****

RetCode

integer

The return code.

Note
  • A value of 0 is returned on a successful call.

  • For abnormal cases, see the list of error codes.

0

Description

string

The error description.

OK

Examples

Success response

JSON format

{
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68*****",
  "RetCode": 0,
  "Description": "OK"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter %s. Parameter error
400 InvalidParam.CodeIllegalDuration %s. The value of start time should be less than the value of end time .
400 CodeInvalidAliUid This aliuid does not have a live domain name. This aluid does not have a live domain name.
400 CodeTaskNotExist Task does not exist. The task does not exist.
400 CodeTaskHasStarted The task has already started. The task has already started and cannot be updated.
500 InternalError %s. error on the live liveapi server.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.