DESCRIBE SESSION POLICY¶
描述有关会话策略的详细信息。
DESCRIBE 可以缩写为 DESC。
- 另请参阅:
语法¶
{ DESCRIBE | DESC } SESSION POLICY <name>
参数¶
name会话策略的标识符;对于您的账户必须是唯一的。
标识符值必须以字母字符开头,且不能包含空格或特殊字符,除非整个标识符字符串放在双引号内(例如
"My object")。放在双引号内的标识符也区分大小写。有关更多详细信息,请参阅 标识符要求。
访问控制要求¶
用于执行此 SQL 命令的 角色 必须至少具有以下 一项 权限:
权限 |
对象 |
备注 |
|---|---|---|
APPLY SESSION POLICY |
账户 |
|
OWNERSHIP |
会话策略 |
OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege). |
The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema. Note that a role granted any privilege on a schema allows that role to resolve the schema. For example, a role granted CREATE privilege on a schema can create objects on that schema without also having USAGE granted on that schema.
有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色。
有关对 安全对象 执行 SQL 操作的相应角色和权限授予的一般信息,请参阅 访问控制概述。
有关会话策略 DDL 和权限的其他详细信息,请参阅 管理会话策略。
使用说明¶
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.
输出¶
命令的输出包括以下列,它们描述了对象的属性和元数据:
列 |
描述 |
|---|---|
|
创建会话策略的时间戳。 |
|
会话策略的标识符。 |
|
对于 Snowflake 客户端和程序化客户端,在用户必须再次对 Snowflake 进行身份验证之前,会话可以空闲的分钟数。 |
|
对于 Snowsight,在用户必须再次对 Snowflake 进行身份验证之前,会话可以空闲的分钟数。 |
|
会话策略的次要角色(如果有)。 |
|
会话策略的注释。 |
示例¶
DESC SESSION POLICY session_policy_prod_1;
+---------------------------------+-----------------------+---------------------------+------------------------------+-------------------------+--------------------------------------------------+
| created_on | name | session_idle_timeout_mins | session_ui_idle_timeout_mins | allowed_secondary_roles | comment |
+---------------------------------+-----------------------+---------------------------+------------------------------+-------------------------+--------------------------------------------------+
| Mon, 11 Jan 2021 00:00:00 -0700 | session_policy_prod_1 | 60 | 30 | [] | session policy for use in the prod_1 environment |
+---------------------------------+-----------------------+---------------------------+------------------------------+-------------------------+--------------------------------------------------+