Skip to main content

case_project_notification_rules

Creates, updates, deletes, gets or lists a case_project_notification_rules resource.

Overview

Namecase_project_notification_rules
TypeResource
Iddatadog.service_management.case_project_notification_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe notification rule's identifier (example: aeadc05e-98a8-11ec-ac2c-da7ad0900001)
attributesobjectNotification rule attributes
typestringNotification rule resource type (notification_rule) (default: notification_rule, example: notification_rule)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_project_notification_rulesselectproject_idGet all notification rules for a project.
create_project_notification_ruleinsertproject_id, dataCreate a notification rule for a project.
update_project_notification_rulereplaceproject_id, notification_rule_id, dataUpdate a notification rule.
delete_project_notification_ruledeleteproject_id, notification_rule_idDelete a notification rule using the notification rule's 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
notification_rule_idstringNotification Rule UUID (example: e555e290-ed65-49bd-ae18-8acbfcf18db7)
project_idstringProject UUID (example: e555e290-ed65-49bd-ae18-8acbfcf18db7)
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.

SELECT examples

Get all notification rules for a project.

SELECT
id,
attributes,
type
FROM datadog.service_management.case_project_notification_rules
WHERE project_id = '{{ project_id }}' -- required
;

INSERT examples

Create a notification rule for a project.

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

REPLACE examples

Update a notification rule.

REPLACE datadog.service_management.case_project_notification_rules
SET
data = '{{ data }}'
WHERE
project_id = '{{ project_id }}' --required
AND notification_rule_id = '{{ notification_rule_id }}' --required
AND data = '{{ data }}' --required;

DELETE examples

Delete a notification rule using the notification rule's id.

DELETE FROM datadog.service_management.case_project_notification_rules
WHERE project_id = '{{ project_id }}' --required
AND notification_rule_id = '{{ notification_rule_id }}' --required
;