此内容没有您所选择的语言版本。

Chapter 37. filter


Manage permission filters

Usage

# hammer filter [OPTIONS] SUBCOMMAND [ARG] ...

Options

  • -h, --help – Print help

37.1. filter available-permissions

List all permissions

Usage

# hammer filter available-permissions [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
  • -h, --help – Print help

Predefined field sets

Expand
FIELDSALLDEFAULTTHIN

Id

x

x

x

Name

x

x

x

Resource

x

x

 

Search and order fields

  • id – integer
  • name – string
  • resource_type – string

37.2. filter available-resources

List available resource types

Usage

# hammer filter available-resources [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
  • -h, --help – Print help

Predefined field sets

Expand
FIELDSALLDEFAULTTHIN

Name

x

x

x

37.3. filter create

Create a filter

Usage

# hammer filter create [OPTIONS]

Options

  • --location VALUE – Set the current location context for the request
  • --location-id NUMBER – Set the current location context for the request
  • --location-ids LIST
  • --location-title VALUE – Set the current location context for the request
  • --location-titles LIST
  • --locations LIST
  • --organization VALUE – Set the current organization context for the request
  • --organization-id NUMBER – Set the current organization context for the request
  • --organization-ids LIST
  • --organization-title VALUE – Set the current organization context for the request
  • --organization-titles LIST
  • --organizations LIST
  • --override BOOLEAN
  • --permission-ids LIST
  • --permissions LIST
  • --role VALUE – User role name
  • --role-id VALUE
  • --search VALUE
  • -h, --help – Print help

Overriding organizations and locations: Filters inherit organizations and locations from its role by default. This behavior can be changed by setting --override=true. Therefore options --organization[s|-ids] and --location[s|-ids] are applicable only when the override flag is set.

37.4. filter delete

Delete a filter

Usage

# hammer filter <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
  • --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

37.5. filter info

Show a filter

Usage

# hammer filter <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
  • --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

Expand
FIELDSALLDEFAULTTHIN

Id

x

x

x

Resource type

x

x

 

Search

x

x

 

Unlimited?

x

x

 

Override?

x

x

 

Role

x

x

 

Permissions

x

x

 

Locations/

x

x

 

Organizations/

x

x

 

Created at

x

x

 

Updated at

x

x

 

37.6. filter list

List all filters

Usage

# hammer filter <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
  • -h, --help – Print help

Predefined field sets

Expand
FIELDSALLDEFAULTTHIN

Id

x

x

x

Resource type

x

x

 

Search

x

x

 

Unlimited?

x

x

 

Override?

x

x

 

Role

x

x

 

Permissions

x

x

 

Search and order fields

  • id – integer
  • limited – Values: true, false
  • location – string
  • location_id – integer
  • organization – string
  • organization_id – integer
  • override – Values: true, false
  • permission – string
  • resource – string
  • role – string
  • role_id – integer
  • search – text
  • unlimited – Values: true, false

37.7. filter update

Update a filter

Usage

# hammer filter update [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-ids LIST
  • --location-title VALUE – Set the current location context for the request
  • --location-titles LIST
  • --locations LIST
  • --organization VALUE – Set the current organization context for the request
  • --organization-id NUMBER – Set the current organization context for the request
  • --organization-ids LIST
  • --organization-title VALUE – Set the current organization context for the request
  • --organization-titles LIST
  • --organizations LIST
  • --override BOOLEAN
  • --permission-ids LIST
  • --permissions LIST
  • --role VALUE – User role name
  • --role-id VALUE
  • --search VALUE
  • -h, --help – Print help

Overriding organizations and locations: Filters inherit organizations and locations from its role by default. This behavior can be changed by setting --override=true. Therefore options --organization[s|-ids] and --location[s|-ids] are applicable only when the override flag is set.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat
返回顶部