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_id, regionGet the list of tags for a device.
update_device_user_tagsupdatedevice_id, regionUpdate 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)
regionstring(default: datadoghq.com)

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
AND region = '{{ region }}' -- required
;

UPDATE examples

Update the tags for a device.

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