incident_notification_rules
Creates, updates, deletes, gets or lists an incident_notification_rules resource.
Overview
| Name | incident_notification_rules |
| Type | Resource |
| Id | datadog.service_management.incident_notification_rules |
Fields
The following fields are returned by SELECT queries:
- get_incident_notification_rule
- list_incident_notification_rules
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The unique identifier of the notification rule. (example: 00000000-0000-0000-0000-000000000001) |
attributes | object | The notification rule's attributes. |
relationships | object | The notification rule's resource relationships. |
type | string | Notification rules resource type. (incident_notification_rules) (example: incident_notification_rules) |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The unique identifier of the notification rule. (example: 00000000-0000-0000-0000-000000000001) |
attributes | object | The notification rule's attributes. |
relationships | object | The notification rule's resource relationships. |
type | string | Notification rules resource type. (incident_notification_rules) (example: incident_notification_rules) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_incident_notification_rule | select | id | include | Retrieves a specific notification rule by its ID. |
list_incident_notification_rules | select | include | Lists all notification rules for the organization. Optionally filter by incident type. | |
create_incident_notification_rule | insert | data | Creates a new notification rule. | |
update_incident_notification_rule | replace | id, data | include | Updates an existing notification rule with a complete replacement. |
delete_incident_notification_rule | delete | id | include | Deletes a notification rule 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 rule. |
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. |
include | string | Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, incident_type, notification_template |
SELECT examples
- get_incident_notification_rule
- list_incident_notification_rules
Retrieves a specific notification rule by its ID.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_notification_rules
WHERE id = '{{ id }}' -- required
AND include = '{{ include }}'
;
Lists all notification rules for the organization. Optionally filter by incident type.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_notification_rules
WHERE include = '{{ include }}'
;
INSERT examples
- create_incident_notification_rule
- Manifest
Creates a new notification rule.
INSERT INTO datadog.service_management.incident_notification_rules (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data,
included
;
# Description fields are for documentation purposes
- name: incident_notification_rules
props:
- name: data
description: |
Notification rule data for a create request.
value:
attributes:
conditions:
- field: "{{ field }}"
values: "{{ values }}"
enabled: {{ enabled }}
handles:
- "{{ handles }}"
renotify_on:
- "{{ renotify_on }}"
trigger: "{{ trigger }}"
visibility: "{{ visibility }}"
relationships:
incident_type:
data:
id: "{{ id }}"
type: "{{ type }}"
notification_template:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
REPLACE examples
- update_incident_notification_rule
Updates an existing notification rule with a complete replacement.
REPLACE datadog.service_management.incident_notification_rules
SET
data = '{{ data }}'
WHERE
id = '{{ id }}' --required
AND data = '{{ data }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;
DELETE examples
- delete_incident_notification_rule
Deletes a notification rule by its ID.
DELETE FROM datadog.service_management.incident_notification_rules
WHERE id = '{{ id }}' --required
AND include = '{{ include }}'
;