
# 查看VPC通道列表
#### 功能介绍
查看VPC通道列表。
#### URI
HTTP/HTTPS请求方法以及URI如下表所示。
表1HTTP/HTTPS请求方法以及URI 
| 请求方法 | URI                                                                 |
|:---|:---|
| GET  | /v1.0/apigw/vpc-channels\[?page_size, page_no, id, name, vpc_type\] |
   
o
![](https://support.huaweicloud.com/api-apig/public_sys-resources/note_3.0-zh-cn.png)
- 可以在URI后面用'?'和'\&'添加不同的查询条件组合。
- 查询条件可为以下字段以及对应的值：id、name、vpc_type、page_size、page_no。
 
表2参数说明 
| 名称             | 是否必选 | 类型      | 说明                        |
|:---|:---|:---|:---|
| id             | 否    | String  | VPC通道的编号。                 |
| name           | 否    | String  | VPC通道的名称。                 |
| vpc_type       | 否    | Integer | VPC通道的类型。                 |
| page_size      | 否    | Integer | 每页显示的VPC通道数量，默认值：20。      |
| page_no        | 否    | Integer | 页码，默认值：1。                 |
| precise_search | 否    | String  | 指定需要精确匹配查找的参数名称，目前仅支持name |
   
#### 请求消息
无
#### 响应消息
表3参数说明 
| 名称    | 类型      | 说明             |
|:---|:---|:---|
| total | Integer | 符合条件的VPC通道总数。  |
| size  | Integer | 本次查询返回的列表长度。   |
| vpcs  | 字典数据类型  | 本次查询到的VPC通道列表。 |
   
表4VPC参数说明 
| 名称               | 类型        | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|
| id               | String    | VPC通道的编号。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| name             | String    | VPC通道的名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| type             | Integer   | VPC通道的类型。 - 2：API网关内置支持负载均衡功能的快速通道类型                                                                                                                                                                                                                                                                                                                                                                                                             |
| member_type      | String    | VPC通道的成员类型。 - ip（暂不支持）  - instance                                                                                                                                                                                                                                                                                  |
| status           | Integer   | VPC通道的状态。 - 1：正常  - 2：异常                                                                                                                                                                                                                                                                                                       |
| port             | Integer   | VPC通道中主机的端口号。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| balance_strategy | Integer   | 分发算法。 - 1：加权轮询（wrr）  - 2：加权最少连接（wleastconn）  - 3：源地址哈希（source）  - 4：URI哈希（uri）   |
| create_time      | Timestamp | VPC通道的创建时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
   
响应消息样例：
```
{
  "total": 2,
  "size": 2,
  "vpcs": [
    {
      "name": "通道1",
      "type": 1,
      "member_type": "instance",
      "port": 8080,
      "balance_strategy": 1,
      "id": "39c62689302a48fe9f4bd7cf5c052064",
      "create_time": "2018-04-24T12:07:58Z",
      "status": 1
    },
    {
      "name": "通道2",
      "type": 2,
      "member_type": "instance",
      "port": 8088,
      "balance_strategy": 1,
      "id": "e6831cbcbe2b45bbbc6318c2892f060b",
      "create_time": "2018-04-24T11:57:03Z",
      "status": 1
    }
  ]
}
```
#### 状态码
表5返回消息说明 
| 状态码 | 说明                    |
|:---|:---|
| 200 | OK                    |
| 400 | Bad Request           |
| 401 | Unauthorized          |
| 403 | Forbidden             |
| 404 | Not Found             |
| 500 | Server Internal Error |
   
