Updated on 2022-12-05 GMT+08:00

Querying Backend Servers of a VPC Channel

Function

This API is used to query the backend servers of a VPC channel.

URI

GET /v2/{project_id}/apic/instances/{instance_id}/vpc-channels/{vpc_channel_id}/members

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Appendix > Obtaining a Project ID in the ROMA Connect API Reference.

instance_id

Yes

String

Instance ID.

vpc_channel_id

Yes

String

VPC channel ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

No

Long

Offset from which the query starts. If the offset is less than 0, the value is automatically converted to 0.

Default: 0

limit

No

Integer

Number of items displayed on each page.

Minimum: 1

Maximum: 500

Default: 20

name

No

String

Cloud server name.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

size

Integer

Length of the returned resource list.

total

Long

Number of resources that match the query conditions.

members

Array of VpcMemberInfo objects

Cloud server list.

Table 5 VpcMemberInfo

Parameter

Type

Description

host

String

Backend server address.

This parameter is valid when the member type is IP address.

Maximum: 64

weight

Integer

Backend server weight.

The higher the weight is, the more requests a cloud server will receive. The weight is only available for the WRR and WLC algorithms.

It is valid only when the VPC channel type is set to 2.

Minimum: 0

Maximum: 100

ecs_id

String

Backend server ID.

This parameter is valid only when the backend instance type is instance. The value can contain 1 to 64 characters, including letters, digits, hyphens (-), and underscores (_).

Maximum: 255

ecs_name

String

Backend server name.

This parameter is valid only when the backend instance type is instance. The value can contain 1 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

Maximum: 64

id

String

Backend instance object ID.

status

Number

Backend server status.

  • 1: valid

vpc_channel_id

String

VPC channel ID.

create_time

String

Time when the backend server is added to the VPC channel.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

None

Example Responses

Status code: 200

OK

{
  "total" : 2,
  "size" : 2,
  "members" : [ {
    "create_time" : "2020-07-23T07:11:57Z",
    "vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59",
    "host" : "192.168.0.5",
    "weight" : 1,
    "id" : "be63c6260a1043888187f84af39c9f0e",
    "status" : 1
  }, {
    "create_time" : "2020-07-23T07:11:57Z",
    "vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59",
    "host" : "192.168.1.124",
    "weight" : 2,
    "id" : "a57b13f1b89b417ca8acd76909e6df67",
    "status" : 1
  } ]
}

Status code: 400

Bad Request

{
  "error_code" : "APIG.2012",
  "error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation"
}

Status code: 401

Unauthorized

{
  "error_code" : "APIG.1002",
  "error_msg" : "Incorrect token or token resolution failed"
}

Status code: 403

Forbidden

{
  "error_code" : "APIG.1005",
  "error_msg" : "No permissions to request this method"
}

Status code: 404

Not Found

{
  "error_code" : "APIG.3023",
  "error_msg" : "The VPC channel does not exist,id:56a7d7358e1b42459c9d730d65b14e59"
}

Status code: 500

Internal Server Error

{
  "error_code" : "APIG.9999",
  "error_msg" : "System error"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.