用途:根据用户描述的运维需求,生成符合阿里云 OOS(Operation Orchestration Service)规范的自动化编排模板,适用于“帮我生成 OOS 模板”“编写编排模板完成某操作”“生成重启 ECS 实例的模板”等意图。
主要能力:分析需求中的操作类型、目标资源与地域(默认 cn-hangzhou);通过 CLI 搜索并获取 Action 属性定义;生成含 FormatVersion、双语 Description、Parameters、Tasks 的模板;生成后调用校验接口验证,失败则修正重试直至通过。
必要用法:需 Aliyun CLI >= 3.3.3(可用 aliyun version 检查,安装命令 curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash);执行 aliyun configure set --auto-plugin-install true 与 aliyun plugin update;用 aliyun configure list 确认凭证,禁止读取或回显 AK/SK。调用前启用 AI 模式 aliyun configure ai-mode enable 并设置 user-agent,退出前执行 aliyun configure ai-mode disable;所有命令需带 --user-agent 与 --biz-region-id,插件模式使用短横线命令如 aliyun oos list-actions。模板需经 aliyun oos validate-template-content 校验通过方可输出。
限制:需 oos:ListActions、oos:ValidateTemplateContent 权限,缺失时须提示用户并暂停等待授权;不得编造资源 ID 或危险操作;引用 {{ TaskName.FieldName }} 前须定义 Outputs;不存在的 Action(如 ACS::Flow::ForEach、ACS::ExecuteScript)需改用 Loop 属性或对应产品 Action。其余安装配置、RAM 策略等细节暂未在资料中完整提供。