PermissionCli¶
PermissionCli
is used by UnityCatalogCli to handle permission
sub-commands.
$ ./bin/uc permission --help
Please provide a valid sub-command for permission.
Valid sub-commands for permission are: get, create, delete
For detailed help on permission sub-commands, use bin/uc permission <sub-command> --help
Handle Command Line¶
handle
handles the given cmd
.
handle
creates a GrantsApi (with the given ApiClient).
Subcommand | Handler | API Handlers |
---|---|---|
create | updatePermission | GrantsApi |
delete | updatePermission | GrantsApi |
get | getPermission | GrantsApi |
handle
is used when:
UnityCatalogCli
is launched on command line withpermission
command
Get Permission¶
getPermission
handles get
sub-command.
Usage: bin/uc permission get [options]
Required Params:
--securable_type The type of the securable
--name The name of the entity.
Optional Params:
--server UC Server to connect to. Default is reference server.
--auth_token PAT token to authorize uc requests.
--output To indicate CLI output format preference. Supported values are json and jsonPretty.
--principal The target principal of the permission change
getPermission
extracts the following command-line options from the given JSONObject
:
securable_type
name
principal
getPermission
requests the GrantsApi for the privilege assignments of the given name
(of securable_type
type).