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
Name |
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. |
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. |
Request Parameters
None
Example Request
GET https://{Endpoint}/v1/{project_id}/vpcs
Response Parameters
Name |
Type |
Description |
---|---|---|
vpcs |
Array of vpcs objects |
Specifies the VPCs. |
Name |
Type |
Description |
---|---|---|
id |
String |
Specifies a resource ID in UUID format. |
name |
String |
|
description |
String |
|
cidr |
String |
|
status |
String |
|
Example Response
{ "vpcs": [ { "id": "13551d6b-755d-4757-b956-536f674975c0", "name": "default", "description": "test", "cidr": "172.16.0.0/16", "status": "OK" }, { "id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", "name": "222", "description": "test", "cidr": "192.168.0.0/16", "status": "OK" }, { "id": "99d9d709-8478-4b46-9f3f-2206b1023fd3", "name": "vpc", "description": "test", "cidr": "192.168.0.0/16", "status": "OK" } ] }
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot