更新时间:2023-12-05 GMT+08:00
分享

查询某个IDE实例

功能介绍

查询某个IDE实例

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v2/instances/{instance_id}

表1 路径参数

参数

是否必选

参数类型

描述

instance_id

String

实例id

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

instance

InstancesVO object

实例

status

String

状态

bundle_url

String

静态资源链接

表4 InstancesVO

参数

参数类型

描述

arch

String

cpu架构 x86|arm

枚举值:

  • x86
  • arm

attributes

Attributes object

属性

cpu_memory

String

cpu规格.arm架构支持4U8G,x86架构支持1U1G,2U4G,2U8G 与技术栈配置的规格对应,可通过技术栈管理ListStacks接口获取。如果标签不为空,以标签配置的技术栈规格为准。 quantum技术栈,x86架构cpu规格为2U8G;其他技术栈,x86架构cpu规格为1U1G,2U4G

枚举值:

  • 1U1G
  • 2U4G
  • 2U8G
  • 4U8G

created_time

String

创建时间

description

String

描述

display_name

String

实例名。 可以输入中文、数字、字母、下划线、点、破折号。长度介于3-100之间

domain_name

String

租户名

id

String

id

is_temporary

Boolean

是否页面显示(以标签配置为准)

label

String

标签

link

String

链接

name

String

名称

organization_id

String

租户id(对应华为云账号的domainId)

owner_id

String

用户id

owner_name

String

用户名

platform_id

Long

平台ID

private

Boolean

是否私有平台

pvc_quantity

String

PVC规格 5GB|10GB|20GB

枚举值:

  • 5GB
  • 10GB
  • 20GB

refresh_interval

Long

自动休眠时长。arm架构,自动休眠时长只能设置成30,60。x86架构可取值为30,60,240,1440和-1。除-1外,其它值的单位为“分钟”。实例无操作超过自动休眠时长后,将会被暂停(已保存的数据不会被删除)。-1表示实例不会自动停止

region

String

区域

server_map

Map<String,String>

server

server_url

String

服务链接

stack_id

String

技术栈ID,通过技术栈管理ListStacks接口获取。

status

String

实例状态 。

  • INIT 初始化
  • STARTING 启动中
  • RUNNING 运行中
  • STOPPING 停止中
  • STOPPED 已停止
  • DELETING 删除中
  • DELETED 已删除
  • DELETE_FAILED 删除失败

枚举值:

  • INIT
  • STARTING
  • RUNNING
  • STOPPING
  • STOPPED
  • DELETING
  • DELETED
  • DELETE_FAILED

updated_time

String

更新时间

visitor_id

String

访问者id

visitor_name

String

访问者名称

visitor_domain_name

String

访问者租户名称

表5 Attributes

参数

参数类型

描述

cpu_limit

String

cpu限制

memory_limit_bytes

String

内存限制

pvc_quantity

String

pvc规格

状态码: 403

表6 响应Body参数

参数

参数类型

描述

error_msg

String

错误描述

error_code

String

错误码

状态码: 404

表7 响应Body参数

参数

参数类型

描述

error_msg

String

错误描述

error_code

String

错误码

状态码: 406

表8 响应Body参数

参数

参数类型

描述

error_msg

String

错误描述

error_code

String

错误码

状态码: 500

表9 响应Body参数

参数

参数类型

描述

error_msg

String

错误描述

error_code

String

错误码

请求示例

查询某个IDE实例

GET https://{endpoint}/v2/instances/zhkfjt

响应示例

状态码: 200

OK

{
  "instance" : {
    "created_time" : "2020-01-07 11:25:56",
    "updated_time" : "2020-03-20 17:14:00",
    "private" : false,
    "owner_name" : "ide_owner_name",
    "refresh_interval" : 30,
    "owner_id" : "d78cbac186b744899480f25bd022f468...",
    "description" : "aaa",
    "cpu_memory" : "1U1G",
    "display_name" : "chen002",
    "domain_name" : "IAM_DOMAIN_NAME_A",
    "is_temporary" : false,
    "organization_id" : "6251b1ee539f4c02ad4b83daeda81633...",
    "stack_id" : "python",
    "name" : "ide-instance8bmjgqx6vfrb9e9n",
    "platform_id" : 1,
    "attributes" : {
      "cpu_limit" : "1",
      "pvc_quantity" : "5Gi",
      "memory_limit_bytes" : "1073741824"
    },
    "pvc_quantity" : "5GB",
    "arch" : "x86",
    "id" : "instancewc0yk05c8y6jov0v",
    "region" : "cn-north-7",
    "status" : "STOPPED",
    "visitor_id" : "c78cbac186b744899480f25bd022f468...",
    "visitor_name" : "ide_visitor_name",
    "visitor_domain_name" : "IAM_DOMAIN_NAME_B"
  },
  "status" : "success"
}

状态码

状态码

描述

200

OK

403

Forbidden

404

Not Found

406

Not Acceptable

500

Internal Server Error

错误码

请参见错误码

分享:

    相关文档

    相关产品