跳到主要内容

agentrun sandbox

管理隔离的 AgentRun 沙箱实例。

运行 ecctl agentrun sandbox <action> -h 查看用法,或 ecctl schema agentrun.sandbox.<action> --full 获取该命令完整的结构化规格——每个参数与行为,便于 Agent 读取和填参。

create

ecctl agentrun sandbox create [flags]

创建 AgentRun 沙箱

  • 类型:mutation · 风险:medium
  • 同步:等待 READY(waiter ready_after_create,超时 600s);用 --no-wait 跳过等待。
API调用时机用途
CreateSandbox每次执行命令时执行资源操作。
GetSandbox未指定 --no-wait轮询等待资源达到目标状态。(重复调用)
参数类型必填说明
--regionstringAlibaba Cloud region
--template-namestring模板名称
--idstring沙箱 ID
--idle-timeoutinteger沙箱空闲超时时间,单位秒
--nas-configobjectNAS 配置,使用 JSON 对象或 @file
--oss-mount-configobjectOSS 挂载配置,使用 JSON 对象或 @file
--polar-fs-configobjectPolarFS 配置,使用 JSON 对象或 @file

delete

ecctl agentrun sandbox delete <id> [flags]

删除 AgentRun 沙箱

  • 类型:mutation · 风险:high
  • 同步:等待 absent(waiter absent_after_delete,超时 300s);用 --no-wait 跳过等待。
API调用时机用途
DeleteSandbox每次执行命令时执行资源操作。
ListSandboxes未指定 --no-wait轮询等待资源达到目标状态。(重复调用)
参数类型必填说明
--regionstringAlibaba Cloud region

get

ecctl agentrun sandbox get <id> [flags]

获取 AgentRun 沙箱

  • 类型:read · 风险:low
API调用时机用途
GetSandbox每次执行命令时读取资源视图。
参数类型必填说明
--regionstringAlibaba Cloud region
--fieldsstring要包含的资源字段,使用逗号分隔

list

ecctl agentrun sandbox list [flags]

列出 AgentRun 沙箱

  • 类型:read · 风险:low
API调用时机用途
ListSandboxes每次执行命令时读取资源视图。
参数类型必填说明
--regionstringAlibaba Cloud region
--fieldsstring要包含的资源字段,使用逗号分隔
--filterkey_value过滤表达式 key=value
--limitinteger最多返回的沙箱数量(默认:100
--next-tokenstring上一页响应返回的分页令牌

stop

ecctl agentrun sandbox stop <id> [flags]

停止 AgentRun 沙箱

  • 类型:mutation · 风险:medium
  • 同步:等待 TERMINATED(waiter terminated_after_stop,超时 300s);用 --no-wait 跳过等待。
API调用时机用途
StopSandbox每次执行命令时执行资源操作。
GetSandbox未指定 --no-wait轮询等待资源达到目标状态。(重复调用)
参数类型必填说明
--regionstringAlibaba Cloud region