跳转到主要内容
PUT
/
gpus
/
v2
/
instances
/
{instance_id}
/
upgrade
升级实例
curl --request PUT \
  --url https://api.ppio.com/gpus/v2/instances/{instance_id}/upgrade \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "image": "registry.example.com/namespace/new-image:tag",
  "registry_auth_id": "registry-auth-id",
  "entrypoint": "",
  "command": "",
  "envs": [
    {
      "key": "ENV_NAME",
      "value": "ENV_VALUE"
    }
  ],
  "save_data": true
}
'
{}

请求头

Content-Type
string
必填

枚举值:application/json。

Authorization
string
必填

Bearer 身份验证格式,例如:Bearer {{API 密钥}}

路径参数

instance_id
string
必填

实例 ID。字符串,长度限制:1-255 字符。

请求体

application/json
image
string
必填

镜像地址。字符串,长度限制:1-500 字符。

示例:

"registry.example.com/namespace/new-image:tag"

registry_auth_id
string

已保存的镜像认证 ID。字符串,长度限制:0-255 字符。

示例:

"registry-auth-id"

entrypoint
string

容器 entrypoint。

示例:

""

command
string

容器启动命令。

示例:

""

envs
object[]

环境变量列表。

示例:
[{ "key": "ENV_NAME", "value": "ENV_VALUE" }]
save_data
boolean

升级/重置实例时是否保留已有数据。

示例:

true

响应

200 - application/json

升级成功

The response is of type object.

最后修改于 2026年6月26日