> ## 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.

# 更新 Endpoint



## OpenAPI

````yaml gpus/v2-spec/update-endpoint.json PUT /gpus/v2/endpoints/{endpoint_id}
openapi: 3.0.0
info:
  title: PPIO GPU API v2
  version: 2.0.0
servers:
  - url: https://api.ppio.com
security: []
paths:
  /gpus/v2/endpoints/{endpoint_id}:
    put:
      summary: 更新 Endpoint
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
          description: 枚举值:application/json。
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer 身份验证格式,例如:Bearer `{{API 密钥}}`。
        - name: endpoint_id
          in: path
          required: true
          schema:
            type: string
          description: Endpoint ID。字符串,长度限制:1-255 字符。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Endpoint 名称。
                  example: example-endpoint-updated
                product_id:
                  type: string
                  description: Serverless 产品 ID。字符串,长度限制:1-255 字符。
                  example: product-id
                worker_config:
                  type: object
                  description: Worker 配置。
                  required:
                    - max_replicas
                  properties:
                    max_replicas:
                      type: integer
                      description: 最大 Worker 数量。整数,取值范围:[0, 1000]。
                      example: 3
                    min_replicas:
                      type: integer
                      description: 最小 Worker 数量。整数,取值范围:[0, 1000]。
                      example: 1
                    idle_timeout:
                      type: integer
                      description: 空闲释放时间。整数,取值范围:[1, 1000]。
                      example: 300
                    max_concurrent_per_worker:
                      type: integer
                      description: 单个 Worker 最大并发请求数。整数,取值范围:[1, 1000]。
                      example: 20
                    gpu_num:
                      type: integer
                      description: GPU 数量。整数,取值范围:[1, 8]。
                      example: 1
                    rootfs_size_gb:
                      type: integer
                      description: 系统盘大小。整数,取值范围:[10, 100]。单位为 GB。
                      example: 20
                    min_cuda_version:
                      type: string
                      enum:
                        - '12.4'
                        - '12.6'
                        - '12.8'
                        - '12.9'
                        - '13.0'
                      description: 最低 CUDA 版本。可选值:`12.4`、`12.6`、`12.8`、`12.9`、`13.0`。
                      example: '12.4'
                    request_timeout:
                      type: integer
                      description: 请求超时时间。整数,取值范围:[1, 1800]。
                      example: 120
                policy:
                  type: object
                  description: 调度/请求策略。
                  properties:
                    type:
                      type: string
                      enum:
                        - queue
                        - concurrency
                      description: 策略类型。可选值:`queue`、`concurrency`。
                      example: queue
                    value:
                      type: integer
                      description: >-
                        策略值。整数,取值范围:[1, 1000]。`queue` 表示队列等待时间,`concurrency`
                        表示请求数。
                      example: 200
                image:
                  type: string
                  description: 镜像地址。字符串,长度限制:0-500 字符。
                  example: registry.example.com/namespace/image:new-tag
                registry_auth_id:
                  type: string
                  description: 已保存的镜像认证 ID。字符串,长度限制:0-255 字符。
                  example: registry-auth-id
                entrypoint:
                  type: string
                  description: 容器 entrypoint。
                  example: ''
                command:
                  type: string
                  description: 启动命令。
                  example: cargo build
                health_check:
                  type: object
                  description: 健康检查配置。
                  properties:
                    path:
                      type: string
                      description: 健康检查路径。
                      example: /healthz
                    port:
                      type: integer
                      description: 健康检查端口。整数,取值范围:[0, 65535]。
                      example: 8080
                envs:
                  type: array
                  description: 环境变量列表。
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        description: 环境变量名。字符串,长度限制:0-511 字符。
                        example: ENV_NAME
                      value:
                        type: string
                        description: 环境变量值。字符串,长度限制:0-4095 字符。
                        example: NEW_VALUE
                ports:
                  type: array
                  items:
                    type: integer
                  description: 端口号列表。每项取值范围:[1, 65535]。
                  example:
                    - 8080
                volumes:
                  type: array
                  description: 挂载卷列表。
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 存储 ID。
                        example: storage-id
                      type:
                        type: string
                        enum:
                          - local
                          - network
                        description: 存储类型。可选值:`local`、`network`。注意:`local` 类型即将废弃。
                        example: network
                      size:
                        type: integer
                        description: 存储大小。仅当 `type=local` 时返回。注意:`local` 类型即将废弃。
                      mount_point:
                        type: string
                        description: 挂载路径。字符串,长度限制:0-4095 字符。
                        example: /data
                region_id:
                  type: string
                  description: 区域 ID。
                  example: region-id
      responses:
        '200':
          description: 更新成功
          content:
            application/json:
              schema:
                type: object

````