You need to enable JavaScript to run this app.
导航

DescribeDBAccounts

最近更新时间2023.12.07 22:02:27

首次发布时间2023.11.15 22:39:51

调用 DescribeDBAccounts 接口查询账号列表。

请求类型

同步请求。

请求参数

名称类型是否必选示例值描述
InstanceIdStringpostgres-ca7b7019****实例 ID。
AccountNameStringtestuser1数据库账号名称,支持模糊查询。
PageNumberInteger1当前页查询偏移量,默认值为 1。
PageSizeInteger10每页记录数,取值应大于 0 且不超过 1000,默认值为 10。

返回参数

名称类型示例值描述
TotalInteger1数据库账号总数。
AccountsArray of AccountObject请参见返回示例关于 AccountObject 的更多信息,请参见数据结构

请求示例

POST /?Action=DescribeDBAccounts&Version=2022-01-01 HTTP/1.1
Content-Type: application/json
Host: rds.volcengineapi.com
X-Date: 20231002T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
{
        "InstanceId": "postgres-ca7b7019****",
        "PageSize": 10,
        "PageNumber": 1
}

返回示例

正常返回示例

{
    "ResponseMetadata": {
        "RequestId": "20230802164405EDD563E45923BDFC3186",
        "Action": "DescribeDBAccounts",
        "Version": "2022-01-01",
        "Service": "rds_postgresql",
        "Region": "cn-beijing"
    },
    "Result": {
        "Accounts": [
            {
                "AccountName": "yy_123",
                "AccountPrivileges": "Inherit,Login,CreateRole,CreateDB",
                "AccountStatus": "Available",
                "AccountType": "Super"
            },
            {
                "AccountName": "test123",
                "AccountPrivileges": "Inherit,Login,CreateDB",
                "AccountStatus": "Available",
                "AccountType": "Normal"
            }
        ],
        "Total": 2
    }
}