Queries created VPCs.
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 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 for paging. Maximum value: 50. Default value: 10. |
10 |
| VpcOwnerId |
integer |
No |
The Alibaba Cloud account ID of the VPC owner. |
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. It 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. It cannot start with |
FinanceJoshua |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned information. |
||
| PageSize |
integer |
The number of entries per page for paging. |
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 VPC. |
|
|
array<object> |
The details of the VPC. |
||
| 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 VPC ID. |
vpc-bp1qpo0kug3a20qqe**** |
| IsDefault |
boolean |
Indicates whether the VPC is the default VPC in the region. Valid values:
|
false |
| OwnerId |
integer |
The ID of the Alibaba Cloud account to which the VPC belongs. |
253460731706911258 |
| RegionId |
string |
The ID of the region to which the VPC belongs. |
cn-hangzhou |
| VpcName |
string |
The name of the VPC. |
vpc1 |
| VRouterId |
string |
The ID of the vRouter. |
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 Cloud Enterprise Network (CEN) instance to which the VPC is attached. Valid values:
|
Attached |
| Tags |
object |
||
| Tag |
array<object> |
The tag information about the VPC. |
|
|
object |
|||
| Key |
string |
The key of tag N. |
FinanceDept |
| Value |
string |
The value of tag N. |
FinanceJoshua |
| Ipv6CidrBlocks |
object |
||
| Ipv6CidrBlock |
array<object> |
The IPv6 CIDR block of the VPC. |
|
|
object |
|||
| Ipv6Isp |
string |
The type of IPv6 CIDR block. Valid values:
Note
If your Alibaba Cloud account is allowed to activate single-ISP bandwidth, you can set this parameter to ChinaTelecom,ChinaUnicom, or ChinaMobile. |
BGP |
| Ipv6CidrBlock |
string |
The IPv6 CIDR block of the VPC. |
2408:XXXX:0:a600::/56 |
| VSwitchIds |
object |
||
| VSwitchId |
array |
The vSwitches in the VPC. You can query up to 300 vSwitches in the VPC. The information about the latest vSwitches is returned. If you want to query the information about all vSwitches in a VPC, call the DescribeVSwitches operation. |
|
|
string |
The vSwitches in the VPC. You can query up to 300 vSwitches in the VPC. The information about the latest vSwitches is returned. If you want to query the information about all vSwitches in a VPC, call the DescribeVSwitches operation. |
vsw-bp1nhbnpv2blyz8dl**** |
|
| SecondaryCidrBlocks |
object |
||
| SecondaryCidrBlock |
array |
The information about the secondary CIDR block. |
|
|
string |
The secondary CIDR block of the VPC. |
192.168.20.0/24 |
|
| UserCidrs |
object |
||
| UserCidr |
array |
The list of user CIDR blocks. |
|
|
string |
The list of user CIDR blocks. |
10.0.0.0/8 |
|
| NatGatewayIds |
object |
||
| NatGatewayIds |
array |
The ID of the Internet NAT gateway. |
|
|
string |
The ID of the Internet NAT gateway. |
nat-245xxxftwt45bg**** |
|
| RouterTableIds |
object |
||
| RouterTableIds |
array |
The information about the route table. |
|
|
string |
The ID of the route table. |
vtb-bp1krxxzp0c29fmon**** |
|
| EnabledIpv6 |
boolean |
Indicates whether the IPv6 is enabled. Valid values:
|
false |
| DnsHostnameStatus |
string |
Indicates whether the Domain Name System (DNS) feature 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. |
| 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.