查询沙箱实例资源
更新时间:2026-08-14
接口描述
查询沙箱实例的资源调整状态。
API Explorer
去调试
您可以在 API Explorer 中直接运行该接口。
请求结构
Plain Text
1GET /sandboxes/{sandboxID}/resources HTTP/1.1
2Host: api.sandbox-execute.bj.baidubce.com
3Authorization: authorization string
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| sandboxID | String | 是 | URL参数 | 沙箱实例 ID。 |
返回状态码
成功返回 200,失败返回公共错误码。
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| sandboxID | String | 沙箱实例 ID。 |
| runtimeType | String | 运行时类型。 |
| status | String | 调整状态。 |
| containers | List |
容器资源状态列表。 |
| conditions | List |
资源调整条件。 |
| message | String | 状态说明。 |
请求示例
Plain Text
1GET /sandboxes/sandbox-1/resources HTTP/1.1
2Host: api.sandbox-execute.bj.baidubce.com
3Authorization: authorization string
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "sandboxID": "sandbox-1",
6 "runtimeType": "kata",
7 "status": "Ready",
8 "containers": []
9}
评价此篇文章
