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
Test
RAM authorization
|
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:
|
cn-shanghai |
| StartTime |
string |
No |
The start time of the task. Note
|
2024-08-23T15:30:00Z |
| EndTime |
string |
No |
The end time of the task. Note
|
2024-08-27T14:30:00Z |
| SourceUrls |
array |
No |
The list of source stream URLs. Note
|
changedtesturl |
|
string |
No |
The source stream URL. Note
|
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:
Note
|
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
|
2 |
| CallbackUrl |
string |
No |
The webhook address. The default value is empty. Note
|
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
|
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.