查看云数据库 RDS 的权限信息 - 仅支持 MySQL,Percona,MariaDB
GET
https://rds.jdcloud-api.com/v1/regions/{regionId}/common:describePrivilege
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
regionId | String | True | 地域代码,取值范围参见《各地域及可用区对照表》 |
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
engine | String | True | 设置可见的引擎类型,如 MySQL 等 |
名称 | 类型 | 描述 |
---|---|---|
result | Result |
名称 | 类型 | 描述 |
---|---|---|
globalPrivileges | String[ ] | 全局权限信息,权限的具体定义参见枚举参数定义 |
databasePrivileges | String[ ] | 数据库权限信息,权限的具体定义参见枚举参数定义 |
tablePrivileges | String[ ] | 数据库表的权限信息,权限的具体定义参见枚举参数定义 |
返回码 | 描述 |
---|---|
200 | OK |
GET
复制成功
public void testDescribePrivilege() {
DescribePrivilegeRequest request = new DescribePrivilegeRequest();
request.setRegionId("cn-north-1");
request.setEngine("MySQL");
DescribePrivilegeResponse response = rdsClient.describePrivilege(request);
System.out.println(new Gson().toJson(response));
}
复制成功
{
"requestId": "bpa3kg3q43nwe1f5195f969n4n4rktcc",
"result": {
"databasePrivileges": [
"DROP",
"EVENT",
"LOCK TABLES",
"REFERENCES",
"ALTER",
"CREATE VIEW",
"CREATE",
"DELETE",
"INDEX",
"INSERT",
"SELECT",
"SHOW VIEW",
"TRIGGER",
"UPDATE",
"ALTER ROUTINE",
"EXECUTE",
"CREATE TEMPORARY TABLES",
"CREATE ROUTINE"
],
"globalPrivileges": [
"PROCESS",
"REPLICATION SLAVE",
"REPLICATION CLIENT"
],
"tablePrivileges": [
"ALTER",
"CREATE VIEW",
"CREATE",
"DELETE",
"DROP",
"INDEX",
"INSERT",
"REFERENCES",
"SELECT",
"SHOW VIEW",
"TRIGGER",
"UPDATE"
]
}
}
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通