user-mgmt get-user

Retrieve Cloud Pak for Data user details for the specified username.

Syntax

cpd-cli user-mgmt get-user <cpd-username> \
--profile=<cpd-profile-name> \
[--cpdconfig=<cpd-configuration-location>] \
[--output=json|yaml] \
[--verbose]

Arguments

Table 1: Command arguments
Argument Description
<cpd-username> The name of the Cloud Pak for Data user to retrieve the details for.

Options

Table 1: Command options
Option Description
--cpdconfig The Cloud Pak for Data
 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 Cloud Pak for Data configuration location.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.

--output

-o

Specify an output format. Valid formats include YAML or JSON (the default format).
Status
Optional.
Syntax
--output=json|yaml
Default value
json
Valid values
json|yaml
--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.

Retrieve Cloud Pak for Data user details for the specified username.
cpd-cli user-mgmt get-user <cpd-username> \
--profile=${CPD_PROFILE_NAME}
Example *json output.
{
  "approval_status": "approved",
  "authenticator": "default",
  "created_timestamp": 1612815298421,
  "current_account_status": "enabled",
  "deletable": true,
  "displayName": "user1",
  "email": "user1@company.com",
  "group_roles": [],
  "groups": [
    {
      "created_at": "",
      "created_by": "Cloud Pak for Data",
      "description": "All users are implicitly part of this group",
      "group_id": 10000,
      "misc": {},
      "name": "All users",
      "updated_at": ""
    }
  ],
  "internal_user": false,
  "is_custom_picture": false,
  "last_modified_timestamp": 1612815298421,
  "misc": {},
  "permissions": [
    "sign_in_only"
  ],
  "profile_picture": "",
  "role": "User",
  "uid": "1000331001",
  "user_roles": [
    "zen_user_role"
  ],
  "username": "user1"
}