{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"EditScriptModel":{"description":"修改脚本","properties":{"content":{"description":"脚本内容","example":"echo ${value}","maxLength":4096,"minLength":1,"type":"string"},"description":{"description":"脚本描述","example":"修改脚本时的描述信息","maxLength":256,"minLength":1,"type":"string"},"properties":{"$ref":"#/definitions/ScriptPropertiesModel","description":"风险等级:LOW;HIGH;MEDIUM;审批人只支持修改"},"script_params":{"description":"脚本入参","items":{"$ref":"#/definitions/ScriptParamDefine"},"maxItems":5,"minItems":0,"type":"array"}},"required":["content","description"],"type":"object"},"ErrorRsp":{"description":"失败时返回的错误对象","properties":{"error_code":{"description":"错误码","maxLength":36,"minLength":8,"type":"string"},"error_msg":{"description":"错误描述","maxLength":512,"minLength":2,"type":"string"}},"required":["error_code","error_msg"]},"ReviewerInfo":{"description":"审批人信息","properties":{"reviewer_id":{"description":"审批人ID(IAM用户Id)","example":"e99a6f27cfe7497084ac9c07bfa573d7","maxLength":32,"minLength":0,"type":"string"},"reviewer_name":{"description":"审批人名称(IAM用户名)","example":"test","maxLength":64,"minLength":1,"type":"string"}},"required":["reviewer_id","reviewer_name"],"type":"object"},"ScriptParamDefine":{"description":"顺序参数,没有参数名字段\n参数顺序,从1开始,不连续会报错\n\napi层用不同的vo对象接收,管理面没有order字段。service层统一处理差异\n\n拼接:sh xxx.sh 'aaa' 'a' 'b'\n执行时值为空:sh xxx.sh '' 'a' 'b'","properties":{"param_description":{"description":"参数描述","example":"测试参数","maxLength":256,"minLength":0,"type":"string"},"param_name":{"description":"参数名仅支持字母、数字以及下划线","example":"value","maxLength":64,"minLength":1,"type":"string"},"param_order":{"description":"该参数已废弃,传入该参数不会生效。","format":"int32","type":"integer"},"param_value":{"description":"1.参数长度为1-4096位\n2.可以包含大写字母、小写字母、数字及特殊字符(_-/.* ?:\",=+@#\\[{]})\n3.禁止出现连续'.'","example":"test","maxLength":4096,"minLength":0,"type":"string"},"sensitive":{"description":"是否是敏感参数","example":false,"type":"boolean"}},"required":["param_description","param_name","param_value","param_order","sensitive"],"type":"object"},"ScriptPropertiesModel":{"description":"脚本标签:风险等级risk_level(取值范围:LOW/MEDIUM/HIGH)、审批人reviewer、脚本解释器interpreter等","properties":{"protocol":{"description":"审批消息通知协议,用于通知审批人\nDEFAULT:默认\nSMS:短信\nEMAIL:邮件\nDING_TALK:钉钉\nWE_LINK:welink\nWECHAT:微信\nCALLNOTIFY:语言\nNOT_TO_NOTIFY:不通知","enum":["DEFAULT","SMS","EMAIL","DING_TALK","WE_LINK","WECHAT","CALLNOTIFY","NOT_TO_NOTIFY"],"example":"WECHAT","type":"string","x-internal":false},"reviewers":{"description":"审批人,不填写不需要审批","items":{"$ref":"#/definitions/ReviewerInfo"},"maxItems":5,"minItems":0,"type":"array","x-internal":"false"},"risk_level":{"description":"风险等级\nLOW:低风险\nMEDIUM:中风险\nHIGH:高风险","enum":["LOW","MEDIUM","HIGH"],"example":"LOW","type":"string"},"version":{"description":"脚本版本号","example":"v1.0.0","maxLength":10,"minLength":1,"type":"string"}},"required":["risk_level","version"],"type":"object"},"UpdateScriptRessponse":{"description":"修改自定义脚本的返回体","properties":{"data":{"description":"被修改脚本的script_uuid","example":"SC2023102521413701c4a8a62","type":"string"}},"required":["data"],"type":"object"}},"description":null,"group_id":"82af75d8fb894fc2b06ca4175859ba53","host":"coc.myhuaweicloud.com","id":"5bd23a42d56047e78986822e56efb235","info_version":"v1","method":"put","name":"UpdateScript","parameters":{},"paths":{"/v1/job/scripts/{script_uuid}":{"put":{"description":"修改作业脚本:自定义脚本\n约束条件:\n脚本名称:同一租户下,脚本名称不能重复,最大字符64个字符,支持中文+字母+数字+下划线。\n脚本内容最大4096个字符。\n脚本参数个数最多20个。\n脚本描述:最大256个字符。\n单个参数的参数名称 64个字符,只支持字母+数字+下划线。\n单个参数的值最大1024个字符,正则表达式如下:^((?!.{2,})[a-zA-Z0-9_-/.*\\x20?:\",=+@\\[{]}])*$。\n修改的脚本如果有审批人,在修改之后,需要再次选择审批人,查询审批","operationId":"UpdateScript","parameters":[{"description":"脚本uuid","in":"path","maxLength":25,"minLength":1,"name":"script_uuid","required":true,"type":"string"},{"description":"待更新的脚本内容","in":"body","name":"UpdateScriptRequestBody","required":true,"schema":{"$ref":"#/definitions/EditScriptModel"}},{"description":"租户token","in":"header","name":"X-Auth-Token","required":true,"type":"string"},{"description":"国际化标记,zh-cn表示中文,en-us或不传表示英文","in":"header","name":"X-Language","required":false,"type":"string"},{"description":"项目ID,一个项目对应一个region","in":"header","name":"x-project-id","required":false,"type":"string"},{"description":"IAM5.0用户信息","in":"header","name":"x-user-profile","required":false,"type":"string"}],"responses":{"200":{"description":"脚本uuid","examples":{"application/json":{"data":"SC2023110211155901a787af4"}},"schema":{"$ref":"#/definitions/UpdateScriptRessponse"}},"400":{"description":"","examples":{"application/json":{"error_code":"COC.00040701","error_msg":"error_msg"}},"schema":{"$ref":"#/definitions/ErrorRsp"}}},"summary":"修改脚本","tags":["ScriptManagement"],"x-api-type":"open-api","x-apiexplorer-hide":false,"x-is-registered":"Y","x-order":4,"x-request-examples-1":{"content":"echo ${a}","description":"修改","name":"019101112","properties":{"reviewers":[],"risk_level":"HIGH","version":"1.1.1"},"script_params":[{"param_description":"string","param_name":"a","param_order":1,"param_value":"string","sensitive":true}],"type":"SHELL"},"x-request-examples-text-1":{"content":"echo ${a}","description":"修改","name":"019101112","properties":{"reviewers":[],"risk_level":"HIGH","version":"1.1.1"},"script_params":[{"param_description":"string","param_name":"a","param_order":1,"param_value":"string","sensitive":true}],"type":"SHELL"},"x-request-examples-url-1":"https://coc.myhuaweicloud.com/v1/job/scripts/SC2023110211155901a700000","x-support-sdk":"Y"}}},"product_short":"COC","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"修改脚本","tags":"ScriptManagement","uri":null,"version":"2.0"}