查询实例详情
更新时间:2022-05-16
说明
- 查询指定实例的详细信息
请求结构
GET /v{version}/instance/{dbInstanceId} HTTP/1.1
HOST: mongodb.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
version | string | 是 | URL参数 | API版本号 |
dbInstanceId | string | 是 | URL参数 | 指定实例Id |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
dbInstanceId | string | 实例ID |
dbInstanceName | string | 数据库实例名 |
connectionString | string | 数据库连接地址 |
port | string | 数据库连接端口 |
engineVersion | string | 数据库引擎版本。具体参见 |
storageEngine | string | 存储引擎。具体参见 |
dbInstanceCpuCount | int | 副本集实例CPU规格 |
dbInstanceMemoryCapacity | int | 副本集实例内存规格,单位GB |
dbInstanceStorage | int | 副本集实例存储规格,单位GB |
dbInstanceStorageType | string | 副本集实例存储类型。具体参见 |
dbInstanceType | string | 实例类型。具体参见 |
mongosCount | int | Mongos组件数量 |
shardCount | int | Shard组件数量 |
mongosList | List NodeModel | Mongos组件列表 |
shardList | List NodeModel | Shard组件列表 |
votingMemberNum | int | 副本集实例投票节点数量 |
readonlyNodeNum | int | 副本集实例只读节点数量 |
dbInstanceStatus | string | 实例状态。参见实例状态表 |
createTime | Datetime | 实例创建时间 |
expireTime | Datetime | 实例到期时间 |
vpcId | String | 实例所属VPC的ID |
publicConnectionString | String | 公网地址连接串 |
publicReadonlyConnectionString | String | 只读节点的公网地址连接串,副本集有效 |
readOnlyNodeConnectionString | String | 只读节点的内网地址连接串,副本集有效 |
paymentTiming | String | 付费方式,参考付费方式 |
logServiceStatus | List LogServiceModel | 实例各种类型日志的状态 |
members | List Member | 副本集实例节点信息 |
subnets | List SubnetModel | 实例所在可用区和子网 |
tags | List TagModel | 实例资源所绑定的标签 |
请求示例
GET /v1/instance/m-qNlWTz HTTP/1.1
HOST: mongodb.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
返回示例
HTTP/1.1 200 OK
x-bce-request-id: 7869616F-7A68-6977-656E-406261696475
Content-Type: application/json
{
"dbInstanceId": "m-soQKA7",
"connectionString": "mongodb://root:****@soQKA7bQs.bce.qa.sandbox.baidu.com:27017,soQKA7LFG.bce.qa.sandbox.baidu.com:27017/admin?replicaSet=rep-GCHhjz",
"dbInstanceName": "M4yui7",
"paymentTiming": "Prepaid",
"dbInstanceCpuCount": 1,
"dbInstanceMemoryCapacity": 2,
"dbInstanceStorage": 5,
"dbInstanceStatus": "RUNNING",
"dbInstanceType": "replica",
"dbInstanceStorageType": "CDS_PREMIUM_SSD",
"createTime": "2020-03-16T02:30:41Z",
"shardCount": "0",
"engineVersion": "3.4",
"storageEngine": "WiredTiger",
"mongosCount": "0",
"votingMemberNum": 3,
"readonlyNodeNum": 1,
"vpcId": "vpc-ar6tyh9t2tz7",
"port": "27017",
"mongosList":[],
"shardList":[],
"logServiceStatus": [
{
"type": "running",
"status": "open",
},
{
"type": "audit",
"status": "closed",
},
{
"type": "error",
"status": "closed",
}
],
"members": [
{
"memberId": "node-FrzVQu",
"mongoStatus": "secondary",
"mongoType": "replica",
"readonly": "READ_ONLY",
"zoneName": "cn-bj-a",
"ip": "192.168.0.1",
"mongoHost": "KKnhbVqra.mongodb.bj.baidubce.com:27017"
},
{
"memberId": "node-3jqyu6",
"mongoStatus": "hidden",
"mongoType": "replica",
"readonly": "READ_WRITE",
"zoneName": "cn-bj-a"
},
{
"memberId": "node-RqQBLh",
"mongoStatus": "primary",
"mongoType": "replica",
"readonly": "READ_WRITE",
"zoneName": "cn-bj-a",
"ip": "192.168.0.2",
"mongoHost": "gXudb8x01.mongodb.bj.baidubce.com:27017"
},
{
"memberId": "node-bQ8Sb1",
"mongoStatus": "secondary",
"mongoType": "replica",
"readonly": "READ_WRITE",
"zoneName": "cn-bj-a",
"ip": "192.168.0.3",
"mongoHost": "gXudb8Snj.mongodb.bj.baidubce.com:27017"
}
],
"subnets": [
{
"zoneName": "cn-bj-a",
"subnetId": "sbn-rafwenxcnvh5"
}
],
"tags": []
}