DESCRIBE EXTERNAL VOLUME

描述 外部卷 的属性。

DESCRIBE 可以缩写为 DESC。

另请参阅:

ALTER EXTERNAL VOLUMECREATE EXTERNAL VOLUMEDROP EXTERNAL VOLUMESHOW EXTERNAL VOLUMES

语法

DESC[RIBE] EXTERNAL VOLUME <name>
Copy

参数

name

指定要描述的外部卷的标识符。如果标识符包含空格或特殊字符,则整个字符串必须放在双引号内(例如,"My object")。放在双引号内的标识符也区分大小写。

输出

命令的输出包括以下列,它们描述了对象的属性和元数据:

描述

parent_property

父属性。此列包括 STORAGE_LOCATIONS 属性,其中包含一组命名的云存储位置。

property

属性的名称。此列可以包含下表中列出的属性。

property_type

属性类型。

property_value

分配给属性的值。

property_default

默认属性值。

property 列可以包含外部卷对象的以下属性:

属性

描述

comment

为外部卷设置的注释(如果有)。

allow_writes

指定是否允许对外部卷执行写入操作。

storage_location_n

与外部卷关联的云存储位置的详细信息,其中 n 是唯一编号,用于区分该位置与 STORAGE_LOCATIONS 列表中的其他位置;例如 storage_location_1

有关存储位置属性的更多信息,请参阅 CREATE EXTERNAL VOLUME

active

外部卷的 活动存储位置 的名称。

访问控制要求

用于执行此操作的 角色 必须至少具有以下 权限

权限

对象

备注

USAGE

外部卷

有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色

有关对 安全对象 执行 SQL 操作的相应角色和权限授予的一般信息,请参阅 访问控制概述

使用说明

  • 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 EXTERNAL VOLUME my_external_volume;
Copy

下面显示了外部卷的 DESCRIBE EXTERNAL VOLUME 的输出和一个存储位置。为便于显示缩写了 STORAGE_LOCATION_1 的属性值。

+-------------------+--------------------+---------------+-------------------------------------------------------------------------------------------+------------------+
| parent_property   | property           | property_type | property_value                                                                            | property_default |
|-------------------+--------------------+---------------+-------------------------------------------------------------------------------------------+------------------|
|                   | ALLOW_WRITES       | Boolean       | true                                                                                      | true             |
| STORAGE_LOCATIONS | STORAGE_LOCATION_1 | String        | {"NAME":"my_storage_us_west","STORAGE_PROVIDER":"S3","STORAGE_BASE_URL":"s3://...", ...}  |                  |
| STORAGE_LOCATIONS | ACTIVE             | String        | my_storage_us_west                                                                        |                  |
+-------------------+--------------------+---------------+-------------------------------------------------------------------------------------------+------------------+
语言: 中文