List details for all Cloud Pak for
Data groups.
Syntax
cpd-cli user-mgmt list-groups \
--profile=<cpd-configuration-profile-name> \
[--cpdconfig=<cpd-configuration-location>] \
[--include-members] \
[--output=json|yaml] \
[--verbose]
Arguments
The list-groups
command has no
arguments.
Options
Option |
Description |
--cpdconfig |
The Cloud Pak for Data
configuration location.
- Status
- Optional.
- Syntax
--cpdconfig=<cpd-configuration-location>
- Default value
$HOME/.cpd-cli/config
- Valid values
- A valid Cloud Pak for Data configuration location.
|
--help
-h
|
Display command
help.
- Status
- Optional.
- Syntax
--help
- Default value
- No default.
- Valid values
- Not applicable.
|
--include-members |
Include members from the group API
call.
- Status
- Optional.
- Syntax
--include-members
- Default value
- Not applicable.
- Valid values
- Not applicable.
|
--output
-o
|
Specify an output format. Valid
formats include json, yaml, csv, or text (the default
format).
- Status
- Optional.
- Syntax
--output=json|yaml|csv|text
- Default value
text
- Valid values
json|yaml|csv|text
|
--profile |
The profile-name from the Cloud
Pak for Data configuration.
- Status
- Required.
- Syntax
--profile=<cpd-configuration-profile-name>
- Default value
- default
- Valid values
- Any valid profile name from the Cloud Pak for Data configuration.
|
--verbose |
Logs include more detailed
messages.
- Status
- Optional.
- Syntax
--verbose
- Default value
- No
default.
- Valid values
- Not applicable.
|
Examples
Note: The following examples use the recommended installation environment variables.
Use a script to create environment variables with the correct values
for your environment. For more information, see Best practice: Setting up install variables.
- Lists details for all Cloud Pak for Data groups in the default
*.json output format.
-
cpd-cli user-mgmt list-groups \
--profile=<cpd-configuration-profile-name>
- Example *.json output.
[
{
"created_at": "2022-10-23T00:35:59.382Z",
"created_by": "admin",
"description": "",
"group_id": 10001,
"misc": {},
"name": "test",
"roles": [
{
"role_id": "zen_administrator_role",
"role_name": "Administrator"
}
],
"updated_at": "2022-10-23T00:35:59.382Z"
},
{
"created_at": "",
"created_by": "Cloud Pak for Data",
"description": "All users are implicitly part of this group",
"group_id": 10000,
"misc": {},
"name": "All users",
"roles": [],
"updated_at": ""
}
]
- Lists details for all Cloud Pak for Data
groups in the *.yaml output format.
-
cpd-cli user-mgmt list-groups \
--profile=<cpd-configuration-profile-name> \
--output=yaml
- Example *.yaml output.
- created_at: "2022-10-23T00:35:59.382Z"
created_by: admin
description: ""
group_id: 10001
misc: {}
name: test
roles:
- role_id: zen_administrator_role
role_name: Administrator
updated_at: "2022-10-23T00:35:59.382Z"
- created_at: ""
created_by: Cloud Pak for Data
description: All users are implicitly part of this group
group_id: 10000
misc: {}
name: All users
roles: []
updated_at: ""