查询账号列表(放弃版)
更新时间:2022-11-17
说明
- 只能查看指定实例的账号列表
请求结构
Plain Text
1GET /v{version}/instance/{instanceId}/account HTTP/1.1
2HOST: rds.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
version | string | 是 | URL参数 | API 版本号 |
instanceId | string | 是 | URL参数 | 实例ID |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
accounts | List Account | 由Account对象组成的数组。 |
请求示例
Plain Text
1GET /v{version}/instance/{instanceId}/account HTTP/1.1
2HOST: rds.bj.baidubce.com
3Authorization: bce-auth-v1/rdsak/2016-07-03T06:13:13Z/1800/x-bce-date/{signature}
返回示例
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 7869616F-7A68-6977-656E-406261696475
3Content-Type: application/json
4Content-Length: 567
5
6{
7 "accounts" : [{
8 "accountName" : "user1",
9 "desc" : "账号user1",
10 "type" : "OnlyMaster",
11 "status" : "Available",
12 "accountType" : "Common",
13 "databasePrivileges" : [{
14 "dbName" : "user_photo_001",
15 "authType" : "ReadOnly"
16 },{
17 "dbName" : "user_photo_002",
18 "authType" : "ReadWrite"
19 }],
20 "type" : "OnlyMaster",
21 },{
22 "accountName" : "user2",
23 "desc" : "账号user2",
24 "type" : "OnlyMaster",
25 "status" : "Available",
26 "accountType" : "Common",
27 "databasePrivileges" : [{
28 "dbName" : "user_photo_002",
29 "authType" : "ReadOnly"
30 },{
31 "dbName" : "user_photo_003",
32 "authType" : "ReadWrite"
33 }],
34 "type" : "OnlyMaster",
35 }]
36}