Skip to main content

device_user_tags

Creates, updates, deletes, gets or lists a device_user_tags resource.

Overview

Namedevice_user_tags
TypeResource
Iddatadog.infrastructure.device_user_tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe device ID (example: example:1.2.3.4)
attributesobjectThe definition of ListTagsResponseDataAttributes object.
typestringThe type of the resource. The value should always be tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_device_user_tagsselectdevice_idGet the list of tags for a device.
update_device_user_tagsupdatedevice_idUpdate the tags for a device.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
device_idstringThe id of the device to update tags for. (example: example:1.2.3.4)
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.

SELECT examples

Get the list of tags for a device.

SELECT
id,
attributes,
type
FROM datadog.infrastructure.device_user_tags
WHERE device_id = '{{ device_id }}' -- required
;

UPDATE examples

Update the tags for a device.

UPDATE datadog.infrastructure.device_user_tags
SET
data = '{{ data }}'
WHERE
device_id = '{{ device_id }}' --required
RETURNING
data;