vinfra domain user create

Create a new domain user:

usage: vinfra domain user create [--email <email>] [--description <description>]
                                 [--assign <project> <role>]
                                 [--assign-domain <domain> <roles>]
                                 [--domain-permissions <domain_permissions>]
                                 [--system-permissions <system_permissions>]
                                 [--enable | --disable] --domain <domain> <name>
--email <email>
User email
--description <description>
User description
--assign <project> <role>

Assign a user to a project with one or more permission sets. Specify this option multiple times to assign the user to multiple projects.

  • <project>: project ID or name
  • <role>: user role in the project (project_admin)
--assign-domain <domain> <roles>

Assign a user to a domain with one or more permission sets. Specify this option multiple times to assign the user to multiple domains. This option is only valid for service accounts.

  • <domain>: domain ID or name
  • <roles>: a comma-separated list of service account roles (compute)
--domain-permissions <domain_permissions>
A comma-separated list of domain permissions. View the list of available domain permissions using vinfra domain user list-available-roles | grep domain.
--enable
Enable user
--disable
Disable user
--domain <domain>
Domain name or ID
<name>
User name

Example:

#  vinfra domain user create myuser --domain mydomain \
--domain-permissions domain_admin
Password:
+--------------------+----------------------------------+
| Field              | Value                            |
+--------------------+----------------------------------+
| assigned_domains   | []                               |
| assigned_projects  | []                               |
| description        |                                  |
| domain_id          | 2929ff42b1e64884a05dea3011862aed |
| domain_permissions | - domain_admin                   |
| email              |                                  |
| enabled            | True                             |
| id                 | a9c67c6acf1f4df1818fdeeee0b4bd5e |
| name               | myuser                           |
| role               | domain_admin                     |
| system_permissions | []                               |
| tags               | []                               |
+--------------------+----------------------------------+

This command creates and enables a new administrator account myuser within the domain mydomain. It also sets password for the new user.