All Products
Search
Document Center

PolarDB:DescribeVpcs

Last Updated:Jun 10, 2026

Mengkueri satu atau beberapa VPC.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DescribeVpcs

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

ZoneId

string

No

ID zona.

Catatan

Anda dapat memanggil operasi DescribeRegions untuk mengkueri zona.

cn-hangzhou-i

Product

string

No

Nama layanan cloud.

VPN

PageSize

integer

No

Jumlah entri per halaman. Nilai valid:

  • 30

  • 50

  • 100

Nilai default: 30.

30

PageNumber

integer

No

Nomor halaman. Nilai harus berupa bilangan bulat yang lebih besar dari 0 dan tidak melebihi nilai maksimum tipe data integer. Nilai default: 1.

3

ResourceGroupId

string

No

ID kelompok sumber daya tempat VPC berada.

rg-acfmzh544n3j3bi

VpcId

string

No

ID VPC.

Catatan

Anda dapat memanggil operasi DescribeVpcs untuk mengkueri detail VPC.

vpc-*************

Elemen respons

Element

Type

Description

Example

object

PageNumber

integer

The page number of the returned page. The default value is 1.

2

PageSize

integer

The number of entries returned per page. Valid values:

  • 30

  • 50

  • 100

    30

50

RequestId

string

The request ID.

11FDB5A0-84F5-5361-B729-5770B0AEB9D5

TotalCount

integer

The total number of entries.

50

Vpcs

array<object>

A list of VPCs.

array<object>

The details of the VPC.

AliUid

string

The ID of the Alibaba Cloud account.

1868512340232755

Bid

string

Indicates whether the account is an Alibaba Finance Cloud account, an Alibaba Gov Cloud account, or a public cloud account.

26842

CidrBlock

string

The IPv4 CIDR block of the VPC.

57.100.6.59/32

GmtCreate

string

The time when the VPC was created.

2021-04-18T15:02:37Z

GmtModified

string

The time when the VPC was last modified.

2021-04-18T15:02:37Z

IsDefault

boolean

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

  • true: The VPC is the default VPC.

  • false: The VPC is not the default VPC.

true

RegionNo

string

The ID of the region to which the VPC belongs.

cn-chengdu-wt97-a01

Status

string

The status of the VPC. Valid values:

  • Pending: The VPC is being configured.

  • Available: The VPC is active.

Pending

VSwitchs

array<object>

A list of vSwitches.

object

The details of the vSwitch.

CidrBlock

string

The IPv4 CIDR block of the vSwitch.

47.118.126.0/25

GmtCreate

string

The time when the vSwitch was created.

2021-04-18T15:02:37Z

GmtModified

string

The time when the vSwitch was last modified.

2021-04-18T15:02:37Z

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.

false

IzNo

string

The zone to which the vSwitch belongs.

cn-shenzhen-f

Status

string

The status of the vSwitch. Valid values:

  • Pending: The vSwitch is being configured.

  • Available: The vSwitch is active.

Pending

VSwitchId

string

The ID of the vSwitch.

vsw-uf6fus5py6hbvxqwzwnk8

VSwitchName

string

The name of the vSwitch.

default-sw

VpcId

string

The ID of the VPC.

Catatan

You can call the DescribeVpcs operation to query the details of VPCs.

vpc-bp16efwqjzyumc23c647v

VpcName

string

The name of the VPC.

vpc-e2e-10341f3

Contoh

Respons sukses

JSONformat

{
  "PageNumber": 2,
  "PageSize": 50,
  "RequestId": "11FDB5A0-84F5-5361-B729-5770B0AEB9D5",
  "TotalCount": 50,
  "Vpcs": [
    {
      "AliUid": "1868512340232755",
      "Bid": "26842",
      "CidrBlock": "57.100.6.59/32",
      "GmtCreate": "2021-04-18T15:02:37Z\n",
      "GmtModified": "2021-04-18T15:02:37Z\n",
      "IsDefault": true,
      "RegionNo": "cn-chengdu-wt97-a01",
      "Status": "Pending",
      "VSwitchs": [
        {
          "CidrBlock": "47.118.126.0/25",
          "GmtCreate": "2021-04-18T15:02:37Z",
          "GmtModified": "2021-04-18T15:02:37Z",
          "IsDefault": false,
          "IzNo": "cn-shenzhen-f",
          "Status": "Pending",
          "VSwitchId": "vsw-uf6fus5py6hbvxqwzwnk8",
          "VSwitchName": "default-sw"
        }
      ],
      "VpcId": "vpc-bp16efwqjzyumc23c647v",
      "VpcName": "vpc-e2e-10341f3"
    }
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 PARAMETER_MUST_NOT_NULL Miss mandatory parameter.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.