Querying the Enterprise Switches
Function
This API is used to query the details about all the enterprise switches.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
esw:instance:list |
List |
- |
- |
- |
- |
URI
GET /v3/{project_id}/l2cg/instances
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
|
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
No |
String |
|
|
name |
No |
String |
|
|
project_id |
No |
String |
|
|
description |
No |
String |
|
|
limit |
No |
Integer |
|
|
marker |
No |
String |
|
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
request_id |
String |
|
|
page_info |
PageInfo object |
|
|
instances |
Array of Instance objects |
|
|
Parameter |
Type |
Description |
|---|---|---|
|
next_marker |
String |
|
|
previous_marker |
String |
|
|
current_count |
Integer |
|
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
|
|
name |
String |
|
|
project_id |
String |
|
|
region |
String |
|
|
flavor_ref |
String |
|
|
ha_mode |
String |
|
|
status |
String |
|
|
created_at |
String |
|
|
updated_at |
String |
|
|
description |
String |
|
|
tunnel_info |
TunnelInfoResult object |
|
|
charge_infos |
PostPaidChargeInfos object |
|
|
availability_zones |
AvailabilityZones object |
|
|
Parameter |
Type |
Description |
|---|---|---|
|
vpc_id |
String |
|
|
virsubnet_id |
String |
|
|
tunnel_ip |
String |
|
|
tunnel_port |
Integer |
|
|
tunnel_type |
String |
|
|
Parameter |
Type |
Description |
|---|---|---|
|
charge_mode |
String |
|
|
Parameter |
Type |
Description |
|---|---|---|
|
primary |
String |
|
|
standby |
String |
|
Example Requests
GET https://{endpoint}/v3/88104fcc62a640bfa0a0bf687607621c/l2cg/instances
Example Responses
Status code: 200
The GET operation is successful. For more status codes, see Status Codes.
{
"request_id" : "ca8bd3285faf5a0e600cc9e66032b4b9",
"instances" : [ {
"name" : "esw-offline-inter",
"id" : "a14aa233-3ac1-4218-8d85-b168a6c1b6df",
"region" : "cn-southwest-242",
"status" : "active",
"description" : null,
"created_at" : "2025-05-27T09:12:50Z",
"updated_at" : "2025-07-26T04:57:15Z",
"project_id" : "88104fcc62a640bfa0a0bf687607621c",
"flavor_ref" : "l2cg.small.ha",
"ha_mode" : "ha",
"availability_zones" : {
"standby" : "cn-southwest-242a",
"primary" : "cn-southwest-242a"
},
"charge_infos" : {
"charge_mode" : "postPaid"
},
"tunnel_info" : {
"vpc_id" : "a36e12f4-b490-4b85-bf41-dc61f8f4f4d7",
"virsubnet_id" : "fb9dee2e-88eb-4fa8-b698-e089d29a56ee",
"tunnel_ip" : "192.168.4.202",
"tunnel_port" : 4789,
"tunnel_type" : "vxlan"
}
}, {
"name" : "esw-online-update",
"id" : "16b2eea7-5935-445d-8410-083b7064b939",
"region" : "cn-southwest-242",
"status" : "active",
"description" : null,
"created_at" : "2025-05-20T07:51:52Z",
"updated_at" : "2025-07-28T08:29:14Z",
"project_id" : "88104fcc62a640bfa0a0bf687607621c",
"flavor_ref" : "l2cg.small.ha",
"ha_mode" : "ha",
"availability_zones" : {
"standby" : "cn-southwest-242a",
"primary" : "cn-southwest-242a"
},
"charge_infos" : {
"charge_mode" : "postPaid"
},
"tunnel_info" : {
"vpc_id" : "41829b5e-66c0-4928-a3d4-f4570ce81d8f",
"virsubnet_id" : "71f74174-c3fb-4929-9207-a4256b19e280",
"tunnel_ip" : "192.168.0.76",
"tunnel_port" : 4789,
"tunnel_type" : "vxlan"
}
} ],
"page_info" : {
"previous_marker" : "a14aa233-3ac1-4218-8d85-b168a6c1b6df",
"current_count" : 2
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The GET operation is successful. For more status codes, see Status Codes. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot