Queries the 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 the list of sharded cluster instances, you must set the DBInstanceType parameter to sharding.
Authorization information
The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action
Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:
- 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 keyword: refers to the condition keyword defined by the cloud product itself.
- 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.
Operate | access level | Resource type | conditional keyword | Association operation |
---|---|---|---|---|
dds:DescribeDBInstances | LIST |
|
|
without |
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. Default value: 30. Valid values:
|
30 |
DBInstanceId | string | No |
The ID of the instance. |
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. Valid values:
|
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. Default value: replicate. 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. Valid values:
|
4.0 |
NetworkType | string | No |
The network type of the instance. Valid values:
|
VPC |
VpcId | string | No |
The ID of the VPC. |
vpc-bp1n3i15v90el48nx**** |
VSwitchId | string | No |
The ID of the vSwitch. |
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 | No |
The tags of instances. |
|
object | No | |||
Key | string | No |
The key of tag N of the instance. Valid values of N: 1 to 20.
|
testdatabase |
Value | string | No |
The value of tag N of the instance. Valid values of N: 1 to 20.
|
apitest |
DBNodeType | string | No |
Used to filter standard instances or test instances
|
default |
Response parameters
Example
Normal return example
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": "mongos1",
"NodeId": "s-bp10e3b0d02f****"
}
]
},
"DBInstanceDescription": "db for test.",
"ExpireTime": "2021-11-25T16:00Z",
"DBInstanceType": "sharding",
"LastDowngradeTime": "2021-05-08",
"ShardList": {
"ShardAttribute": [
{
"NodeClass": "dds.shard.mid",
"NodeDescription": "testshard",
"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"
}
]
}
}
Error codes
For a list of error codes, visit the API error center.
Change history
Change time | Summary of changes | Operate | ||
---|---|---|---|---|
2021-12-27 | The internal configurations of the API operation has changed but you can still call the operation. | |||
|
||||
2021-12-27 | The response structure of the API operation has changed | |||
|