SHOW ROLES IN SERVICE¶
列出与服务关联的所有服务角色。这些是服务规范中定义的角色。有关更多信息,请参阅 管理与服务相关的权限。
语法¶
SHOW ROLES IN SERVICE <name>
参数¶
name服务的名称。
访问控制要求¶
权限 |
对象 |
备注 |
|---|---|---|
USAGE |
服务 |
有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色。
输出¶
命令输出提供以下列:
列 |
描述 |
|---|---|
|
创建服务角色的日期和时间 |
|
服务角色名称 |
|
服务角色的注释(如果有) |
使用说明¶
该命令不需要正在运行的仓库即可执行。
该命令仅返回当前用户的当前角色已获授至少一项访问权限的对象。
MANAGE GRANTS 访问权限隐式允许其持有者查看账户中的每个对象。默认情况下,只有账户管理员(具有 ACCOUNTADMIN 角色的用户)和安全管理员(具有 SECURITYADMIN 角色的用户)才具有 MANAGE GRANTS 权限。
To post-process the output of this command, you can use the pipe operator (
->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is
type, then specify"type"for the identifier.
示例¶
列出 echo_service 服务中的服务角色。
SHOW ROLES IN SERVICE echo_service;
+-------------------------------+-------------------------+------------+
| created_on | name | comment |
+-------------------------------+-------------------------+------------+
| 2024-04-29 14:58:50.063 -0700 | ALL_ENDPOINTS_USAGE | |
+-------------------------------+-------------------------+------------+