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

AgentKit

复制全文
下载 pdf
Tool
PauseSession - 暂停沙箱会话实例
复制全文
下载 pdf
PauseSession - 暂停沙箱会话实例
暂停当前正在运行的沙箱会话实例。​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:PauseSession​
要执行的操作,取值:PauseSession。​
​
Version string 必选 示例值:2025-10-30​
API的版本,取值:2025-10-30。​
​
SessionId string 必选 示例值:s-3tigy72q3u3vj0x2****​
会话ID。​
​
ToolId string 必选 示例值:t-3tigy72q3u3vj0x2****​
沙箱模板ID。您可调用 GetTool 获取ID信息。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
SessionId string 示例值:s-3tigy72q3u3vj0x2****​
会话ID。​
​
Status string 示例值:Paused​
会话状态,取值:​
  • Starting: 启动中。​
  • Ready: 运行中。​
  • Failed: 启动失败。​
  • Terminating: 终止中。​
  • Pausing:暂停中。​
  • Paused:已暂停。​
​
​
​
请求示例​
​
POST /?Action=PauseSession&Version=2025-10-30 HTTP/1.1​
Host: https://agentkit.cn-beijing.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20261021T082258Z​
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": "202610211623110430370331951EB128",​
"Action": "PauseSession",​
"Version": "2025-10-30",​
"Service": "agentkit",​
"Region": "cn-beijing"​
},​
"Result": {​
"SessionId": "s-3tigy72q3u3vj0x2****",​
"Status": "Paused"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InternalError.PauseSessionFailed​
Failed to pause session.​
暂停会话失败,请稍后重试。​
400​
InvalidPauseSession.EFSUnsupported​
Pausing a session is not supported for sandboxes with EFS mounts.​
挂载EFS的沙箱不支持暂停会话。​
400​
InvalidResourceStatus​
The status of the specified resource does not support this request.​
当前资源的状态不支持此操作。​
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不能为空。​
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
这个页面对您有帮助吗?
有用
有用
无用
无用