Queries the connection information for a MongoDB sharded cluster instance.
Operation description
This operation is applicable only to sharded cluster instances.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:DescribeShardingNetworkAddress |
get |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The instance ID. |
dds-bpxxxxxxxx |
| NodeId |
string |
No |
The ID of the Mongos, shard, or ConfigServer node in the sharded cluster instance. Note
Call the DescribeDBInstanceAttribute operation to query the IDs of Mongos, shard, and ConfigServer nodes. |
d-bpxxxxxxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| CompatibleConnections |
object |
||
| CompatibleConnection |
array<object> |
A list of connection information for an instance that is compatible with the DynamoDB protocol. |
|
|
object |
|||
| VswitchId |
string |
The ID of the vSwitch in the VPC. Note
This parameter is returned when the network type is VPC. |
vsw-bpxxxxxxxx |
| ExpiredTime |
string |
The remaining validity period of the classic network address, in seconds. |
2591963 |
| NetworkType |
string |
The network type.
|
VPC |
| Port |
string |
The connection port. |
3717 |
| NetworkAddress |
string |
The connection address. |
dds-bpxxxxxxxxxxxxxx.mongodb.rds.aliyuncs.com |
| VPCId |
string |
The VPC ID. Note
This parameter is returned when the network type is VPC. |
vpc-bpxxxxxxxx |
| IPAddress |
string |
The IP address. |
10.140.xxx.xx |
| RequestId |
string |
The request ID. |
18D8AAFD-6BEB-420F-8164-810CB0C0AA39 |
| NetworkAddresses |
object |
||
| NetworkAddress |
array<object> |
A list of connection information for an instance that is compatible with the MongoDB protocol. |
|
|
object |
|||
| NodeType |
string |
The node type. Valid values:
|
mongos |
| VswitchId |
string |
The ID of the vSwitch in the VPC. Note
This parameter is returned when the network type is VPC. |
vsw-bpxxxxxxxx |
| ExpiredTime |
string |
The remaining validity period of the classic network address, in seconds. |
2591963 |
| NetworkType |
string |
The network type.
|
VPC |
| Role |
string |
The role of the node. Valid values:
|
Primary |
| Port |
string |
The connection port. |
3717 |
| VPCId |
string |
The VPC ID. Note
This parameter is returned when the network type is VPC. |
vpc-bpxxxxxxxx |
| NetworkAddress |
string |
The connection address. |
s-bpxxxxxxxx.mongodb.rds.aliyuncs.com |
| NodeId |
string |
The ID of the Mongos node. |
s-bpxxxxxxxx |
| IPAddress |
string |
The IP address. |
10.140.xxx.xx |
| ConnectionType |
string |
The type of the public endpoint. Valid values:
|
SRV |
| TxtRecord |
string |
The TXT record that stores MongoDB metadata, such as version information and configuration parameters. This record works with other technologies, such as SRV records, to enable features like service discovery and configuration delivery. |
mongo.example.com. IN TXT "config=replicaSet=myReplicaSet" |
Examples
Success response
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\""
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.