Skip to content

datadog add-tags-host

This endpoint allows you to add new tags to a host, optionally specifying where these tags come from

Description

This endpoint allows you to add new tags to a host, optionally specifying where these tags come from

Synopsis

datadog add-tags-host
    [--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)

     Name of host.
     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: optional, multiple allowed

Examples

Input:

!datadog add-tags-host --host "10409554" --tags "tag1" --tags "tag2"
Output:
HOST    TAGS
beehyv  tatfdg2, tag1, tag2, tagdfg1

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.