Skip to main content

incident_notification_rules

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

Overview

Nameincident_notification_rules
TypeResource
Iddatadog.service_management.incident_notification_rules

Fields

The following fields are returned by SELECT queries:

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

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_incident_notification_ruleselectidincludeRetrieves a specific notification rule by its ID.
list_incident_notification_rulesselectincludeLists all notification rules for the organization. Optionally filter by incident type.
create_incident_notification_ruleinsertdataCreates a new notification rule.
update_incident_notification_rulereplaceid, dataincludeUpdates an existing notification rule with a complete replacement.
delete_incident_notification_ruledeleteidincludeDeletes 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.

NameDatatypeDescription
idstring (uuid)The ID of the notification rule.
sitestringThe 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.
includestringComma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, incident_type, notification_template

SELECT examples

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 }}'
;

INSERT examples

Creates a new notification rule.

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

REPLACE examples

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

Deletes a notification rule by its ID.

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