跳到主要内容

tcb agent update

v3.0.0+

tcb agent 命令自 v3.0.0 起提供。

更新 Agent 代码或配置。

语法​

tcb agent update <agentId> [options]

参数​

参数说明
--code [path]更新代码。省略时使用当前目录;仅写 --code 而未指定路径时使用项目目录
--runtime <runtime>更新运行时版本
--timeout <seconds>更新超时时间
--memory-size <mb>更新内存大小(MB)
--install-dep自动安装依赖
--ignore <patterns>更新忽略模式
--env <K=V,...>更新环境变量
-e, --env-id <envId>环境 ID

示例​

# 仅更新代码
tcb agent update agent-xxx --code ./new-agent-code -e my-env-id

# 更新运行时和超时
tcb agent update agent-xxx --runtime Nodejs20.19 --timeout 3600 -e my-env-id