Queries a list of ApsaraDB for MongoDB instances.
Operation description
The list of replica set and standalone instances is displayed when the DBInstanceType parameter uses the default value replicate. To query a list of sharded cluster instances, you must set the DBInstanceType parameter to sharding.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dds:DescribeDBInstances | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
PageNumber | integer | No | The number of the page to return. The value of this parameter must be an integer that is greater than 0. Default value: 1. | 1 |
PageSize | integer | No | The number of entries to return on each page. Valid values:
| 30 |
DBInstanceId | string | No | The instance ID. | dds-bp199659b178**** |
ReplicationFactor | string | No | The number of nodes in the replica set instance. Valid values:
| 3 |
DBInstanceDescription | string | No | The name of the instance. The name must meet the following requirements:
| Test database |
ExpireTime | string | No | The time when the instance expires. | 2019-12-26T16:00Z |
DBInstanceStatus | string | No | The state of the instance. For more information about valid values, see Instance states. | Running |
DBInstanceType | string | No | The architecture of the instance. Valid values:
| sharding |
DBInstanceClass | string | No | The instance type. For more information about valid values, see Instance types. | dds.mongo.mid |
Engine | string | No | The database engine of the instance. Set the value to MongoDB. | MongoDB |
EngineVersion | string | No | The database engine version of the instance.
| 4.0 |
NetworkType | string | No | The network type of the instance. Valid values:
| VPC |
VpcId | string | No | The VPC ID of the instance. | vpc-bp1n3i15v90el48nx**** |
VSwitchId | string | No | The vSwitch ID of the instance. | vsw-bp1vj604nj5a9zz74**** |
ChargeType | string | No | The billing method of the instance. Valid values:
| PrePaid |
ZoneId | string | No | The zone ID of the instance. You can call the DescribeRegions operation to query the most recent zone list. | cn-hangzhou-b |
Expired | string | No | Specifies whether the instance has expired. Valid values:
| true |
ConnectionDomain | string | No | The endpoint of the node. You can call the DescribeDBInstanceAttribute operation to query the endpoint of the node. | dds-bp1ea17b41abecf43****.mongodb.rds.aliyuncs.com |
ResourceGroupId | string | No | The ID of the resource group. | rg-acfmyiu4ekp**** |
Tag | array<object> | No | The tags of the instance. | |
object | No | |||
Key | string | No | The tag key of the instance. Valid values of N: 1 to 20.
| testdatabase |
Value | string | No | The tag value of the instance. Valid values of N: 1 to 20.
| apitest |
DBNodeType | string | No | The type of the node in the instance. This parameter is used to filter standard or test instance.
| default |
Response parameters
Examples
Sample success responses
JSON
format
{
"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": "testmongosnode\n",
"NodeId": "s-bp10e3b0d02f****"
}
]
},
"DBInstanceDescription": "Test database\n",
"ExpireTime": "2021-11-25T16:00Z",
"DBInstanceType": "sharding",
"LastDowngradeTime": "2021-05-08",
"ShardList": {
"ShardAttribute": [
{
"NodeClass": "dds.shard.mid",
"NodeDescription": "testshardnode\n",
"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",
"SecondaryZoneId": "cn-hangzhou-i",
"HiddenZoneId": "cn-hangzhou-h",
"BackupRetentionPolicy": 1,
"ReleaseTime": "2024-06-17T07:01Z"
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-01-29 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-07-31 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2021-12-27 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2021-12-27 | The response structure of the API has changed | View Change Details |