All Products
Search
Document Center

Virtual Private Cloud:DescribeVpcs

Last Updated:Aug 21, 2026

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

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 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:

  • 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. Valid values:

  • true: performs a dry run. The system checks the request for potential issues, including invalid AccessKey pairs, unauthorized Resource Access Management (RAM) users, and missing parameter values. If the request fails the dry run, the corresponding error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.

  • false (default): sends a Normal request, and the resource status is directly queried after the request passes the authorization check. 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. 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: IPv6 is not enabled.

  • true: IPv6 is 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. The tag key cannot be an empty string.

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

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 aliyun or acs:. It cannot contain http:// or https://.

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:

  • Pending: being configured.

  • Available: 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 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: available.

  • InUse: in use.

  • Deleted: deleted.

  • Pending: 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 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:

  • BGP: Alibaba Cloud BGP IPv6.

  • ChinaMobile: China Mobile (single-ISP).

  • ChinaUnicom: China Unicom (single-ISP).

  • ChinaTelecom: China Telecom (single-ISP).

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: IPv6 is not enabled.

  • true: IPv6 is enabled.

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.