修改容器实例镜像(ChangeImage)
基本信息
Action:/qai/aicp/notebooks/namespaces/{namespace}/notebooks/change_image
Method: POST
Content-Type:application/json
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
namespance |
string |
命名空间。 |
yes |
image |
string |
镜像名称或地址。 |
yes |
image_type |
string |
镜像类型。 |
yes |
uuid |
string |
容器实例的 ID。 |
yes |
secret |
string |
自定义镜像仓库认证信息。 |
no |
secret.has_auth |
boolean |
是否需要认证。 |
no |
sercret.username |
string |
镜像仓库用户名。 |
no |
sercret.password |
string |
镜像仓库账户密码。 |
no |
响应参数
此接口包含的公共响应参数,可参见前文内容,其他参数介绍如下:
参数 | 类型 | 描述 |
---|---|---|
data.kuid |
string |
容器实例的 UUID。 |
data.status |
string |
容器实例状态。 |
data.reason |
string |
状态原因。 |
data.user_id |
string |
用户 ID。 |
data.root_user_id |
string |
根用户 ID。 |
data.create_at |
string |
创建时间。 |
data.updated_at |
string |
更新时间。 |
data.namespace |
string |
容器实例的命名空间。 |
data.image |
string |
镜像名称或镜像地址。 |
data.image_type |
string |
镜像类型标识。 |
data.name |
string |
容器实例名称。 |
data.server_type |
string |
服务类型。 |
data.envs |
string |
环境变量列表。 |
data.stop_time |
string |
停止时间。 |
data.auto_delete_time |
string |
容器实例自动释放时间。 |
data.uuid |
string |
容器实例 ID。 |
data.server |
string |
服务地址,用于前端跳转。 |
data.pip |
string |
pip 源。 |
data.conda |
string |
conda 源。 |
data.apt |
string |
apt 源。 |
请求示例
curl -X 'POST' \
'https://ai.coreshub.cn/qai/aicp/notebooks/namespaces/usr-5HY8cxxx/notebooks/change_image' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"image": "string",
"image_type": "string",
"uuid": "string",
"secret": {
"has_auth": false,
"username": "",
"password": ""
}
}'
响应示例
{
"message": "success",
"meta": {
"X_REQUEST_ID": "d5ad2d69",
"X_REQUEST_USER": "usr-5HY8xxxx"
},
"data": {
"status": "Suspended",
"uuid": "nb-eiguqichl5hc",
"user_id": "usr-5HY8xxxx",
"name": "\u5bb9\u5668\u5b9e\u4f8b-1",
"server_type": "jupyter",
"image_type": "official",
"created_at": "2025-04-10T15:00:33",
"namespace": "usr-5hy8xxxx",
"root_user_id": "",
"apt": "ubuntu",
"updated_at": "2025-04-10T17:33:41",
"envs": [],
"reason": "\u5df2\u6682\u505c",
"conda": "conda",
"stop_time": null,
"auto_delete_time": null,
"pip": "aliyun",
"server": null,
"image": "xb3-dockerhub.coreshub.cn/aicp/public/tensorflow:2.16.1-gpu-jupyter",
"kuid": "b9a485e4-1672-45fa-a90e-5adf0016fe30"
},
"ret_code": 0
}