Queries created VPCs.
Operation description
The DescribeVpcs operation may return the Throttling.DeepPageSkip error code during frequent deep paging or page skipping. Reduce the query frequency or use sequential paging.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeVpcs |
list |
VPC
VPC
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| VpcId |
string |
No |
The ID of the VPC. You can specify up to 20 VPC IDs. Separate multiple VPC IDs with commas (,). |
vpc-bp1b1xjllp3ve5yze**** |
| RegionId |
string |
Yes |
The region ID of the VPC. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
| VpcName |
string |
No |
The name of the VPC. |
Vpc-1 |
| IsDefault |
boolean |
No |
Specifies whether to query the default VPC in the specified region. Valid values:
|
false |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the VPC belongs. |
rg-acfmxvfvazb4p**** |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page in paging queries. Maximum value: 50. Default value: 10. |
10 |
| VpcOwnerId |
integer |
No |
The Alibaba Cloud account ID that owns the VPC. |
253460731706911258 |
| DhcpOptionsSetId |
string |
No |
The ID of the DHCP options set. |
dopt-o6w0df4epg9zo8isy**** |
| EnableIpv6 |
boolean |
No |
Specifies whether to query VPCs that have IPv6 CIDR blocks enabled in the specified region. The default value is empty, which means no filtering is performed based on IPv6 enablement. Valid values:
|
false |
| Tag |
array<object> |
No |
The tags of the resource. |
|
|
object |
No |
The tag. |
||
| Key |
string |
No |
The tag key of the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with |
FinanceDept |
| Value |
string |
No |
The tag value of the resource. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with |
FinanceJoshua |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
integer |
The number of entries per page in paging queries. |
10 |
| RequestId |
string |
The request ID. |
C6532AA8-D0F7-497F-A8EE-094126D441F5 |
| PageNumber |
integer |
The page number. |
1 |
| TotalCount |
integer |
The total number of entries returned. |
2 |
| Vpcs |
object |
||
| Vpc |
array<object> |
The details of the VPCs. |
|
|
array<object> |
The details of the VPCs. |
||
| CreationTime |
string |
The time when the VPC was created. |
2021-04-18T15:02:37Z |
| Status |
string |
The status of the VPC. Valid values:
|
Available |
| VpcId |
string |
The ID of the VPC. |
vpc-bp1qpo0kug3a20qqe**** |
| IsDefault |
boolean |
Indicates whether the VPC is the default VPC in the region. Valid values:
|
false |
| OwnerId |
integer |
The Alibaba Cloud account ID that owns the VPC. |
253460731706911258 |
| RegionId |
string |
The region ID of the VPC. |
cn-hangzhou |
| VpcName |
string |
The name of the VPC. |
vpc1 |
| VRouterId |
string |
The ID of the vRouter in the VPC. |
vrt-bp1jcg5cmxjbl9xgc**** |
| DhcpOptionsSetStatus |
string |
The status of the DHCP options set. Valid values:
|
Available |
| CidrBlock |
string |
The IPv4 CIDR block of the VPC. |
192.168.0.0/16 |
| Description |
string |
The description of the VPC. |
This is my VPC. |
| ResourceGroupId |
string |
The ID of the resource group to which the VPC belongs. |
rg-acfmxazb4ph**** |
| DhcpOptionsSetId |
string |
The ID of the DHCP options set. |
dopt-o6w0df4epg9zo8isy**** |
| Ipv6CidrBlock |
string |
The IPv6 CIDR block of the VPC. |
2408:XXXX:0:a600::/56 |
| CenStatus |
string |
The status of the VPC attached to a Cloud Enterprise Network (CEN) instance. Attached is returned only when the VPC is attached to a CEN instance. |
Attached |
| Tags |
object |
||
| Tag |
array<object> |
The tag information of the VPC. |
|
|
object |
The tag information of the VPC. |
||
| Key |
string |
The tag key of the VPC. |
FinanceDept |
| Value |
string |
The tag value of the VPC. |
FinanceJoshua |
| Ipv6CidrBlocks |
object |
||
| Ipv6CidrBlock |
array<object> |
The IPv6 CIDR block information of the VPC. |
|
|
object |
The IPv6 CIDR block information of the VPC. |
||
| Ipv6Isp |
string |
The type of the IPv6 CIDR block of the VPC. Valid values:
Note
If you are a user who has the single-ISP bandwidth whitelist enabled, this field can be set to ChinaTelecom (China Telecom), ChinaUnicom (China Unicom), or ChinaMobile (China Mobile). |
BGP |
| Ipv6CidrBlock |
string |
The IPv6 CIDR block of the VPC. |
2408:XXXX:0:a600::/56 |
| VSwitchIds |
object |
||
| VSwitchId |
array |
The list of vSwitches in the queried VPC. Up to 300 most recently created vSwitches in the VPC can be returned. To query all vSwitches in the VPC, call the DescribeVSwitches operation. |
|
|
string |
The list of vSwitches in the queried VPC. Up to 300 most recently created vSwitches in the VPC can be returned. To query all vSwitches in the VPC, call the DescribeVSwitches operation. |
vsw-bp1nhbnpv2blyz8dl**** |
|
| SecondaryCidrBlocks |
object |
||
| SecondaryCidrBlock |
array |
The secondary CIDR block information. |
|
|
string |
The secondary CIDR block of the VPC. |
192.168.20.0/24 |
|
| UserCidrs |
object |
||
| UserCidr |
array |
The list of user-side CIDR blocks. |
|
|
string |
The list of user-side CIDR blocks. |
10.0.0.0/8 |
|
| NatGatewayIds |
object |
||
| NatGatewayIds |
array |
The ID of the NAT gateway. |
|
|
string |
The ID of the NAT gateway. |
nat-245xxxftwt45bg**** |
|
| RouterTableIds |
object |
||
| RouterTableIds |
array |
The route table information. |
|
|
string |
The route table ID. |
vtb-bp1krxxzp0c29fmon**** |
|
| EnabledIpv6 |
boolean |
Indicates whether IPv6 is enabled. Valid values:
|
false |
| DnsHostnameStatus |
string |
Indicates whether DNS hostname is enabled. |
DISABLED |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "C6532AA8-D0F7-497F-A8EE-094126D441F5",
"PageNumber": 1,
"TotalCount": 2,
"Vpcs": {
"Vpc": [
{
"CreationTime": "2021-04-18T15:02:37Z",
"Status": "Available",
"VpcId": "vpc-bp1qpo0kug3a20qqe****",
"IsDefault": false,
"OwnerId": 253460731706911260,
"RegionId": "cn-hangzhou",
"VpcName": "vpc1",
"VRouterId": "vrt-bp1jcg5cmxjbl9xgc****",
"DhcpOptionsSetStatus": "Available",
"CidrBlock": "192.168.0.0/16",
"Description": "This is my VPC.",
"ResourceGroupId": "rg-acfmxazb4ph****",
"DhcpOptionsSetId": "dopt-o6w0df4epg9zo8isy****",
"Ipv6CidrBlock": "2408:XXXX:0:a600::/56",
"CenStatus": "Attached",
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
},
"Ipv6CidrBlocks": {
"Ipv6CidrBlock": [
{
"Ipv6Isp": "BGP",
"Ipv6CidrBlock": "2408:XXXX:0:a600::/56"
}
]
},
"VSwitchIds": {
"VSwitchId": [
"vsw-bp1nhbnpv2blyz8dl****"
]
},
"SecondaryCidrBlocks": {
"SecondaryCidrBlock": [
"192.168.20.0/24"
]
},
"UserCidrs": {
"UserCidr": [
"10.0.0.0/8"
]
},
"NatGatewayIds": {
"NatGatewayIds": [
"nat-245xxxftwt45bg****"
]
},
"RouterTableIds": {
"RouterTableIds": [
"vtb-bp1krxxzp0c29fmon****"
]
},
"EnabledIpv6": false,
"DnsHostnameStatus": "DISABLED"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidVpcIdNumber.NotSupported | The number of vpcIds exceeds the limit. | The value of the vpcId parameter has reached the upper limit. |
| 400 | InvalidAliuid | User Id is not valid. | |
| 400 | InvalidResourceGroupId | The specified ResourceGroupId does not exist. | The specified resource group ID does not exist. |
| 400 | InvalidTagKey | The tag keys are not valid. | The tag index is invalid. |
| 400 | InvalidTagValue | The tag values are not valid. | The tag value is invalid. |
| 400 | InvalidResourceGroupId.NotFound | The Specified ResourceGroupId not exists. | |
| 400 | OperationUnsupported.ResourceGroupId | %s | |
| 400 | IellgalParameter.OwnerAccount | The specified parameter OwnerAccount is not valid. | The specified parameter OwnerAccount is illegal. |
| 400 | IllegalParam.OwnerId | The specified parameter VpcOwnerId is not valid. | |
| 400 | InvalidAccount.NotFound | The account is invalid. | The operation failed because an invalid account is used. |
| 400 | Throttling.DeepPageSkip | Deep page skip throttled. Please reduce the page skip frequency or use sequential pagination. | The number of deep pagination skip operations has triggered rate limiting. Reduce the frequency of deep page jumps, or use sequential paging. |
| 400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | The error message returned because the specified tag key already exists. |
| 500 | InternalError | The request processing has failed due to some unknown error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.