查询二层连接详情 - ShowConnection
功能介绍
当您的二层连接创建成功后,您可以通过调用此接口查询单二层连接的详细信息。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备如下身份策略权限,更多的权限说明请参见权限和授权项。
|
授权项 |
访问级别 |
资源类型(*为必须) |
条件键 |
别名 |
依赖的授权项 |
|---|---|---|---|---|---|
|
esw:connection:get |
Read |
- |
- |
- |
- |
URI
GET /v3/{project_id}/l2cg/instances/{instance_id}/connections/{connection_id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
connection_id |
是 |
String |
|
|
instance_id |
是 |
String |
|
|
project_id |
是 |
String |
|
请求参数
无
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
request_id |
String |
|
|
connection |
Connection object |
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
fixed_ips |
Array of strings |
|
|
id |
String |
|
|
instance_id |
String |
|
|
name |
String |
|
|
project_id |
String |
|
|
remote_infos |
Array of RemoteInfosResult objects |
|
|
status |
String |
|
|
virsubnet_id |
String |
|
|
vpc_id |
String |
|
|
created_at |
String |
|
|
updated_at |
String |
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
segmentation_id |
Integer |
|
|
tunnel_ip |
String |
|
|
tunnel_port |
Integer |
|
|
tunnel_type |
String |
|
请求示例
GET https://{endpoint}/v3/b2782e6708b8475c993e6064bc456bf8/l2cg/instances/94e7bf9d-c5a0-40da-9bcb-4407fde1907d/connections/cf7c95de-1464-48db-9f00-d773a5a8e29d
响应示例
状态码:200
GET操作正常返回,更多状态码请参见状态码。
{
"request_id" : "7d685ccd5ce38dbd41d4ed4a7ef9cf19",
"connection" : {
"name" : "l2conn-ba19",
"id" : "9cb4f6bd-89a0-4633-b53e-c333b8c9277f",
"status" : "abnormal",
"created_at" : "2025-06-24T06:09:03Z",
"updated_at" : "2025-08-22T02:30:50Z",
"project_id" : "88104fcc62a640bfa0a0bf687607621c",
"instance_id" : "16b2eea7-5935-445d-8410-083b7064b939",
"vpc_id" : "41829b5e-66c0-4928-a3d4-f4570ce81d8f",
"virsubnet_id" : "7ef08d1e-6e82-4133-9147-5dde6a50ee90",
"fixed_ips" : [ "192.168.1.170", "192.168.1.140" ],
"remote_infos" : [ {
"segmentation_id" : 6790,
"tunnel_ip" : "192.168.4.202",
"tunnel_port" : 4789,
"tunnel_type" : "vxlan"
} ]
}
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
GET操作正常返回,更多状态码请参见状态码。 |
错误码
请参见错误码。