Updates a pulled-stream relay task.
Operation description
- You can call this operation to update a pulled-stream relay task.
- As long as the specified start time of a task has not been reached, you can modify the SourceType, Region, and DstUrl parameters of the task.
- If a task is running (even if the task is in an abnormal retry state), you can modify only the CallbackUrl and RepeatTime parameters of the task. The update takes effect immediately.
- If a task is stopped, you can modify all parameters of the task except SourceType, Region, and DstUrl.
QPS limit
You can call this operation up to 10 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
live:UpdateLivePullToPush | update | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TaskId | string | Yes | The task ID. | fd245384-4067-4f91-9d75-9666a6bc**** |
Region | string | Yes | The region where the task is started. Valid values:
Enumeration Value:
| 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 source URLs. Note
| |
string | No | The source URL of the stream. Note
| rtmp://pulltest.****.aliyunlive.com/pulltest493/pulltest-w434 | |
RepeatNumber | integer | No | The number of playbacks after the first playback is complete. Valid values:
Note
| 0 |
Offset | integer | No | The offset of the position where the system starts to read the video resource. Unit: seconds. Valid values: positive numbers. Note
| 2 |
CallbackUrl | string | No | The callback URL. By default, this parameter is left empty. Note
| https://callback*****.com |
FileIndex | integer | No | The file index. Default value: 0. Note
You can modify this parameter only if the task is stopped. The update takes effect after you restart the task.
| 0 |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.