You can call this operation to query the list of MongoDB instances.

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 No DescribeDBInstances

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

PageNumber Integer No 1

The number of the page. Valid values: any non-zero positive Integer. Default value:1.

PageSize Integer No 30

The number of records on each page. Valid values: 30, 50, and 100. Default value: 30.

DBInstanceId String No dds-bpxxxxxxxx

The ID of the instance.

ReplicationFactor String No 3

The number of nodes in a replica set instance. Valid values: 3, 5, and 7.

DBInstanceDescription String No Test database

The description or remarks of the instance.

DBInstanceStatus String No ACTIVATION

The status information of the instance. For more information about valid values, see Instance states.

DBInstanceType String No Replicate

The instance type. Valid values:

  • sharding: sharded cluster instances.
  • replicate: replica set or standalone instances. This is the default value.
DBInstanceClass String No dds.mongo.mid

The instance type. For more information about valid values, see Instance types.

Engine String No MongoDB

The database engine. Valid value: MongoDB.

EngineVersion String No 4.0

The database version of the instance. Valid values: 3.2, 3.4 or 4.0.

NetworkType String No VPC

The network type of the instances. Valid values:

  • Classic
  • VPC
VpcId String No vpc-bpxxxxxxxx

The VPC ID of the cluster endpoint.

VSwitchId String No vsw-bpxxxxxxxx

The VSwitch ID of the VPC.

ChargeType String No PrePaid

The billing method of the instance. Valid values:

  • PrePaid: monthly or yearly subscription.
  • PostPaid: pay-as-you-go.
ZoneId String No cn-hangzhou-b

The ID of the zone.

Tag.N.Key String No testdatabase

The key of the tag. Valid values of N: 1 to 20. It can be up to 64 characters in length. It cannot begin with aliyun, acs:, http://, or https://.

Note It cannot be an empty string.
Tag.N.Value String No apitest

The value of the tag. Valid values of N: 1 to 20. It can be a maximum of 128 characters in length. It cannot start with aliyun, acs:, http://, or https://.

Note Tag.N.Value can be an empty string.
ExpireTime String No 2019-12-26T16:00Z

The expiration time of the instance.

Expired String No true

Specifies whether the instance is expired. Valid values:

  • True: expired.
  • False: not expired.

Response parameters

Parameter Type Example Description
RequestId String A10B8ECB-0BA0-4EC6-93A5-C65FDEDA07CB

The ID of the request.

PageNumber Integer 1

The number of the page.

PageSize Integer 30

The number of records to display on each page

TotalCount Integer 1

The number of the instances in the query results.

DBInstances Array

The list of the instances.

ResourceGroupId String rg-axxxxxxxx

The ID of the resource group.

DBInstanceId String dds-bpxxxxxxxx

The ID of the instance whose description is modified.

DBInstanceDescription String Test database

The description or remarks of the instance.

RegionId String cn-hangzhou

The region ID of the instance.

ZoneId String cn-hangzhou-b

The ID of the zone to which the instance belongs.

Engine String MongoDB

The database engine used by a parameter template.

EngineVersion String 4.0

The version of the database.

DBInstanceClass String dds.mongo.mid

The instance type.

DBInstanceStorage Integer 20

The storage space of the instance.

DBInstanceStatus String Running

The status of the instance. For more information, see Instance status table.

LockMode String Unlock

The lock status of the instance.

  • Unlock: The instance is not locked.
  • ManualLock: The instance has been manually locked.
  • LockByExpiration: The instance has been locked because it has expired.
  • LockByRestoration: The instance has been locked before rollback.
  • LockByDiskQuota: The instance has been locked because its capacity is full.
  • Released: The instance has been released. When the instance is in the released state, it cannot be unlocked. If you want to restore the instance, you can only use backup data to create a new instance. Creating an instance from backup data takes a long time.
ChargeType String PostPaid

The billing method of the instance.

  • PrePaid: monthly or yearly subscription.
  • PostPaid: pay-as-you-go.
NetworkType String VPC

The network type of the read-only storage instance.

  • Classic: Classic network type.
  • VPC: VPC network type.
CreationTime String 2018-09-25T06:33:07Z

The time when the instance was created, in the format of yyyy-MM-dd T HH:mm:ss z(UTC time).

ExpireTime String 2019-11-25T16:00Z

The expiration time of the instance. The format is: yyyy-MM-dd T HH:mm z(UTC time).

DBInstanceType String sharding

The instance type.

  • sharding: the sharded cluster instance.
  • replicate: replica set instances.
LastDowngradeTime String 2019-03-08

The last time the instance was downgraded.

ReplicationFactor String 3

The number of the nodes in the instance.

Note This parameter is returned when the instance is a replica set instance.
DestroyTime String 2019-03-05T11:26:02Z

Instance data destruction time, in the format of yyyy-MM-dd T HH:mm:ss z(UTC time).

Note
  • Subscription instances will be released seven days after expiration. The data of released instances will be deleted and cannot be recovered.
  • Pay-as-you-go instances will be locked when the payment is overdue for more than 24 hours. The instance will be released when it is overdue for more than seven days. The data of released instances will be deleted and cannot be recovered.
