调用 UpdateRelaySourceV4 接口,更新指定固定触发回源配置。
固定触发回源配置包含固定回源和永久回源类型。您可以调用该接口,更新回源配置的回源地址、回源时间或回源类型。
StartTime 和回源结束时间 EndTime。StartTime 和回源结束时间 EndTime,即可更新为永久回源类型。说明
如需将固定回源类型变更为永久回源类型,确保已开通永久回源功能。如未开通,请联系技术支持开通该功能。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | UpdateRelaySourceV4 | 接口名称。当前 API 的名称为 UpdateRelaySourceV4。 |
| Version | String | 是 | 2023-01-01 | 接口版本。当前 API 的版本为 2023-01-01。 |
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
Vhost | String | 是 |
| 域名空间。
|
| App | String | 是 | live | 视频直播播放地址中的 AppName。您可调用 ListRelaySourceV4 并根据返回参数 App 获取固定触发回源配置的 AppName。 |
| Stream | String | 是 | example_stream | 视频直播播放地址中的 StreamName。您可调用 ListRelaySourceV4 并根据返回参数 Stream 获取固定触发回源配置的 StreamName。 |
SrcAddrS | Array of String | 是 |
| 回源地址列表,即视频直播从源站拉取直播流时访问的地址列表。支持 RTMP、RTMPS、FLV 或 HLS 协议。 说明
|
StartTime | Integer | 否 |
| 回源开始时间。Unix 时间戳,单位为秒。 说明
|
EndTime | Integer | 否 |
| 回源结束时间。Unix 时间戳,单位为秒。 说明
|
本接口无特有的返回参数。更多信息请见返回结构。
POST https://live.volcengineapi.com?Action=UpdateRelaySourceV4&Version=2023-01-01 { "Vhost": "pull.example.com", "App": "live", "Stream": "example_stream", "SrcAddrS": [ "rtmp://live.example.com/live01/test01" ], "StartTime": 1785923506, "EndTime": 1785953506 }
{ "ResponseMetadata": { "RequestId": "20230604110420****100232280022D31", "Action": "UpdateRelaySourceV4", "Version": "2023-01-01", "Service": "live", "Region": "cn-north-1" } }
下表仅列出本接口特有的错误码。更多信息请参见公共错误码获取详细信息。
| 状态码 | 错误码 | 错误信息 | 说明 |
|---|---|---|---|
| 200 | CommonErr | - | 未分类错误。建议重试,如果仍返回该错误码,请联系技术支持。 |
| 400 | InvalidParam | - | 输入的参数无效或不符合要求,请参照请求参数说明进行检查。 |
| 400 | InvalidParam.BindError | Request parameter error, please check input data | 参数未通过校验,请检查参数类型是否正确。 |
| 400 | InvalidParam.OutOfRange | %s should be one of {[%s]}%s should be between %d and %d | 参数超出允许范围,请检查错误消息中指定参数的取值是否超出取值范围。 |
| 403 | RequestForbidden | - | 请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。 |
| 403 | RequestForbidden.AccountIDNotAllowed | this AccountID does not have permission to access the corresponding resource, please check the request parameters | 请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。 |
| 403 | RequestForbidden.BillingStatus | Billing status is not available for the AccountID, please activate the service or recharge. | 未开通视频直播服务或账号欠费,造成账单不可用,请检查服务开通情况和账号欠费情况。 |
| 404 | ResourceNotFound | - | 未找到资源(域名空间、域名、应用、配置模版、证书)。建议重试,如果仍返回该错误码,请联系技术支持。 |
| 500 | InternalError | an internal error occurred, please contact the administrator. | 出现内部错误,请联系技术支持。 |
| 502 | InternalServiceError | an internal error occurred, please contact the administrator. | 服务间出现错误,请联系技术支持。 |
| 502 | InternalServiceError.BadResponse | an internal error occurred, please contact the administrator. | 服务间出现错误,请联系技术支持。 |
| 504 | InternalServiceTimeout | Internal Service is timeout. please contact the administrator. | 内部服务超时,请联系技术支持。 |
视频直播提供了配套的开发工具集 SDK,支持多种编程语言,帮助您更方便的调用 API。