From 1c84389f504eb3f6d6dc92853bcb959debd7b5d5 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 10 Jul 2021 20:40:43 +0200 Subject: [PATCH] feat: support datadog_monitor composite type (#2958) (#2986) * feat: support datadog_monitor composite type * docs: note support for composite types * lint * lint: line lengths * doc: changelog frag (cherry picked from commit 7a41833e599e04d1f24ad90c17843ad5aec8a958) Co-authored-by: Tyler Schwend --- .../2958-datadog_monitor_support_composites.yml | 3 +++ .../modules/monitoring/datadog/datadog_monitor.py | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/2958-datadog_monitor_support_composites.yml diff --git a/changelogs/fragments/2958-datadog_monitor_support_composites.yml b/changelogs/fragments/2958-datadog_monitor_support_composites.yml new file mode 100644 index 0000000000..394a589994 --- /dev/null +++ b/changelogs/fragments/2958-datadog_monitor_support_composites.yml @@ -0,0 +1,3 @@ +minor_changes: + - datadog_monitor - allow creation of composite datadog monitors + (https://github.com/ansible-collections/community.general/issues/2956). diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index 6c0f8cdb02..ab25777ecd 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -51,7 +51,17 @@ options: description: - The type of the monitor. - The types C(query alert), C(trace-analytics alert) and C(rum alert) were added in community.general 2.1.0. - choices: ['metric alert', 'service check', 'event alert', 'process alert', 'log alert', 'query alert', 'trace-analytics alert', 'rum alert'] + - The type C(composite) was added in community.general 3.4.0. + choices: + - metric alert + - service check + - event alert + - process alert + - log alert + - query alert + - trace-analytics alert + - rum alert + - composite type: str query: description: @@ -209,7 +219,8 @@ def main(): 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', - 'log alert', 'query alert', 'trace-analytics alert', 'rum alert']), + 'log alert', 'query alert', 'trace-analytics alert', + 'rum alert', 'composite']), name=dict(required=True), query=dict(), notification_message=dict(no_log=True),