Obtient les informations de connexion d'une instance de cluster fragmenté MongoDB.
Description de l'opération
Cette API est destinée uniquement aux instances de cluster fragmenté.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
dds:DescribeShardingNetworkAddress |
get |
*Instance
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| DBInstanceId |
string |
Oui |
L'identifiant de l'instance. |
dds-bpxxxxxxxx |
| NodeId |
string |
Non |
L'identifiant d'un nœud mongos, shard ou ConfigServer dans l'instance de cluster fragmenté. Remarque
Vous pouvez appeler l'opération DescribeDBInstanceAttribute pour interroger les identifiants des nœuds mongos, shard et ConfigServer. |
d-bpxxxxxxxx |
| NetworkType |
string |
Non |
Le type de réseau. Valeurs valides :
|
VPC |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| CompatibleConnections |
object |
||
| CompatibleConnection |
array<object> |
Détails de connexion pour les instances compatibles avec le protocole DynamoDB. |
|
|
object |
|||
| VswitchId |
string |
The ID of the vSwitch in the VPC. Remarque
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. Remarque
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 |
L'identifiant de la requête. |
18D8AAFD-6BEB-420F-8164-810CB0C0AA39 |
| NetworkAddresses |
object |
||
| NetworkAddress |
array<object> |
Détails de connexion pour les instances qui utilisent le protocole MongoDB. |
|
|
object |
|||
| NodeType |
string |
The type of the node. Valid values:
|
mongos |
| VswitchId |
string |
The ID of the vSwitch in the VPC. Remarque
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. Remarque
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 |
Le suffixe de la chaîne de connexion. |
.mongodb.rds.aliyuncs.com |
Exemples
JSON format
{
"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"
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.