UpdateLivePullToPush

Updated at:
Copy as MD

Updates a stream pulling and pushing task by calling UpdateLivePullToPush.

Operation description

  • Call this operation to update a stream pulling and pushing task.

  • If the task has not reached the configured start time, you can update the Region parameter.

  • While the task is running (including during abnormal retry states), only CallbackUrl and RepeatTime can be updated, and the updates take effect immediately.

  • If the task is stopped, all parameters except Region can be updated.

QPS limit

The single-user QPS limit for this operation is 10 calls per second. If this limit is exceeded, the API calls are throttled, which may affect your business. Call this operation appropriately.

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

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 launched. Valid values:

  • ap-southeast-1 (Singapore)

  • ap-southeast-5 (Indonesia)

  • cn-beijing (Beijing)

  • cn-shanghai (Shanghai).

Valid values:

  • cn-shenzhen :

    Shenzhen.

  • cn-qingdao :

    Qingdao.

  • preregion :

    Pre-release.

  • cn-beijing :

    Beijing.

  • cn-shanghai :

    Shanghai.

  • ap-southeast-1 :

    Singapore.

  • eu-central-1 :

    Germany (Frankfurt).

  • ap-northeast-1 :

    Japan (Tokyo).

  • ap-southeast-5 :

    Indonesia.

  • me-central-1 :

    Saudi Arabia (Riyadh).

cn-shanghai

StartTime

string

No

The start time of the task.

Note
  • Format: yyyy-MM-ddTHH:mm:ssZ (UTC).

  • If the task has already started running, this update does not take effect.

2024-08-23T15:30:00Z

EndTime

string

No

The end time of the task.

Note
  • Format: yyyy-MM-ddTHH:mm:ssZ (UTC).

  • EndTime must be later than StartTime.

  • EndTime must be later than the current time.

  • If the task has already ended, this update does not take effect.

2024-08-27T14:30:00Z

SourceUrls

array

No

The list of source stream URLs.

Note
  • For the live type, only one complete live streaming URL is supported.

  • For the vod and url types, up to 30 URLs can be specified.

  • The live type supports RTMP, SRT, and HTTP-FLV protocols.

  • For the vod type, specify ApsaraVideo VOD media asset IDs.

  • The url type supports MP4 and HTTP-FLV protocols.

  • For live source streams, the update takes effect immediately. For video file source streams, the update takes effect after the currently playing video ends, and playback restarts from the beginning of the updated video list.

  • Update this parameter while the task is stopped. The update takes effect after the task is restarted.

changedtesturl

string

No

The source stream URL.

Note
  • For the live type, only one complete live streaming URL is supported.

  • For the vod and url types, up to 30 URLs can be specified.

  • The live type supports RTMP, SRT, and HTTP-FLV protocols.

  • For the vod type, specify ApsaraVideo VOD media asset IDs.

  • The url type supports MP4 and HTTP-FLV protocols.

  • For live source streams, the update takes effect immediately. For video file source streams, the update takes effect after the currently playing video ends, and playback restarts from the beginning of the updated video list.

  • Update this parameter while 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 playback repeats after the playlist finishes. Valid values:

  • 0 (default): no repeat.

  • -1: loop indefinitely.

  • Other positive integers: the number of times playback repeats after the playlist finishes.

Note
  • This parameter applies only to video-on-demand or third-party video streams.

  • The update takes effect immediately.

0

Offset

integer

No

The start offset of the video file, in seconds. The value must be greater than 0.

Note
  • Specifies the position relative to the first frame from which to start reading.

  • This parameter applies only to video-on-demand or third-party video streams.

  • This parameter takes effect only when the first video in the playlist is played.

  • Update this parameter while the task is stopped. The update takes effect after the task is restarted.

2

CallbackUrl

string

No

The callback URL. Default value: empty.

Note
  • The URL that receives task-related callbacks.

  • Maximum length: 2000 characters.

  • If this parameter is not specified, task events are not sent as callbacks.

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

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

FileIndex

integer

No

The video index. Default value: 0.

Note

Update this parameter while the task is stopped. The update takes effect after the task is restarted.

0

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

RetCode

integer

The return code.

Note
  • The value "0" is returned if the call is successful.

  • For exceptions, refer to the error code list below.

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.