API Interface Description
Get instance list
|
|
---|---|
|
|
|
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
---|---|---|
|
|
|
|
|
|
GET /json-api/v1/cluster HTTP/1.1 HOST: xxx.baidu.com Authorization: bce-auth-v1/rdsak/2014-07-03T06:13:13Z/1800/x-bce-date/{signature}
HTTP/1.1 200 OK x-bce-request-id: 7869616F-7A68-6977-656E-406261696475 Content-Type: application/json [ "clusters" : [ { "clusterId": "xxxjxjkp1fimpb", "clusterName": "xxxtest", "endpoint": { "port": 6600, "address": "xxx.xxxjxjkp1fimpb.baidu.com", "vnetIp" : "192.0.0.4", "inetIp" : "180.0.0.4", }, "region": "bj", "instanceClass": "db1.large", "engineVeresion": "5.x", "allocatedMemoryInMB": 32768, "allocatedStorageInGB": 320, "usedStorageInMB": 0, "instanceStatus": "available", "lockMode": "unlock", "eipStatus": "closed", "publiclyAccessible": false, "instanceCreateTime": "2017-05-15 07:05:56", "sliceAmount": 1, "instanceAmount": 2, "subInstanceAmount": 4, "azone": "zoneA", "vpcId": "98c700ed-fed4-4d4e-bdd0-a17f6433d471", "subnetId": { "zoneA" : "66051292-093c-49df-8648-c1f744f0c302" }, } ] ]
Get instance details
|
|
---|---|
|
|
|
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
---|---|---|
|
|
|
|
|
|
|
|
|
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GET /json-api/v1/cluster/xxxmxiaozhiwen0 HTTP/1.1HOST: xxx.baidu.com Authorization: bce-auth-v1/rdsak/2014-07-03T06:13:13Z/1800/x-bce-date/{signature}
{ "cluster" : { "clusterId": "xxxjxjkp1fimpb", "clusterName": "xxxtest", "engineVersion": "5.x", "endpoint": { "port": 6600, "address": "xxx.xxxjxjkp1fimpb.baidu.com", "vnetIp" : "192.0.0.4", "inetIp" : "180.0.0.4", }, "region": "bj", "instanceClass": "db1.large", "allocatedMemoryInMB": 32768, "allocatedStorageInGB": 320, "usedStorageInMB": 0, "instanceStatus": "available", "lockMode": "unlock", "eipStatus": "closed", "publiclyAccessible": false, "instanceCreateTime": "2017-05-15 07:05:56", "sliceAmount": 1, "instanceAmount": 2, "subInstanceAmount": 4, "azone": "default", "vpcId": "98c700ed-fad4-424e-bdd0-a17f64ead471", "subnetId": { "zoneA" : "66051292-493c-4ddf-8648-c18742f0c302" }, "sliceList": [ { "sliceId": "slice946t28kt1k", "usedStorageInMB" : 10, "status" : "available", "instanceIds": [ { "role": "master", "instanceId": "5a63a4c5-5d7c-44ac-89bd-cded7ac2ec44", "instanceShortId":"dr-asdf1", "status" : "available", "usedStorageInMB" : 10 }, { "role": "standbymaster", "instanceId": "a9419e43-f3c0-4527-a995-9a27478af22c", "instanceShortId":"dr-asdf2", "status" : "available", "usedStorageInMB" : 10 }, { "role": "slave", "instanceId": "a9419e43-f3c0-4527-a995-9a27478af22c", "instanceShortId":"dr-asdf2", "status" : "available", "usedStorageInMB" : 10 } ] } ] } }
Create Instance
|
|
---|---|
|
|
|
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---|---|---|
|
|
|
|
|
|
POST /json-api/v1/cluster HTTP/1.1 HOST: xxx.baidu.com Authorization:bce-auth-v1/rdsak/2014-07-03T06:13:13Z/1800/x-bce-date/{signature} { "orderId": "20170607012312400345676", "clusterAmount": 1, "clusterParameters":{ "clusterName": "xxxtest", "engineVersion": "5.x", "instanceClass": "db1.large", "allocatedMemoryInMB": 32768, "instanceAmount": 2, "subInstanceAmount": 4, "vpcId": "98c700ed-fed4-4d56-bdd0-a17f64ead471", "subnetId" : { "azoneA" : "66033292-093c-49d4-8648-c18742f0c302" } } }
{ "clusters": [ { "clusterId": "xxxm59yzsvvk81", "clusterName": "xxxtest", "endpoint": { "port": 6600, "address": "xxx.xxxjxjkp1fimpb.baidu.com", "vnetIp" : "192.0.0.4", "inetIp" : "180.0.0.4", }, "region": "bj", "instanceClass": "db1.large", "allocatedMemoryInMB": 32768, "allocatedStorageInGB": 320, "usedStorageInMB": 0, "instanceStatus": "creating", "lockMode": "unlock", "eipStatus": "closed", "publiclyAccessible": false, "instanceCreateTime": "2017-06-07 05:56:57", "sliceAmount": 1, "instanceAmount": 2, "subInstanceAmount": 4, "azone": "azoneA", "vpcId": "983740ed-fed4-4d4e-bdd0-a17f64ead471" } ] }
{ "requestId":"35663333-3033-3766-3536-373564633661", "code":"ClusterInstanceIsExist", "message":"Cluster Instance is exist." }
Delete Instance
|
|
---|---|
|
|
|
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
---|---|---|
|
|
|
DELETE /json-api/v1/cluster/testclusterId HTTP/1.1 HOST: xxx.baidu.com Authorization: bce-auth-v1/rdsak/2014-07-03T06:13:13Z/1800/x-bce-date/{signature}
HTTP/1.1 200 OK x-bce-request-id: 7869616F-7A68-6977-656E-406261696475 Content-Type: application/json Content-Length: 0