Get the Instance List
Last Updated:2020-08-28
Description
- You can only view the instance list of your account.
Request Structure
GET /v{version}/instance?marker={marker}&maxKeys={maxKeys} HTTP/1.1
Host: redis.{region}.baidubce.com
Authorization authorization string
Request Header Field
There are no other special header fields except the public header field.
Request Parameter
Parameter Name | Type | Required | Parameter Position | Description |
---|---|---|---|---|
version | string | Yes | URI Parameter | API version No. |
marker | string | No | Query parameters /td> | The start position of query for the list obtained in batch is a character string generated by the system. |
maxKeys | int | No | Query parameters | The maximum number of maxKeys contained in each page (master instance) is usually not more than 1000 and the default value is 1000. |
Return Header Field
There are no other special header fields except the common header field.
Return Parameters
Parameter Name | Type | Description |
---|---|---|
marker | String | The start position of query for the list obtained in batch is a character string generated by the system. |
maxKeys | int | It is the maximum number of maxKeys contained in each page, which is usually does not exceed 1000 and the default value is 1000. |
isTruncated | boolean | True means there is still data behind, and false means it is already the last page. |
nextMarker | String | Get the marker value to be passed on the next page. This field does not appear when “isTruncated” is false. |
instances | List<InstanceModel> | Arrays comprised by InstanceModel |
Request Instance
GET /v2/instance?marker=-1&maxKeys=20 HTTP/1.1
HOST: redis.bj.baidubce.com
ContentType: application/json
Authorization bce-auth-v1/0255cb4f78f140728045b551d6a317ec/2018-11-13T05:57:04Z/1800/host/633fd6aadc177fce91e5e930c63886b5fb4da8938d9a02c9d13df4fdb8efdec5
Return Example
{
"marker": "-1",
"isTruncated": true,
"nextMarker": "1058",
"maxKeys": 1,
"instances": [
{
"instanceId": "scs-bj-cxisuftlkquj",
"instanceName": "post101",
"instanceStatus": "Running",
"engine": "redis",
"engineVersion": "3.2",
"vnetIp": "10.107.231.11",
"domain": "redis.ruqpwjmvrsyt.scs.bj.bce.qa.sandbox.baidu.com",
"port": "6379",
"instanceCreateTime": "2018-11-13T05:37:49Z",
"capacity": 1,
"usedCapacity": 0.06,
"paymentTiming": "Postpaid",
"zoneNames": [
"cn-bj-a",
"cn-bj-c"
]
}
]
}