CLI(遗留)

重要的

这个文档已经退休了,可能不会被更新。

这个信息适用于遗留数据砖CLI版本0.17及以下。砖建议你使用新砖CLI的版本0.200或更高版本。看到砖CLI。找到你的版本的砖CLI,运行- v

从砖CLI或低于0.17版本迁移到砖CLI版本0.200或更高版本,看看砖CLI的迁移

请注意

  • 组CLI需要砖CLI 0.8.0或以上。

  • 你一定是一个砖管理员调用此API。

你跑砖组CLI子命令通过添加。这些子命令调用组API

砖团体——帮助
用法:砖组[选项]命令(ARGS)……提供实用与砖组。选项:- v、——版本0.8.0调试调试模式。显示完整的堆栈跟踪误差。——概要文本使用CLI连接配置文件。默认的配置文件是“默认”。- h,帮助显示此消息并退出。命令:添加成员添加现有的主体到另一个现有的组。选择:——母体名文本的名称母公司新成员将被添加。这个字段是必需的。 [required] --user-name TEXT The user name which will be added to the parent group. --group-name TEXT If group name which will be added to the parent group. create Create a new group with the given name. Options: --group-name TEXT [required] delete Remove a group from this organization. Options: --group-name TEXT [required] list Return all of the groups in a workspace. list-members Return all of the members of a particular group. Options: --group-name TEXT [required] list-parents Retrieve all groups in which a given user or group is a member. Options: --user-name TEXT --group-name TEXT remove-member Removes a user or group from a group. Options: --parent-name TEXT Name of the parent group to which the new member will be removed. This field is required. [required] --user-name TEXT The user name which will be removed from the parent group. --group-name TEXT If group name which will be removed from the parent group.

将成员添加到组

显示使用文档,运行添加成员——帮助

砖组添加成员\——母体名sql用户\——用户名someone@example.com
砖组添加成员\——母体名sql-power-users\——组名sql用户

如果成功,没有显示输出。

创建一个组

显示使用文档,运行创建——帮助

砖组的创建,组名sql用户
{“group_name”:“sql用户”}

删除一组

显示使用文档,运行删除——帮助

砖组的删除,组名sql用户
{}

可用的组列表

显示使用文档,运行列表——帮助

砖组列表
{“group_name”:(“sql用户”,“sql-power-users”,“sql-admins”]}

一组的成员列表

显示使用文档,运行国家——帮助

砖组的国家——组名sql用户
{“成员”:({“user_name”:“someone@example.com”}]}
砖组的国家——组名sql-power-users
{“成员”:({“group_name”:“sql用户”}]}

一个用户或组所属的组列表

显示使用文档,运行list-parents——帮助

砖组list-parents——用户名someone@example.com
{“group_name”:(“sql用户”]}
砖组list-parents——组名sql用户
{“group_name”:(“sql-power-users”]}

删除组中的一员

显示使用文档,运行remove-member——帮助

砖组remove-member\——母体名sql-power-users\——组名sql用户
砖组remove-member\——母体名sql用户\——用户名someone@example.com

如果成功,没有显示输出。