Users

Version 5.6.0 introduces the ability to interact with user accounts from the cli.

user list

List Users.

user list [OPTIONS]

Options

--columns <columns>

Columns to display. [options: id, username, email, displayName, status, hardwareCount, virtualGuestCount] [default: id,username,email,displayName]

user detail

User details.

user detail [OPTIONS] IDENTIFIER

Options

-k, --keys

Show the users API key.

-p, --permissions

Display permissions assigned to this user. Master users will show no permissions

-h, --hardware

Display hardware this user has access to.

-v, --virtual

Display virtual guests this user has access to.

-l, --logins

Show login history of this user for the last 30 days

-e, --events

Show event log for this user.

Arguments

IDENTIFIER

Required argument

user permissions

User Permissions.

user permissions [OPTIONS] IDENTIFIER

Arguments

IDENTIFIER

Required argument

user edit-permissions

Enable or Disable specific permissions.

user edit-permissions [OPTIONS] IDENTIFIER

Options

--enable, --disable

Enable (DEFAULT) or Disable selected permissions

-p, --permission <permission>

Permission keyName to set, multiple instances allowed. Use keyword ALL to select ALL permisssions

-u, --from-user <from_user>

Set permissions to match this user’s permissions. Will add then remove the appropriate permissions

Arguments

IDENTIFIER

Required argument

user edit-details

Edit a Users details

JSON strings should be enclosed in ‘’ and each item should be enclosed in “”

Example:

slcli user edit-details testUser -t '{"firstName": "Test", "lastName": "Testerson"}'
user edit-details [OPTIONS] USER

Options

-t, --template <template>

A json string describing https://softlayer.github.io/reference/datatypes/SoftLayer_User_Customer/ [required]

Arguments

USER

Required argument

user create

Creates a user Users.

Remember to set the permissions and access for this new user.

Example:

slcli user create my@email.com -e my@email.com -p generate -a
-t '{"firstName": "Test", "lastName": "Testerson"}'
user create [OPTIONS] USERNAME

Options

-e, --email <email>

Email address for this user. Required for creation. [required]

-p, --password <password>

Password to set for this user. If no password is provided, user will be sent an email to generate one, which expires in 24 hours. ‘-p generate’ will create a password for you (Requires Python 3.6+). Passwords require 8+ characters, upper and lowercase, a number and a symbol.

-u, --from-user <from_user>

Base user to use as a template for creating this user. Will default to the user running this command. Information provided in –template supersedes this template.

-t, --template <template>

A json string describing https://softlayer.github.io/reference/datatypes/SoftLayer_User_Customer/

-a, --api-key

Create an API key for this user.

Arguments

USERNAME

Required argument

user delete

Sets a user’s status to CANCEL_PENDING, which will immediately disable the account,

and will eventually be fully removed from the account by an automated internal process.

Example: slcli user delete userId

user delete [OPTIONS] IDENTIFIER

Arguments

IDENTIFIER

Required argument