Skip to main content

incident_notification_templates

Creates, updates, deletes, gets or lists an incident_notification_templates resource.

Overview

Nameincident_notification_templates
TypeResource
Iddatadog.service_management.incident_notification_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)The unique identifier of the notification template. (example: 00000000-0000-0000-0000-000000000001)
attributesobjectThe notification template's attributes.
relationshipsobjectThe notification template's resource relationships.
typestringNotification templates resource type. (example: notification_templates)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_incident_notification_templateselectid, regionincludeRetrieves a specific notification template by its ID.
list_incident_notification_templatesselectregionfilter[incident-type], includeLists all notification templates. Optionally filter by incident type.
create_incident_notification_templateinsertregion, data__dataCreates a new notification template.
update_incident_notification_templateupdateid, region, data__dataincludeUpdates an existing notification template's attributes.
delete_incident_notification_templatedeleteid, regionincludeDeletes a notification template by its ID.

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
idstring (uuid)The ID of the notification template.
regionstring(default: datadoghq.com)
filter[incident-type]string (uuid)Optional incident type ID filter.
includestringComma-separated list of relationships to include. Supported values: created_by_user, last_modified_by_user, incident_type

SELECT examples

Retrieves a specific notification template by its ID.

SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_notification_templates
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
AND include = '{{ include }}'
;

INSERT examples

Creates a new notification template.

INSERT INTO datadog.service_management.incident_notification_templates (
data__data,
region
)
SELECT
'{{ data }}' /* required */,
'{{ region }}'
RETURNING
data,
included
;

UPDATE examples

Updates an existing notification template's attributes.

UPDATE datadog.service_management.incident_notification_templates
SET
data__data = '{{ data }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;

DELETE examples

Deletes a notification template by its ID.

DELETE FROM datadog.service_management.incident_notification_templates
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND include = '{{ include }}'
;