Updated on 2022-09-01 GMT+08:00

Querying the VPC channel List

Function

This API is used to query the list of VPC channels that have been created.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

GET

/v1.0/apigw/vpc-channels[?page_size, page_no, id, name, vpc_type]

o

  • A combination of different query conditions can be added at the end of the URI by using question marks (?) and ampersands (&).
  • Query conditions include: id, name, vpc_type, page_size, and page_no.
Table 2 Parameter description

Parameter

Mandatory

Type

Description

id

No

String

VPC channel ID

name

No

String

VPC channel name

vpc_type

No

Integer

VPC channel type, which can be:

page_size

No

Integer

Number of VPC channels displayed on each page. The default value is 20.

page_no

No

Integer

Page number. The default value is 1.

precise_search

No

String

Parameter name (name) for exact matching

Request

N/A

Response

Table 3 Parameter description

Parameter

Type

Description

total

Integer

Total number of VPC channels that match the query conditions

size

Integer

Length of the returned VPC channel list

vpcs

Dictionary

VPC channel list

Table 4 VPC channel parameter description

Parameter

Type

Description

id

String

VPC channel ID

name

String

VPC channel name

type

Integer

VPC channel type, which can be:

  • 2: fast channel with the load balancing function

member_type

String

Member type of the VPC channel, which can be:

  • ip (not supported currently)
  • instance

status

Integer

VPC channel status, which can be:

  • 1: normal
  • 2: abnormal

port

Integer

Host port of the VPC channel

balance_strategy

Integer

Distribution algorithm, which can be:

  • 1: WRR
  • 2: WLC
  • 3: SH
  • 4: URI hashing

create_time

Timestamp

Time when the VPC channel is created

Example response:

{
  "total": 2,
  "size": 2,
  "vpcs": [
    {
      "name": "Channel_1",
      "type": 1,
      "member_type": "instance",
      "port": 8080,
      "balance_strategy": 1,
      "id": "39c62689302a48fe9f4bd7cf5c052064",
      "create_time": "2018-04-24T12:07:58Z",
      "status": 1
    },
    {
      "name": "Channel_2",
      "type": 2,
      "member_type": "instance",
      "port": 8088,
      "balance_strategy": 1,
      "id": "e6831cbcbe2b45bbbc6318c2892f060b",
      "create_time": "2018-04-24T11:57:03Z",
      "status": 1
    }
  ]
}

Status Codes

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Server Internal Error