查询实例下的二层连接列表 - ListConnections
功能介绍
当您的二层连接创建成功后,您可以通过调用此接口查询ESW实例下的二层连接列表。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备如下身份策略权限,更多的权限说明请参见权限和授权项。
授权项 | 访问级别 | 资源类型(*为必须) | 条件键 | 别名 | 依赖的授权项 |
|---|---|---|---|---|---|
esw:connection:list | List | - | - | - | - |
URI
GET /v3/{project_id}/l2cg/instances/{instance_id}/connections
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
instance_id | 是 | String |
|
project_id | 是 | String |
|
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
id | 否 | String |
|
name | 否 | String |
|
请求参数
无
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
request_id | String |
|
page_info | PageInfo object |
|
connections | Array of Connection objects |
|
参数 | 参数类型 | 描述 |
|---|---|---|
next_marker | String |
|
previous_marker | String |
|
current_count | Integer |
|
参数 | 参数类型 | 描述 |
|---|---|---|
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/dd9e484e058b48e18b820948dcbd480e/l2cg/instances/87fea8df-3e0d-473a-a1bd-e6a76157f4ce/connections 响应示例
状态码:200
GET操作正常返回,更多状态码请参见状态码。
{
"request_id" : "e08970b5f462162c4c7553fe3a6832fc",
"connections" : [ {
"name" : "l2conn",
"id" : "b6eb65d0-0079-4432-86b9-60a066fe21d4",
"status" : "disconnect",
"created_at" : "2025-07-28T08:22:21Z",
"updated_at" : "2025-07-28T08:23:09Z",
"project_id" : "dd9e484e058b48e18b820948dcbd480e",
"instance_id" : "87fea8df-3e0d-473a-a1bd-e6a76157f4ce",
"vpc_id" : "6ae030de-f630-476e-8284-7bcfbd94929d",
"virsubnet_id" : "2c649856-0d44-400c-8194-f6d67603e0eb",
"fixed_ips" : [ "192.168.0.116", "192.168.0.96" ],
"remote_infos" : [ {
"segmentation_id" : 7127,
"tunnel_ip" : "192.168.111.111",
"tunnel_port" : 4789,
"tunnel_type" : "vxlan"
} ]
} ],
"page_info" : {
"previous_marker" : "b6eb65d0-0079-4432-86b9-60a066fe21d4",
"current_count" : 1
}
} 状态码
状态码 | 描述 |
|---|---|
200 | GET操作正常返回,更多状态码请参见状态码。 |
错误码
请参见错误码。

