You need to enable JavaScript to run this app.
文档中心
AgentKit

AgentKit

复制全文
下载 pdf
Tool
ResumeSession - 恢复沙箱会话实例
复制全文
下载 pdf
ResumeSession - 恢复沙箱会话实例
恢复已暂停的沙箱会话实例。​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:ResumeSession​
要执行的操作,取值:ResumeSession。​
​
Version string 必选 示例值:2025-10-30​
API的版本,取值:2025-10-30。​
​
SessionId string 必选 示例值:s-3tigy72q3u3vj0x2****​
会话ID。​
​
ToolId string 必选 示例值:t-3tigy72q3u3vj0x2****​
沙箱模板ID。您可调用 GetTool 获取ID信息。​
​
Ttl integer 可选 示例值:3600​
恢复会话后,该Sandbox实例的存活时长。未传时默认为 3600 秒(1 小时)。​
​
TtlUnit string 可选 示例值:second​
Ttl 的时间单位,支持 second(秒)和 minute(分钟)。未传时默认为 second。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
ExpireAt string 示例值:2006-01-02T15:04:05Z07:00​
实例恢复后的过期时间。​
​
SessionId string 示例值:s-3tigy72q3u3vj0x2****​
会话ID。​
​
Status string 示例值:Ready​
会话状态。​
  • Starting: 启动中。​
  • Ready: 运行中。​
  • Failed: 启动失败。​
  • Terminating: 终止中。​
  • Pausing:暂停中。​
  • Paused:已暂停。​
​
​
​
请求示例​
​
POST /?Action=ResumeSession&Version=2025-10-30 HTTP/1.1​
Host: https://agentkit.cn-beijing.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20261021T084157Z​
X-Content-Sha256: 287e874e******d653b44d21e​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20261021/cn-beijing/agentkit/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
{​
"SessionId": "s-3tigy72q3u3vj0x2****",​
"ToolId": "t-3tigy72q3u3vj0x2****"​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2026102116420604321908714714197B",​
"Action": "ResumeSession",​
"Version": "2025-10-30",​
"Service": "agentkit",​
"Region": "cn-beijing"​
},​
"Result": {​
"ExpireAt": "2006-01-02T15:04:05Z07:00",​
"SessionId": "s-3tigy72q3u3vj0x2****",​
"Status": "Ready"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InternalError.ResumeSessionFailed​
Failed to resume session.​
恢复会话失败,请稍后重试。​
400​
InvalidParameter.Ttl​
The specified parameter Ttl is invalid.​
指定的 Ttl 参数无效。​
400​
InvalidParameter.TtlUnit​
The specified parameter TtlUnit is malformed. Ttl unit must be minute or second​
TTL的时间单位必须为“分钟”或者“秒”​
400​
InvalidResourceStatus​
The status of the specified resource does not support this request.​
当前资源的状态不支持此操作。​
400​
InvalidResumeSession.EFSUnsupported​
Resuming a session is not supported for sandboxes with EFS mounts.​
挂载EFS的沙箱不支持恢复会话。​
400​
MissingParameter.AccountId​
The required parameter AccountId is not supplied.​
参数账户ID不能为空。​
400​
MissingParameter.SessionId​
The required parameter SessionId is not supplied.​
session id不能为空。​
400​
MissingParameter.ToolId​
The required parameter ToolId is not supplied.​
tool id不能为空。​
400​
QuotaExceeded.SandboxResources​
The sandbox resource quota has been exceeded. Release unused sandboxes or request a quota increase.​
沙箱 CPU 或内存资源配额不足,请释放不再使用的实例或申请提升配额。​
403​
AccessDenied.Unauthorized​
The specified action on the resource is denied.​
指定的操作被拒绝。角色权限不足​
404​
InvalidResource.NotFound​
The specified resource does not exist.​
指定资源不存在。​
​
​
最近更新时间:2026.10.21 17:55:06
这个页面对您有帮助吗?
有用
有用
无用
无用