vulnerability_notification_rules
Creates, updates, deletes, gets or lists a vulnerability_notification_rules resource.
Overview
| Name | vulnerability_notification_rules |
| Type | Resource |
| Id | datadog.security.vulnerability_notification_rules |
Fields
The following fields are returned by SELECT queries:
- get_vulnerability_notification_rule
- get_vulnerability_notification_rules
Notification rule details.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of a notification rule. (example: aaa-bbb-ccc) |
attributes | object | Attributes of the notification rule. |
type | string | The rule type associated to notification rules. (notification_rules) (example: notification_rules) |
The list of notification rules.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of a notification rule. (example: aaa-bbb-ccc) |
attributes | object | Attributes of the notification rule. |
type | string | The rule type associated to notification rules. (notification_rules) (example: notification_rules) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_vulnerability_notification_rule | select | id | Get the details of a notification rule for security vulnerabilities. | |
get_vulnerability_notification_rules | select | Returns the list of notification rules for security vulnerabilities. | ||
create_vulnerability_notification_rule | insert | Create a new notification rule for security vulnerabilities and return the created rule. | ||
patch_vulnerability_notification_rule | update | id | Partially update the notification rule. All fields are optional; if a field is not provided, it is not updated. | |
delete_vulnerability_notification_rule | delete | id | Delete a notification rule for security vulnerabilities. |
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 | 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. |
SELECT examples
- get_vulnerability_notification_rule
- get_vulnerability_notification_rules
Get the details of a notification rule for security vulnerabilities.
SELECT
id,
attributes,
type
FROM datadog.security.vulnerability_notification_rules
WHERE id = '{{ id }}' -- required
;
Returns the list of notification rules for security vulnerabilities.
SELECT
id,
attributes,
type
FROM datadog.security.vulnerability_notification_rules
;
INSERT examples
- create_vulnerability_notification_rule
- Manifest
Create a new notification rule for security vulnerabilities and return the created rule.
INSERT INTO datadog.security.vulnerability_notification_rules (
data
)
SELECT
'{{ data }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: vulnerability_notification_rules
props:
- name: data
description: |
Data of the notification rule create request: the rule type, and the rule attributes. All fields are required.
value:
attributes:
enabled: {{ enabled }}
name: "{{ name }}"
routing:
mode: "{{ mode }}"
selectors:
query: "{{ query }}"
rule_types:
- "{{ rule_types }}"
severities:
- "{{ severities }}"
trigger_source: "{{ trigger_source }}"
targets:
- "{{ targets }}"
time_aggregation: {{ time_aggregation }}
type: "{{ type }}"
UPDATE examples
- patch_vulnerability_notification_rule
Partially update the notification rule. All fields are optional; if a field is not provided, it is not updated.
UPDATE datadog.security.vulnerability_notification_rules
SET
data = '{{ data }}'
WHERE
id = '{{ id }}' --required
RETURNING
data;
DELETE examples
- delete_vulnerability_notification_rule
Delete a notification rule for security vulnerabilities.
DELETE FROM datadog.security.vulnerability_notification_rules
WHERE id = '{{ id }}' --required
;