Queries the list of user VPCs.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeVpcs |
The operation that you want to perform. Set the value to DescribeVpcs. |
| RegionId | String | Yes | cn-hangzhou |
The region ID of the VPC to be queried. |
| ZoneId | String | No | cn-hangzhou-d |
The ID of the zone to which the VPC to be queried belongs. |
| PageNumber | Integer | No | 1 |
The page number of the VPC list. Default value: 1. Valid values: 1 to 100. |
| PageSize | Integer | No | 50 |
The number of entries returned per page. Default value: 50. Valid values: 1 to 50. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0FE2C83B |
The ID of the request. |
| Vpcs | Object |
The result of the VPC array. |
|
| Vpc | Array of Vpc |
The details of a single VPC. |
|
| VpcId | String | vpc-bp1qpo0kug3a20qqe**** |
The ID of the VPC. |
| VpcName | String | vpc1 |
The name of the VPC. |
| Status | String | Available |
The status of the VPC. Valid values:
|
| IsDefault | Boolean | true |
Indicates whether the VPC is the default VPC in the specified region. Valid values:
|
| CidrBlock | String | 192.168.0.0/16 |
The IPv4 CIDR block of the VPC. |
| RegionNo | String | cn-hangzhou |
The ID of the region to which the VPC belongs. |
| GmtCreate | String | 2021-04-18T15:02:37Z |
The time when the VPC was created. |
| GmtModified | String | 2021-04-18T15:02:37Z |
The time when the VPC was modified. |
| VSwitchs | Array of String | vsw-bp1nhbnpv2blyz8dl**** |
The ID of the vSwitch. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeVpcs
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-d
&PageNumber=1
&PageSize=50
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeVpcsResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0FE2C83B</RequestId>
<Vpcs>
<Vpc>
<VpcId>vpc-bp1qpo0kug3a20qqe****</VpcId>
<VpcName>vpc1</VpcName>
<Status>Available</Status>
<IsDefault>true</IsDefault>
<CidrBlock>192.168.0.0/16</CidrBlock>
<RegionNo>cn-hangzhou</RegionNo>
<GmtCreate>2021-04-18T15:02:37Z</GmtCreate>
<GmtModified>2021-04-18T15:02:37Z</GmtModified>
<VSwitchs>vsw-bp1nhbnpv2blyz8dl****</VSwitchs>
</Vpc>
</Vpcs>
</DescribeVpcsResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0FE2C83B",
"Vpcs" : {
"Vpc" : [ {
"VpcId" : "vpc-bp1qpo0kug3a20qqe****",
"VpcName" : "vpc1",
"Status" : "Available",
"IsDefault" : true,
"CidrBlock" : "192.168.0.0/16",
"RegionNo" : "cn-hangzhou",
"GmtCreate" : "2021-04-18T15:02:37Z",
"GmtModified" : "2021-04-18T15:02:37Z",
"VSwitchs" : [ "vsw-bp1nhbnpv2blyz8dl****" ]
} ]
}
}
Error codes
For a list of error codes, see Service error codes.