All Products
Search
Document Center

Virtual Private Cloud:DescribeVpcs

Last Updated:Oct 19, 2026

Queries created VPCs.

Operation description

The DescribeVpcs operation may return the Throttling.DeepPageSkip error code during frequent deep paging and page skipping. Reduce the query frequency or use sequential paging.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:DescribeVpcs

list

VPC

acs:vpc:{#regionId}:{#accountId}:vpc/*

VPC

acs:vpc:{#regionId}:{#accountId}:vpc/{#VPCId}

  • vpc:tag
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 region IDs.

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:

  • true (default): Queries the default VPC in the specified region.

  • false: Does not query the default VPC.

false

DryRun

boolean

No

Specifies whether to perform a dry run for the request. Valid values:

  • true: Sends a check request and does not query the resource status. The system checks whether your AccessKey pair is valid, whether the Resource Access Management (RAM) user has authorization, and whether required parameters are specified. If the check fails, the system returns an error. If the check succeeds, the system returns the DryRunOperation error code.

  • false (default): Sends a normal request and queries the resource status after the check succeeds and an HTTP 2xx status code is returned.

false

ResourceGroupId

string

No

The ID of the resource group to which the VPC belongs.

rg-acfmxvfvazb4p****

PageNumber

integer

No

The page number of the list. 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.

253460731706911258

DhcpOptionsSetId

string

No

The ID of the DHCP options set.

dopt-o6w0df4epg9zo8isy****

EnableIpv6

boolean

No

Specifies whether to query VPCs for which IPv6 CIDR blocks are enabled in the specified region. By default, this parameter is empty, which means VPCs are not filtered based on whether IPv6 CIDR blocks are enabled. Valid values:

  • false: IPv6 CIDR blocks are not enabled.

  • true: IPv6 CIDR blocks are enabled.

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. If you specify this parameter, you cannot specify an empty string.

A tag key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

FinanceDept

Value

string

No

The tag value of the resource. You can specify up to 20 tag values. If you specify this parameter, you can specify an empty string.

A tag value can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

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 of the list.

1

TotalCount

integer

The total number of entries.

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. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format.

2021-04-18T15:02:37Z

Status

string

The status of the VPC. Valid values:

  • Pending: The VPC is being configured.

  • Available: The VPC is available.

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:

  • true: The VPC is the default VPC in the region.

  • false: The VPC is not the default VPC in the region.

false

OwnerId

integer

The Alibaba Cloud account ID of 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.

vrt-bp1jcg5cmxjbl9xgc****

DhcpOptionsSetStatus

string

The status of the DHCP options set. Valid values:

  • Available: The DHCP options set is available.

  • InUse: The DHCP options set is in use.

  • Deleted: The DHCP options set is deleted.

  • Pending: The DHCP options set is being configured.

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 the Cloud Enterprise Network (CEN). This parameter returns Attached 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 attached to the VPC.

FinanceDept

Value

string

The tag value attached to 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:

  • BGP: Alibaba Cloud BGP IPv6.

  • ChinaMobile: China Mobile (single line).

  • ChinaUnicom: China Unicom (single line).

  • ChinaTelecom: China Telecom (single line).

Note

If you are added to the single-line bandwidth whitelist, 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 list of vSwitches in the queried VPC.

You can query up to 300 most recently created vSwitches in the VPC. To query all vSwitches in the VPC, call the DescribeVSwitches operation.

string

The list of vSwitches in the queried VPC.

You can query up to 300 most recently created vSwitches in the VPC. 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 CIDR blocks.

string

The list of user 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: IPv6 is disabled.

  • true: IPv6 is enabled.

false

DnsHostnameStatus

string

Indicates whether the 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.