tencent cloud

DescribeDBInstanceNodeProperty
Last updated:2025-12-03 10:42:07
DescribeDBInstanceNodeProperty
Last updated: 2025-12-03 10:42:07

1. API Description

Domain name for API request: mongodb.intl.tencentcloudapi.com.

This API is used to query node attributes, such as the AZ, node name, address, role, status, delay between primary and secondary nodes, priority, voting right, and tags.

A maximum of 10 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeDBInstanceNodeProperty.
Version Yes String Common Params. The value used for this API: 2019-07-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String Instance ID. Log in to the TencentDB for MongoDB console, and copy the instance ID from the instance list.
NodeIds.N No Array of String Node ID. Log in to the TencentDB for MongoDB console, go to Node Management, and copy the node ID.
Roles.N No Array of String Node role. Valid values:
- PRIMARY: primary node.
- SECONDARY: secondary node.
- READONLY: read-only node.
- ARBITER: arbitration node.
OnlyHidden No Boolean Whether the node is a hidden node. Default value: false.
Priority No Integer Priority of the node for electing it as the new primary node. Value range: [0, 100]. A larger value indicates a higher priority.
Votes No Integer Node voting right.- 1: The node has the right to vote.
- 0: The node does not have the right to vote.
Tags.N No Array of NodeTag Node tag.

3. Output Parameters

Parameter Name Type Description
Mongos Array of NodeProperty Mongos node attributes.
ReplicateSets Array of ReplicateSetInfo Replica set node information.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Querying the Information on an Instance Node

This example shows you how to query the detailed attributes of an instance node.

Input Example

POST / HTTP/1.1
Host: mongodb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDBInstanceNodeProperty
<Common request parameters>

{
    "InstanceId": "cmgo-by909vwp"
}

Output Example

{
    "Response": {
        "Mongos": [
            {
                "Address": "10.8.16.37:30000",
                "Hidden": false,
                "NodeName": "mongos-0",
                "Priority": 0,
                "ReplicateSetId": "",
                "Role": "MONGOS",
                "SlaveDelay": 0,
                "Status": "NORMAL",
                "Tags": [
                    {
                        "TagKey": "role-cmgo",
                        "TagValue": "primary-secondary-group"
                    }
                ],
                "Votes": 0,
                "Zone": "ap-guangzhou-3",
                "WanServiceAddress": ""
            }
        ],
        "ReplicateSets": [
            {
                "Nodes": [
                    {
                        "Address": "",
                        "Hidden": false,
                        "NodeName": "cmgo-by909vwp_0-node-slave0",
                        "Priority": 1,
                        "ReplicateSetId": "cmgo-by909vwp_0",
                        "Role": "SECONDARY",
                        "SlaveDelay": 0,
                        "Status": "NORMAL",
                        "WanServiceAddress": "",
                        "Tags": [
                            {
                                "TagKey": "role-cmgo",
                                "TagValue": "primary-secondary-group"
                            }
                        ],
                        "Votes": 1,
                        "Zone": "ap-guangzhou-3"
                    }
                ]
            },
            {
                "Nodes": [
                    {
                        "Address": "",
                        "Hidden": false,
                        "NodeName": "cmgo-by909vwp_1-node-slave0",
                        "Priority": 1,
                        "ReplicateSetId": "cmgo-by909vwp_1",
                        "Role": "SECONDARY",
                        "SlaveDelay": 0,
                        "Status": "NORMAL",
                        "WanServiceAddress": "",
                        "Tags": [
                            {
                                "TagKey": "role-cmgo",
                                "TagValue": "primary-secondary-group"
                            }
                        ],
                        "Votes": 1,
                        "Zone": "ap-guangzhou-3"
                    },
                    {
                        "Address": "",
                        "Hidden": false,
                        "NodeName": "cmgo-by909vwp_1-node-primary",
                        "Priority": 1,
                        "ReplicateSetId": "cmgo-by909vwp_1",
                        "Role": "PRIMARY",
                        "SlaveDelay": 0,
                        "Status": "NORMAL",
                        "WanServiceAddress": "",
                        "Tags": [
                            {
                                "TagKey": "role-cmgo",
                                "TagValue": "primary-secondary-group"
                            }
                        ],
                        "Votes": 1,
                        "Zone": "ap-guangzhou-3"
                    },
                    {
                        "Address": "",
                        "Hidden": true,
                        "NodeName": "cmgo-by909vwp_1-node-slave1",
                        "Priority": 0,
                        "ReplicateSetId": "cmgo-by909vwp_1",
                        "Role": "SECONDARY",
                        "SlaveDelay": 0,
                        "Status": "NORMAL",
                        "WanServiceAddress": "",
                        "Tags": [
                            {
                                "TagKey": "role-cmgo",
                                "TagValue": "primary-secondary-group"
                            }
                        ],
                        "Votes": 1,
                        "Zone": "ap-guangzhou-3"
                    }
                ]
            }
        ],
        "RequestId": "14ab088a-9d69-44b4-b39d-e4b8fbbb8f25"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.KernelResponseTimeout Kernel response timed out.
InternalError Internal error
InternalError.CheckAppIdFailed appId verification failed.
InvalidParameter Parameter error
InvalidParameter.PermissionDenied The current sub-account has no permission to perform this operation.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback