更新时间:2023-12-14 GMT+08:00

查看专享版实例详情

功能介绍

查看专享版实例详情

调用方法

请参见如何调用API

URI

GET /v2/{project_id}/apigw/instances/{instance_id}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID,获取方式请参见获取项目ID

instance_id

String

实例ID,在API网关控制台的“实例信息”中获取。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

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

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

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:重启超时
  • Resizing:规格变更中
  • ResizeFailed:规格变更失败
  • ResizeTimeout:规格变更超时

枚举值:

  • 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
  • Resizing
  • ResizeFailed
  • ResizeTimeout

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:重启超时
  • 42:规格变更中
  • 43:规格变更失败
  • 44:规格变更超时

枚举值:

  • 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
  • 42
  • 43
  • 44

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:按需计费
  • 1:暂未使用

枚举值:

  • 0
  • 1

cbc_metadata

String

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

loadbalancer_provider

String

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

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

缺省值:lvs

枚举值:

  • lvs
  • elb

cbc_operation_locks

Array of CbcOperationLock objects

云运营限制操作锁

description

String

实例描述

vpc_id

String

虚拟私有云ID。

获取方法如下:

  • 方法1:登录虚拟私有云服务的控制台界面,在虚拟私有云的详情页面查找VPC ID。
  • 方法2:通过虚拟私有云服务的API接口查询,具体方法请参见《虚拟私有云服务API参考》的“查询VPC列表”章节。

subnet_id

String

子网的网络ID。

获取方法如下:

  • 方法1:登录虚拟私有云服务的控制台界面,单击VPC下的子网,进入子网详情页面,查找网络ID。
  • 方法2:通过虚拟私有云服务的API接口查询,具体方法请参见《虚拟私有云服务API参考》的“查询子网列表”章节。

security_group_id

String

指定实例所属的安全组。

获取方法如下:

  • 方法1:登录虚拟私有云服务的控制台界面,在安全组的详情页面查找安全组ID。
  • 方法2:通过虚拟私有云服务的API接口查询,具体方法请参见《虚拟私有云服务API参考》的“查询安全组列表”章节。

maintain_begin

String

'维护时间窗开始时间。时间格式为 xx:00:00,xx取值为02,06,10,14,18,22。'

'在这个时间段内,运维人员可以对该实例的节点进行维护操作。维护期间,业务可以正常使用,可能会发生闪断。维护操作通常几个月一次。'

maintain_end

String

'维护时间窗结束时间。时间格式为 xx:00:00,与维护时间窗开始时间相差4个小时。'

'在这个时间段内,运维人员可以对该实例的节点进行维护操作。维护期间,业务可以正常使用,可能会发生闪断。维护操作通常几个月一次'。

ingress_ip

String

实例入口,虚拟私有云访问地址

ingress_ip_v6

String

实例入口,虚拟私有云访问地址 (IPv6)

user_id

String

实例所属用户ID

nat_eip_ipv6_cidr

String

出公网网段 (IPv6) 。

当前仅部分region部分可用区支持IPv6

eip_ipv6_address

String

弹性IP地址(IPv6)。

当前仅部分region部分可用区支持IPv6

nat_eip_address

String

实例出公网IP

bandwidth_size

Integer

出公网带宽

bandwidth_charging_mode

String

出公网带宽计费模式

available_zone_ids

String

可用区

instance_version

String

实例版本编号

virsubnet_id

String

子网的网络ID。

暂不支持

roma_eip_address

String

roma弹性公网IP。

暂不支持

listeners

Object

监听信息

暂不支持

supported_features

Array of strings

实例支持的特性列表

endpoint_service

EndpointService object

终端节点服务详情

待废弃,优先使用endpoint_services

endpoint_services

Array of EndpointService objects

终端节点服务列表

node_ips

NodeIps object

服务节点IP

publicips

Array of IpDetails objects

公网入口地址列表

privateips

Array of IpDetails objects

私网入口地址列表

is_releasable

Boolean

实例是否可释放

  • true:可释放
  • false:不可释放

ingress_bandwidth_charging_mode

String

入公网带宽计费模式

表4 CbcOperationLock

参数

参数类型

描述

lock_scene

String

限制操作场景:

  • TO_PERIOD_LOCK:按需转包周期场景锁,不允许进行删除、规格变更、按需转包周期等
  • SPEC_CHG_LOCK:包周期规格变更场景锁,不允许进行删除、规格变更等

