查询账号列表(放弃版)
更新时间:2022-11-17
说明
- 只能查看指定实例的账号列表
请求结构
GET /v{version}/instance/{instanceId}/account HTTP/1.1
HOST: rds.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
version | string | 是 | URL参数 | API 版本号 |
instanceId | string | 是 | URL参数 | 实例ID |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
accounts | List Account | 由Account对象组成的数组。 |
请求示例
GET /v{version}/instance/{instanceId}/account HTTP/1.1
HOST: rds.bj.baidubce.com
Authorization: bce-auth-v1/rdsak/2016-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: 567
{
"accounts" : [{
"accountName" : "user1",
"desc" : "账号user1",
"type" : "OnlyMaster",
"status" : "Available",
"accountType" : "Common",
"databasePrivileges" : [{
"dbName" : "user_photo_001",
"authType" : "ReadOnly"
},{
"dbName" : "user_photo_002",
"authType" : "ReadWrite"
}],
"type" : "OnlyMaster",
},{
"accountName" : "user2",
"desc" : "账号user2",
"type" : "OnlyMaster",
"status" : "Available",
"accountType" : "Common",
"databasePrivileges" : [{
"dbName" : "user_photo_002",
"authType" : "ReadOnly"
},{
"dbName" : "user_photo_003",
"authType" : "ReadWrite"
}],
"type" : "OnlyMaster",
}]
}