列出数据库令牌
使用 influxctl token list
命令 列出您的 InfluxDB 集群中的数据库令牌。
如果您尚未安装,请下载并安装
influxctl
CLI。使用以下内容运行
influxctl token list
- 可选: 输出格式
influxctl token list --format table
输出格式
influxctl token list
命令支持两种输出格式:table
和 json
。默认情况下,命令以表格形式输出令牌列表。为了便于程序访问命令输出,请包含 --format json
以将令牌列表格式化为 JSON。
示例输出
+--------------------------------------+----------------------+
| ID | DESCRIPTION |
+--------------------------------------+----------------------+
| 000x0000-000x-0000-X0x0-X0X00000x000 | read/write for mydb1 |
| 000x000X-Xx0X-0000-0x0X-000xX000xx00 | read-only for mydb2 |
| 00XXxXxx-000X-000X-x0Xx-00000xx00x00 | write-only for myb3 |
+--------------------------------------+----------------------+
[
{
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"cluster_id": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000",
"id": "000x0000-000x-0000-X0x0-X0X00000x000",
"description": "read/write for mydb1",
"permissions": {}
},
{
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"cluster_id": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000",
"id": "000x000X-Xx0X-0000-0x0X-000xX000xx00",
"description": "read-only for mydb2",
"permissions": {}
},
{
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"cluster_id": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000",
"id": "00XXxXxx-000X-000X-x0Xx-00000xx00x00",
"description": "write-only for myb3",
"permissions": {}
}
]
这个页面有帮助吗?
感谢您的反馈!