枚举值:

  • TO_PERIOD_LOCK
  • PEC_CHG_LOCK

lock_source_id

String

发起限制操作对象的标志

表5 EndpointService

参数

参数类型

描述

service_name

String

终端节点服务名称

created_at

String

创建时间

表6 NodeIps

参数

参数类型

描述

livedata

Array of strings

livedata节点IP地址列表

shubao

Array of strings

shubao节点IP地址列表

表7 IpDetails

参数

参数类型

描述

ip_address

String

IP地址

bandwidth_size

Integer

带宽大小

状态码: 401

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 403

表9 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 404

表10 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 500

表11 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

请求示例

响应示例

状态码: 200

OK

{
  "id" : "8dfxxxxxxxxxxxxxxxxxxxxxxxxxx00p",
  "spec" : "BASIC",
  "project_id" : "78xxxxxxxxxxxxxxxxxxxxxxxxxxxxoi",
  "instance_name" : "apig-demo",
  "status" : "Running",
  "instance_status" : 6,
  "eip_address" : null,
  "type" : null,
  "create_time" : 1635890506328,
  "charging_mode" : 0,
  "enterprise_project_id" : "0",
  "loadbalancer_provider" : "elb",
  "description" : "test create instance",
  "instance_version" : "acc6d368a3cb4d47840380bf62b0ab32",
  "available_zone_ids" : "[xx-xxx-7a, xx-xxx-7b]",
  "user_id" : "e966ff7227ef4df49df7d57aaf00f8ed",
  "vpc_id" : "0402ea19-5457-4032-9d1b-eb48b98f6c66",
  "subnet_id" : "a3bd29e4-d5bc-414c-a79a-1f35ee4ead88",
  "virsubnet_id" : "a3bd29e4-d5bc-414c-a79a-1f35ee4ead88",
  "security_group_id" : "4b95a790-5cfc-463d-8de5-42199e55371c",
  "maintain_begin" : "22:00:00",
  "maintain_end" : "02:00:00",
  "ingress_ip" : "192.168.0.152",
  "ingress_ip_v6" : null,
  "nat_eip_address" : "xxx.xxx.xxx.xxx",
  "roma_eip_address" : null,
  "bandwidth_size" : 5,
  "bandwidth_charging_mode" : "traffic",
  "nat_eip_ipv6_cidr" : null,
  "eip_ipv6_address" : null,
  "supported_features" : [ "lts", "gateway_responses", "ratelimit", "request_body_size", "backend_timeout", "app_token", "app_basic", "app_secret", "multi_auth", "route", "sign_basic", "app_route", "backend_client_certificate", "ssl_ciphers", "cors", "app_quota", "app_acl", "real_ip_from_xff", "set_resp_headers", "vpc_backup", "throttle_strategy", "watch_instance", "sign_aes", "mock_status_code_and_header", "backend_retry_count", "custom_log", "real_ip_header_getter", "policy_sys_param", "vpc_name_modifiable", "breaker", "default_group_host_trustlist" ],
  "node_ips" : {
    "livedata" : [ ],
    "shubao" : [ "192.168.0.123", "192.168.0.114" ]
  },
  "endpoint_service" : null,
  "endpoint_services" : [ {
    "service_name" : "xx-xxx-7a.apig.20bc4a91-1542-43s2-a278-b1e49c0hh6f9",
    "created_at" : "2021-8-03 06:04:43"
  } ],
  "publicips" : [ {
    "ip_address" : "xxx.xxx.xxx.xxx",
    "bandwidth_size" : 5
  } ],
  "privateips" : [ {
    "ip_address" : "xxx.xxx.xxx.xxx",
    "bandwidth_size" : 5
  } ],
  "ingress_bandwidth_charging_mode" : "traffic",
  "cbc_operation_locks" : [ {
    "lock_scene" : "TO_PERIOD_LOCK",
    "lock_source_id" : "CxxxxxxxxxxxM"
  } ]
}

状态码: 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"
}

状态码: 404

Not Found

{
  "error_code" : "APIC.7302",
  "error_msg" : "Instance not found"
}

状态码: 500

Internal Server Error

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

状态码

状态码

描述

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

错误码

请参见错误码