{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"UpdateDeviceChannelStrategy":{"properties":{"end_time":{"description":"一天中视频接入的结束时间,时间格式为HH:MM,取值范围是00:10~23:50。分钟数值须为10的倍数,如23:10、23:20等。end_time必须晚于start_time。第一次设置视频采集类型为RANDOM时,该参数必填。后续更新接入策略时,该参数可选采集类型为CONSECUTIVE时,该参数被忽略。","example":"12:10","type":"string"},"periodicity":{"description":"采集周期,可选值如下。\n- ONCE:表示采集一次。\n- DAY:表示每天执行。\n\n默认值为DAY,不区分大小写。","enum":["DAY","ONCE"],"example":"DAY","type":"string"},"random_strategy":{"description":"视频采集类型,可选值如下。\n- RANDOM:表示使用随机采集方法。在开始时间和结束时间内,随机采集总时长为total_length参数值的视频。\n\n 随机策略说明:\n\n 一天内从start_time到end_time的时间,会随机分成若干个时间分片(总分片个数不超过6个),每个时间分片最短为10min,最长不超过total_length时间,每两个时间分片之间的间隔至少为20min。时间分片之间的间隔即视频起始时间的间隔,例如中间断开10min,也就是间隔至少20min。\n\n\n 如果设置为每天执行采集(即“periodicity”为“DAY”),每天的时间分片会重新随机生成,以保证每天接入的时间分片不同。\n\n\n 如果更新了接入策略(例如修改了start_time、total_length等参数),并且当前接入策略运行状态为ACTIVE,则会重新生成分片,其中分片开始时间早于当前时间的不会在当天执行,分片开始时间晚于当前时间的会在当天执行。\n\n- CONSECUTIVE:表示从开始时间连续采集时长为total_length参数值的视频。\n\n默认值为RANDOM,不区分大小写。","enum":["RANDOM","CONSECUTIVE"],"example":"RANDOM","type":"string"},"start_time":{"description":"一天中视频接入的开始时间,时间格式为HH:MM,取值范围是00:10~23:40。分钟数值须为10的倍数,例如10:10、10:20、10:30等。第一次设置接入测略时,该参数必填。后续更新接入策略时,该参数可选。","example":"10:20","pattern":"(?:0[0-9]|1[0-9]|2[0-3]):([0-5]0)","type":"string"},"state":{"description":"视频接入状态,可选值如下。\n- ACTIVE:表示激活当前视频接入策略。\n- STOPPED:表示停止当前视频接入策略。\n\n默认值为STOPPED,不区分大小写。","enum":["ACTIVE","STOPPED"],"example":"ACTIVE","type":"string"},"total_length":{"description":"视频接入总采集时长,单位:分钟。参数值须为10的倍数,最小值为10分钟,最大值根据用户的配额决定。不同的视频采集类型,total_length有不同的配额设置:采集类型为RANDOM时,start_time加上total_length后的时间不能超过end_time。采集类型为CONSECUTIVE时,start_time加上total_length后的时间不能超过24:00,即采集时长不允许跨天。第一次设置接入测试略时,该参数必填。后续更新接入策略时,该参数可选。","example":10,"maximum":1440,"minimum":10,"type":"integer"}}},"UpdateResponse":{"properties":{"result":{"description":"处理成功时返回","example":"success","type":"string"}}}},"description":null,"group_id":"5346b7c1dc284228a28795d5bcbd550d","host":"vis.cn-north-4.myhuaweicloud.com","id":"0c04b221fcc14ffe9bd61d91db26adad","info_version":"v1","method":"put","name":"UpdateDeviceChannelStrategy","parameters":{"Authorization":{"description":"使用AK/SK方式认证时必选,携带的鉴权信息。","in":"header","maxLength":256,"minLength":1,"name":"Authorization","required":false,"type":"string","x-example":"SDK-HMAC-SHA256 Access=xxx, SignedHeaders=content-type;host;x-sdk-date, Signature=xxx"},"X-Auth-Token":{"description":"普通租户的token。","in":"header","maxLength":10240,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string"},"X-Project-Id":{"description":"使用AK/SK方式认证时必选,携带项目ID信息。","in":"header","maxLength":64,"minLength":1,"name":"X-Project-Id","required":false,"type":"string","x-example":"70b76xxxxxx34253880af501cdxxxxxx"},"X-Sdk-Date":{"description":"使用AK/SK方式认证时必选,请求的发生时间。","in":"header","maxLength":256,"minLength":1,"name":"X-Sdk-Date","required":false,"type":"string","x-example":"20191115T033655Z"},"project_id":{"description":"项目ID,获取方法请参考[获取项目ID](https://support.huaweicloud.com/api-vis/vis_03_0005.html)","in":"path","maxLength":32,"minLength":32,"name":"project_id","required":true,"type":"string"}},"paths":{"/v1/{project_id}/devices/{device_id}/channels/{channel_id}/access-strategy":{"put":{"consumes":[],"deprecated":false,"description":"该接口用于设置GB/T28181设备的视频接入策略。用户可以通过设置接入策略定时自动进行设备的接入。\n\n定时接入策略分为随机接入和连续接入两种采集类型。\n\n- 随机接入:在开始时间和结束时间内,随机采集总时长为total_length参数值的视频。\n\n- 连续接入:从开始时间连续采集时长为total_length参数值的视频。","operationId":"UpdateDeviceChannelStrategy","parameters":[{"$ref":"#/parameters/project_id"},{"$ref":"#/parameters/X-Auth-Token"},{"$ref":"#/parameters/Authorization"},{"$ref":"#/parameters/X-Sdk-Date"},{"$ref":"#/parameters/X-Project-Id"},{"description":"设备ID","in":"path","name":"device_id","required":true,"type":"string","x-example":"devi****3123sadf"},{"description":"通道ID","in":"path","name":"channel_id","required":true,"type":"string","x-example":"933908423*****000001"},{"description":"更新设备通道接入策略请求体\"","in":"body","name":"UpdateDeviceChannelStrategy","required":false,"schema":{"$ref":"#/definitions/UpdateDeviceChannelStrategy"}}],"produces":[],"responses":{"200":{"description":"正常","examples":{"application/json":{"result":"success"}},"schema":{"$ref":"#/definitions/UpdateResponse"}},"404":{"description":"找不到资源或没有开通服务","examples":{"application/json":{"error_code":"VIS.0302","error_msg":"Failed to find the device."}}}},"summary":"更新GB/T28181设备通道接入策略","tags":["设备管理"],"x-apiexplorer-hide":"N","x-is-registered":"Y","x-name":"更新GB/T28181设备通道接入策略","x-request-examples-1":{"end_time":"18:00","periodicity":"DAY","random_strategy":"RANDOM","start_time":"10:00","state":"STOPPED","total_length":240},"x-request-examples-url-1":"PUT /v1/3266392d188c47d09948b1**********/devices/9339084235*****000001/channels/ 933908423****0000001/access-strategy","x-support-sdk":"Y"}}},"product_short":"VIS","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"更新GB/T28181设备通道接入策略","tags":"设备管理","uri":null,"version":"2.0"}