Queries the roles and zones of each node in a MongoDB instance.
Operation description
For more information, see View the zone of a node.
This operation is applicable to replica set instances and sharded cluster instances. Standalone instances are not supported.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:DescribeRoleZoneInfo |
get |
*dbinstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The instance ID. |
dds-bpxxxxxxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
728B9A96-E262-4AE5-915E-3A51CCE2FDA9 |
| ZoneInfos |
object |
||
| ZoneInfo |
array<object> |
The list of node distribution information across zones. |
|
|
object |
|||
| InsName |
string |
The node ID. |
dds-bpxxxxxxxx |
| NodeType |
string |
The node type. Valid values:
Note
If the instance is a replica set instance, the return value is normal. If the instance is a sharded cluster instance, the return values include configServer, shard, and mongos. |
normal |
| RoleType |
string |
The role of the node. Valid values:
|
Primary |
| ZoneId |
string |
The zone ID. |
cn-hangzhou-e |
| RoleId |
string |
The role ID. |
83xxxxx |
Examples
Success response
JSON format
{
"RequestId": "728B9A96-E262-4AE5-915E-3A51CCE2FDA9",
"ZoneInfos": {
"ZoneInfo": [
{
"InsName": "dds-bpxxxxxxxx",
"NodeType": "normal",
"RoleType": "Primary",
"ZoneId": "cn-hangzhou-e",
"RoleId": "83xxxxx"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.