DescribeVpcs
1. API Description
This API (DescribeVpcs) is used to query the virtual private cloud (VPC) list. You can filter VPCs by VPC ID, VPC name, and other information.
2. Input Parameters
The following request parameter list only provides API request parameters.
vpcIds
No
Array of String
List of global VPC IDs.
Up to 100 IDs can be specified per request.
name
No
String
Global VPC name.
Fuzzy query is supported.
cidrBlock
No
String
Filter by the IPv4 CIDR block of the VPC.
Fuzzy search is supported.
Both the primary CIDR block and the secondary CIDR blocks participate in the matching, that is, VPCs matching either of them are returned.
pageSize
No
Integer
Number of items in the current page result.
Default value: 20;
Maximum value: 1000.
Value range: [1, 1000]
Default value: 20
pageNum
No
Integer
Number of pages returned.
Default value: 1.
Value range: [1, +)
Default value: 1
resourceGroupId
No
String
Resource group id.
tagKeys
No
Array of String
Query using tag keys.
A maximum of 20 tag keys can be used.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request.
RequestId is required for locating a problem.
totalCount
Integer
Number of global VPCs meeting the filtering conditions.
4. Code Example
1. Query the list of VPCs whose CIDR block matches 10.0.0.0/24.
The cidrBlock filter matches both the primary CIDR block and the secondary CIDR blocks, and VPCs matching either of them are returned.
5. Developer Resources
Zenlayer Cloud API 2.0 integrates SDKs,to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
HTTP Status Code
Error Code
Description
Last updated