VpcAuthMode String Close

Indicates whether the password-free access to VPC is enabled. Valid values:

  • Open: enabled
  • Close: closed.
MongosList Array

The list of mongos.

Note This parameter is returned when the instance is a sharded cluster instance.
NodeId String s-bpxxxxxxxx

The ID of the mongos.

NodeDescription String Test mongos

The description of the mongos.

NodeClass String dds.mongos.mid

The instance type of the shard.

ShardList Array

The list of shards.

Note This parameter is returned when the instance is a sharded cluster instance.
NodeId String d-bpxxxxxxxx

The ID of the shard.

NodeDescription String Test shard node

The description of the shard.

NodeClass String dds.shard.mid

The instance type of the shard nodes.

NodeStorage Integer 20

The storage space of the shard. Unit: GB.

Tags Array

The resource tag information list.

Key String test

The tag key of the resource.

Value String api

The tag value of the resource.

Examples

Sample requests

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

Successful response examples

XML format

<PageNumber>1</PageNumber>
<TotalCount>1</TotalCount>
<PageSize>30</PageSize>
<RequestId>D1FF92B8-3714-4182-BA0B-D04F917F0463</RequestId>
<DBInstances>
    <DBInstance>
        <ChargeType>PostPaid</ChargeType>
        <LockMode>Unlock</LockMode>
        <DBInstanceClass>dds.mongo.logic</DBInstanceClass>
        <ResourceGroupId>rg-acxxxxxxxx</ResourceGroupId>
        <DBInstanceId>dds-bpxxxxxxxx</DBInstanceId>
        <ZoneId>cn-hangzhou-i</ZoneId>
        <MongosList>
            <MongosAttribute>
                <NodeId>s-bpxxxxxxxx</NodeId>
                <NodeClass>dds.mongos.mid</NodeClass>
            </MongosAttribute>
            <MongosAttribute>
                <NodeId>s-bpxxxxxxxx</NodeId>
                <NodeClass>dds.mongos.mid</NodeClass>
            </MongosAttribute>
        </MongosList>
        <DBInstanceDescription>testdata</DBInstanceDescription>
        <Engine>MongoDB</Engine>
        <CreationTime>2019-11-23T03:08:01Z</CreationTime>
        <Tags>
        </Tags>
        <NetworkType>VPC</NetworkType>
        <ExpireTime>2999-09-08T16:00Z</ExpireTime>
        <DBInstanceType>sharding</DBInstanceType>
        <RegionId>cn-hangzhou</RegionId>
        <ShardList>
            <ShardAttribute>
                <NodeId>d-bpxxxxxxxx</NodeId>
                <NodeClass>dds.shard.standard</NodeClass>
                <NodeStorage>10</NodeStorage>
            </ShardAttribute>
            <ShardAttribute>
                <NodeId>d-bpxxxxxxxx</NodeId>
                <NodeClass>dds.shard.standard</NodeClass>
                <NodeStorage>10</NodeStorage>
            </ShardAttribute>
        </ShardList>
        <EngineVersion>4.2</EngineVersion>
        <DBInstanceStatus>Running</DBInstanceStatus>
    </DBInstance>
</DBInstances>

JSON format

{
    "PageNumber": 1,
    "TotalCount": 1,
    "PageSize": 30,
    "RequestId": "D1FF92B8-3714-4182-BA0B-D04F917F0463",
    "DBInstances": {
        "DBInstance": [
            {
                "ChargeType": "PostPaid",
                "LockMode": "Unlock",
                "DBInstanceClass": "dds.mongo.logic",
                "ResourceGroupId": "rg-acxxxxxxxx",
                "DBInstanceId": "dds-bpxxxxxxxx",
                "ZoneId": "cn-hangzhou-i",
                "MongosList": {
                    "MongosAttribute": [
                        {
                            "NodeId": "s-bpxxxxxxxx",
                            "NodeClass": "dds.mongos.mid"
                        },
                        {
                            "NodeId": "s-bpxxxxxxxx",
                            "NodeClass": "dds.mongos.mid"
                        }
                    ]
                },
                "DBInstanceDescription": "testdata",
                "Engine": "MongoDB",
                "CreationTime": "2019-11-23T03:08:01Z",
                "Tags": {
                    "Tag": []
                },
                "NetworkType": "VPC",
                "ExpireTime": "2999-09-08T16:00Z",
                "DBInstanceType": "sharding",
                "RegionId": "cn-hangzhou",
                "ShardList": {
                    "ShardAttribute": [
                        {
                            "NodeId": "d-bpxxxxxxxx",
                            "NodeClass": "dds.shard.standard",
                            "NodeStorage": 10
                        },
                        {
                            "NodeId": "d-bpxxxxxxxx",
                            "NodeClass": "dds.shard.standard",
                            "NodeStorage": 10
                        }
                    ]
                },
                "EngineVersion": "4.2",
                "DBInstanceStatus": "Running"
            }
        ]
    }
}

Error codes

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