云数据库RDS

    查询账号列表

    说明

    • 只能查看指定实例的账号列表

    请求结构

    GET /v{version}/instance/{instanceId}/account HTTP/1.1
    HOST: rds.bj.baidubce.com
    Authorization: authorization string

    请求头域

    除公共头域外,无其它特殊头域。

    请求参数

    参数名称类型是否必须参数位置描述
    versionstringURL参数API 版本号
    instanceIdstringURL参数实例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",
        }]
    }
    上一篇
    创建账号
    下一篇
    查询特定账号信息