DESCRIBE SECRET¶
描述密钥的属性。
DESCRIBE 可以缩写为 DESC。
语法¶
{ DESC | DESCRIBE } SECRET <name>
参数¶
name指定要描述的密钥的标识符。如果标识符包含空格或特殊字符,则整个字符串必须放在双引号内。放在双引号内的标识符也区分大小写。
输出¶
命令输出在以下列中提供密钥属性和元数据:
列 |
描述 |
|---|---|
|
创建密钥的日期和时间。 |
|
密钥的名称。 |
|
包含密钥的架构的名称。 |
|
包含密钥的数据库的名称。 |
|
拥有密钥的角色的名称。 |
|
密钥的注释,如果没有指定注释,则显示 NULL。 |
|
|
|
存储在密钥中的用户名。 |
|
OAuth 访问令牌过期的时间戳字符串。 |
|
OAuth 刷新令牌过期的时间戳字符串,如果密钥没有存储这个值,则显示 NULL。 |
|
在以下情况下使用的以逗号分隔的范围列表:在 OAuth 客户端凭据流程期间,对集成具有 USAGE 权限的角色从 OAuth 服务器发出请求。如果没有范围,则显示 NULL。 |
|
密钥中引用的外部 API 身份验证集成的名称,如果密钥没有引用外部 API 身份验证集成,则显示 NULL。 |
|
用于 对称密钥 的算法。 |
|
用于 对称密钥 的密钥长度。 |
访问控制要求¶
权限 |
对象 |
备注 |
|---|---|---|
USAGE |
密钥 |
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.
有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色。
使用说明¶
Snowflake 从不返回
PASSWORD属性值。
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.
示例¶
描述密钥:
DESC SECRET service_now_creds_pw;