All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeVpcsForMongoDB

Last Updated:Dec 26, 2025

Queries a paginated list of VPCs.

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

RegionId

string

No

The region ID.

cn-hangzhou

ZoneId

string

No

The zone ID.

cn-hangzhou-h

PageNumber

integer

No

The page number. The value must be an integer greater than 0. The default value is 1.

1

PageSize

integer

No

The number of entries to return on each page. The value must be an integer greater than 0. The default value is 50.

10

ResourceGroupId

string

No

The resource group ID.

rg-acfmyiu4ekp****

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of entries.

4

Vpcs

array<object>

The list of VPCs.

array<object>

Status

string

The status of the VPC. A value of Available indicates that the VPC is active.

Available

VpcName

string

The name of the VPC.

vpc-name

VpcId

string

The VPC ID.

vpc-2zep2pepkthg5ueal****

IsDefault

boolean

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

  • true: The VPC is the default one.

  • false: The VPC is not the default one.

Valid values:

  • true :

    true

  • false :

    false

true

CidrBlock

string

The CIDR block of the VPC.

10.**.**.**/24

RegionNo

string

The region ID.

cn-hangzhou

GmtCreate

string

This parameter is deprecated. No value is returned.

null

AliUid

string

This parameter is deprecated. No value is returned.

null

VSwitchs

array<object>

The list of vSwitches.

object

Status

string

The status of the vSwitch. A value of Available indicates that the vSwitch is active.

Available

VSwitchId

string

The vSwitch ID.

vsw-bp*******************

IsDefault

boolean

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

  • true: The vSwitch is the default vSwitch.

  • false: The vSwitch is not the default vSwitch.

Valid values:

  • true :

    true

  • false :

    false

true

CidrBlock

string

The CIDR block of the vSwitch.

10.**.**.**/28

GmtCreate

string

This parameter is deprecated. No value is returned.

null

GmtModified

string

This parameter is deprecated. No value is returned.

null

IzNo

string

The zone to which the vSwitch belongs.

cn-hangzhou-i

VSwitchName

string

The name of the vSwitch.

vsw-name

GmtModified

string

This parameter is deprecated. No value is returned.

null

Bid

string

This parameter is deprecated. No value is returned.

null

RequestId

string

The request ID.

53924AF0-1628-5AA2-9C95-D4**********

PageSize

integer

The number of entries returned per page.

10

PageNumber

integer

The page number.

1

Examples

Success response

JSON format

{
  "TotalCount": 4,
  "Vpcs": [
    {
      "Status": "Available",
      "VpcName": "vpc-name",
      "VpcId": "vpc-2zep2pepkthg5ueal****",
      "IsDefault": true,
      "CidrBlock": "10.**.**.**/24",
      "RegionNo": "cn-hangzhou",
      "GmtCreate": "null",
      "AliUid": "null",
      "VSwitchs": [
        {
          "Status": "Available",
          "VSwitchId": "vsw-bp*******************",
          "IsDefault": true,
          "CidrBlock": "10.**.**.**/28",
          "GmtCreate": "null",
          "GmtModified": "null",
          "IzNo": "cn-hangzhou-i",
          "VSwitchName": "vsw-name"
        }
      ],
      "GmtModified": "null",
      "Bid": "null"
    }
  ],
  "RequestId": "53924AF0-1628-5AA2-9C95-D4**********",
  "PageSize": 10,
  "PageNumber": 1
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.