查询VPC通道列表
功能介绍
查看VPC通道列表
URI
GET /v2/{project_id}/apic/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通道的名称 |
| vpc_type | 否 | Integer | 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编码。 |
| type | Integer | VPC通道的类型。
|
| port | Integer | VPC通道中主机的端口号。 取值范围1 ~ 65535,仅VPC通道类型为2时有效。 VPC通道类型为2时必选。 |
| balance_strategy | Integer | 分发算法。
VPC通道类型为2时必选。 |
| member_type | String | VPC通道的成员类型。
VPC通道类型为2时必选。 缺省值:ecs |
| create_time | String | VPC通道的创建时间 |
| id | String | VPC通道的编号 |
| status | Integer | VPC通道的状态。
|
| elb_id | String | 私网ELB通道的编号。 仅当VPC通道类型为1时生效 |
状态码: 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" : "channel 1",
"id" : "105c6902457144a4820dff8b1ad63331",
"type" : 1,
"status" : 1
}, {
"member_type" : "ip",
"balance_strategy" : 2,
"create_time" : "2020-07-23T07:11:57Z",
"port" : 8088,
"name" : "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:f0fa1789-3b76-433b-a787-9892951c620e"
} 状态码: 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 |
错误码
请参见错误码。