Queries the virtual private clouds (VPCs) that are available in a specified region.
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. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TotalCount | Integer | 10 |
The total number of entries returned. By default, this parameter is not returned. |
RequestId | String | BD65C0AD-D3C6-48D3-8D93-38D2015C**** |
The ID of the request. |
NextToken | String | "" |
The token that marks the end of the current returned page. If this parameter is empty, it indicates that you have retrieved all the data. |
MaxResults | Integer | 10 |
The maximum number of entries returned on a single page. |
Vpcs | Array of Vpcs |
The list of VPCs that are available in the specified region. |
|
VpcId | String | vpc-bp1qkf2o3xmqc2519**** |
The ID of the VPC. |
VpcName | String | vpc-test |
The name of the VPC. |
Status | String | Available |
The status of the VPC. Valid values:
|
IsDefault | Boolean | false |
Indicates whether the VPC is the default VPC in the specified region. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeVpcs
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeVpcsResponse>
<TotalCount>10</TotalCount>
<RequestId>BD65C0AD-D3C6-48D3-8D93-38D2015C****</RequestId>
<NextToken>""</NextToken>
<MaxResults>10</MaxResults>
<Vpcs>
<VpcId>vpc-bp1qkf2o3xmqc2519****</VpcId>
<VpcName>vpc-test</VpcName>
<Status>Available</Status>
<IsDefault>false</IsDefault>
</Vpcs>
</DescribeVpcsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 10,
"RequestId" : "BD65C0AD-D3C6-48D3-8D93-38D2015C****",
"NextToken" : "\"\"",
"MaxResults" : 10,
"Vpcs" : {
"VpcId" : "vpc-bp1qkf2o3xmqc2519****",
"VpcName" : "vpc-test",
"Status" : "Available",
"IsDefault" : false
}
}
Error codes
For a list of error codes, visit the API Error Center.