Querying VPCs
Function
This API is used to query VPCs using search criteria and to display the VPCs in a list.
URI
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. For details about how to obtain a project ID, see Obtaining a 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 |
|
Request Parameters
None
Example Request
GET https://{Endpoint}/v1/{project_id}/vpcs
Response Parameters
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 |
|
tenant_id |
String |
|
created_at |
String |
|
updated_at |
String |
|
Parameter |
Type |
Description |
---|---|---|
destination |
String |
|
nexthop |
String |
|
Example Response
{ "vpcs": [ { "id": "13551d6b-755d-4757-b956-536f674975c0", "name": "default", "description": "test", "cidr": "172.16.0.0/16", "status": "OK" , "routes": [] "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" , "routes": [] "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": [] "tenant_id": "087679f0aa80d32a2f4ec0172f5e902b", "created_at": "2022-12-15T05:36:29", "updated_at": "2022-12-15T05:36:29" } ] }
Status Code
See Status Codes.
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.