CLI组

请注意

  • Groups CLI需要Databricks CLI 0.8.0或以上版本。

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

将Databricks groups CLI子命令附加到。这些子命令调用Groups API 2.0(旧版)

Databricks组——帮助
用法:databricks groups [OPTIONS] COMMAND [ARGS]…提供与Databricks组交互的实用程序。选项:-v,——version 0.8.0——debug调试模式。显示错误时的完整堆栈跟踪。——profile要使用的CLI连接配置文件。默认配置文件为“default”。-h,——help显示此消息并退出。命令:Add -member将一个已存在的主体添加到另一个已存在的组中。Options:——parent- Name TEXT要添加新成员的父组名称。必填字段。 [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用户

如果成功,则无输出。

创建组

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

Databricks组创建——group-name sql-users
“group_name”:“sql用户”}

删除组

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

删除数据库组——group-name sql-users
{}

列出可用组

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

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

列出组的成员

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

Databricks组列表成员——组名sql-users
“成员”:(“user_name”:“someone@example.com”}]}
Databricks组列表成员——组名sql-power-users
“成员”:(“group_name”:“sql用户”}]}

列出用户或组所属的组

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

Databricks组列表-家长-用户名someone@example.com
“group_name”:(“sql用户”]}
Databricks组list-parent -group-name sql-users
“group_name”:(“sql-power-users”]}

从组中删除成员

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

Databricks组删除成员\——母体名sql-power-users\——组名sql用户
Databricks组删除成员\——母体名sql用户\——用户名someone@example.com

如果成功,则无输出。