You need to enable JavaScript to run this app.
导航
DescribeDBInstanceDetail
最近更新时间:2024.08.15 20:48:02首次发布时间:2022.04.12 11:06:53

调用 DescribeDBInstanceDetail 接口查询目标 MongoDB 实例的详细信息。

请求类型

同步请求。

请求参数

参数
类型
是否必选
示例值
描述
InstanceId
String
mongo-shard-3d714182****

实例 ID。

说明

您可以调用 DescribeDBInstances 接口查询目标地域下所有 MongoDB 实例的基本信息,包括实例 ID。

返回参数

参数
类型
示例值
描述
DBInstance
Object
实例详细信息列表。

示例

请求示例 1

查询按量计费分片集群实例详情。

POST https://mongodb.volcengineapi.com/?Action=DescribeDBInstanceDetail&Version=2022-01-01 HTTP/1.1
Host: mongodb.volcengineapi.com
Content-Type: application/json; charset=utf-8
X-Date: 20201103T104027Z
Authorization: HMAC-SHA256 Credential=AK****/20201103/cn-beijing/mongodb/request,SignedHeaders=content-type;host;x-date,Signature=****
{
    "InstanceId": "mongo-shard-3d714182****"
}

返回示例 1

按量计费分片集群实例返回示例。

{
    "ResponseMetadata": {
        "RequestId": "2023080717584872F38A93B759C4B4****",
        "Action": "DescribeDBInstanceDetail",
        "Version": "2022-01-01",
        "Service": "mongodb",
        "Region": "cn-beijing"
    },
    "Result": {
        "DBInstance": {
            "ChargeStatus": "Normal",
            "ChargeType": "PostPaid",
            "ClosedTime": "",
            "ConfigServers": [
                {
                    "ConfigServerNodeId": "mongo-shard-3d714182****-config-0",
                    "NodeRole": "Primary",
                    "NodeSpec": "mongo.config.2c4g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 4,
                    "TotalStorageGB": 20,
                    "TotalvCPU": 2,
                    "UsedMemoryGB": 1.182403564453125,
                    "UsedStorageGB": 0.5118787316605449,
                    "UsedvCPU": 0.005272225,
                    "ZoneId": "cn-beijing-a"
                },
                {
                    "ConfigServerNodeId": "mongo-shard-3d714182****-config-1",
                    "NodeRole": "Secondary",
                    "NodeSpec": "mongo.config.2c4g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 4,
                    "TotalStorageGB": 20,
                    "TotalvCPU": 2,
                    "UsedMemoryGB": 1.170654296875,
                    "UsedStorageGB": 0.504860988818109,
                    "UsedvCPU": 0.00520271,
                    "ZoneId": "cn-beijing-a"
                },
                {
                    "ConfigServerNodeId": "mongo-shard-3d714182****-config-2",
                    "NodeRole": "Hidden",
                    "NodeSpec": "mongo.config.2c4g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 4,
                    "TotalStorageGB": 20,
                    "TotalvCPU": 2,
                    "UsedMemoryGB": 1.1680870056152344,
                    "UsedStorageGB": 0.4890130665153265,
                    "UsedvCPU": 0.003583799,
                    "ZoneId": "cn-beijing-a"
                }
            ],
            "ConfigServersId": "mongo-shard-3d714182****-config",
            "CreateTime": "2023-06-15T09:27:55Z",
            "DBEngine": "MongoDB",
            "DBEngineVersion": "MongoDB_4_0",
            "DBEngineVersionStr": "MongoDB 4.0",
            "ExpiredTime": "",
            "InstanceId": "mongo-shard-3d714182****",
            "InstanceName": "python_sdk_test_shard",
            "InstanceStatus": "Running",
            "InstanceType": "ShardedCluster",
            "Mongos": [
                {
                    "MongosNodeId": "mongo-shard-3d714182****-0",
                    "NodeSpec": "mongo.mongos.1c2g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 2,
                    "TotalvCPU": 1,
                    "UsedMemoryGB": 0.01592254638671875,
                    "UsedvCPU": 0.0008809540000000001,
                    "ZoneId": "cn-beijing-a"
                },
                {
                    "MongosNodeId": "mongo-shard-3d714182****-1",
                    "NodeSpec": "mongo.mongos.1c2g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 2,
                    "TotalvCPU": 1,
                    "UsedMemoryGB": 0.018115997314453125,
                    "UsedvCPU": 0.000800726,
                    "ZoneId": "cn-beijing-a"
                },
                {
                    "MongosNodeId": "mongo-shard-3d714182****-2",
                    "NodeSpec": "mongo.mongos.1c2g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 2,
                    "TotalvCPU": 1,
                    "UsedMemoryGB": 0.01668548583984375,
                    "UsedvCPU": 0.000735207,
                    "ZoneId": "cn-beijing-a"
                }
            ],
            "MongosId": "mongo-shard-3d714182****",
            "NetworkType": "Private",
            "PrivateEndpoint": "mongodb://<user>:<password>@mongoshard3d714182****0.mongodb.ivolces.com:3717,mongoshard3d714182****1.mongodb.ivolces.com:3717,mongoshard3d714182****2.mongodb.ivolces.com:3717/?authSource=admin&retryWrites=true",
            "ProjectName": "default",
            "ReadOnlyNodeNumber": 0,
            "ReclaimTime": "",
            "Shards": [
                {
                    "Nodes": [
                        {
                            "NodeDelayTime": 0,
                            "NodeId": "mongo-shard-3d714182****-s0-0",
                            "NodeRole": "Primary",
                            "NodeSpec": "mongo.shard.4c8g",
                            "NodeStatus": "Running",
                            "TotalMemoryGB": 8,
                            "TotalStorageGB": 200,
                            "TotalvCPU": 4,
                            "UsedMemoryGB": 0.18061447143554688,
                            "UsedStorageGB": 0.3368065720424056,
                            "UsedvCPU": 0.0035826009999999995,
                            "ZoneId": "cn-beijing-a"
                        },
                        {
                            "NodeDelayTime": 0,
                            "NodeId": "mongo-shard-3d714182****-s0-1",
                            "NodeRole": "Secondary",
                            "NodeSpec": "mongo.shard.4c8g",
                            "NodeStatus": "Running",
                            "TotalMemoryGB": 8,
                            "TotalStorageGB": 200,
                            "TotalvCPU": 4,
                            "UsedMemoryGB": 0.16490554809570312,
                            "UsedStorageGB": 0.32363984920084476,
                            "UsedvCPU": 0.0035280270000000004,
                            "ZoneId": "cn-beijing-a"
                        },
                        {
                            "NodeDelayTime": 0,
                            "NodeId": "mongo-shard-3d714182****-s0-2",
                            "NodeRole": "Hidden",
                            "NodeSpec": "mongo.shard.4c8g",
                            "NodeStatus": "Running",
                            "TotalMemoryGB": 8,
                            "TotalStorageGB": 200,
                            "TotalvCPU": 4,
                            "UsedMemoryGB": 0.16708755493164062,
                            "UsedStorageGB": 0.3132143775001168,
                            "UsedvCPU": 0.003121396,
                            "ZoneId": "cn-beijing-a"
                        },
                    ],
                    "ShardId": "mongo-shard-3d714182****-s0"
                },
                {
                    "Nodes": [
                        {
                            "NodeDelayTime": 0,
                            "NodeId": "mongo-shard-3d714182****-s1-0",
                            "NodeRole": "Primary",
                            "NodeSpec": "mongo.shard.4c8g",
                            "NodeStatus": "Running",
                            "TotalMemoryGB": 8,
                            "TotalStorageGB": 200,
                            "TotalvCPU": 4,
                            "UsedMemoryGB": 0.1804046630859375,
                            "UsedStorageGB": 0.3359950380399823,
                            "UsedvCPU": 0.003784527,
                            "ZoneId": "cn-beijing-a"
                        },
                        {
                            "NodeDelayTime": 0,
                            "NodeId": "mongo-shard-3d714182****-s1-1",
                            "NodeRole": "Secondary",
                            "NodeSpec": "mongo.shard.4c8g",
                            "NodeStatus": "Running",
                            "TotalMemoryGB": 8,
                            "TotalStorageGB": 200,
                            "TotalvCPU": 4,
                            "UsedMemoryGB": 0.16428756713867188,
                            "UsedStorageGB": 0.32382639963179827,
                            "UsedvCPU": 0.003279991,
                            "ZoneId": "cn-beijing-a"
                        },
                        {
                            "NodeDelayTime": 0,
                            "NodeId": "mongo-shard-3d714182****-s1-2",
                            "NodeRole": "Hidden",
                            "NodeSpec": "mongo.shard.4c8g",
                            "NodeStatus": "Running",
                            "TotalMemoryGB": 8,
                            "TotalStorageGB": 200,
                            "TotalvCPU": 4,
                            "UsedMemoryGB": 0.16622161865234375,
                            "UsedStorageGB": 0.3133346000686288,
                            "UsedvCPU": 0.004672801,
                            "ZoneId": "cn-beijing-a"
                        }
                    ],
                    "ShardId": "mongo-shard-3d714182****-s1"
                }
            ],
            "StorageType": "LocalSSD",
            "SubnetId": "subnet-rr96lovl7f28v0x58tv****",
            "UpdateTime": "2023-06-29T13:23:20Z",
            "VpcId": "vpc-13f24t16guqdc3n6nu4k5****",
            "ZoneId": "cn-beijing-a"
        }
    }
}

