查询VPC通道列表
功能介绍
查看VPC通道列表
URI
GET /v2/{project_id}/apigw/instances/{instance_id}/vpc-channels
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目ID,获取方式请参见API参考的“附录 > 获取项目ID”章节。 |
instance_id |
是 |
String |
实例ID |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
offset |
否 |
Long |
偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0 缺省值:0 |
limit |
否 |
Integer |
每页显示的条目数量 最小值:1 最大值:500 缺省值:20 |
id |
否 |
String |
VPC通道的编号 |
name |
否 |
String |
VPC通道的名称 |
precise_search |
否 |
String |
指定需要精确匹配查找的参数名称,目前仅支持name |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
size |
Integer |
本次返回的列表长度 |
total |
Long |
满足条件的记录数 |
vpc_channels |
Array of VpcChannelInfo objects |
本次查询到的VPC通道列表 |
参数 |
参数类型 |
描述 |
---|---|---|
name |
String |
VPC通道的名称。 长度为3 ~ 64位的字符串,字符串由中文、英文字母、数字、中划线、下划线组成,且只能以英文或中文开头。
说明:
中文字符必须为UTF-8或者unicode编码。 |
port |
Integer |
VPC通道中主机的端口号。 取值范围1 ~ 65535,仅VPC通道类型为2时有效。 VPC通道类型为2时必选。 |
balance_strategy |
Integer |
分发算法。
VPC通道类型为2时必选。 缺省值:1 枚举值:
|
member_type |
String |
VPC通道的成员类型。
VPC通道类型为2时必选。 缺省值:ecs 枚举值:
|
create_time |
String |
VPC通道的创建时间 |
id |
String |
VPC通道的编号 |
status |
Integer |
VPC通道的状态。
枚举值:
|
member_groups |
Array of MemberGroupInfo objects |
后端云服务器组列表。 暂不支持 |
参数 |
参数类型 |
描述 |
---|---|---|
member_group_name |
String |
VPC通道后端服务器组名称 |
member_group_remark |
String |
VPC通道后端服务器组描述 |
member_group_weight |
Integer |
VPC通道后端服务器组权重值。 当前服务器组存在服务器且此权重值存在时,自动使用此权重值分配权重。 最小值:0 最大值:100 |
dict_code |
String |
VPC通道后端服务器组的字典编码 支持英文,数字,特殊字符(-_.) 暂不支持 最小长度:3 最大长度:64 |
member_group_id |
String |
VPC通道后端服务器组编号 |
create_time |
String |
VPC通道后端服务器组创建时间 |
update_time |
String |
VPC通道后端服务器组更新时间 |
状态码: 400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码 |
error_msg |
String |
错误描述 |
状态码: 401
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码 |
error_msg |
String |
错误描述 |
状态码: 403
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码 |
error_msg |
String |
错误描述 |
状态码: 404
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码 |
error_msg |
String |
错误描述 |
状态码: 500
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码 |
error_msg |
String |
错误描述 |
请求示例
无
响应示例
状态码: 200
OK
{ "total" : 2, "size" : 2, "vpc_channels" : [ { "member_type" : "instance", "balance_strategy" : 1, "create_time" : "2020-07-23T07:24:33Z", "port" : 8080, "name" : "VPC_Channel_1", "id" : "105c6902457144a4820dff8b1ad63331", "type" : 1, "status" : 1 }, { "member_type" : "ip", "balance_strategy" : 2, "create_time" : "2020-07-23T07:11:57Z", "port" : 8088, "name" : "VPC_Channel_2", "id" : "56a7d7358e1b42459c9d730d65b14e59", "type" : 2, "status" : 1 } ] }
状态码: 400
Bad Request
{ "error_code" : "APIG.2011", "error_msg" : "The request parameters must be specified,parameterName:name. Please refer to the support documentation" }
状态码: 401
Unauthorized
{ "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" }
状态码: 403
Forbidden
{ "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" }
状态码: 404
Not Found
{ "error_code" : "APIG.3030", "error_msg" : "The instance does not exist;id:eddc4d25480b4cd6b512f270a1b8b341" }
状态码: 500
Internal Server Error
{ "error_code" : "APIG.9999", "error_msg" : "System error" }
状态码
状态码 |
描述 |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
错误码
请参见错误码。