Obtém as informações de conexão de uma instância de cluster sharded do MongoDB.
Descrição da operação
Esta API é destinada apenas a instâncias de cluster sharded.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
dds:DescribeShardingNetworkAddress |
get |
*Instance
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| DBInstanceId |
string |
Sim |
O ID da instância. |
dds-bpxxxxxxxx |
| NodeId |
string |
Não |
O ID de um nó mongos, shard ou ConfigServer na instância de cluster sharded. Nota
Você pode chamar a operação DescribeDBInstanceAttribute para consultar os IDs dos nós mongos, shard e ConfigServer. |
d-bpxxxxxxxx |
| NetworkType |
string |
Não |
O tipo de rede. Valores válidos:
|
VPC |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| CompatibleConnections |
object |
||
| CompatibleConnection |
array<object> |
Detalhes de conexão para instâncias compatíveis com o protocolo DynamoDB. |
|
|
object |
|||
| VswitchId |
string |
The ID of the vSwitch in the VPC. Nota
This parameter is returned only when the network type is VPC. |
vsw-bpxxxxxxxx |
| ExpiredTime |
string |
The remaining validity period of the classic network address that is retained, in seconds. |
2591963 |
| NetworkType |
string |
The network type. Valid values:
|
VPC |
| Port |
string |
The port that is used to connect to the instance. |
3717 |
| NetworkAddress |
string |
The endpoint of the instance. |
dds-bpxxxxxxxxxxxxxx.mongodb.rds.aliyuncs.com |
| VPCId |
string |
The VPC ID. Nota
This parameter is returned only when the network type is VPC. |
vpc-bpxxxxxxxx |
| IPAddress |
string |
The IP address of the instance. |
10.140.xxx.xx |
| RequestId |
string |
O ID da solicitação. |
18D8AAFD-6BEB-420F-8164-810CB0C0AA39 |
| NetworkAddresses |
object |
||
| NetworkAddress |
array<object> |
Detalhes de conexão para instâncias que usam o protocolo MongoDB. |
|
|
object |
|||
| NodeType |
string |
The type of the node. Valid values:
|
mongos |
| VswitchId |
string |
The ID of the vSwitch in the VPC. Nota
This parameter is returned only when the network type is VPC. |
vsw-bpxxxxxxxx |
| ExpiredTime |
string |
The remaining validity period of the classic network address that is retained, in seconds. |
2591963 |
| NetworkType |
string |
The network type. Valid values:
|
VPC |
| Role |
string |
The role of the node. Valid values:
|
Primary |
| Port |
string |
The port that is used to connect to the instance. |
3717 |
| VPCId |
string |
The VPC ID. Nota
This parameter is returned only when the network type is VPC. |
vpc-bpxxxxxxxx |
| NetworkAddress |
string |
The endpoint of the node. |
s-bpxxxxxxxx.mongodb.rds.aliyuncs.com |
| NodeId |
string |
The ID of the mongos or shard node. |
s-bpxxxxxxxx |
| IPAddress |
string |
The IP address of the node. |
10.140.xxx.xx |
| ConnectionType |
string |
The type of the public endpoint. Valid values:
|
SRV |
| TxtRecord |
string |
The TXT record. A TXT record is a type of Domain Name System (DNS) record that is used to store text-based information about a domain. It can be used to deliver service configurations and discover services by working with other technologies such as SRV records. |
mongo.example.com. IN TXT "config=replicaSet=myReplicaSet" |
| ConnectionStringSuffix |
string |
O sufixo da string de conexão. |
.mongodb.rds.aliyuncs.com |
Exemplos
Resposta de sucesso
JSON formato
{
"CompatibleConnections": {
"CompatibleConnection": [
{
"VswitchId": "vsw-bpxxxxxxxx",
"ExpiredTime": "2591963",
"NetworkType": "VPC",
"Port": "3717",
"NetworkAddress": "dds-bpxxxxxxxxxxxxxx.mongodb.rds.aliyuncs.com",
"VPCId": "vpc-bpxxxxxxxx",
"IPAddress": "10.140.xxx.xx"
}
]
},
"RequestId": "18D8AAFD-6BEB-420F-8164-810CB0C0AA39",
"NetworkAddresses": {
"NetworkAddress": [
{
"NodeType": "mongos",
"VswitchId": "vsw-bpxxxxxxxx",
"ExpiredTime": "2591963",
"NetworkType": "VPC",
"Role": "Primary",
"Port": "3717",
"VPCId": "vpc-bpxxxxxxxx",
"NetworkAddress": "s-bpxxxxxxxx.mongodb.rds.aliyuncs.com",
"NodeId": "s-bpxxxxxxxx",
"IPAddress": "10.140.xxx.xx",
"ConnectionType": "SRV",
"TxtRecord": "mongo.example.com. IN TXT \"config=replicaSet=myReplicaSet\""
}
]
},
"ConnectionStringSuffix": ".mongodb.rds.aliyuncs.com"
}
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.