3个稳定版本
5.0.4+20240224 | 2024年3月5日 |
---|---|
3.1.0+20220223 | 2022年4月26日 |
3.0.0+20220223 | 2022年3月8日 |
在 Web编程 中排名 2431
每月下载 48 次
3.5MB
42K SLoC
dataplex1
命令行界面(CLI)允许您从终端舒适地使用Google Cloud Dataplex服务的多数功能。
默认情况下,所有输出都打印到标准输出,但可以使用标志将其定向到文件,而不依赖于shell的能力。错误将打印到标准错误,并导致程序退出代码非零。
如果请求数据结构,这些将以格式化的JSON返回,以便作为其他工具的输入。
有关云Dataplex API的其他所有信息,请参阅官方文档网站。
安装和源代码
使用cargo安装命令行界面
cargo install google-dataplex1-cli
用法
此文档是根据修订版 20240224 中的云Dataplex API生成的。CLI版本为 5.0.4。
dataplex1 [options]
projects
locations-aspect-types-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-aspect-types-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-aspect-types-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-attribute-bindings-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-attribute-bindings-delete <name> [-p <v>]... [-o <out>]
locations-data-attribute-bindings-get <name> [-p <v>]... [-o <out>]
locations-data-attribute-bindings-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-data-attribute-bindings-list <parent> [-p <v>]... [-o <out>]
locations-data-attribute-bindings-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-attribute-bindings-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-attribute-bindings-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-scans-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-scans-delete <name> [-p <v>]... [-o <out>]
locations-data-scans-get <name> [-p <v>]... [-o <out>]
locations-data-scans-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-data-scans-jobs-get <name> [-p <v>]... [-o <out>]
locations-data-scans-jobs-list <parent> [-p <v>]... [-o <out>]
locations-data-scans-list <parent> [-p <v>]... [-o <out>]
locations-data-scans-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-scans-run <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-scans-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-scans-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-taxonomies-attributes-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-taxonomies-attributes-delete <name> [-p <v>]... [-o <out>]
locations-data-taxonomies-attributes-get <name> [-p <v>]... [-o <out>]
locations-data-taxonomies-attributes-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-data-taxonomies-attributes-list <parent> [-p <v>]... [-o <out>]
locations-data-taxonomies-attributes-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-taxonomies-attributes-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-taxonomies-attributes-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-taxonomies-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-taxonomies-delete <name> [-p <v>]... [-o <out>]
locations-data-taxonomies-get <name> [-p <v>]... [-o <out>]
locations-data-taxonomies-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-data-taxonomies-list <parent> [-p <v>]... [-o <out>]
locations-data-taxonomies-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-taxonomies-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-data-taxonomies-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-entry-groups-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-entry-groups-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-entry-groups-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-entry-types-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-entry-types-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-entry-types-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-get <name> [-p <v>]... [-o <out>]
locations-governance-rules-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-governance-rules-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-governance-rules-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-actions-list <parent> [-p <v>]... [-o <out>]
locations-lakes-content-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-content-delete <name> [-p <v>]... [-o <out>]
locations-lakes-content-get <name> [-p <v>]... [-o <out>]
locations-lakes-content-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-lakes-content-list <parent> [-p <v>]... [-o <out>]
locations-lakes-content-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-content-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-content-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-contentitems-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-contentitems-delete <name> [-p <v>]... [-o <out>]
locations-lakes-contentitems-get <name> [-p <v>]... [-o <out>]
locations-lakes-contentitems-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-lakes-contentitems-list <parent> [-p <v>]... [-o <out>]
locations-lakes-contentitems-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-contentitems-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-contentitems-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-delete <name> [-p <v>]... [-o <out>]
locations-lakes-environments-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-environments-delete <name> [-p <v>]... [-o <out>]
locations-lakes-environments-get <name> [-p <v>]... [-o <out>]
locations-lakes-environments-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-lakes-environments-list <parent> [-p <v>]... [-o <out>]
locations-lakes-environments-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-environments-sessions-list <parent> [-p <v>]... [-o <out>]
locations-lakes-environments-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-environments-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-get <name> [-p <v>]... [-o <out>]
locations-lakes-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-lakes-list <parent> [-p <v>]... [-o <out>]
locations-lakes-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-tasks-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-tasks-delete <name> [-p <v>]... [-o <out>]
locations-lakes-tasks-get <name> [-p <v>]... [-o <out>]
locations-lakes-tasks-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-lakes-tasks-jobs-cancel <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-tasks-jobs-get <name> [-p <v>]... [-o <out>]
locations-lakes-tasks-jobs-list <parent> [-p <v>]... [-o <out>]
locations-lakes-tasks-list <parent> [-p <v>]... [-o <out>]
locations-lakes-tasks-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-tasks-run <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-tasks-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-tasks-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-actions-list <parent> [-p <v>]... [-o <out>]
locations-lakes-zones-assets-actions-list <parent> [-p <v>]... [-o <out>]
locations-lakes-zones-assets-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-assets-delete <name> [-p <v>]... [-o <out>]
locations-lakes-zones-assets-get <name> [-p <v>]... [-o <out>]
locations-lakes-zones-assets-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-lakes-zones-assets-list <parent> [-p <v>]... [-o <out>]
locations-lakes-zones-assets-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-assets-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-assets-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-delete <name> [-p <v>]... [-o <out>]
locations-lakes-zones-entities-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-entities-delete <name> [-p <v>]... [-o <out>]
locations-lakes-zones-entities-get <name> [-p <v>]... [-o <out>]
locations-lakes-zones-entities-list <parent> [-p <v>]... [-o <out>]
locations-lakes-zones-entities-partitions-create <parent> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-entities-partitions-delete <name> [-p <v>]... [-o <out>]
locations-lakes-zones-entities-partitions-get <name> [-p <v>]... [-o <out>]
locations-lakes-zones-entities-partitions-list <parent> [-p <v>]... [-o <out>]
locations-lakes-zones-entities-update <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-get <name> [-p <v>]... [-o <out>]
locations-lakes-zones-get-iam-policy <resource> [-p <v>]... [-o <out>]
locations-lakes-zones-list <parent> [-p <v>]... [-o <out>]
locations-lakes-zones-patch <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-set-iam-policy <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-lakes-zones-test-iam-permissions <resource> (-r <kv>)... [-p <v>]... [-o <out>]
locations-list <name> [-p <v>]... [-o <out>]
locations-operations-cancel <name> (-r <kv>)... [-p <v>]... [-o <out>]
locations-operations-delete <name> [-p <v>]... [-o <out>]
locations-operations-get <name> [-p <v>]... [-o <out>]
locations-operations-list <name> [-p <v>]... [-o <out>]
dataplex1 --help
Configuration:
[--scope <url>]...
Specify the authentication a method should be executed in. Each scope
requires the user to grant this application permission to use it.
If unset, it defaults to the shortest scope url for a particular method.
--config-dir <folder>
A directory into which we will store our persistent data. Defaults to
a user-writable directory that we will create during the first invocation.
[default: ~/.google-service-cli]
配置
程序将所有持久数据存储在 ~/.google-service-cli
目录中的 JSON 文件中,文件名以 dataplex1-
开头。您可以使用 --config-dir
标志在每次调用中更改用于存储配置的目录。
以下段落提供了有关各种类型持久数据的更多信息。
身份验证
大多数API需要用户对任何请求进行身份验证。如果是这种情况,则 作用域 确定了授予的权限集。这些通常不超过 只读 或 完全访问。
如果未设置,则系统将自动选择最小的可行作用域,例如,在调用只读方法时,它只会请求只读作用域。您可以使用 --scope
标志直接指定作用域。所有适用作用域均在各自方法的CLI文档中进行了记录。
首次使用作用域时,系统会要求用户授权。根据CLI的说明授予权限或拒绝。
如果作用域被用户认证,相关的信息将存储在配置目录中,格式为JSON,例如:~/.google-service-cli/dataplex1-token-<scope-hash>.json
。无需手动管理这些令牌。
要撤销授权的认证,请参阅官方文档。
应用程序密钥
为了允许任何应用程序使用Google服务,它需要通过Google开发者控制台进行注册。应用程序可能使用的API将逐个启用。大多数API可以免费使用,并且有每日配额。
为了在不强制任何人注册自己的应用程序的情况下更方便地使用CLI,CLI自带默认应用程序密钥,并进行相应配置。这也意味着全球范围内的重用可能会耗尽每日配额。
您可以通过在此位置放置自己的密钥文件来解决这个问题:~/.google-service-cli/dataplex1-secret.json
,假设已为它启用了所需的dataplex API。此类密钥文件可以在Google开发者控制台的APIs & auth -> Credentials -> Download JSON处下载并直接使用。
有关如何设置Google项目和启用API的更多信息,请参阅官方文档。
调试
尽管CLI尽力提供可用的错误信息,但有时可能需要了解导致特定问题的确切原因。这是通过允许所有客户端-服务器通信以原始形式输出到标准错误来完成的。
--debug
标志将使用Debug
表示法将错误打印到标准错误。
您可以考虑将标准错误重定向到文件以方便使用,例如:dataplex1 --debug <resource> <method> [options] 2>debug.txt
。
依赖项
~20–31MB
~580K SLoC