All Products
Search
Document Center

Virtual Private Cloud:DescribeVpcAttribute

Last Updated:Aug 28, 2026

Queries the configuration of a virtual private cloud (VPC).

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

VpcId

string

Yes

The ID of the VPC that you want to query.

vpc-bp18sth14qii3pnv****

RegionId

string

Yes

The ID of the region where the VPC is deployed.

You can call DescribeRegions to query available regions.

cn-hangzhou

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: performs a dry run without executing the request. The system checks request syntax, parameter values, service limits, and permissions, but does not verify whether the specified resource exists. Returns the DryRunOperation error code if the check passes, or an error message if it fails.

  • false (default): executes the request. Returns a 2xx HTTP status code on success.

false

IsDefault

boolean

No

Specifies whether the VPC is the default VPC. Valid values:

  • false (default)

  • true

false

Response elements

Element

Type

Description

Example

object

The creation time of the VPC.

CreationTime

string

The time when the VPC was created.

2021-10-16T07:31:09Z

Status

string

The status of the VPC. Valid values:

  • Available

  • Pending

Available

VpcId

string

The ID of the VPC.

vpc-bp18sth14qii3pnvo****

IsDefault

boolean

Indicates whether the VPC is the default VPC. Valid values:

  • true

  • false (default)

false

ClassicLinkEnabled deprecated

boolean

Indicates whether the ClassicLink feature is enabled. Valid values:

  • true

  • false (default)

false

OwnerId

integer

The ID of the Alibaba Cloud account to which the VPC belongs.

28311773240248****

RegionId

string

The ID of the region to which the VPC belongs.

cn-hangzhou

VpcName

string

The name of the VPC.

doctest2

VRouterId

string

The ID of the vRouter that belongs to the VPC.

vrt-bp1jso6ng1at0ajsc****

DhcpOptionsSetStatus

string

The status of the DHCP options set. Valid values:

  • Available

  • InUse

  • Deleted

  • Pending

Available

CidrBlock

string

The IPv4 CIDR block of the VPC.

192.168.0.0/16

RequestId

string

The request ID.

7486AE4A-129D-43DB-A714-2432C074BA04

Description

string

The description of the VPC.

VPC

ResourceGroupId

string

The ID of the resource group.

rg-acfmxazbvgb4ph****

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

VSwitchIds

object

VSwitchId

array

The list of vSwitches deployed in the VPC.

string

The list of vSwitches deployed in the VPC.

{"VSwitchId": [ "vsw-bp14cagpfysr29feg****" ]}

UserCidrs

object

UserCidr

array

The user CIDR block. Multiple CIDR blocks are separated by commas (,). Up to three CIDR blocks are returned.

string

The user CIDR block. Multiple CIDR blocks are separated by commas (,). Up to three CIDR blocks are returned.

172.16.0.1/24

SecondaryCidrBlocks

object

SecondaryCidrBlock

array

The secondary IPv4 CIDR block of the VPC.

string

The secondary IPv4 CIDR block of the VPC.

192.168.0.0/16

AssociatedCens

object

AssociatedCen

array<object>

The CEN instances attached to the VPC.

Not returned if no CEN instance is attached.

object

The account ID of the CEN owner.

CenOwnerId

integer

The ID of the account to which the CEN instance belongs.

28311773240248****

CenId

string

The ID of the CEN instance to which the VPC is attached.

cen-7qthudw0ll6jmc****

CenStatus

string

The status of the CEN instance.

Attached is returned only when the VPC is attached to a CEN instance.

Attached

CloudResources

object

CloudResourceSetType

array<object>

The resources in the VPC.

object

The resource count in the VPC.

ResourceCount

integer

The number of resources in the VPC.

1

ResourceType

string

The type of resource deployed in the VPC. Valid values:

  • VSwitch

  • VRouter

  • RouteTable

VSwitch

Ipv6CidrBlocks

object

Ipv6CidrBlock

array<object>

The IPv6 CIDR block of the VPC.

object

Ipv6Isp

string

The IPv6 CIDR block type of the VPC. Valid values:

  • BGP (default)

  • ChinaMobile

  • ChinaUnicom

  • ChinaTelecom

Note

If you are allowed to use single-ISP bandwidth, valid values are ChinaTelecom, ChinaUnicom, and ChinaMobile.

BGP

Ipv6CidrBlock

