Consulta uma lista de instâncias do MongoDB.
Descrição da operação
Por padrão, esta operação consulta uma lista de instâncias de conjunto de réplicas, que inclui instâncias independentes. Se você não especificar o parâmetro de solicitação DBInstanceType, o valor padrão será replicate. Para consultar uma lista de instâncias de cluster fragmentado, defina DBInstanceType como sharding.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
dds:DescribeDBInstances |
get |
*Instance
*Instance
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Não |
O ID da região. Você pode chamar a operação DescribeRegions para consultar o ID da região. |
cn-hangzhou |
| PageNumber |
integer |
Não |
O número da página. O valor deve ser maior que 0 e não maior que o valor máximo do tipo de dados inteiro. Valor padrão: 1. |
1 |
| PageSize |
integer |
Não |
O número de entradas a serem retornadas em cada página. Valores válidos:
|
30 |
| DBInstanceId |
string |
Não |
O ID da instância. |
dds-bp199659b178**** |
| ReplicationFactor |
string |
Não |
O número de nós na instância de conjunto de réplicas. Valores válidos:
|
3 |
| DBInstanceDescription |
string |
Não |
O nome da instância. O nome deve atender aos seguintes requisitos:
|
Test database |
| ExpireTime |
string |
Não |
A hora de expiração da instância. A hora está no formato yyyy-MM-ddTHH:mm:ssZ. A hora é exibida em UTC. Este parâmetro é usado para filtrar instâncias que expiram na hora especificada ou antes dela. |
2019-12-26T16:00:00Z |
| DBInstanceStatus |
string |
Não |
O status da instância. Para obter mais informações, consulte Estados da instância. |
Running |
| DBInstanceType |
string |
Não |
A arquitetura da instância. Valores válidos:
|
sharding |
| DBInstanceClass |
string |
Não |
O tipo de instância. Para obter mais informações, consulte Tipos de instância. |
dds.mongo.mid |
| Engine |
string |
Não |
O mecanismo de banco de dados. Defina o valor como MongoDB. |
MongoDB |
| EngineVersion |
string |
Não |
A versão do mecanismo de banco de dados. Valores válidos:
|
4.0 |
| NetworkType |
string |
Não |
O tipo de rede da instância. Valores válidos:
|
VPC |
| VpcId |
string |
Não |
O ID da VPC. |
vpc-bp1n3i15v90el48nx**** |
| VSwitchId |
string |
Não |
O ID do vSwitch da VPC. |
vsw-bp1vj604nj5a9zz74**** |
| ChargeType |
string |
Não |
O método de cobrança da instância. Valores válidos:
|
PrePaid |
| ZoneId |
string |
Não |
O ID da zona. Você pode chamar a operação DescribeRegions para consultar o ID da zona. |
cn-hangzhou-b |
| Expired |
string |
Não |
O status de expiração da instância. Valores válidos:
|
true |
| ConnectionDomain |
string |
Não |
O endpoint do nó. Você pode chamar a operação DescribeDBInstanceAttribute para consultar o endpoint. |
dds-bp1ea17b41abecf43****.mongodb.rds.aliyuncs.com |
| ResourceGroupId |
string |
Não |
O ID do grupo de recursos. |
rg-acfmyiu4ekp**** |
| Tag |
array<object> |
Não |
As tags da instância. |
|
|
object |
Não |
|||
| Key |
string |
Não |
A chave da tag N. O valor de N deve estar no intervalo de 1 a 20.
|
testdatabase |
| Value |
string |
Não |
O valor da tag N. O valor de N deve estar no intervalo de 1 a 20.
|
apitest |
| DBNodeType |
string |
Não |
Filtra instâncias por tipo. Valores válidos:
|
default |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| TotalCount |
integer |
O número de instâncias retornadas. |
5 |
| RequestId |
string |
O ID da solicitação. |
0E4FE33F-5510-5758-8FA7-A6672CDE**** |
| PageSize |
integer |
O número de entradas retornadas por página. |
30 |
| PageNumber |
integer |
O número da página. |
1 |
| DBInstances |
object |
||
| DBInstance |
array<object> |
Os detalhes das instâncias. |
|
|
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 |
| 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:
|
Close |
| NetworkType |
string |
The network type of the instance. Valid values:
|
Classic |
| LockMode |
string |
The lock status of the instance. Valid values:
|
Unlock |
| EngineVersion |
string |
The database engine version. Valid values:
|
4.2 |
| MongosList |
object |
||
| MongosAttribute |
array<object> |
The details of the Mongos nodes. Nota
This parameter is returned only for sharded cluster instances. |
|
|
object |
The details of the Mongos nodes. Nota
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. |
Test database |
| 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 |
| LastDowngradeTime |
string |
The last time when the instance was downgraded. |
2021-05-08 |
| ShardList |
object |
||
| ShardAttribute |
array<object> |
The details of the shard nodes. Nota
This parameter is returned only for sharded cluster instances. |
|
|
object |
The details of the shard nodes. Nota
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. Nota
|
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. Nota
This parameter is returned only for replica set instances. |
3 |
| KindCode |
string |
The type of the instance. Valid values:
|
1 |
| CapacityUnit |
string |
The read and write throughput consumed by the instance. Nota
This parameter is returned only for serverless instances. |
100 |
| StorageType |
string |
The storage type. Valid values:
|
local_ssd |
| BackupRetentionPolicy |
integer |
The backup retention policy. Valid values:
|
1 |
| ReleaseTime |
string |
The release time of the instance. |
2024-06-17T07:01Z |
Exemplos
Resposta de sucesso
JSON formato
{
"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": "Test database",
"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"
}
]
}
}
Códigos de erro
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.