查看VPC通道详情
功能介绍
查看指定的VPC通道详情
URI
GET /v2/{project_id}/apic/instances/{instance_id}/vpc-channels/{vpc_channel_id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID,获取方式请参见API参考的“附录 > 获取项目ID”章节。 |
|
instance_id |
是 |
String |
实例ID |
|
vpc_channel_id |
是 |
String |
VPC通道的编号 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
name |
String |
VPC通道的名称。 长度为3 ~ 64位的字符串,字符串由中文、英文字母、数字、中划线、下划线组成,且只能以英文或中文开头。
说明:
中文字符必须为UTF-8或者unicode编码。 |
|
type |
Integer |
VPC通道的类型。
|
|
port |
Integer |
VPC通道中主机的端口号。 取值范围1 ~ 65535,仅VPC通道类型为2时有效。 VPC通道类型为2时必选。 |
|
balance_strategy |
Integer |
分发算法。
VPC通道类型为2时必选。 |
|
member_type |
String |
VPC通道的成员类型。
VPC通道类型为2时必选。 缺省值:ecs |
|
create_time |
String |
VPC通道的创建时间 |
|
id |
String |
VPC通道的编号 |
|
status |
Integer |
VPC通道的状态。
|
|
elb_id |
String |
私网ELB通道的编号。 仅当VPC通道类型为1时生效 |
|
members |
Array of VpcMemberInfo objects |
后端实例列表,VPC通道类型为1时,有且仅有1个后端实例。 |
|
vpc_health_config |
VpcHealthConfigInfo object |
健康检查详情,仅VPC通道类型为2时有效。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
host |
String |
后端服务器地址 后端实例类型为ip时生效 最大长度:64 |
|
weight |
Integer |
权重值。 允许您对云服务器进行评级,权重值越大,转发到该云服务的请求数量越多。权重只对加权轮询和加权最小连接算法生效 仅VPC通道类型为2时有效。 最小值:0 最大值:100 |
|
ecs_id |
String |
后端云服务器的编号。 后端实例类型为instance时生效,支持英文,数字,“-”,“_”,1 ~ 64字符。 最大长度:255 |
|
ecs_name |
String |
后端云服务器的名称。 后端实例类型为instance时生效,支持汉字,英文,数字,“-”,“_”,“.”,1 ~ 64字符。 最大长度:64 |
|
id |
String |
后端实例对象的编号 |
|
status |
Number |
后端实例对象的状态
|
|
vpc_channel_id |
String |
VPC通道的编号 |
|
create_time |
String |
后端实例增加到VPC通道的时间 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
protocol |
String |
使用以下协议,对VPC中主机执行健康检查:
|
|
path |
String |
健康检查时的目标路径。protocol = http或https时必选 |
|
method |
String |
健康检查时的请求方法 缺省值:GET |
|
port |
Integer |
健康检查的目标端口,缺省或port = 0时为VPC中主机的端口号。 最小值:0 最大值:65535 |
|
threshold_normal |
Integer |
正常阈值。判定VPC通道中主机正常的依据为:连续检查x成功,x为您设置的正常阈值。 最小值:2 最大值:10 |
|
threshold_abnormal |
Integer |
异常阈值。判定VPC通道中主机异常的依据为:连续检查x失败,x为您设置的异常阈值。 最小值:2 最大值:10 |
|
time_interval |
Integer |
间隔时间:连续两次检查的间隔时间,单位为秒。必须大于timeout字段取值。 最小值:5 最大值:300 |
|
http_code |
String |
检查目标HTTP响应时,判断成功使用的HTTP响应码。取值范围为100到599之前的任意整数值,支持如下三种格式:
|
|
enable_client_ssl |
Boolean |
是否开启双向认证。若开启,则使用实例配置中的backend_client_certificate配置项的证书 缺省值:false |
|
timeout |
Integer |
超时时间:检查期间,无响应的时间,单位为秒。必须小于time_interval字段取值。 最小值:2 最大值:30 |
|
vpc_channel_id |
String |
VPC通道的编号 |
|
id |
String |
健康检查的编号 |
|
create_time |
String |
创建时间 |
状态码: 400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
状态码: 401
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
状态码: 403
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
状态码: 404
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
状态码: 500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
请求示例
无
响应示例
状态码: 200
OK
{
"id" : "56a7d7358e1b42459c9d730d65b14e59",
"balance_strategy" : 1,
"create_time" : "2020-07-23T07:11:57.244829604Z",
"member_type" : "ip",
"port" : 22,
"status" : 1,
"name" : "VPC_demo",
"type" : 2,
"vpc_health_config" : {
"create_time" : "2020-07-23T07:11:57Z",
"http_code" : "200",
"id" : "3b3d02026c5f402d85e8645ea95b0816",
"method" : "GET",
"path" : "/vpc/demo",
"port" : 22,
"protocol" : "http",
"threshold_abnormal" : 5,
"threshold_normal" : 2,
"time_interval" : 10,
"timeout" : 5,
"enable_client_ssl" : false
},
"members" : [ {
"create_time" : "2020-07-23T07:11:57Z",
"host" : "192.168.0.5",
"id" : "be63c6260a1043888187f84af39c9f0e",
"status" : 1,
"vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59",
"weight" : 1
}, {
"create_time" : "2020-07-23T07:11:57Z",
"host" : "192.168.1.124",
"id" : "a57b13f1b89b417ca8acd76909e6df67",
"status" : 1,
"vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59",
"weight" : 2
} ]
}
状态码: 400
Bad Request
{
"error_code" : "APIG.2012",
"error_msg" : "Invalid parameter value,parameterName:id. Please refer to the support documentation"
}
状态码: 401
Unauthorized
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
}
状态码: 403
Forbidden
{
"error_code" : "APIG.1005",
"error_msg" : "No permissions to request this method"
}
状态码: 404
Not Found
{
"error_code" : "APIG.3023",
"error_msg" : "The VPC channel does not exist,id:56a7d7358e1b42459c9d730d65b14e59"
}
状态码: 500
Internal Server Error
{
"error_code" : "APIG.9999",
"error_msg" : "System error"
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
500 |
Internal Server Error |
错误码
请参见错误码。