This API is used to query VPCs using search criteria and to display the VPCs in a list.
GET /v1/{project_id}/vpcs
GET https://{Endpoint}/v1/{project_id}/vpcs?limit=10&marker=13551d6b-755d-4757-b956-536f674975c0
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
id |
No |
String |
Specifies the VPC ID that is used as the filtering condition. |
marker |
No |
String |
Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. This parameter can work together with the parameter limit.
|
limit |
No |
Integer |
Specifies the number of records that will be returned on each page. The value is from 0 to intmax (2^31-1). The default value is 2000. limit can be used together with marker. For details, see the parameter description of marker. |
enterprise_project_id |
No |
String |
|
None
GET https://{Endpoint}/v1/{project_id}/vpcs
Parameter |
Type |
Description |
---|---|---|
vpcs |
Array of vpc objects |
Specifies the VPC objects. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies a resource ID in UUID format. |
name |
String |
|
description |
String |
|
cidr |
String |
|
status |
String |
|
enterprise_project_id |
String |
|
routes |
Array of route objects |
|
enable_shared_snat |
Boolean |
Specifies whether to enable the shared SNAT function. true indicates that the function is enabled, and false indicates that the function is not enabled. |
tenant_id |
String |
|
created_at |
String |
|
updated_at |
String |
|
Parameter |
Type |
Description |
---|---|---|
destination |
String |
|
nexthop |
String |
|
{ "vpcs": [ { "id": "13551d6b-755d-4757-b956-536f674975c0", "name": "default", "description": "test", "cidr": "172.16.0.0/16", "status": "OK", "enterprise_project_id": "0", "routes": [], "enable_shared_snat": false, "tenant_id": "087679f0aa80d32a2f4ec0172f5e902b", "created_at": "2022-12-15T02:11:13", "updated_at": "2022-12-15T02:11:13" }, { "id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", "name": "222", "description": "test", "cidr": "192.168.0.0/16", "status": "OK", "enterprise_project_id": "0635d733-c12d-4308-ba5a-4dc27ec21038", "routes": [], "enable_shared_snat": false, "tenant_id": "087679f0aa80d32a2f4ec0172f5e902b", "created_at": "2022-12-15T04:01:21", "updated_at": "2022-12-15T04:01:21" }, { "id": "99d9d709-8478-4b46-9f3f-2206b1023fd3", "name": "vpc", "description": "test", "cidr": "192.168.0.0/16", "status": "OK", "enterprise_project_id": "0", "routes": [], "enable_shared_snat": false, "tenant_id": "087679f0aa80d32a2f4ec0172f5e902b", "created_at": "2022-12-15T05:36:29", "updated_at": "2022-12-15T05:36:29" } ] }
See Status Codes.
See Error Codes.