更新时间:2022-08-15 GMT+08:00

查询专享版实例列表

功能介绍

查询专享版实例列表

URI

GET /v2/{project_id}/apigw/instances

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID,获取方式请参见API参考的“附录 > 获取项目ID”章节。

表2 Query参数

参数

是否必选

参数类型

描述

offset

Long

偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0

缺省值:0

limit

Integer

每页显示的条目数量

最小值:1

最大值:500

缺省值:20

instance_id

String

实例编号

instance_name

String

实例名称

status

String

实例状态:

  • Creating:创建中
  • CreateSuccess:创建成功
  • CreateFail:创建失败
  • Initing:初始化中
  • Registering:注册中
  • Running:运行中
  • InitingFailed:初始化失败
  • RegisterFailed:注册失败
  • Installing:安装中
  • InstallFailed:安装失败
  • Updating:升级中
  • UpdateFailed:升级失败
  • Rollbacking:回滚中
  • RollbackSuccess:回滚成功
  • RollbackFailed:回滚失败
  • Deleting:删除中
  • DeleteFailed:删除失败
  • Unregistering:注销中
  • UnRegisterFailed:注销失败
  • CreateTimeout:创建超时
  • InitTimeout:初始化超时
  • RegisterTimeout:注册超时
  • InstallTimeout:安装超时
  • UpdateTimeout:升级超时
  • RollbackTimeout:回滚超时
  • DeleteTimeout:删除超时
  • UnregisterTimeout:注销超时
  • Starting:启动中
  • Freezing:冻结中
  • Frozen:已冻结
  • Restarting:重启中
  • RestartFail:重启失败
  • Unhealthy:实例异常
  • RestartTimeout:重启超时

枚举值:

  • Creating
  • CreateSuccess
  • CreateFail
  • Initing
  • Registering
  • Running
  • InitingFailed
  • RegisterFailed
  • Installing
  • InstallFailed
  • Updating
  • UpdateFailed
  • Rollbacking
  • RollbackSuccess
  • RollbackFailed
  • Deleting
  • DeleteFailed
  • Unregistering
  • UnRegisterFailed
  • CreateTimeout
  • InitTimeout
  • RegisterTimeout
  • InstallTimeout
  • UpdateTimeout
  • RollbackTimeout
  • DeleteTimeout
  • UnregisterTimeout
  • Starting
  • Freezing
  • Frozen
  • Restarting
  • RestartFail
  • Unhealthy
  • RestartTimeout

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

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

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

size

Integer

本次返回的列表长度

total

Long

满足条件的记录数

instances

Array of RespInstanceBase objects

实例列表

表5 RespInstanceBase

参数

参数类型

描述

id

String

实例ID

project_id

String

实例所属租户ID

instance_name

String

实例名称

status

String

实例状态:

  • Creating:创建中
  • CreateSuccess:创建成功
  • CreateFail:创建失败
  • Initing:初始化中
  • Registering:注册中
  • Running:运行中
  • InitingFailed:初始化失败
  • RegisterFailed:注册失败
  • Installing:安装中
  • InstallFailed:安装失败
  • Updating:升级中
  • UpdateFailed:升级失败
  • Rollbacking:回滚中
  • RollbackSuccess:回滚成功
  • RollbackFailed:回滚失败
  • Deleting:删除中
  • DeleteFailed:删除失败
  • Unregistering:注销中
  • UnRegisterFailed:注销失败
  • CreateTimeout:创建超时
  • InitTimeout:初始化超时
  • RegisterTimeout:注册超时
  • InstallTimeout:安装超时
  • UpdateTimeout:升级超时
  • RollbackTimeout:回滚超时
  • DeleteTimeout:删除超时
  • UnregisterTimeout:注销超时
  • Starting:启动中
  • Freezing:冻结中
  • Frozen:已冻结
  • Restarting:重启中
  • RestartFail:重启失败
  • Unhealthy:实例异常
  • RestartTimeout:重启超时

枚举值:

  • Creating
  • CreateSuccess
  • CreateFail
  • Initing
  • Registering
  • Running
  • InitingFailed
  • RegisterFailed
  • Installing
  • InstallFailed
  • Updating
  • UpdateFailed
  • Rollbacking
  • RollbackSuccess
  • RollbackFailed
  • Deleting
  • DeleteFailed
  • Unregistering
  • UnRegisterFailed
  • CreateTimeout
  • InitTimeout
  • RegisterTimeout
  • InstallTimeout
  • UpdateTimeout
  • RollbackTimeout
  • DeleteTimeout
  • UnregisterTimeout
  • Starting
  • Freezing
  • Frozen
  • Restarting
  • RestartFail
  • Unhealthy
  • RestartTimeout

