我正在尝试使用 python 中的 boto3
更新 Input MediaLive URL。
输入是 URL_PULL
类型 (HLS) 并附加到 channel ,我认为这是我的问题的根源。
account = { all credentials and stuff }
url = 'https://mynew/supercool/hls/playlist.m3u8'
client = boto3.client("medialive",
aws_access_key_id=account['access_key'],
aws_secret_access_key=account['key_secret'],
region_name=account['region_name'])
input_id = 1234567
client.update_input(InputId=input_id, Sources=[{'Url': url}])
代码运行良好,但出现此错误,我不知道如何处理:
An error occurred (BadRequestException) when calling the UpdateInput operation: You cannot change the input class of an input while it's attached to a channel. Please detach the input from the channel in order to switch its class.
问题:我应该使用哪个工作流程来更新已附加到 channel 的输入?
最佳答案
AWS API 在更新输入、主要和备份时需要 2 个 url。
client.update_input(InputId=input_id, Sources=[{'Url': url},{'Url': url}])
关于python - 在 MediaLive 中更改输入 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60263002/