> ## Documentation Index
> Fetch the complete documentation index at: https://ppio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 升级实例

## 接口说明

升级实例时，参数必须全量传递。

## 请求头

<ParamField header="Content-Type" type="string" required={true}>
  枚举值：application/json。
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer 身份验证格式，例如：Bearer \{\{API 密钥}}。
</ParamField>

## 请求体

<ParamField body="instanceId" type="string" required={true}>
  要升级的实例 ID。
</ParamField>

<ParamField body="imageUrl" type="string" required={true}>
  容器镜像地址。字符串，长度限制：1-500 字符。
</ParamField>

<ParamField body="imageAuthId" type="string" required={false}>
  镜像仓库认证 ID。
</ParamField>

<ParamField body="envs" type="object[]" required={true}>
  实例环境变量。最多创建 100 组环境变量。

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="key" type="string" required={false}>
      环境变量名称。字符串，长度限制：0-511 字符。
    </ParamField>

    <ParamField body="value" type="string" required={false}>
      环境变量取值。字符串，长度限制：0-4095 字符。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="command" type="string" required={true}>
  容器启动命令。字符串，长度限制：0-2047 字符。
</ParamField>

<ParamField body="entrypoint" type="string" required={true}>
  容器启动 entrypoint。该配置会覆盖 Docker 镜像的 ENTRYPOINT。字符串，长度限制：0-2047 字符。
</ParamField>

<ParamField body="save" type="boolean" required={true}>
  是否保存旧实例中的数据。布尔值，取值：true、false。
</ParamField>

<ParamField body="networkVolume" type="object" required={true}>
  编辑云存储(type：network)，一个实例最大支持挂载 30 个云存储。如果需要移除所有云存储挂载，volumeMounts 请传空数组：\[]。

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="volumeMounts" type="object[]" required={true}>
      云存储挂载信息。

      <Expandable title="properties" defaultOpen={true}>
        <ParamField body="type" type="string" required={true}>
          存储类型。固定取值为 network。
        </ParamField>

        <ParamField body="id" type="string" required={true}>
          云存储 ID。
        </ParamField>

        <ParamField body="mountPath" type="string" required={true}>
          云存储的挂载路径。默认值："/network"，字符串，长度限制：1-4095 字符。
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>
