device_user_tags
Creates, updates, deletes, gets or lists a device_user_tags resource.
Overview
| Name | device_user_tags | 
| Type | Resource | 
| Id | datadog.infrastructure.device_user_tags | 
Fields
The following fields are returned by SELECT queries:
- list_device_user_tags
| Name | Datatype | Description | 
|---|---|---|
| id | string | The device ID (example: example:1.2.3.4) | 
| attributes | object | The definition of ListTagsResponseDataAttributes object. | 
| type | string | The type of the resource. The value should always be tags. | 
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description | 
|---|---|---|---|---|
| list_device_user_tags | select | device_id,region | Get the list of tags for a device. | |
| update_device_user_tags | update | device_id,region | Update 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.
| Name | Datatype | Description | 
|---|---|---|
| device_id | string | The id of the device to update tags for. (example: example:1.2.3.4) | 
| region | string | (default: datadoghq.com) | 
SELECT examples
- list_device_user_tags
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_device_user_tags
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;