调用 DescribeDBAccounts 接口查询实例的账号信息。
同步请求。
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
InstanceId | String | 是 | vedbm-r3xq0zdl**** | 实例 ID。 说明 您可以调用 DescribeDBInstances 接口查询实例 ID。 |
PageSize | Integer | 否 | 10 | 每页记录数。取值范围 1~1000,默认值为 10。 |
PageNumber | Integer | 否 | 1 | 页码。取值大于等于 1,且不超过 Integer 的最大值,默认值为 1。 |
AccountName | String | 否 | testuser1 | 数据库账号名称,支持模糊查询。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Total | Integer | 1 | 账号总数。 |
Accounts | Array of AccountObject | 请参见返回示例。 | 账号列表。详细信息,请参见 AccountObject。 |
POST /?Action=DescribeDBAccounts&Version=2022-01-01 HTTP/1.1 Content-Type: application/json Host:vedbm.volcengineapi.com X-Date: 20220101T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20220101/cn-beijing/vedbm/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c645**** { "InstanceId": "vedbm-ca12cbqv****", "PageNumber" : 1, "PageSize" : 10 }
正常返回示例
{ "ResponseMetadata": { "RequestId": "202406261717167860DC3556BF29132202-461255", "Action": "DescribeDBAccounts", "Version": "2022-01-01", "Service": "vedbm", "Region": "cn-chongqing-sdv" }, "Result": { "Accounts": [ { "AccountName": "test_user", "AccountPrivileges": [], "AccountType": "Super" }, { "AccountName": "test3", "AccountPrivileges": [ { "AccountPrivilege": "ReadWrite", "AccountPrivilegeDetail": "SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EXECUTE,EVENT,TRIGGER", "DBName": "db1" }, { "AccountPrivilege": "ReadOnly", "AccountPrivilegeDetail": "SELECT,LOCK TABLES,SHOW VIEW", "DBName": "db2" }, { "AccountPrivilege": "Custom", "AccountPrivilegeDetail": "SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES", "DBName": "db3" } ], "AccountType": "Normal" }, ], "Total": 2 } }
更多详情,请参见错误码。