SHOW DELEGATED AUTHORIZATIONS

列出您拥有访问权限的有效委派授权。此命令可用于列出针对指定用户或集成(或当前用户)或您的整个账户的 DELEGATED AUTHORIZATIONS。

语法

SHOW DELEGATED AUTHORIZATIONS

SHOW DELEGATED AUTHORIZATIONS BY USER <username>

SHOW DELEGATED AUTHORIZATIONS TO SECURITY INTEGRATION <integration_name>
Copy

变体

SHOW DELEGATED AUTHORIZATIONS BY USER username

列出用户已批准的全部有效委派授权。此变体需要用户的 MODIFY 权限。

SHOW DELEGATED AUTHORIZATIONS TO SECURITY INTEGRATION integration_name

列出已为集成批准的全部有效委派授权。此变体需要 ACCOUNTADMIN 角色。

有关各变体的详细信息,请参阅:

使用说明

  • 该命令不需要正在运行的仓库即可执行。

  • 该命令仅返回当前用户的当前角色已获授至少一项访问权限的对象。

  • 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.

  • 该命令 最多 返回指定对象类型的 1 万条记录,由用于执行命令的角色的访问权限决定。即使应用了筛选器,也不会返回任何超出 1 万条限制后的记录。

    要查看存在超过 1 万条记录的结果,请在 Snowflake Information Schema 中查询相应的视图(如果存在)。

示例

列出您账户的所有委派授权:

SHOW DELEGATED AUTHORIZATIONS;

+-------------------------------+-----------+-----------+-------------------+--------------------+
| created_on                    | user_name | role_name | integration_name  | integration_status |
|-------------------------------+-----------+-----------+-------------------+--------------------|
| 2018-11-27 07:43:10.914 -0800 | JSMITH    | PUBLIC    | MY_OAUTH_INT1     | ENABLED            |
| 2018-11-27 08:14:56.123 -0800 | MJONES    | PUBLIC    | MY_OAUTH_INT2     | ENABLED            |
+-------------------------------+-----------+-----------+-------------------+--------------------+
Copy

列出指定用户的所有委派授权:

SHOW DELEGATED AUTHORIZATIONS BY USER jsmith;

+-------------------------------+-----------+-----------+-------------------+--------------------+
| created_on                    | user_name | role_name | integration_name  | integration_status |
|-------------------------------+-----------+-----------+-------------------+--------------------|
| 2018-11-27 07:43:10.914 -0800 | JSMITH    | PUBLIC    | MY_OAUTH_INT1     | ENABLED            |
+-------------------------------+-----------+-----------+-------------------+--------------------+
Copy

列出指定集成的所有委派授权:

SHOW DELEGATED AUTHORIZATIONS TO SECURITY INTEGRATION my_oauth_int2;

+-------------------------------+-----------+-----------+-------------------+--------------------+
| created_on                    | user_name | role_name | integration_name  | integration_status |
|-------------------------------+-----------+-----------+-------------------+--------------------|
| 2018-11-27 08:14:56.123 -0800 | MJONES    | PUBLIC    | MY_OAUTH_INT2     | ENABLED            |
+-------------------------------+-----------+-----------+-------------------+--------------------+
Copy
语言: 中文