{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"ApplyObject":{"description":"定时任务应用对象。","properties":{"object_id":{"description":"对象ID。","example":"2b31e-d520xxxx-xxebedb6-e57xxxxxx","maxLength":255,"minLength":1,"type":"string"},"object_name":{"description":"对象名称。","example":"测试桌面","readOnly":true,"type":"string"},"object_type":{"description":"对象类型,可选值为:\n- DESKTOP:桌面。\n- DESKTOP_POOL:桌面池。\n- ALL_DESKTOPS: 所有桌面,仅供触发式任务使用。","enum":["DESKTOP","DESKTOP_POOL","ALL_DESKTOPS"],"example":"DESKTOP","maxLength":255,"minLength":1,"type":"string"}},"type":"object"},"BaseResponse":{"description":"API响应基类","properties":{"error_code":{"description":"错误码。","maxLength":12,"minLength":0,"type":"string"},"error_msg":{"description":"错误描述。","maxLength":1000,"minLength":0,"type":"string"}}},"ScheduledTaskConfig":{"description":"定时任务时间配置。","properties":{"date_list":{"description":"周期按月时:取值1~31及L(代表当月最后一天),英文逗号分隔,如1,2,28,L。","example":"1,2,28,L","maxLength":255,"minLength":0,"type":"string"},"day_interval":{"description":"周期按天时:按x天间隔执行。","example":1,"format":"int32","maximum":31,"minimum":1,"type":"integer"},"expire_time":{"description":"到期时间,格式为yyyy-MM-dd HH:mm:ss。","example":"2022-12-31 09:00:00","maxLength":255,"minLength":0,"type":"string"},"gray_count":{"description":"灰度对象数量,优先级高于gray_desktop_ids。只支持脚本执行。","format":"int32","maximum":1000,"minimum":0,"type":"integer"},"gray_desktop_ids":{"description":"灰度执行的桌面id列表,优先级低于gray_count。只支持脚本执行。","items":{"maxLength":255,"minLength":0,"type":"string"},"maxItems":1000,"minItems":0,"type":"array","x-maxLength":1000,"x-minLength":0},"gray_fail_threshold":{"description":"灰度失败阈值,灰度执行失败次数达到该值时,不执行下一批任务。只支持脚本执行。","format":"int32","maximum":1000,"minimum":1,"type":"integer"},"life_cycle_type":{"description":"触发场景。POST_CREATE_DESKTOP_SUCCESS:创建桌面成功后,POST_REBUILD_DESKTOP_SUCCESS:重建桌面成功后,POST_REATTACH_DESKTOP_SUCCESS:触发重建的分配用户任务成功后。","maxLength":255,"minLength":0,"type":"string"},"month_list":{"description":"周期按月时:取值1~12,英文逗号分隔,如1,3,12。","example":"1,3,12","maxLength":255,"minLength":0,"type":"string"},"scheduled_date":{"description":"周期指定时间时:表示指定的日期,格式为yyyy-MM-dd。","example":"2022-12-23","maxLength":255,"minLength":0,"type":"string"},"scheduled_time":{"description":"指定的执行时间点,格式为HH:mm:ss。","example":"09:00:00","maxLength":255,"minLength":0,"type":"string"},"scheduled_type":{"description":"执行周期类型,可选值为:\n- FIXED_TIME:指定时间。\n- DAY:按天。\n- WEEK:按周。\n- MONTH:按月。\n- LIFE_CYCLE:指定场景下触发。","enum":["FIXED_TIME","DAY","WEEK","MONTH","LIFE_CYCLE"],"example":"FIXED_TIME","maxLength":255,"minLength":1,"type":"string"},"time_zone":{"description":"时区。","example":"Asia/Shanghai","maxLength":2000,"minLength":0,"type":"string"},"week_list":{"description":"周期按周时:取值1~7,分别对应周日~周六,英文逗号分隔,如1,2,7。","example":"1,2,7","maxLength":255,"minLength":0,"type":"string"}},"type":"object"},"UpdateScheduledTasksReq":{"allOf":[{"$ref":"#/definitions/ScheduledTaskConfig"},{"properties":{"apply_objects":{"description":"定时任务应用的对象列表。","items":{"$ref":"#/definitions/ApplyObject"},"maxItems":1000,"minItems":0,"type":"array"},"description":{"description":"描述。","example":"一个描述","maxLength":255,"minLength":0,"type":"string"},"enable":{"description":"是否启用","example":true,"type":"boolean"},"extra_params":{"description":"扩展参数,json格式。","example":"{ \"notify_message\": \"测试\" }","maxLength":1024,"minLength":0,"type":"string"},"force_execute":{"description":"是否强制执行","example":false,"type":"boolean"},"is_gray":{"description":"任务是否灰度执行,供远程脚本使用。","type":"boolean"},"priority":{"description":"优先级。触发式任务使用。","format":"int32","maximum":50,"minimum":1,"type":"integer"},"task_name":{"description":"任务名称。","example":"测试任务","maxLength":255,"minLength":1,"type":"string"}},"type":"object"}],"description":"修改定时任务请求体。"}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"91cf4f65832f4d369561dfbca4ac3229","info_version":"v2","method":"put","name":"UpdateScheduledTasks","parameters":{},"paths":{"/v2/{project_id}/scheduled-tasks/{task_id}":{"put":{"description":"修改定时任务。","operationId":"UpdateScheduledTasks","parameters":[{"description":"项目ID。","in":"path","maxLength":255,"minLength":1,"name":"project_id","required":true,"type":"string","x-annotations":"@Size(max = 255, min = 1)","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"任务ID。","in":"path","maxLength":255,"minLength":1,"name":"task_id","required":true,"type":"string","x-annotations":"@Size(max = 255, min = 1)","x-example":"2b31e-d520xxxx-xxebedb6-e57xxxxxx"},{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":40000,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string","x-annotations":"@Size(max = 40000, min = 1)","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX...","x-is-registered":"N"},{"description":"请求参数。","in":"body","name":"UpdateScheduledTasksRequestBody","required":true,"schema":{"$ref":"#/definitions/UpdateScheduledTasksReq"}}],"responses":{"200":{"description":"正常。"},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BaseResponse"}},"500":{"description":"服务内部错误,具体返回错误码请参见错误码说明。","schema":{"$ref":"#/definitions/BaseResponse"}}},"summary":"修改定时任务","tags":["ScheduledTask"],"x-apiexplorer-hide":"N","x-apig-group":"public,internal_token","x-apigateway-request-type":"public","x-is-registered":"Y","x-support-sdk":"Y"}}},"product_short":"Workspace","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"修改定时任务","tags":"定时任务","uri":null,"version":"2.0"}