请求示例 2

查询包年包月副本集实例详情。

POST https://mongodb.volcengineapi.com/?Action=DescribeDBInstanceDetail&Version=2022-01-01 HTTP/1.1
Host: mongodb.volcengineapi.com
Content-Type: application/json; charset=utf-8
X-Date: 20201103T104027Z
Authorization: HMAC-SHA256 Credential=AK****/20201103/cn-beijing/mongodb/request,SignedHeaders=content-type;host;x-date,Signature=****
{
    "InstanceId": "mongo-replica-c70a99ee****"
}

返回示例 2

包年包月副本集实例返回示例。

{
    "ResponseMetadata": {
        "RequestId": "202308071757474510ABC0CFDDA3B5****",
        "Action": "DescribeDBInstanceDetail",
        "Version": "2022-01-01",
        "Service": "mongodb",
        "Region": "cn-beijing"
    },
    "Result": {
        "DBInstance": {
            "AutoRenew": false,
            "ChargeStatus": "Normal",
            "ChargeType": "Prepaid",
            "ClosedTime": "2023-09-04T04:00:00Z",
            "CreateTime": "2023-08-02T09:22:58Z",
            "DBEngine": "MongoDB",
            "DBEngineVersion": "MongoDB_5_0",
            "DBEngineVersionStr": "MongoDB 5.0",
            "ExpiredTime": "2023-09-03T15:59:59Z",
            "InstanceId": "mongo-replica-c70a99ee****",
            "InstanceName": "api_test_replica_50",
            "InstanceStatus": "Running",
            "InstanceType": "ReplicaSet",
            "NetworkType": "Private",
            "Nodes": [
                {
                    "NodeDelayTime": 0,
                    "NodeId": "mongo-replica-c70a99ee****-0",
                    "NodeRole": "Primary",
                    "NodeSpec": "mongo.1c2g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 2,
                    "TotalStorageGB": 30,
                    "TotalvCPU": 1,
                    "UsedMemoryGB": 0.0952301025390625,
                    "UsedStorageGB": 0.4220599876716733,
                    "UsedvCPU": 0.012380105,
                    "ZoneId": "cn-beijing-a"
                },
                {
                    "NodeDelayTime": 0,
                    "NodeId": "mongo-replica-c70a99ee****-1",
                    "NodeRole": "Secondary",
                    "NodeSpec": "mongo.1c2g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 2,
                    "TotalStorageGB": 30,
                    "TotalvCPU": 1,
                    "UsedMemoryGB": 0.09490585327148438,
                    "UsedStorageGB": 0.3982076896354556,
                    "UsedvCPU": 0.010946917,
                    "ZoneId": "cn-beijing-a"
                },
                {
                    "NodeDelayTime": 0,
                    "NodeId": "mongo-replica-c70a99ee****-2",
                    "NodeRole": "Hidden",
                    "NodeSpec": "mongo.1c2g",
                    "NodeStatus": "Running",
                    "TotalMemoryGB": 2,
                    "TotalStorageGB": 30,
                    "TotalvCPU": 1,
                    "UsedMemoryGB": 0.10307693481445312,
                    "UsedStorageGB": 0.3699794188141823,
                    "UsedvCPU": 0.009040284,
                    "ZoneId": "cn-beijing-a"
                }
            ],
            "PrivateEndpoint": "mongodb://<user>:<password>@mongoreplicac70a99ee****0.mongodb.ivolces.com:3717,mongoreplicac70a99ee****1.mongodb.ivolces.com:3717/?authSource=admin&replicaSet=rs-mongo-replica-c70a99ee****&retryWrites=true",
            "ProjectName": "default",
            "ReadOnlyNodeNumber": 0,
            "ReclaimTime": "2023-09-10T15:59:59Z",
            "StorageType": "LocalSSD",
            "SubnetId": "subnet-rr96lovl7f28v0x58tv****",
            "Tags": [
                {
                    "Key": "chargetype",
                    "Value": "prepaid"
                },
                {
                    "Key": "instancetype",
                    "Value": "replica"
                }
            ],
            "UpdateTime": "2023-08-03T02:58:29Z",
            "VpcId": "vpc-13f24t16guqdc3n6nu4k5****",
            "ZoneId": "cn-beijing-a"
        }
    }
}

错误码

更多详情,请参见错误码