更新时间:2022-08-30 GMT+08:00
分享

查看VPC通道列表

功能介绍

查看VPC通道列表。

URI

HTTP/HTTPS请求方法以及URI如下表所示。

表1 HTTP/HTTPS请求方法以及URI

请求方法

URI

GET

/v1/{project_id}/apigw/instances/{instance_id}/vpc-channels[?page_size, page_no, id, name, vpc_type]

o

  • 可以在URI后面用‘?’和‘&’添加不同的查询条件组合。
  • 查询条件可为以下字段以及对应的值:id、name、vpc_type、page_size、page_no。
表2 参数说明

名称

是否必选

类型

说明

project_id

String

项目ID。可从控制台“我的凭证”中获取region下项目ID,只有管理员权限可以查询。

instance_id

String

实例ID,可从API网关控制台的专享版实例信息中获取。

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通道列表。

表4 VPC参数说明

名称

类型

说明

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

分享:

    相关文档

    相关产品