Skip to content

datadog update-host-tags

This endpoint allows you to update/replace all tags in an integration source with those supplied in the request

Description

This endpoint allows you to update/replace all tags in an integration source with those supplied in the request

Synopsis

datadog update-host-tags
    [--site <site>]
    [--source <source>]
    --host <host>
    --tags <tags>

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

source - (string)

     filters host list to those tags with the specified source.
     Example: --source "source-1"
     Default: _None_      Attributes: optional

host - (string)

     Your host name.
     Example: --host "host-1"
     Default: _None_      Attributes: required

tags - (string)

     A list of tags to apply to the host.
     Example: --tags "tags-1"
     Default: _None_      Attributes: required, multiple allowed

Examples

Input:

!datadog update-host-tags --host "10409554" --tags "fgdf789456" --tags "sfg564321" --tags "fdjhgjd"
Output:
HOST    TAGS
beehyv  fgdf789456, sfg564321, fdjhgjd

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "datadog"
Service Instance
Namespace
Object Type "host"
Object ID name

Please see Access Control for details.