< Back

Get-DDTag

Sat Jan 18, 2020 8:13 pm

NAME Get-DDTag



SYNOPSIS

Retrieves a mapping of tags to hosts for your whole infrastructure when called with -All, or the list of tags that

apply to a given host when called with -Hostname.





SYNTAX

Get-DDTag -All [[-Source] <String>] [<CommonParameters>]



Get-DDTag [-Hostname] <String> [[-Source] <String>] [[-BySource]] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-All [<SwitchParameter>]

Returns a mapping of tags to hosts for your whole infrastructure. Incompatible with -Hostname.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Hostname <String>

A hostname as shown on Datadog's Infrastructure List. Incompatible with -All.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Source <String>

Only shows tags from a particular source. Valid sources are: nagios, hudson, jenkins, users, feed, chef,

puppet, git, bitbucket, fabric, capistrano.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BySource [<SwitchParameter>]

Returns tags grouped by source. Incompatible with -All.



Required? false

Position? 3

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Get a list of all tags



Get-DDTag -All









-------------------------- EXAMPLE 2 --------------------------



PS C:\\># Get a list of all tags coming from nagios



Get-DDTag -All -Source nagios









-------------------------- EXAMPLE 3 --------------------------



PS C:\\># Get a list of all tags for host myhost, grouped by source



Get-DDTag -Hostname myhost -BySource











RELATED LINKS

http://docs.datadoghq.com/api/?lang=console#tags-get

http://docs.datadoghq.com/api/?lang=con ... s-get-host

http://docs.datadoghq.com/api/?lang=console#tags-get

http://docs.datadoghq.com/api/?lang=con ... s-get-host