instance_status

Integer

实例状态对应编号

  • 1:创建中
  • 2:创建成功
  • 3:创建失败
  • 4:初始化中
  • 5:注册中
  • 6:运行中
  • 7:初始化失败
  • 8:注册失败
  • 10:安装中
  • 11:安装失败
  • 12:升级中
  • 13:升级失败
  • 20:回滚中
  • 21:回滚成功
  • 22:回滚失败
  • 23:删除中
  • 24:删除失败
  • 25:注销中
  • 26:注销失败
  • 27:创建超时
  • 28:初始化超时
  • 29:注册超时
  • 30:安装超时
  • 31:升级超时
  • 32:回滚超时
  • 33:删除超时
  • 34:注销超时
  • 35:启动中
  • 36:冻结中
  • 37:已冻结
  • 38:重启中
  • 39:重启失败
  • 40:实例异常
  • 41:重启超时

枚举值:

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 10
  • 11
  • 12
  • 13
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41

type

String

实例类型

默认apig

spec

String

实例规格:

  • BASIC:基础版实例
  • PROFESSIONAL:专业版实例
  • ENTERPRISE:企业版实例
  • PLATINUM:铂金版实例
  • BASIC_IPV6:基础版IPV6实例
  • PROFESSIONAL_IPV6:专业版IPV6实例
  • ENTERPRISE_IPV6:企业版IPV6实例
  • PLATINUM_IPV6:铂金版IPV6实例

枚举值:

  • BASIC
  • PROFESSIONAL
  • ENTERPRISE
  • PLATINUM
  • BASIC_IPV6
  • PROFESSIONAL_IPV6
  • ENTERPRISE_IPV6
  • PLATINUM_IPV6

create_time

Long

实例创建时间。unix时间戳格式。

enterprise_project_id

String

企业项目ID,企业帐号必填

eip_address

String

实例绑定的弹性IP地址

charging_mode

Integer

实例计费方式:

  • 0:按需计费

枚举值:

  • 0

cbc_metadata

String

计费订单编号参数暂未使用

loadbalancer_provider

String

实例使用的负载均衡器类型

  • lvs Linux虚拟服务器
  • elb 弹性负载均衡,elb仅部分region支持

缺省值:lvs

枚举值:

  • lvs
  • elb

状态码: 401

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 403

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 500

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

请求示例

响应示例

状态码: 200

OK

{
  "total" : 2,
  "size" : 2,
  "instances" : [ {
    "cbc_metadata" : "CS2006301043A28NF:00301-734023-0--0",
    "charging_mode" : 1,
    "create_time" : 1585302825070,
    "eip_address" : "100.95.155.221",
    "enterprise_project_id" : "0",
    "id" : "eddc4d25480b4cd6b512f270a1b8b341",
    "instance_name" : "apig-Enterprise_Project_Pay-per-Use",
    "instance_status" : 6,
    "project_id" : "73d69ae0cfcf460190522d06b60f05ad",
    "spec" : "PROFESSIONAL",
    "status" : "Running",
    "type" : "apig"
  }, {
    "charging_mode" : 0,
    "create_time" : 1594370987422,
    "eip_address" : "100.95.147.95",
    "enterprise_project_id" : "0",
    "id" : "2e2d613c64094a4a94ad38e7ca30adee",
    "instance_name" : "apig-autotest-apitest-nodelete",
    "instance_status" : 6,
    "project_id" : "73d69ae0cfcf460190522d06b60f05ad",
    "spec" : "PROFESSIONAL",
    "status" : "Running",
    "type" : "apig"
  } ]
}

状态码: 401

Unauthorized

{
  "error_code" : "APIC.7102",
  "error_msg" : "Incorrect token or token resolution failed"
}

状态码: 403

Forbidden

{
  "error_code" : "APIC.7106",
  "error_msg" : "No permissions to request for the method"
}

状态码: 500

Internal Server Error

{
  "error_code" : "APIC.9000",
  "error_msg" : "Failed to request internal service"
}

状态码

状态码

描述

200

OK

401

Unauthorized

403

Forbidden

500

Internal Server Error

错误码

请参见错误码