Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33542,15 +33542,20 @@ paths:
A host must match every term. Prefix a term with `!` to exclude matching hosts.

Term types:
- `<text>`: Partial, case-insensitive match against host name, alias, AWS ID and name, tags, apps, and
agent metadata. Text of fewer than 3 characters only matches a field whose value is exactly that text.
- `<text>`: Partial, case-insensitive match against hostname, alias, AWS ID, AWS name, tags, apps, and
Agent metadata. Text of fewer than 3 characters only matches only a field whose value is exactly that text.
- `tag:<key>:<value>`: Exact match on a tag, for example `tag:env:prod`.
- `field:apps:<app>`: Exact match on an app name, for example `field:apps:nginx`.
- `field:metadata_agent_version:<value>`, `field:metadata_machine:<value>`,
`field:metadata_platform:<value>`, `field:metadata_processor:<value>`: Exact match on that metadata field.
- `exists:tag:<key>` or `exists:field:<field>`: Match hosts that have the tag key or a non-empty value
for the field, for example `exists:tag:env` or `exists:field:metadata_platform`.
- `exact:<value>`: Whole-value, case-sensitive match.
- `exact:<value>`: Whole-value, case-sensitive match. The entire value of at least one of these fields
must equal `<value>`: host name (`host_name`, `name`), `aliases`, `aws_id`, `aws_name`, `apps`, `tags`,
and the agent metadata fields (`agent_version`, `machine`, `platform`, `processor`). Use it instead of
plain text when you need a full name rather than a partial match, for example `exact:web-01` matches
`web-01` but not `web-010` or `web-01-canary`. If `<value>` contains a colon, such as
`exact:env:prod`, it is matched against tags only.

Boolean operators (`AND`, `OR`, `NOT`) and `*` wildcards are not supported.
in: query
Expand All @@ -33560,7 +33565,7 @@ paths:
type: string
- description: |-
Sort hosts by this field. Options include `name`, `aws_id`, `aws_name`, `up`, `apps`, `cpu`,
`iowait`, and `load`. Unrecognized values default to `cpu`..
`iowait`, and `load`. Unrecognized values default to `cpu`.
in: query
name: sort_field
required: false
Expand Down
13 changes: 9 additions & 4 deletions src/datadog_api_client/v1/api/hosts_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,20 +201,25 @@ def list_hosts(

Term types:

* ``<text>`` : Partial, case-insensitive match against host name, alias, AWS ID and name, tags, apps, and
agent metadata. Text of fewer than 3 characters only matches a field whose value is exactly that text.
* ``<text>`` : Partial, case-insensitive match against hostname, alias, AWS ID, AWS name, tags, apps, and
Agent metadata. Text of fewer than 3 characters only matches only a field whose value is exactly that text.
* `tag:<key>:<value>`: Exact match on a tag, for example `tag:env:prod`.
* `field:apps:<app>`: Exact match on an app name, for example `field:apps:nginx`.
* ``field:metadata_agent_version:<value>`` , ``field:metadata_machine:<value>`` ,
``field:metadata_platform:<value>`` , ``field:metadata_processor:<value>`` : Exact match on that metadata field.
* ``exists:tag:<key>`` or ``exists:field:<field>`` : Match hosts that have the tag key or a non-empty value
for the field, for example ``exists:tag:env`` or ``exists:field:metadata_platform``.
* ``exact:<value>`` : Whole-value, case-sensitive match.
* ``exact:<value>`` : Whole-value, case-sensitive match. The entire value of at least one of these fields
must equal ``<value>`` : host name ( ``host_name`` , ``name`` ), ``aliases`` , ``aws_id`` , ``aws_name`` , ``apps`` , ``tags`` ,
and the agent metadata fields ( ``agent_version`` , ``machine`` , ``platform`` , ``processor`` ). Use it instead of
plain text when you need a full name rather than a partial match, for example ``exact:web-01`` matches
``web-01`` but not ``web-010`` or ``web-01-canary``. If ``<value>`` contains a colon, such as
``exact:env:prod`` , it is matched against tags only.

Boolean operators ( ``AND`` , ``OR`` , ``NOT`` ) and ``*`` wildcards are not supported.
:type filter: str, optional
:param sort_field: Sort hosts by this field. Options include ``name`` , ``aws_id`` , ``aws_name`` , ``up`` , ``apps`` , ``cpu`` ,
``iowait`` , and ``load``. Unrecognized values default to ``cpu``..
``iowait`` , and ``load``. Unrecognized values default to ``cpu``.
:type sort_field: str, optional
:param sort_dir: Direction of sort. Options include ``asc`` and ``desc``.
:type sort_dir: str, optional
Expand Down
Loading