GET
/
gpu-instance
/
openapi
/
v1
/
gpu
/
instance
curl --request GET \
  --url https://api.ppinfra.com/gpu-instance/openapi/v1/gpu/instance \
  --header 'Authorization: <authorization>'
{
  "id": "<string>",
  "name": "<string>",
  "clusterId": "<string>",
  "clusterName": "<string>",
  "status": "<string>",
  "sshCommand": "<string>",
  "password": "<string>",
  "imageUrl": "<string>",
  "imageAuthId": "<string>",
  "command": "<string>",
  "cpuNum": "<string>",
  "memory": "<string>",
  "gpuNum": "<string>",
  "createdAt": "<string>",
  "lastStartedAt": "<string>",
  "lastStoppedAt": "<string>",
  "useTime": "<string>",
  "billingMode": "<string>",
  "productId": "<string>",
  "productName": "<string>",
  "rootfsSize": 123,
  "tools": [
    {
      "name": "<string>",
      "port": "<string>",
      "type": "<string>",
      "endpoint": "<string>"
    }
  ],
  "volumeMounts": [
    {
      "type": "<string>",
      "size": "<string>",
      "id": "<string>",
      "mountPath": "<string>"
    }
  ],
  "node": [
    {
      "maxRootfsSize": "<string>"
    }
  ],
  "jobs": [
    {
      "id": "<string>",
      "type": "<string>"
    }
  ],
  "statusError": {
    "state": "<string>",
    "message": "<string>"
  },
  "network": {
    "id": "<string>",
    "ip": "<string>"
  },
  "portMappings": [
    {
      "port": 123,
      "endpoint": "<string>",
      "type": "<string>"
    }
  ],
  "envs": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "connectComponentSSH": {
    "isRunning": true
  },
  "connectComponentWebTerminal": {
    "address": "<string>",
    "username": "<string>",
    "password": "<string>",
    "isRunning": true
  },
  "connectComponentJupyter": {
    "port": 123,
    "address": "<string>",
    "isRunning": true
  },
  "connectComponentLog": {
    "systemLogAddress": "<string>",
    "instanceLogAddress": "<string>",
    "isRunning": true
  },
  "kind": "<string>",
  "endTime": "<string>",
  "freeStorageSize": 123,
  "keepDataDay": 123
}

请求头

Authorization
string
required

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

查询参数

instanceId
string
required

要查询详情的实例 ID。

响应参数

id
string
required

实例 ID。

name
string
required

实例名称。

clusterId
string
required

集群 ID。

clusterName
string
required

集群名称。

status
string
required

实例状态。取值:

  • toCreate:待创建
  • creating:创建中
  • pulling:拉取镜像中
  • running:运行中
  • toStart:待启动
  • starting:启动中
  • toStop:待停止
  • stopping:停止中
  • exited:已停止
  • toRestart:待重启
  • restarting:重启中
  • toRemove:待删除
  • removing:删除中
  • removed:已删除
  • toReset:待重置(升级)
  • resetting:重置中
  • migrating:迁移中
  • freezing:冻结中
sshCommand
string

用于 SSH 远程登录的命令。

password
string

用于 SSH 远程登录的密码。

imageUrl
string
required

容器镜像地址。

imageAuthId
string
required

镜像仓库认证信息。

command
string
required

容器启动命令。

cpuNum
string
required

实例的 CPU 数。单位为核。

memory
string
required

实例的内存大小。单位为 GB。

gpuNum
string
required

实例的 GPU 卡数。

createdAt
string
required

实例的创建时间。格式为 Unix 时间戳。

lastStartedAt
string
required

实例最近一次的启动时间。格式为 Unix 时间戳。

lastStoppedAt
string
required

实例最近一次的停止时间。格式为 Unix 时间戳。

useTime
string
required

实例的使用时长。单位为秒。

billingMode
string
required

实例的计费方式。取值:

  • onDemand:按量计费。

  • monthly:包年包月。

productId
string
required

用于部署实例的产品 ID。

productName
string
required

用于部署实例的产品名称。

rootfsSize
integer
required

系统盘大小。单位为 GB。

tools
object[]

工具信息。目前部分官方镜像包含 Jupyter。

volumeMounts
object[]

实例的存储配置。

node
object[]

节点信息。

jobs
object[]

当前实例正在运行的任务。

statusError
object

实例创建失败或实例不可用时的错误信息。

network
object

实例的 VPC 网络信息。

portMappings
object[]
required

实例端口映射信息。

envs
object[]

实例的环境变量信息。

connectComponentSSH
object

实例 SSH 连接信息。

connectComponentWebTerminal
object

实例 Web Terminal连接信息。

connectComponentJupyter
object

实例 Jupyter 连接信息(如果有)。

connectComponentLog
object

实例日志连接信息(HTTP Stream)。

kind
string

实例类型。

endTime
string

包年包月实例到期时间。若是按量计费实例,则返回 -1。

freeStorageSize
integer

免费的系统盘容量大小。单位为 GB。

keepDataDay
integer

实例关机后,数据保留的天数。