case_watchers
Creates, updates, deletes, gets or lists a case_watchers resource.
Overview
| Name | case_watchers |
| Type | Resource |
| Id | datadog.service_management.case_watchers |
Fields
The following fields are returned by SELECT queries:
- list_case_watchers
| Name | Datatype | Description |
|---|---|---|
id | string | The primary identifier of the case watcher. (example: 8146583c-0b5f-11ec-abf8-da7ad0900001) |
relationships | object | Relationships for a case watcher, linking to the underlying user resource. |
type | string | JSON:API resource type for case watchers. (watcher) (default: watcher, example: watcher) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_case_watchers | select | case_id | Returns the list of users who are watching a case. Watchers receive notifications about updates to the case. | |
watch_case | insert | case_id, user_uuid | Adds a user (identified by their UUID) as a watcher of a case. The user receives notifications about subsequent updates to the case. | |
unwatch_case | delete | case_id, user_uuid | Removes a user from the watchers list of a case. The user no longer receives notifications about updates to the case. |
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 |
|---|---|---|
case_id | string | Case's UUID or key (example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de504) |
site | string | The 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. |
user_uuid | string | The UUID of the user to add or remove as a watcher. (example: 8146583c-0b5f-11ec-abf8-da7ad0900001) |
SELECT examples
- list_case_watchers
Returns the list of users who are watching a case. Watchers receive notifications about updates to the case.
SELECT
id,
relationships,
type
FROM datadog.service_management.case_watchers
WHERE case_id = '{{ case_id }}' -- required
;
INSERT examples
- watch_case
- Manifest
Adds a user (identified by their UUID) as a watcher of a case. The user receives notifications about subsequent updates to the case.
INSERT INTO datadog.service_management.case_watchers (
case_id,
user_uuid
)
SELECT
'{{ case_id }}',
'{{ user_uuid }}'
;
# Description fields are for documentation purposes
- name: case_watchers
props:
- name: case_id
value: "{{ case_id }}"
description: Required parameter for the case_watchers resource.
- name: user_uuid
value: "{{ user_uuid }}"
description: Required parameter for the case_watchers resource.
DELETE examples
- unwatch_case
Removes a user from the watchers list of a case. The user no longer receives notifications about updates to the case.
DELETE FROM datadog.service_management.case_watchers
WHERE case_id = '{{ case_id }}' --required
AND user_uuid = '{{ user_uuid }}' --required
;