百度智能云

All Product Document

          Cloud Database MONGODB

          Query Instance Details

          Query the Instance Details

          Description

          • Query the details of the specified replica cluster instances.

          Request structure

          GET /v{version}/instance/{dbInstanceId} HTTP/1.1
          HOST: mongodb.bj.baidubce.com
          Authorization: authorization string

          Request header field

          No other special header fields are available, except for common header fields.

          Request parameter

          Parameter Name Type Required? Parameter Position Description
          version string Yes URL parameter API version number
          dbInstanceId string Yes URL parameters Specified instance Id

          Return a header field

          There are no other special header fields except for the common header field.

          Return parameter

          Parameter Name Type Description
          dbInstanceId string Instance ID
          dbInstanceName string Instance name of database
          connectionString string Address for database connections
          port string Connecting port of the database
          engineVersion string Database engine version. For details, see
          storageEngine string Storage engine. For details, see
          dbInstanceCpuCount int CPU specifications of the replica cluster
          dbInstanceMemoryCapacity int Memory specification of the replica cluster instance expressed in GB
          dbInstanceStorage int Storage specification of the replica cluster instance expressed in GB.
          dbInstanceType string Instance Types For details, see
          mongosCount int Number of Mongos nodes
          shardCount int Number of Shard nodes.
          mongosList List NodeModel Mongos Nodes List
          shardList List NodeModel Shard Node Lists
          dbInstanceStatus string Instance status. See Instance Status List
          createTime Datetime Instance creation time
          expireTime Datetime Expiry time of the instance
          vpcId String ID for VPC of instances
          paymentTiming String Payment mode. Refer to the payment packagesPayment Packages
          subnets List SubnetModel The availability zone of the instances and subnet.
          tags List TagModel The tag to which the instance resource is bound.

          Request example

          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

          Return example

          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",
                  "createTime": "2020-03-16T02:30:41Z",
                  "shardCount": "0",
                  "engineVersion": "3.4",
                  "storageEngine": "WiredTiger",
                  "mongosCount": "0",
                  "vpcId":"vpc-ar6tyh9t2tz7"
                  "port": "27017",
                  "mongosList":[],
                  "shardList":[],
                  "subnets": [{
                      "zoneName": "cn-bj-a",
                      "subnetId": "sbn-rafwenxcnvh5"
                  }],
                  "tags": [{
                      "tagKey": “Default Item",
                      "tagValue": "test-1"
                  }]
            }
          Previous
          Master-slave Switch between Sharded Cluster Instance Nodes
          Next
          Query Instance List