Queries the details of virtual private clouds (VPCs) within a specified region or zone.

Description

When you create an AnalyticDB for PostgreSQL instance, you can call this operation to query the available VPCs within a specified region or zone.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered and may affect your business. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeRdsVpcs

The operation that you want to perform. Set the value to DescribeRdsVpcs.

RegionId String No cn-hangzhou

The ID of the region.

Note You can call the DescribeRegions operation to query the most recent region list.
ZoneId String No cn-hangzhou-h

The ID of the zone.

Response parameters

Parameter Type Example Description
Vpcs Object

Details of the VPCs.

Vpc Array of Vpc

Details of the VPC.

Status String Available

The state of the VPC. If Available is returned, the VPC is available.

VpcName String vpc-name

The name of the VPC.

VpcId String vpc-bp*******************

The ID of VPC.

IsDefault Boolean true

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

  • true
  • false
CidrBlock String 10.**.**.0/8

The CIDR block of the VPC.

RegionNo String cn-hangzhou

The ID of the region.

GmtCreate String null

An invalid parameter. It is no longer returned when you call this operation.

AliUid String null

An invalid parameter. It is no longer returned when you call this operation.

VSwitchs Array of VSwitch

Details of the vSwitches.

Status String Available

The state of the vSwitch. If Available is returned, the vSwitch is available.

VSwitchId String vsw-bp*******************

The ID of the vSwitch.

IsDefault Boolean true

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

  • true
  • false
CidrBlock String 10.**.**.0/24

The CIDR block of the vSwitch.

GmtCreate String null

An invalid parameter. It is no longer returned when you call this operation.

GmtModified String null

An invalid parameter. It is no longer returned when you call this operation.

IzNo String cn-hangzhou-i

The ID of the zone to which the vSwitch belongs.

VSwitchName String vsw-name

The name of the vSwitch.

GmtModified String null

An invalid parameter. It is no longer returned when you call this operation.

Bid String null

An invalid parameter. It is no longer returned when you call this operation.

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

The ID of the request.

Examples

Sample requests

http(s)://gpdb.aliyuncs.com/?Action=DescribeRdsVpcs
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeRdsVpcsResponse>
    <Vpcs>
        <Vpc>
            <IsDefault>false</IsDefault>
            <RegionNo>cn-hangzhou</RegionNo>
            <VSwitchs>
                <Status>Available</Status>
                <IsDefault>false</IsDefault>
                <IzNo>cn-hangzhou-h</IzNo>
                <VSwitchId>vsw-bp*******************</VSwitchId>
                <CidrBlock>10.**.**.0/24</CidrBlock>
                <VSwitchName>vsw-name</VSwitchName>
            </VSwitchs>
            <VpcId>vpc-bp*******************</VpcId>
            <CidrBlock>10.**.**.0/8</CidrBlock>
            <VpcName>vpc-name</VpcName>
        </Vpc>
        <Vpc>
            <IsDefault>true</IsDefault>
            <RegionNo>cn-hangzhou</RegionNo>
            <VSwitchs>
                <Status>Available</Status>
                <IsDefault>true</IsDefault>
                <IzNo>cn-hangzhou-h</IzNo>
                <VSwitchId>vsw-bp*******************</VSwitchId>
                <CidrBlock>172.**.**.0/20</CidrBlock>
                <VSwitchName/>
            </VSwitchs>
            <VpcId>vpc-bp*******************</VpcId>
            <CidrBlock>172.**.**.0/16</CidrBlock>
            <VpcName>Private</VpcName>
        </Vpc>
    </Vpcs>
    <RequestId>53924AF0-1628-5AA2-9C95-D4**********</RequestId>
</DescribeRdsVpcsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Vpcs" : {
    "Vpc" : [ {
      "IsDefault" : false,
      "RegionNo" : "cn-hangzhou",
      "VSwitchs" : [ {
        "Status" : "Available",
        "IsDefault" : false,
        "IzNo" : "cn-hangzhou-h",
        "VSwitchId" : "vsw-bp*******************",
        "CidrBlock" : "10.**.**.0/24",
        "VSwitchName" : "vsw-name"
      } ],
      "VpcId" : "vpc-bp*******************",
      "CidrBlock" : "10.**.**.0/8",
      "VpcName" : "vpc-name"
    }, {
      "IsDefault" : true,
      "RegionNo" : "cn-hangzhou",
      "VSwitchs" : [ {
        "Status" : "Available",
        "IsDefault" : true,
        "IzNo" : "cn-hangzhou-h",
        "VSwitchId" : "vsw-bp*******************",
        "CidrBlock" : "172.**.**.0/20",
        "VSwitchName" : ""
      } ],
      "VpcId" : "vpc-bp*******************",
      "CidrBlock" : "172.**.**.0/16",
      "VpcName" : "Private"
    } ]
  },
  "RequestId" : "53924AF0-1628-5AA2-9C95-D4**********"
}

Error codes

For a list of error codes, visit the API Error Center.