on_call_user_notification_channels
Creates, updates, deletes, gets or lists an on_call_user_notification_channels resource.
Overview
| Name | on_call_user_notification_channels |
| Type | Resource |
| Id | datadog.service_management.on_call_user_notification_channels |
Fields
The following fields are returned by SELECT queries:
- get_user_notification_channel
- list_user_notification_channels
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for the channel |
attributes | object | Attributes for an on-call notification channel. |
type | string | Indicates that the resource is of type 'notification_channels'. (notification_channels) (default: notification_channels, example: notification_channels) |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for the channel |
attributes | object | Attributes for an on-call notification channel. |
type | string | Indicates that the resource is of type 'notification_channels'. (notification_channels) (default: notification_channels, example: notification_channels) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_user_notification_channel | select | user_id, channel_id | Get a notification channel for a user. The authenticated user must be the target user or have the on_call_admin permission | |
list_user_notification_channels | select | user_id | List the notification channels for a user. The authenticated user must be the target user or have the on_call_admin permission | |
create_user_notification_channel | insert | user_id, data | Create a new notification channel for a user. The authenticated user must be the target user or have the on_call_admin permission | |
delete_user_notification_channel | delete | user_id, channel_id | Delete a notification channel for a user. The authenticated user must be the target user or have the on_call_admin permission |
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 |
|---|---|---|
channel_id | string | The channel ID |
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. |
user_id | string | The user ID |
SELECT examples
- get_user_notification_channel
- list_user_notification_channels
Get a notification channel for a user. The authenticated user must be the target user or have the on_call_admin permission
SELECT
id,
attributes,
type
FROM datadog.service_management.on_call_user_notification_channels
WHERE user_id = '{{ user_id }}' -- required
AND channel_id = '{{ channel_id }}' -- required
;
List the notification channels for a user. The authenticated user must be the target user or have the on_call_admin permission
SELECT
id,
attributes,
type
FROM datadog.service_management.on_call_user_notification_channels
WHERE user_id = '{{ user_id }}' -- required
;
INSERT examples
- create_user_notification_channel
- Manifest
Create a new notification channel for a user. The authenticated user must be the target user or have the on_call_admin permission
INSERT INTO datadog.service_management.on_call_user_notification_channels (
data,
user_id
)
SELECT
'{{ data }}' /* required */,
'{{ user_id }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: on_call_user_notification_channels
props:
- name: user_id
value: "{{ user_id }}"
description: Required parameter for the on_call_user_notification_channels resource.
- name: data
description: |
Data for creating an on-call notification channel
value:
attributes:
config:
number: "{{ number }}"
type: "{{ type }}"
address: "{{ address }}"
formats:
- "{{ formats }}"
type: "{{ type }}"
DELETE examples
- delete_user_notification_channel
Delete a notification channel for a user. The authenticated user must be the target user or have the on_call_admin permission
DELETE FROM datadog.service_management.on_call_user_notification_channels
WHERE user_id = '{{ user_id }}' --required
AND channel_id = '{{ channel_id }}' --required
;