You need to enable JavaScript to run this app.
文档中心
云数据库 PostgreSQL 版

云数据库 PostgreSQL 版

复制全文
下载 pdf
账号管理
DescribeDBAccounts
复制全文
下载 pdf
DescribeDBAccounts
调用 DescribeDBAccounts 接口查询账号列表。​
请求类型​
同步请求。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
​
参数​
类型​
是否必选​
示例值​
描述​
InstanceId​
String​
是​
postgres-ca7b7019****​
实例 ID。​
AccountName​
String​
否​
testuser1​
数据库账号名称,支持模糊查询。​
说明​
不传值或传空值时,会查询指定实例下的所有账号。​
PageNumber​
Integer​
否​
1​
当前页查询偏移量,默认值为 1。​
PageSize​
Integer​
否​
10​
每页记录数,取值应大于 0 且不超过 1000,默认值为 10。​
​
返回参数​
​
参数​
类型​
示例值​
描述​
Total​
Integer​
1​
数据库账号总数。​
Accounts​
Array of AccountObject​
请参见返回示例。​
数据库账号列表。​
​
AccountObject​
​
参数​
类型​
示例值​
描述​
AccountName​
String​
test1​
账号名称。​
AccountType​
String​
Normal​
数据库账号类型,取值范围如下:​
  • Super:高权限账号。​
  • Normal:普通账号。​
  • InstanceReadOnly:实例只读账号。​
AccountStatus​
String​
Available​
账号状态:​
  • Unavailable:不可用​
  • Available:可用​
AccountPrivileges​
String​
Inherit,Login,CreateRole,CreateDB​
账号的数据库权限信息。​
NotAllowPrivileges​
Array of String​
DDL​
为账号禁用的权限。当前仅支持取值为 DDL。​
说明​
  • 仅高权限账号或普通账号会返回该字段,即 AccountType 取值为 Super 或 Normal 时。​
  • 实例只读账号、无禁用权限的高权限账号和普通账号,不会返回该字段。​
​
示例​
请求示例​
​
POST /?Action=DescribeDBAccounts&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-postgresql.cn-beijing.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": "20250310161036EC563D43C4B61C93082F-838f17",​
"Action": "DescribeDBAccounts",​
"Version": "2022-01-01",​
"Service": "rds_postgresql",​
"Region": "cn-beijing"​
},​
"Result": {​
"Accounts": [​
{​
"AccountName": "test_super_user_with_DDL_permission",​
"AccountPrivileges": "Inherit,Login,CreateRole,CreateDB",​
"AccountStatus": "Available",​
"AccountType": "Super"​
},​
{​
"AccountName": "test_super_user_without_DDL_permission",​
"AccountPrivileges": "Inherit,Login,CreateRole,CreateDB",​
"AccountStatus": "Available",​
"AccountType": "Super",​
"NotAllowPrivileges": [​
"DDL"​
]​
},​
{​
"AccountName": "test_normal_user_with_DDL_permission",​
"AccountPrivileges": "Inherit,Login,CreateRole,CreateDB",​
"AccountStatus": "Available",​
"AccountType": "Normal"​
},​
{​
"AccountName": "test_normal_user_without_DDL_permission",​
"AccountPrivileges": "Inherit,Login,CreateRole,CreateDB",​
"AccountStatus": "Available",​
"AccountType": "Normal",​
"NotAllowPrivileges": [​
"DDL"​
]​
},​
{​
"AccountName": "test_InstanceReadOnly_user",​
"AccountPrivileges": "Login",​
"AccountStatus": "Available",​
"AccountType": "InstanceReadOnly"​
}​
],​
"Total": 5​
}​
}​
​
最近更新时间:2026.03.31 10:39:10
这个页面对您有帮助吗?
有用
有用
无用
无用