string

The IPv6 CIDR block of the VPC.

2408:XXXX:0:6a::/56

SupportIpv4Gateway

boolean

Indicates whether the VPC supports IPv4 gateways.

  • true

  • false

true

Ipv4GatewayId

string

The ID of the IPv4 gateway.

ipv4gw-5tsnc6s4ogsedtp3k****

Tags

object

Tag

array<object>

The tags added to the VPC.

object

The tags.

Key

string

The key of tag N.

FinanceDept

Value

string

The value of tag N.

FinanceJoshua

AssociatedPropagationSources

object

AssociatedPropagationSources

array<object>

The route source associated with the VPC.

object

SourceType

string

The source type.

  • CEN

  • VPN

  • TR

  • ECR

CEN

SourceOwnerId

integer

The account ID of the source.

153980532164****

SourceInstanceId

string

The instance ID of the source.

cen-dc4vwznpwbobrl****

Status

string

The binding status.

  • Attaching

  • Attached

  • Detaching

Attaching

RoutePropagated

boolean

Indicates whether routes are advertised to the VPC.

true

EnabledIpv6

boolean

Indicates whether IPv6 is enabled for the VPC.

  • true

  • false

Valid values:

  • false :

    false

  • true :

    true

false

DnsHostnameStatus

string

Indicates whether the DNS hostname feature is enabled.

DISABLED

Examples

Success response

JSON format

{
  "CreationTime": "2021-10-16T07:31:09Z",
  "Status": "Available",
  "VpcId": "vpc-bp18sth14qii3pnvo****",
  "IsDefault": false,
  "ClassicLinkEnabled": false,
  "OwnerId": 0,
  "RegionId": "cn-hangzhou",
  "VpcName": "doctest2",
  "VRouterId": "vrt-bp1jso6ng1at0ajsc****",
  "DhcpOptionsSetStatus": "Available",
  "CidrBlock": "192.168.0.0/16",
  "RequestId": "7486AE4A-129D-43DB-A714-2432C074BA04",
  "Description": "VPC",
  "ResourceGroupId": "rg-acfmxazbvgb4ph****",
  "DhcpOptionsSetId": "dopt-o6w0df4epg9zo8isy****",
  "Ipv6CidrBlock": "2408:XXXX:0:a600::/56",
  "VSwitchIds": {
    "VSwitchId": [
      "{\"VSwitchId\": [ \"vsw-bp14cagpfysr29feg****\" ]}"
    ]
  },
  "UserCidrs": {
    "UserCidr": [
      "172.16.0.1/24"
    ]
  },
  "SecondaryCidrBlocks": {
    "SecondaryCidrBlock": [
      "192.168.0.0/16"
    ]
  },
  "AssociatedCens": {
    "AssociatedCen": [
      {
        "CenOwnerId": 0,
        "CenId": "cen-7qthudw0ll6jmc****",
        "CenStatus": "Attached"
      }
    ]
  },
  "CloudResources": {
    "CloudResourceSetType": [
      {
        "ResourceCount": 1,
        "ResourceType": "VSwitch"
      }
    ]
  },
  "Ipv6CidrBlocks": {
    "Ipv6CidrBlock": [
      {
        "Ipv6Isp": "BGP",
        "Ipv6CidrBlock": "2408:XXXX:0:6a::/56"
      }
    ]
  },
  "SupportIpv4Gateway": true,
  "Ipv4GatewayId": "ipv4gw-5tsnc6s4ogsedtp3k****",
  "Tags": {
    "Tag": [
      {
        "Key": "FinanceDept",
        "Value": "FinanceJoshua"
      }
    ]
  },
  "AssociatedPropagationSources": {
    "AssociatedPropagationSources": [
      {
        "SourceType": "CEN",
        "SourceOwnerId": 0,
        "SourceInstanceId": "cen-dc4vwznpwbobrl****",
        "Status": "Attaching",
        "RoutePropagated": true
      }
    ]
  },
  "EnabledIpv6": false,
  "DnsHostnameStatus": "DISABLED"
}

Error codes

HTTP status code

Error code

Error message

Description

400 IncorrectVpcStatus Current VPC status does not support this operation.
400 Forbidden.VpcNotFound Specified VPC does not exist.
500 InternalError The request processing has failed due to some unknown error.
404 InvalidVpcId.NotFound Specified VPC does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.