From 6edc17614300ad1c9d9d438c1f9de04ed7c5e973 Mon Sep 17 00:00:00 2001 From: ermeaney Date: Mon, 11 Apr 2022 00:09:27 -0500 Subject: [PATCH] add support for datadog monitors of type event-v2 (#4457) * add support for datadog monitors of type event-v2 See https://docs.datadoghq.com/events/guides/migrating_to_new_events_features/ * add changelog fragement for PR * typos * add link to PR * minor_fetaure, not bugfix * add to description when we added event-v2 type * Update changelogs/fragments/4457-support-datadog-monitors-type event-v2.yaml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../4457-support-datadog-monitors-type event-v2.yaml | 3 +++ plugins/modules/monitoring/datadog/datadog_monitor.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4457-support-datadog-monitors-type event-v2.yaml diff --git a/changelogs/fragments/4457-support-datadog-monitors-type event-v2.yaml b/changelogs/fragments/4457-support-datadog-monitors-type event-v2.yaml new file mode 100644 index 0000000000..9072b6a389 --- /dev/null +++ b/changelogs/fragments/4457-support-datadog-monitors-type event-v2.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - datadog_monitor - support new datadog event monitor of type `event-v2 alert` (https://github.com/ansible-collections/community.general/pull/4457) diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index e9b225dce9..ffc2bcd657 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -15,6 +15,7 @@ short_description: Manages Datadog monitors description: - Manages monitors within Datadog. - Options as described on https://docs.datadoghq.com/api/. + - The type C(event-v2) was added in community.general 4.8.0. author: Sebastian Kornehl (@skornehl) requirements: [datadog] options: @@ -56,6 +57,7 @@ options: - metric alert - service check - event alert + - event-v2 alert - process alert - log alert - query alert @@ -222,7 +224,7 @@ def main(): api_host=dict(), app_key=dict(required=True, no_log=True), state=dict(required=True, choices=['present', 'absent', 'mute', 'unmute']), - type=dict(choices=['metric alert', 'service check', 'event alert', 'process alert', + type=dict(choices=['metric alert', 'service check', 'event alert', 'event-v2 alert', 'process alert', 'log alert', 'query alert', 'trace-analytics alert', 'rum alert', 'composite']), name=dict(required=True),