3.81. Hammer 用户


操作用户

Usage:
    hammer user [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 access-token                  Managing personal access tokens
 add-role                      Assign a user role
 create                        Create a user
 delete, destroy               Delete a user
 info, show                    Show a user
 list, index                   List all users
 mail-notification             Managing personal mail notifications
 remove-role                   Remove a user role
 ssh-keys                      Managing User SSH Keys.
 update                        Update a user

Options:
 -h, --help                    Print help

3.81.1. hammer 用户 access-token

管理个人访问令牌

Usage:
    hammer user access-token [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 create                        Create a Personal Access Token for a user
 info, show                    Show a Personal Access Token for a user
 list, index                   List all Personal Access Tokens for a user
 revoke                        Revoke a Personal Access Token for a user

Options:
 -h, --help                    Print help

3.81.1.1. hammer 用户 access-token create

为用户创建个人访问令牌

Usage:
    hammer user access-token create [OPTIONS]

Options:
 --expires-at VALUE            Expiry Date
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --user VALUE                  User's login to search by
 --user-id VALUE               ID of the user
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.1.2. hammer 用户 access-token info

显示用户的个人访问令牌

Usage:
    hammer user access-token <info|show> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  Name to search by
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --user VALUE                  User's login to search by
 --user-id VALUE               ID of the user
 -h, --help                    Print help

Predefined field sets:
  -------------|-----|---------|-----
  FIELDS       | ALL | DEFAULT | THIN
  -------------|-----|---------|-----
  Id           | x   | x       | x
  Name         | x   | x       | x
  Active       | x   | x       |
  Expires at   | x   | x       |
  Created at   | x   | x       |
  Last used at | x   | x       |
  -------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.1.3. hammer 用户 access-token list

列出用户的所有个人访问令牌

Usage:
    hammer user access-token <list|index> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --order VALUE                 Sort and order by a searchable field, e.g. '<field> DESC'
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --page NUMBER                 Page number, starting at 1
 --per-page VALUE              Number of results per page to return, 'all' to return all results
 --search VALUE                Filter results
 --user VALUE                  User's login to search by
 --user-id VALUE               ID of the user
 -h, --help                    Print help

Predefined field sets:
  -----------|-----|---------|-----
  FIELDS     | ALL | DEFAULT | THIN
  -----------|-----|---------|-----
  Id         | x   | x       | x
  Name       | x   | x       | x
  Active     | x   | x       |
  Expires at | x   | x       |
  -----------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

Search / Order fields:
  name                string
  user_id             integer

3.81.1.4. hammer 用户 access-token revoke

为用户撤销个人访问令牌

Usage:
    hammer user access-token revoke [OPTIONS]

Options:
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  Name to search by
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --user VALUE                  User's login to search by
 --user-id VALUE               ID of the user
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.2. hammer user add-role

分配用户角色

Usage:
    hammer user add-role [OPTIONS]

Options:
 --id VALUE
 --login VALUE                 User's login to search by
 --role VALUE                  User role name
 --role-id NUMBER
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.3. hammer 用户创建

创建用户

Usage:
    hammer user create [OPTIONS]

Options:
 --admin BOOLEAN                  Is an admin account
 --ask-password BOOLEAN
 --auth-source VALUE              Name to search by
 --auth-source-id NUMBER
 --default-location VALUE         Default location name
 --default-location-id NUMBER
 --default-organization VALUE     Default organization name
 --default-organization-id NUMBER
 --description VALUE
 --disabled BOOLEAN
 --firstname VALUE
 --lastname VALUE
 --locale ENUM                    User's preferred locale
                                  Possible value(s): 'ca', 'cs_CZ', 'de', 'en', 'en_GB', 'es', 'fr', 'gl', 'it',
                                  'ja', 'ko', 'nl_NL', 'pl', 'pt_BR', 'ru', 'sv_SE', 'zh_CN', 'zh_TW'
 --location VALUE                 Set the current location context for the request
 --location-id NUMBER             Set the current location context for the request
 --location-ids LIST              REPLACE locations with given ids
 --location-title VALUE           Set the current location context for the request
 --location-titles LIST
 --locations LIST
 --login VALUE
 --mail VALUE
 --organization VALUE             Set the current organization context for the request
 --organization-id NUMBER         Set the current organization context for the request
 --organization-ids LIST          REPLACE organizations with given ids.
 --organization-title VALUE       Set the current organization context for the request
 --organization-titles LIST
 --organizations LIST
 --password VALUE                 Required unless user is in an external authentication source
 --role-ids LIST
 --roles LIST
 --timezone ENUM                  User's timezone
                                  Possible value(s): 'International Date Line West', 'American Samoa', 'Midway
                                  Island', 'Hawaii', 'Alaska', 'Pacific Time (US & Canada)', 'Tijuana', 'Arizona',
                                  'Chihuahua', 'Mazatlan', 'Mountain Time (US & Canada)', 'Central America',
                                  'Central Time (US & Canada)', 'Guadalajara', 'Mexico City', 'Monterrey',
                                  'Saskatchewan', 'Bogota', 'Eastern Time (US & Canada)', 'Indiana (East)',
                                  'Lima', 'Quito', 'Atlantic Time (Canada)', 'Caracas', 'Georgetown', 'La Paz',
                                  'Puerto Rico', 'Santiago', 'Newfoundland', 'Brasilia', 'Buenos Aires',
                                  'Greenland', 'Montevideo', 'Mid-Atlantic', 'Azores', 'Cape Verde Is.',
                                  'Casablanca', 'Dublin', 'Edinburgh', 'Lisbon', 'London', 'Monrovia', 'UTC',
                                  'Amsterdam', 'Belgrade', 'Berlin', 'Bern', 'Bratislava', 'Brussels', 'Budapest',
                                  'Copenhagen', 'Ljubljana', 'Madrid', 'Paris', 'Prague', 'Rome', 'Sarajevo',
                                  'Skopje', 'Stockholm', 'Vienna', 'Warsaw', 'West Central Africa', 'Zagreb',
                                  'Zurich', 'Athens', 'Bucharest', 'Cairo', 'Harare', 'Helsinki', 'Jerusalem',
                                  'Kaliningrad', 'Kyiv', 'Pretoria', 'Riga', 'Sofia', 'Tallinn', 'Vilnius',
                                  'Baghdad', 'Istanbul', 'Kuwait', 'Minsk', 'Moscow', 'Nairobi', 'Riyadh', 'St.
                                  Petersburg', 'Volgograd', 'Tehran', 'Abu Dhabi', 'Baku', 'Muscat', 'Samara',
                                  'Tbilisi', 'Yerevan', 'Kabul', 'Ekaterinburg', 'Islamabad', 'Karachi',
                                  'Tashkent', 'Chennai', 'Kolkata', 'Mumbai', 'New Delhi', 'Sri Jayawardenepura',
                                  'Kathmandu', 'Almaty', 'Astana', 'Dhaka', 'Urumqi', 'Rangoon', 'Bangkok',
                                  'Hanoi', 'Jakarta', 'Krasnoyarsk', 'Novosibirsk', 'Beijing', 'Chongqing', 'Hong
                                  Kong', 'Irkutsk', 'Kuala Lumpur', 'Perth', 'Singapore', 'Taipei', 'Ulaanbaatar',
                                  'Osaka', 'Sapporo', 'Seoul', 'Tokyo', 'Yakutsk', 'Adelaide', 'Darwin',
                                  'Brisbane', 'Canberra', 'Guam', 'Hobart', 'Melbourne', 'Port Moresby', 'Sydney',
                                  'Vladivostok', 'Magadan', 'New Caledonia', 'Solomon Is.', 'Srednekolymsk',
                                  'Auckland', 'Fiji', 'Kamchatka', 'Marshall Is.', 'Wellington', 'Chatham Is.',
                                  'Nuku'alofa', 'Samoa', 'Tokelau Is.'
 -h, --help                       Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.4. hammer 删除用户

删除用户

Usage:
    hammer user <delete|destroy> [OPTIONS]

Options:
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --login VALUE                 User's login to search by
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.5. Hammer 用户信息

显示用户

Usage:
    hammer user <info|show> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --login VALUE                 User's login to search by
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 -h, --help                    Print help

Predefined field sets:
  --------------------------------|-----|---------|-----
  FIELDS                          | ALL | DEFAULT | THIN
  --------------------------------|-----|---------|-----
  Id                              | x   | x       | x
  Login                           | x   | x       | x
  Name                            | x   | x       |
  Email                           | x   | x       |
  Admin                           | x   | x       |
  Disabled                        | x   | x       |
  Last login                      | x   | x       |
  Authorized by                   | x   | x       |
  Effective admin                 | x   | x       |
  Locale                          | x   | x       |
  Timezone                        | x   | x       |
  Description                     | x   | x       |
  Default organization            | x   | x       |
  Default location                | x   | x       |
  Roles/                          | x   | x       |
  User groups/usergroup           | x   | x       |
  User groups/id                  | x   | x       |
  User groups/roles/              | x   | x       |
  Inherited user groups/usergroup | x   | x       |
  Inherited user groups/id        | x   | x       |
  Inherited user groups/roles/    | x   | x       |
  Locations/                      | x   | x       |
  Organizations/                  | x   | x       |
  Created at                      | x   | x       |
  Updated at                      | x   | x       |
  --------------------------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.6. Hammer 用户列表

列出所有用户

Usage:
    hammer user <list|index> [OPTIONS]

Options:
 --auth-source-ldap VALUE      Name to search by
 --auth-source-ldap-id VALUE   ID of LDAP authentication source
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Scope by locations
 --location-title VALUE        Set the current location context for the request
 --order VALUE                 Sort and order by a searchable field, e.g. '<field> DESC'
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Scope by organizations
 --organization-title VALUE    Set the current organization context for the request
 --page NUMBER                 Page number, starting at 1
 --per-page VALUE              Number of results per page to return, 'all' to return all results
 --role VALUE                  User role name
 --role-id VALUE               ID of role
 --search VALUE                Filter results
 --user-group VALUE            Name to search by
 --user-group-id VALUE         ID of user group
 -h, --help                    Print help

Predefined field sets:
  --------------|-----|---------|-----
  FIELDS        | ALL | DEFAULT | THIN
  --------------|-----|---------|-----
  Id            | x   | x       | x
  Login         | x   | x       | x
  Name          | x   | x       |
  Email         | x   | x       |
  Admin         | x   | x       |
  Disabled      | x   | x       |
  Last login    | x   | x       |
  Authorized by | x   | x       |
  --------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

Search / Order fields:
  admin               Values: true, false
  auth_source         string
  auth_source_type    string
  description         text
  disabled            Values: true, false
  firstname           string
  last_login_on       datetime
  lastname            string
  location            string
  location_id         integer
  login               string
  mail                string
  organization        string
  organization_id     integer
  role                string
  role_id             integer
  usergroup           string

3.81.7. hammer 用户 mail-notification

管理个人邮件通知

Usage:
    hammer user mail-notification [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 add                           Add an email notification for a user
 list, index                   List all email notifications for a user
 remove                        Remove an email notification for a user
 update                        Update an email notification for a user

Options:
 -h, --help                    Print help

3.81.7.1. hammer 用户 mail-notification add

为用户添加电子邮件通知

Usage:
    hammer user mail-notification add [OPTIONS]

Options:
 --interval VALUE              Mail notification interval option, e.g. Daily, Weekly or Monthly. Required for
                               summary notification
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --mail-notification VALUE     Name to search by
 --mail-notification-id NUMBER
 --mail-query VALUE            Relevant only for audit summary notification
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --subscription VALUE          Mail notification subscription option, e.g. Subscribe, Subscribe to my hosts or
                               Subscribe to all hosts. Required for host built and config error state
 --user VALUE                  User's login to search by
 --user-id VALUE
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.7.2. hammer 用户 mail-notification 列表

列出用户的所有电子邮件通知

Usage:
    hammer user mail-notification <list|index> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --user VALUE                  User's login to search by
 --user-id VALUE
 -h, --help                    Print help

Predefined field sets:
  ------------|-----|---------|-----
  FIELDS      | ALL | DEFAULT | THIN
  ------------|-----|---------|-----
  Id          | x   | x       |
  Name        | x   | x       | x
  Description | x   | x       |
  Interval    | x   | x       |
  Mail query  | x   | x       |
  ------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.7.3. hammer 用户 mail-notification remove

删除用户的电子邮件通知

Usage:
    hammer user mail-notification remove [OPTIONS]

Options:
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --mail-notification VALUE     Name to search by
 --mail-notification-id NUMBER
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --user VALUE                  User's login to search by
 --user-id VALUE
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.7.4. hammer 用户 mail-notification 更新

更新用户的电子邮件通知

Usage:
    hammer user mail-notification update [OPTIONS]

Options:
 --interval VALUE              Mail notification interval option, e.g. Daily, Weekly or Monthly. Required for
                               summary notification
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --mail-notification VALUE     Name to search by
 --mail-notification-id NUMBER
 --mail-query VALUE            Relevant only for audit summary notification
 --new-name VALUE
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --subscription VALUE          Mail notification subscription option, e.g. Subscribe, Subscribe to my hosts or
                               Subscribe to all hosts. Required for host built and config error state
 --user VALUE                  User's login to search by
 --user-id VALUE
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.8. hammer user remove-role

删除用户角色

Usage:
    hammer user remove-role [OPTIONS]

Options:
 --id VALUE
 --login VALUE                 User's login to search by
 --role VALUE                  User role name
 --role-id NUMBER
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.9. hammer 用户 ssh-keys

管理用户 SSH 密钥.

Usage:
    hammer user ssh-keys [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 add                           Add an SSH key for a user
 delete, destroy               Delete an SSH key for a user
 info, show                    Show an SSH key from a user
 list, index                   List all SSH keys for a user

Options:
 -h, --help                    Print help

3.81.9.1. hammer 用户 ssh-keys 添加

为用户添加 SSH 密钥

Usage:
    hammer user ssh-keys add [OPTIONS]

Options:
 --key VALUE                   Public SSH key
 --key-file FILE               Path to a SSH public key
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --user VALUE                  User's login to search by
 --user-id VALUE               ID of the user
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.9.2. hammer 用户 ssh-keys delete

为用户删除 SSH 密钥

Usage:
    hammer user ssh-keys <delete|destroy> [OPTIONS]

Options:
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  Name to search by
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --user VALUE                  User's login to search by
 --user-id VALUE               ID of the user
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.9.3. hammer 用户 ssh-keys info

显示用户的 SSH 密钥

Usage:
    hammer user ssh-keys <info|show> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  Name to search by
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --user VALUE                  User's login to search by
 --user-id VALUE               ID of the user
 -h, --help                    Print help

Predefined field sets:
  ------------|-----|---------|-----
  FIELDS      | ALL | DEFAULT | THIN
  ------------|-----|---------|-----
  Id          | x   | x       | x
  Name        | x   | x       | x
  Fingerprint | x   | x       |
  Length      | x   | x       |
  Created at  | x   | x       |
  Public key  | x   | x       |
  ------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

3.81.9.4. hammer 用户 ssh-keys 列表

列出用户的所有 SSH 密钥

Usage:
    hammer user ssh-keys <list|index> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --order VALUE                 Sort and order by a searchable field, e.g. '<field> DESC'
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --page NUMBER                 Page number, starting at 1
 --per-page VALUE              Number of results per page to return, 'all' to return all results
 --search VALUE                Filter results
 --user VALUE                  User's login to search by
 --user-id VALUE               ID of the user
 -h, --help                    Print help

Predefined field sets:
  ------------|-----|---------|-----
  FIELDS      | ALL | DEFAULT | THIN
  ------------|-----|---------|-----
  Id          | x   | x       | x
  Name        | x   | x       | x
  Fingerprint | x   | x       |
  Length      | x   | x       |
  Created at  | x   | x       |
  ------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

Search / Order fields:
  name                string
  user_id             integer

3.81.10. hammer user table-preference

管理表首选项

Usage:
    hammer user table-preference [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 create                        Create a table preference for a given table
 delete                        Delete a table preference for a given table
 info                          Show table preference details of a given table
 list                          List table preferences for a user
 update                        Updates a table preference for a given table

Options:
 -h, --help                    Print help

3.81.10.1. hammer user-table-preference create

为给定表创建表首选项

Usage:
    hammer user table-preference create [OPTIONS]

Options:
 --columns LIST                          List of user selected columns
 --location[-id|-title] VALUE/NUMBER     Set the current location context for the request
 --name VALUE                            Name of the table
 --organization[-id|-title] VALUE/NUMBER Set the current organization context for the request
 --user[-id] VALUE                       Login/id of the user
 -h, --help                              Print help

Option details:
  Here you can find option types and the value an option can accept:

  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  NUMBER              Numeric value. Integer
  VALUE               Value described in the option's description. Mostly simple string

3.81.10.2. hammer user table-preference delete

删除给定表的表首选项

Usage:
    hammer user table-preference delete [OPTIONS]

Options:
 --columns LIST                          List of user selected columns
 --location[-id|-title] VALUE/NUMBER     Set the current location context for the request
 --name VALUE                            Name of the table
 --organization[-id|-title] VALUE/NUMBER Set the current organization context for the request
 --user[-id] VALUE                       Login/id of the user
 -h, --help                              Print help

Option details:
  Here you can find option types and the value an option can accept:

  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  NUMBER              Numeric value. Integer
  VALUE               Value described in the option's description. Mostly simple string

3.81.10.3. hammer user table-preference info

显示给定表的表首选项详情

Usage:
    hammer user table-preference info [OPTIONS]

Options:
 --location[-id|-title] VALUE/NUMBER     Set the current location context for the request
 --name VALUE                            Name of the table
 --organization[-id|-title] VALUE/NUMBER Set the current organization context for the request
 --user[-id] VALUE                       Login/id of the user
 -h, --help                              Print help

Option details:
  Here you can find option types and the value an option can accept:

  NUMBER              Numeric value. Integer
  VALUE               Value described in the option's description. Mostly simple string

3.81.10.4. hammer user table-preference list

列出用户的表首选项

Usage:
    hammer user table-preference list [OPTIONS]

Options:
 --fields LIST                           Show specified fields or predefined field sets only. (See below)
 --location[-id|-title] VALUE/NUMBER     Set the current location context for the request
 --order VALUE                           Sort and order by a searchable field, e.g. '<field> DESC'
 --organization[-id|-title] VALUE/NUMBER Set the current organization context for the request
 --page NUMBER                           Page number, starting at 1
 --per-page VALUE                        Number of results per page to return, 'all' to return all results
 --search VALUE                          Filter results
 --user[-id] VALUE                       Login/id of the user
 -h, --help                              Print help

Predefined field sets:
  --------|-----|---------|-----
  FIELDS  | ALL | DEFAULT | THIN
  --------|-----|---------|-----
  Id      | x   | x       | x
  Name    | x   | x       |
  Columns | x   | x       |
  --------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  NUMBER              Numeric value. Integer
  VALUE               Value described in the option's description. Mostly simple string

3.81.10.5. hammer user table-preference update

为给定表更新表首选项

Usage:
    hammer user table-preference update [OPTIONS]

Options:
 --columns LIST                          List of user selected columns
 --location[-id|-title] VALUE/NUMBER     Set the current location context for the request
 --name VALUE                            Name of the table
 --organization[-id|-title] VALUE/NUMBER Set the current organization context for the request
 --user[-id] VALUE                       Login/id of the user
 -h, --help                              Print help

Option details:
  Here you can find option types and the value an option can accept:

  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  NUMBER              Numeric value. Integer
  VALUE               Value described in the option's description. Mostly simple string

3.81.11. Hammer 用户更新

更新用户

Usage:
    hammer user update [OPTIONS]

Options:
 --admin BOOLEAN                  Is an admin account
 --ask-password BOOLEAN
 --auth-source VALUE              Name to search by
 --auth-source-id NUMBER
 --current-password VALUE         Required when user want to change own password
 --default-location VALUE         Default location name
 --default-location-id NUMBER
 --default-organization VALUE     Default organization name
 --default-organization-id NUMBER
 --description VALUE
 --disabled BOOLEAN
 --firstname VALUE
 --id VALUE
 --lastname VALUE
 --locale ENUM                    User's preferred locale
                                  Possible value(s): 'ca', 'cs_CZ', 'de', 'en', 'en_GB', 'es', 'fr', 'gl', 'it',
                                  'ja', 'ko', 'nl_NL', 'pl', 'pt_BR', 'ru', 'sv_SE', 'zh_CN', 'zh_TW'
 --location VALUE                 Set the current location context for the request
 --location-id NUMBER             Set the current location context for the request
 --location-ids LIST              REPLACE locations with given ids
 --location-title VALUE           Set the current location context for the request
 --location-titles LIST
 --locations LIST
 --login VALUE
 --mail VALUE
 --new-login VALUE
 --organization VALUE             Set the current organization context for the request
 --organization-id NUMBER         Set the current organization context for the request
 --organization-ids LIST          REPLACE organizations with given ids.
 --organization-title VALUE       Set the current organization context for the request
 --organization-titles LIST
 --organizations LIST
 --password VALUE                 Required unless user is in an external authentication source
 --role-ids LIST
 --roles LIST
 --timezone ENUM                  User's timezone
                                  Possible value(s): 'International Date Line West', 'American Samoa', 'Midway
                                  Island', 'Hawaii', 'Alaska', 'Pacific Time (US & Canada)', 'Tijuana', 'Arizona',
                                  'Chihuahua', 'Mazatlan', 'Mountain Time (US & Canada)', 'Central America',
                                  'Central Time (US & Canada)', 'Guadalajara', 'Mexico City', 'Monterrey',
                                  'Saskatchewan', 'Bogota', 'Eastern Time (US & Canada)', 'Indiana (East)',
                                  'Lima', 'Quito', 'Atlantic Time (Canada)', 'Caracas', 'Georgetown', 'La Paz',
                                  'Puerto Rico', 'Santiago', 'Newfoundland', 'Brasilia', 'Buenos Aires',
                                  'Greenland', 'Montevideo', 'Mid-Atlantic', 'Azores', 'Cape Verde Is.',
                                  'Casablanca', 'Dublin', 'Edinburgh', 'Lisbon', 'London', 'Monrovia', 'UTC',
                                  'Amsterdam', 'Belgrade', 'Berlin', 'Bern', 'Bratislava', 'Brussels', 'Budapest',
                                  'Copenhagen', 'Ljubljana', 'Madrid', 'Paris', 'Prague', 'Rome', 'Sarajevo',
                                  'Skopje', 'Stockholm', 'Vienna', 'Warsaw', 'West Central Africa', 'Zagreb',
                                  'Zurich', 'Athens', 'Bucharest', 'Cairo', 'Harare', 'Helsinki', 'Jerusalem',
                                  'Kaliningrad', 'Kyiv', 'Pretoria', 'Riga', 'Sofia', 'Tallinn', 'Vilnius',
                                  'Baghdad', 'Istanbul', 'Kuwait', 'Minsk', 'Moscow', 'Nairobi', 'Riyadh', 'St.
                                  Petersburg', 'Volgograd', 'Tehran', 'Abu Dhabi', 'Baku', 'Muscat', 'Samara',
                                  'Tbilisi', 'Yerevan', 'Kabul', 'Ekaterinburg', 'Islamabad', 'Karachi',
                                  'Tashkent', 'Chennai', 'Kolkata', 'Mumbai', 'New Delhi', 'Sri Jayawardenepura',
                                  'Kathmandu', 'Almaty', 'Astana', 'Dhaka', 'Urumqi', 'Rangoon', 'Bangkok',
                                  'Hanoi', 'Jakarta', 'Krasnoyarsk', 'Novosibirsk', 'Beijing', 'Chongqing', 'Hong
                                  Kong', 'Irkutsk', 'Kuala Lumpur', 'Perth', 'Singapore', 'Taipei', 'Ulaanbaatar',
                                  'Osaka', 'Sapporo', 'Seoul', 'Tokyo', 'Yakutsk', 'Adelaide', 'Darwin',
                                  'Brisbane', 'Canberra', 'Guam', 'Hobart', 'Melbourne', 'Port Moresby', 'Sydney',
                                  'Vladivostok', 'Magadan', 'New Caledonia', 'Solomon Is.', 'Srednekolymsk',
                                  'Auckland', 'Fiji', 'Kamchatka', 'Marshall Is.', 'Wellington', 'Chatham Is.',
                                  'Nuku'alofa', 'Samoa', 'Tokelau Is.'
 -h, --help                       Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.