最近更新时间:2026-06-03 21:31:35
以下代码用于更新批量任务的优先级:
from ks3.connection import Connection
# 金山云主账号AccessKey拥有所有API的访问权限,风险很高。
# 强烈建议您创建并使用子账号进行API访问或日常运维,请登录https://uc.console.ksyun.com/pro/iam/#/user/list创建子账号。
c = Connection('<YOUR_ACCESS_KEY>', '<YOUR_SECRET_KEY>', host='<YOUR_REGION_ENDPOINT>')
job_id = '<YOUR_JOB_ID>'
new_priority = '10'
result = c.update_job_priority(job_id, new_priority)
print("优先级更新成功:")
print(" 任务ID:", result.job_id)
print(" 新优先级:", result.priority)
有关更新批量任务优先级的API,请参见Update Job Priority。
优先级为数字字符串,数值越大优先级越高。
纯净模式
