case_project_notification_rules
Creates, updates, deletes, gets or lists a case_project_notification_rules resource.
Overview
| Name | case_project_notification_rules |
| Type | Resource |
| Id | datadog.service_management.case_project_notification_rules |
Fields
The following fields are returned by SELECT queries:
- get_project_notification_rules
| Name | Datatype | Description |
|---|---|---|
id | string | The notification rule's identifier (example: aeadc05e-98a8-11ec-ac2c-da7ad0900001) |
attributes | object | Notification rule attributes |
type | string | Notification rule resource type (notification_rule) (default: notification_rule, example: notification_rule) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_project_notification_rules | select | project_id | Get all notification rules for a project. | |
create_project_notification_rule | insert | project_id, data | Create a notification rule for a project. | |
update_project_notification_rule | replace | project_id, notification_rule_id, data | Update a notification rule. | |
delete_project_notification_rule | delete | project_id, notification_rule_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
notification_rule_id | string | Notification Rule UUID (example: e555e290-ed65-49bd-ae18-8acbfcf18db7) |
project_id | string | Project UUID (example: e555e290-ed65-49bd-ae18-8acbfcf18db7) |
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. |
SELECT examples
- get_project_notification_rules
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_project_notification_rule
- Manifest
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
;
# Description fields are for documentation purposes
- name: case_project_notification_rules
props:
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the case_project_notification_rules resource.
- name: data
description: |
Notification rule create
value:
attributes:
is_enabled: {{ is_enabled }}
query: "{{ query }}"
recipients:
- data:
channel: "{{ channel }}"
channel_id: "{{ channel_id }}"
channel_name: "{{ channel_name }}"
connector_name: "{{ connector_name }}"
email: "{{ email }}"
name: "{{ name }}"
service_name: "{{ service_name }}"
team_id: "{{ team_id }}"
team_name: "{{ team_name }}"
tenant_id: "{{ tenant_id }}"
tenant_name: "{{ tenant_name }}"
workspace: "{{ workspace }}"
workspace_id: "{{ workspace_id }}"
type: "{{ type }}"
triggers:
- data:
change_type: "{{ change_type }}"
field: "{{ field }}"
from_status: "{{ from_status }}"
from_status_name: "{{ from_status_name }}"
to_status: "{{ to_status }}"
to_status_name: "{{ to_status_name }}"
type: "{{ type }}"
type: "{{ type }}"
REPLACE examples
- update_project_notification_rule
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_project_notification_rule
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
;