{"base_path":"/","components":null,"consumes":"","definitions":{"OperationExecutionContentV3":{"description":"操作的执行内容。","properties":{"content":{"description":"脚本内容。","type":"string"},"language":{"description":"脚本语言。可取值为:\n* python\n* shell\n* bat","maxLength":64,"type":"string"},"runner":{"description":"执行用户。","maxLength":256,"type":"string"},"scriptId":{"description":"脚本在用户系统中的源ID,会传给回调服务器用于验证脚本","maxLength":36,"type":"string"},"timeoutSeconds":{"description":"执行脚本的超时时间(单位:秒)。","format":"int16","type":"integer"}},"required":["language","content","timeoutSeconds","runner","scriptId"]},"OperationExecutionResourceLimitItemV3":{"description":"资源限制项","properties":{"limitResourceType":{"description":"资源类型。可取值为:\n* cpu (CPU)\n* memory (内存)\n* subProcess (子进程)\n* stackSize (栈大小)\n* fileHandler (文件句柄数)\n* diskReadRate (磁盘读速率)\n* diskWriteRate (磁盘写速率)","type":"string"},"limitType":{"description":"限制方式。可取值为:\n* absolute (绝对限制)\n* unlimited (不限制)\n* relative (相对限制)","type":"string"},"value":{"description":"限制值。","maxLength":10,"type":"string"}},"required":["limitResourceType","limitType"]},"OperationInputParamsV3":{"description":"操作的输入参数。","properties":{"defaultValue":{"description":"默认值。","maxLength":204800,"type":"string"},"description":{"description":"参数描述。","maxLength":512,"type":"string"},"descriptionEnUs":{"description":"国际化参数描述。","maxLength":512,"type":"string"},"encrypted":{"description":"是否加密","type":"boolean"},"id":{"description":"输入参数id(仅用于查询,创建/修改操作时不需要传该字段)。","format":"int64","type":"integer"},"name":{"description":"参数名称。","maxLength":64,"type":"string"},"nameTip":{"description":"参数名称提示。","maxLength":64,"type":"string"},"nameTipEnUs":{"description":"国际化参数名称提示。","maxLength":64,"type":"string"},"paramExtValues":{"description":"参数扩展信息,文件类型参数包含文件名、id、服务器id,枚举类型参数包含id、枚举名、枚举英文名、枚举id(仅用于查询,创建/修改操作时不需要传该字段)。","items":{"additionalProperties":{"type":"string"},"type":"object"},"maxItems":20,"type":"array","x-object-max-depth":2,"x-object-max-size":20},"paramSeq":{"description":"参数顺序ID(仅用于查询,创建/修改操作时不需要传该字段)。","format":"int64","type":"integer"},"paramType":{"description":"参数类型。可取值为:\n* text(文本)\n* date(日期参数)\n* enum (枚举参数,仅支持查询,不支持创建/修改)\n* file(文件参数,仅支持查询,不支持创建/修改)","type":"string"},"required":{"description":"是否必须","type":"boolean"},"validateRule":{"description":"校验规则(仅适用于文本参数)。","maxLength":256,"type":"string"}},"required":["name","paramType","required","encrypted"]},"OperationMapRequestV3":{"description":"创建、修改操作请求","properties":{"cloudService":{"description":"云服务标识。","type":"string"},"cloudServiceVersion":{"description":"云服务版本。","type":"string"},"description":{"description":"操作描述。","type":"string"},"execEnv":{"description":"脚本执行环境。可取值为:\n* remote (远程主机)\n* local(本地执行)","type":"string"},"execution":{"$ref":"#/definitions/OperationExecutionContentV3","description":"操作的执行内容。"},"inputs":{"description":"输入参数列表。","items":{"$ref":"#/definitions/OperationInputParamsV3"},"maxItems":30,"type":"array"},"name":{"description":"操作名称。","type":"string"},"outputs":{"description":"输出参数列表。","items":{"$ref":"#/definitions/OperationOutputParamsV3"},"maxItems":30,"type":"array"},"packageName":{"description":"包名称。","type":"string"},"packageVersion":{"description":"包版本。","type":"string"},"resourceLimit":{"$ref":"#/definitions/OperationResourceLimitV3","description":"操作的资源限制"},"status":{"description":"发布状态。可取值为:\n* published (已发布)\n* unpublished (未发布)","type":"string"},"version":{"description":"操作版本。","format":"int16","type":"integer"}},"required":["name","execEnv","status","execution","resourceLimit"]},"OperationOutputParamsV3":{"description":"操作输出参数。","properties":{"description":{"description":"参数描述。","maxLength":512,"type":"string"},"descriptionEnUs":{"description":"国际化参数描述。","maxLength":512,"type":"string"},"encrypted":{"description":"是否加密。","type":"boolean"},"id":{"description":"操作输出参数id。","format":"int64","type":"integer"},"name":{"description":"参数名称。","maxLength":64,"type":"string"},"paramType":{"description":"参数类型。可取值为:\n* text (文本)\n* file(文件)\n* date(日期参数)","type":"string"}},"required":["name","paramType","encrypted"]},"OperationResourceLimitV3":{"description":"资源限制配置","properties":{"limits":{"description":"资源限制项","items":{"$ref":"#/definitions/OperationExecutionResourceLimitItemV3"},"maxItems":7,"type":"array"},"policy":{"description":"资源限制策略。可取值为:\n* default (系统默认限制)\n* unlimited (不限制)\n* custom (自定义限制)","type":"string"}},"required":["policy"]},"OperationResponseV3":{"description":"操作删除返回体。","properties":{"id":{"description":"操作id","maxLength":128,"type":"string"},"message":{"description":"删除失败的原因","maxLength":500,"type":"string"},"success":{"description":"删除成功","type":"boolean"}},"required":["id","success"]}},"description":null,"group_id":"a58bba086da947389167b8c3715f7155","host":"hcs.cn-north-4.myhuaweicloud.com","id":"d2d8dfe32e2b42f0971796ab4f284f0d","info_version":"v1","method":"post","name":"CreateOperationV3","parameters":{},"paths":{"/rest/moautoops/v3/operations":{"post":{"consumes":["application/json"],"description":"新建操作接口V3","operationId":"CreateOperationV3","parameters":[{"description":"发送操作请求时间,毫秒级时间戳。","format":"int64","in":"query","name":"timestamp","required":true,"type":"integer"},{"description":"加密密文,用于验证回调请求。","in":"query","maxLength":64,"name":"noise","required":true,"type":"string"},{"description":"证书的序列号,证书在ManageOne运维面“系统>系统集成>信任证书”页面上传,用于建立回调用的HTTPS连接并将noise值加密回调给用户。建议在导入页面的附加信息内添加说明信息,明确证书作用。","in":"query","name":"certsn","required":true,"type":"string"},{"description":"用户自行创建的回调服务器地址,用于用户接收回调请求验证脚本内容,需使用HTTPS协议,用脚本内容计算出的SHA256值作为路径参数置于末尾。","in":"query","name":"verifyUrl","required":true,"type":"string"},{"description":"操作请求体。","in":"body","name":"operationRequest","required":true,"schema":{"$ref":"#/definitions/OperationMapRequestV3"}}],"produces":["application/json"],"responses":{"200":{"description":"新建操作结果。","examples":{"application/json":{"id":"0","message":null,"success":true}},"schema":{"$ref":"#/definitions/OperationResponseV3"}},"400":{"description":"参数错误"},"403":{"description":"URL鉴权"},"500":{"description":"默认ServiceException异常码,应用内部错误"}},"summary":"新建操作V3","tags":["自动化运维"],"x-filter":"ManageOne,irservice,openapi","x-plane":"OM","x-precautions":"1.权限码:(自动作业-操作库-创建操作/编排) moocapp:moautoops-operate-workflow:create; \n2.错误码:当请求不成功时,响应体内的错误码信息请参见“ManageOne 运维面API参考 > 错误码说明 > ManageOne运维面错误码说明 > 自动化运维”章节。\n","x-request-examples-1":{"cloudService":"ManageOne","cloudServiceVersion":"1.0","description":"重启FMService","execEnv":"remote","execution":{"content":"echo 'hello, autoops'","language":"shell","runner":"opsuser","scriptId":123,"timeoutSeconds":"300"},"inputs":[{"defaultValue":"ManageOne","description":"product name","encrypted":false,"name":"product_name","nameTip":"product name","paramExtValues":[],"paramType":"text","required":true,"validateRule":"[a-zA-Z0-9]{2,30}"},{"defaultValue":"1730535034000","description":"published time","encrypted":false,"name":"published_time","nameTip":"published time","paramExtValues":[],"paramType":"date","required":true,"validateRule":null}],"name":"重启FMService","outputs":[{"description":"execute_result","encrypted":false,"name":"execute_result","paramType":"text"}],"packageName":"ManageOne","packageVersion":"1.0","resourceLimit":{"limits":[{"limitResourceType":"memory","limitType":"absolute","value":"10"},{"limitResourceType":"cpu","limitType":"absolute","value":"1"}],"policy":"default"},"status":"published","version":0},"x-request-examples-description-1":"","x-request-examples-url-1":"POST https://{endpoint}/rest/moautoops/v3/operations?timestamp=${1731921597280}&noise=${xxxxxxx}&certsn=${xxxx}&verifyUrl=https://x.x.x.x:xx/xxxx/{sha256}","x-support-sdk":"N"}}},"product_short":"ManageOneOCHCS","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"新建操作V3","tags":"自动化运维","uri":null,"version":"2.0"}