Querying VPC Channel Details
Function
This API is used to query the details of a specified VPC channel.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
| Request Method | URI |
|---|---|
| GET | /v1/{project_id}/apigw/instances/{instance_id}/vpc-channels/{id} |
The following table lists the parameter in the URI.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which can be obtained by the administrator on the My Credentials page. |
| instance_id | Yes | String | Instance ID, which can be obtained from the dedicated gateway information on the API Gateway console. |
| id | Yes | String | VPC channel ID |
Request
N/A
Response
| Parameter | Type | Description |
|---|---|---|
| id | String | VPC channel ID |
| name | String | VPC channel name |
| type | Integer | VPC channel type, which can be:
|
| member_type | String | Member type of the VPC channel, which can be:
|
| status | Integer | VPC channel status, which can be:
|
| port | Integer | Host port of the VPC channel |
| balance_strategy | Integer | Distribution algorithm, which can be:
|
| create_time | Timestamp | Time when the VPC channel is created |
| vpc_health_config | Dictionary | Health check details |
| vpc_instances | Dictionary | Backend instance list |
| Parameter | Type | Description |
|---|---|---|
| id | String | Health check ID |
| vpc_id | String | VPC channel ID |
| protocol | String | Protocol for performing health checks on cloud servers in the VPC channel. The value can be:
|
| path | String | Destination path for health checks NOTE: The value of this parameter must comply with URI specifications. |
| port | Integer | Destination port for health checks. By default, the host port of the VPC channel is used. Range: 1–65535 |
| threshold_normal | Integer | Healthy threshold It refers to the number (x) of consecutive successful checks required for a cloud server to be marked as healthy. Range: 2–10 |
| threshold_abnormal | Integer | Unhealthy threshold It refers to the number (x) of consecutive failed checks required for a cloud server to be marked as unhealthy. Range: 2–10 |
| time_out | Integer | Timeout for determining whether a health check fails. Unit: s. The value must be less than the value of time_interval. Range: 2–30 |
| time_interval | Integer | Interval between consecutive checks. Unit: s. The value must be greater than the value of time_out. Range: 5–300 |
| http_code | String | HTTP response codes for determining a successful HTTP response The value can be any integer within 100–599 in one of the following formats:
|
| create_time | Timestamp | Time when the VPC channel is created |
| Parameter | Type | Description |
|---|---|---|
| id | String | Backend instance object ID |
| vpc_id | String | VPC channel ID |
| status | Integer | Status of the backend instance object |
| instance_name | String | Backend instance name |
| instance_id | String | Backend instance ID |
| host | String | IP address of the backend instance |
| weight | Integer | Cloud server weight The larger the weight is, the more requests are forwarded to the backend instance. Range: 1–100 |
| create_time | Timestamp | Time when the backend instance is added to the VPC channel |
Example response:
{
"name": "vpc_001",
"type": 2,
"member_type": "instance",
"port": 15565,
"balance_strategy": 1,
"id": "c3e6a7d85d9e47be89dfcc3cd37405d7",
"create_time": "2018-07-27T12:30:48Z",
"status": 1,
"vpc_health_config": {
"protocol": "http",
"path": "/hc",
"port": 15563,
"threshold_normal": 5,
"threshold_abnormal": 5,
"time_out": 30,
"time_interval": 200,
"http_code": "205",
"id": "f26c1b158f2e40f2b531cf5c1b5e05e5",
"vpc_id": "c3e6a7d85d9e47be89dfcc3cd37405d7",
"create_time": "2018-07-27T12:30:48Z"
},
"vpc_instances": [
{
"instance_id": "instance01",
"instance_name": "instance_name01",
"host": "127.0.0.1",
"weight": 10,
"id": "c3bc73605a8b400793363c87574fbad7",
"vpc_id": "c3e6a7d85d9e47be89dfcc3cd37405d7",
"status": 1,
"create_time": "2018-07-27T12:30:48Z"
}
]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Server Internal Error |
Last Article: Deleting a VPC Channel
Next Article: Querying the List of VPC Channels
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.