incident_notification_templates
Creates, updates, deletes, gets or lists an incident_notification_templates resource.
Overview
| Name | incident_notification_templates |
| Type | Resource |
| Id | datadog.service_management.incident_notification_templates |
Fields
The following fields are returned by SELECT queries:
- get_incident_notification_template
- list_incident_notification_templates
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The unique identifier of the notification template. (example: 00000000-0000-0000-0000-000000000001) |
attributes | object | The notification template's attributes. |
relationships | object | The notification template's resource relationships. |
type | string | Notification templates resource type. (notification_templates) (example: notification_templates) |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The unique identifier of the notification template. (example: 00000000-0000-0000-0000-000000000001) |
attributes | object | The notification template's attributes. |
relationships | object | The notification template's resource relationships. |
type | string | Notification templates resource type. (notification_templates) (example: notification_templates) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_incident_notification_template | select | id | include | Retrieves a specific notification template by its ID. |
list_incident_notification_templates | select | filter[incident-type], include | Lists all notification templates. Optionally filter by incident type. | |
create_incident_notification_template | insert | data | Creates a new notification template. | |
update_incident_notification_template | update | id, data | include | Updates an existing notification template's attributes. |
delete_incident_notification_template | delete | id | include | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the notification template. |
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. |
filter[incident-type] | string (uuid) | Optional incident type ID filter. |
include | string | Comma-separated list of relationships to include. Supported values: created_by_user, last_modified_by_user, incident_type |
SELECT examples
- get_incident_notification_template
- list_incident_notification_templates
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 include = '{{ include }}'
;
Lists all notification templates. Optionally filter by incident type.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_notification_templates
WHERE filter[incident-type] = '{{ filter[incident-type] }}'
AND include = '{{ include }}'
;
INSERT examples
- create_incident_notification_template
- Manifest
Creates a new notification template.
INSERT INTO datadog.service_management.incident_notification_templates (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data,
included
;
# Description fields are for documentation purposes
- name: incident_notification_templates
props:
- name: data
description: |
Notification template data for a create request.
value:
attributes:
category: "{{ category }}"
content: "{{ content }}"
name: "{{ name }}"
subject: "{{ subject }}"
relationships:
incident_type:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
UPDATE examples
- update_incident_notification_template
Updates an existing notification template's attributes.
UPDATE datadog.service_management.incident_notification_templates
SET
data = '{{ data }}'
WHERE
id = '{{ id }}' --required
AND data = '{{ data }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;
DELETE examples
- delete_incident_notification_template
Deletes a notification template by its ID.
DELETE FROM datadog.service_management.incident_notification_templates
WHERE id = '{{ id }}' --required
AND include = '{{ include }}'
;