List details for all Cloud Pak for
Data groups.
Syntax
cpd-cli user-mgmt list-groups \
--profile=<cpd-profile-name> \
[--cpdconfig=<cpd-configuration-location>] \
[--include-members] \
[--output=json|yaml] \
[--verbose]
Arguments
The list-groups command has no
arguments.
Options
Table 1: Command options
| Option |
Description |
--cpdconfig |
The IBM Software Hub
configuration location. For example,
$HOME/.cpd-cli/config.
- Status
- Optional.
- Syntax
--cpdconfig=<cpd-configuration-location>
- Default value
$HOME/.cpd-cli/config
- Valid values
- A valid IBM® Software Hub
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 name of the profile that you
created to store information about an instance of Cloud Pak for Data and your credentials for the
instance.
- Status
- Required.
- Syntax
--profile=<cpd-profile-name>
- Default value
- No default.
- Valid values
-
The name of the profile that you created.
|
--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.
It is strongly recommended that you use a script to create
environment variables with the correct values for your
environment. For more information, see Setting up installation environment variables.
- Lists details for all Cloud Pak for Data groups in the default
*.json output format.
-
cpd-cli user-mgmt list-groups \
--profile=${CPD_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_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: ""