All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeDBInstances

Last Updated:Jun 10, 2026

Mengkueri daftar instans MongoDB.

Deskripsi operasi

By default, this operation queries a list of replica set instances, which includes standalone instances. If you do not specify the DBInstanceType request parameter, the default value is replicate. To query a list of sharded cluster instances, set DBInstanceType to sharding.

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

dds:DescribeDBInstances

get

*Instance

acs:dds:{#regionId}:{#accountId}:dbinstance/*

*Instance

acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

No

ID wilayah. Anda dapat memanggil operasi DescribeRegions untuk mengkueri ID wilayah.

cn-hangzhou

PageNumber

integer

No

Nomor halaman. Nilai harus lebih besar dari 0 dan tidak lebih besar dari nilai maksimum tipe data integer. Nilai default: 1.

1

PageSize

integer

No

Jumlah entri yang dikembalikan pada setiap halaman. Nilai valid:

  • 30 (default)

  • 50

  • 100.

30

DBInstanceId

string

No

ID instans.

dds-bp199659b178****

ReplicationFactor

string

No

Jumlah node dalam instans replica set. Nilai valid:

  • 3

  • 5

  • 7.

3

DBInstanceDescription

string

No

Nama instans. Nama harus memenuhi persyaratan berikut:

  • Harus dimulai dengan karakter Cina atau huruf.

  • Dapat berisi digit, karakter Cina, huruf, garis bawah (_), dan tanda hubung (-).

  • Panjangnya harus 2 hingga 256 karakter.

测试数据库

ExpireTime

string

No

Waktu kedaluwarsa instans. Pengatur waktu dalam format yyyy-MM-ddTHH:mm:ssZ. Waktu ditampilkan dalam UTC. Parameter ini digunakan untuk memfilter instans yang kedaluwarsa pada atau sebelum waktu yang ditentukan.

2019-12-26T16:00:00Z

DBInstanceStatus

string

No

Status instans. Untuk informasi lebih lanjut, lihat Status instans. Format lihat dokumentasi terkait.

Running

DBInstanceType

string

No

Arsitektur instans. Nilai valid:

  • sharding: instans kluster sharded.

  • replicate: instans replica set atau instans mandiri. Ini adalah nilai default.

  • .

sharding

DBInstanceClass

string

No

Tipe instans. Untuk informasi lebih lanjut tentang format dan daftar lengkapnya, lihat Tipe instans.

dds.mongo.mid

Engine

string

No

Mesin database. Tetapkan nilai ke MongoDB.

MongoDB

EngineVersion

string

No

Versi mesin database. Nilai valid:

  • 7.0

  • 6.0

  • 5.0

  • 4.4

  • 4.2

  • 4.0

  • 3.4.

4.0

NetworkType

string

No

Jenis jaringan instans. Nilai valid:

  • Classic: jaringan klasik.

  • VPC: virtual private cloud (VPC).

VPC

VpcId

string

No

ID VPC.

vpc-bp1n3i15v90el48nx****

VSwitchId

string

No

ID vSwitch VPC.

vsw-bp1vj604nj5a9zz74****

ChargeType

string

No

Metode penagihan instans. Nilai valid:

  • PrePaid: langganan.

  • PostPaid: bayar sesuai pemakaian.

PrePaid

ZoneId

string

No

ID zona. Anda dapat memanggil operasi DescribeRegions untuk mengkueri ID zona.

cn-hangzhou-b

Expired

string

No

Status kedaluwarsa instans. Nilai valid:

  • true: Instans telah kedaluwarsa.

  • false: Instans belum kedaluwarsa.

true

ConnectionDomain

string

No

Titik akhir node. Anda dapat memanggil operasi DescribeDBInstanceAttribute untuk mengkueri titik akhir.

dds-bp1ea17b41abecf43****.mongodb.rds.aliyuncs.com

ResourceGroupId

string

No

ID kelompok sumber daya.

rg-acfmyiu4ekp****

Tag

array<object>

No

Tag instans.

object

No

Key

string

No

The key of tag N. The value of N must be in the range of 1 to 20.

  • The tag key cannot start with aliyun, acs:, http://, or https://.

  • The tag key can be up to 64 characters in length.

  • The tag key cannot be an empty string.

testdatabase

Value

string

No

The value of tag N. The value of N must be in the range of 1 to 20.

  • The tag value cannot start with aliyun, acs:, http://, or https://.

  • The tag value can be up to 128 characters in length.

  • The tag value can be an empty string.

apitest

DBNodeType

string

No

Memfilter instans berdasarkan tipe. Nilai valid:

  1. customized: instans mandiri dan instans DBFS.

  2. standard: instans standar, yang mencakup instans replica set dan kluster sharded.

  3. default: semua instans.

default

Elemen respons

Element

Type

Description

Example

object

TotalCount

integer

The number of instances returned.

5

RequestId

string

The request ID.

0E4FE33F-5510-5758-8FA7-A6672CDE****

PageSize

integer

The number of entries returned per page.

30

PageNumber

integer

The page number.

1

DBInstances

object

DBInstance

array<object>

The details of the instances.

array<object>

CreationTime

string

The time when the instance was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-03-25T02:18:00Z

ChargeType

string

The billing method of the instance. Valid values:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

PrePaid

Tags

object

Tag

array<object>

The details of the resource tags.

object

The details of the resource tags.

Key

string

The tag key.

test

Value

string

The tag value.

api

VpcAuthMode

string

Indicates whether password-free access over a VPC is enabled. Valid values:

  • Open: enabled.

  • Close: disabled.

Close

NetworkType

string

The network type of the instance. Valid values:

  • Classic: classic network.

  • VPC: VPC.

Classic

LockMode

string

The lock status of the instance. Valid values:

  • Unlock: The instance is not locked.

  • ManualLock: The instance is manually locked.

  • LockByExpiration: The instance is automatically locked due to expiration.

  • LockByRestoration: The instance is automatically locked before a rollback.

  • LockByDiskQuota: The instance is automatically locked because the storage space is full.

  • Released: The instance is released. In this state, the instance cannot be unlocked. You can only create a new instance from a backup file. The restoration process may take a long time.

Unlock

EngineVersion

string

The database engine version. Valid values:

  • 7.0

  • 6.0

  • 5.0

  • 4.4

  • 4.2

  • 4.0

  • 3.4

4.2

MongosList

object

MongosAttribute

array<object>

The details of the Mongos nodes.

Catatan

This parameter is returned only for sharded cluster instances.

object

The details of the Mongos nodes.

Catatan

This parameter is returned only for sharded cluster instances.

NodeClass

string

The instance type of the Mongos node.

dds.mongos.standard

NodeDescription

string

The description of the Mongos node.

测试mongos节点

NodeId

string

The ID of the Mongos node.

s-bp10e3b0d02f****

DBInstanceDescription

string

The description of the instance.

测试数据库

ExpireTime

string

The time when the instance expires. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

2021-11-25T16:00Z

DBInstanceType

string

The instance architecture. Valid values:

  • sharding: sharded cluster instance.

  • replicate: replica set or standalone instance.

sharding

LastDowngradeTime

string

The last time when the instance was downgraded.

2021-05-08

ShardList

object

ShardAttribute

array<object>

The details of the shard nodes.

Catatan

This parameter is returned only for sharded cluster instances.

object

The details of the shard nodes.

Catatan

This parameter is returned only for sharded cluster instances.

NodeClass

string

The instance type of the shard node.

dds.shard.mid

NodeDescription

string

The description of the shard node.

测试shard节点

NodeStorage

integer

The storage space of the shard node. Unit: GB.

10

NodeId

string

The ID of the shard node.

d-bp1cac6f2083****

ReadonlyReplicas

integer

The number of read-only nodes in the shard node. The value can be an integer from 0 to 5.

2

DestroyTime

string

The time when the data of the instance is destroyed. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Catatan
  • For a subscription instance, its computing resources are released on the 16th day after the instance expires. The data is retained for another 7 days. On the 23rd day, the data is deleted and cannot be recovered.

  • For a pay-as-you-go instance, its computing resources are released on the 16th day after its payment becomes overdue. The data is retained for another 7 days. On the 23rd day, the data is deleted and cannot be recovered.

2021-12-10T16:00:00Z

DBInstanceStatus

string

The instance status. For more information, see Instance states.

Running

RegionId

string

The region ID of the instance.

cn-hangzhou

DBInstanceStorage

integer

The storage space of the instance.

20

ResourceGroupId

string

The resource group ID.

rg-acfmyiu4ekp****

ZoneId

string

The zone ID of the instance.

cn-hangzhou-g

DBInstanceId

string

The instance ID.

dds-bp18b0934e70****

DBInstanceClass

string

The instance type.

dds.mongo.mid

Engine

string

The database engine.

MongoDB

ReplicationFactor

string

The number of nodes in the instance.

Catatan

This parameter is returned only for replica set instances.

3

KindCode

string

The type of the instance. Valid values:

  • 0: physical server.

  • 1: ECS.

  • 2: Docker.

  • 18: instance on the new Kubernetes-based architecture.

1

CapacityUnit

string

The read and write throughput consumed by the instance.

Catatan

This parameter is returned only for serverless instances.

100

StorageType

string

The storage type. Valid values:

  • cloud_essd: ESSD cloud disk.

  • local_ssd: local SSD.

local_ssd

SecondaryZoneId

string

实现多可用区部署时,实例的备可用区 1,取值说明:

  • cn-hangzhou-g:杭州可用区 G。

  • cn-hangzhou-h:杭州可用区 H。

  • cn-hangzhou-i:杭州可用区 I。

  • cn-hongkong-b:香港可用区 B。

  • cn-hongkong-c:香港可用区 C。

  • cn-hongkong-d:香港可用区 D。

  • cn-wulanchabu-a:乌兰察布可用区 A。

  • cn-wulanchabu-b:乌兰察布可用区 B。

  • cn-wulanchabu-c:乌兰察布可用区 C。

  • ap-southeast-1a:新加坡可用区 A。

  • ap-southeast-1b:新加坡可用区 B。

  • ap-southeast-1c:新加坡可用区 C。

  • ap-southeast-5a:雅加达可用区 A。

  • ap-southeast-5b:雅加达可用区 B。

  • ap-southeast-5c:雅加达可用区 C。

  • eu-central-1a:法兰克福可用区 A。

  • eu-central-1b:法兰克福可用区 B。

  • eu-central-1c:法兰克福可用区 C。

Catatan
  • 当实例为 4.4 或 5.0 版本的多可用区副本集实例或分片集群实例时,返回该参数。

  • 目前仅中国站支持返回该参数。

cn-hangzhou-i

HiddenZoneId

string

实现多可用区部署时,实例的备可用区 2,取值说明:

  • cn-hangzhou-g:杭州可用区 G。

  • cn-hangzhou-h:杭州可用区 H。

  • cn-hangzhou-i:杭州可用区 I。

  • cn-hongkong-b:香港可用区 B。

  • cn-hongkong-c:香港可用区 C。

  • cn-hongkong-d:香港可用区 D。

  • cn-wulanchabu-a:乌兰察布可用区 A。

  • cn-wulanchabu-b:乌兰察布可用区 B。

  • cn-wulanchabu-c:乌兰察布可用区 C。

  • ap-southeast-1a:新加坡可用区 A。

  • ap-southeast-1b:新加坡可用区 B。

  • ap-southeast-1c:新加坡可用区 C。

  • ap-southeast-5a:雅加达可用区 A。

  • ap-southeast-5b:雅加达可用区 B。

  • ap-southeast-5c:雅加达可用区 C。

  • eu-central-1a:法兰克福可用区 A。

  • eu-central-1b:法兰克福可用区 B。

  • eu-central-1c:法兰克福可用区 C。

Catatan
  • 当实例为 4.4 或 5.0 版本的多可用区副本集实例或分片集群实例时,返回该参数。

  • 目前仅中国站支持返回该参数。

cn-hangzhou-h

BackupRetentionPolicy

integer

The backup retention policy. Valid values:

  • 0: All backup sets are immediately deleted when the instance is released.

  • 1: An automatic backup is performed when the instance is released, and this backup set is retained for a long time.

  • 2: An automatic backup is performed when the instance is released, and all backup sets of the cluster are retained for a long time.

1

ReleaseTime

string

The release time of the instance.

2024-06-17T07:01Z

Contoh

Respons sukses

JSONformat

{
  "TotalCount": 5,
  "RequestId": "0E4FE33F-5510-5758-8FA7-A6672CDE****",
  "PageSize": 30,
  "PageNumber": 1,
  "DBInstances": {
    "DBInstance": [
      {
        "CreationTime": "2021-03-25T02:18:00Z",
        "ChargeType": "PrePaid",
        "Tags": {
          "Tag": [
            {
              "Key": "test",
              "Value": "api"
            }
          ]
        },
        "VpcAuthMode": "Close",
        "NetworkType": "Classic",
        "LockMode": "Unlock",
        "EngineVersion": "4.2",
        "MongosList": {
          "MongosAttribute": [
            {
              "NodeClass": "dds.mongos.standard",
              "NodeDescription": "测试mongos节点",
              "NodeId": "s-bp10e3b0d02f****"
            }
          ]
        },
        "DBInstanceDescription": "测试数据库",
        "ExpireTime": "2021-11-25T16:00Z",
        "DBInstanceType": "sharding",
        "LastDowngradeTime": "2021-05-08",
        "ShardList": {
          "ShardAttribute": [
            {
              "NodeClass": "dds.shard.mid",
              "NodeDescription": "测试shard节点",
              "NodeStorage": 10,
              "NodeId": "d-bp1cac6f2083****",
              "ReadonlyReplicas": 2
            }
          ]
        },
        "DestroyTime": "2021-12-10T16:00:00Z",
        "DBInstanceStatus": "Running",
        "RegionId": "cn-hangzhou",
        "DBInstanceStorage": 20,
        "ResourceGroupId": "rg-acfmyiu4ekp****",
        "ZoneId": "cn-hangzhou-g",
        "DBInstanceId": "dds-bp18b0934e70****",
        "DBInstanceClass": "dds.mongo.mid",
        "Engine": "MongoDB",
        "ReplicationFactor": "3",
        "KindCode": "1",
        "CapacityUnit": "100",
        "StorageType": "local_ssd",
        "BackupRetentionPolicy": 1,
        "ReleaseTime": "2024-06-17T07:01Z"
      }
    ]
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.