POST
/
gpu-instance
/
openapi
/
v1
/
endpoint
/
update
curl --request POST \
  --url https://api.ppinfra.com/gpu-instance/openapi/v1/endpoint/update \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "id": "<string>",
  "name": "<string>",
  "clusterID": "<string>",
  "workerConfig": [
    {
      "minNum": 123,
      "maxNum": 123,
      "freeTimeout": 123,
      "maxConcurrent": 123,
      "gpuNum": 123
    }
  ],
  "ports": [
    {
      "port": "<string>"
    }
  ],
  "policy": [
    {
      "type": "<string>",
      "value": 123
    }
  ],
  "image": [
    {
      "image": "<string>",
      "authId": "<string>",
      "command": "<string>"
    }
  ],
  "volumeMounts": [
    {
      "type": "<string>",
      "size": 123,
      "id": "<string>",
      "mountPath": "<string>"
    }
  ],
  "envs": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "healthy": [
    {
      "path": "<string>"
    }
  ]
}'

接口说明

更新 Endpoint 时,参数必须全量传递。

请求头

Content-Type
string
required

枚举值:application/json。

Authorization
string
required

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

请求体

id
string
required

需要更新的 endpoint id。

name
string

endpoint 名称。

clusterID
string

集群信息,挂载云存储必填。且需要与云存储所在集群 ID 一致。字符串,长度限制:0-255 字符。

workerConfig
object[]
required

Worker 配置。范围通过参数限制范围接口动态获取。

ports
object[]
required

HTTP 端口。仅支持一个。支持的端口号范围:1-65535,其中 2222、2223、2224 为内部端口,不可使用。

policy
object[]
required

弹性策略。范围通过参数限制范围接口动态获取。

image
object[]
required

镜像信息。

volumeMounts
object[]

存储信息(GB)。

envs
object[]

环境变量信息。

healthy
object[]

监控检查接口路径。