diff --git a/changelogs/fragments/6811-datadog-downtime-rrule-type.yaml b/changelogs/fragments/6811-datadog-downtime-rrule-type.yaml new file mode 100644 index 0000000000..0106f8fb7e --- /dev/null +++ b/changelogs/fragments/6811-datadog-downtime-rrule-type.yaml @@ -0,0 +1,2 @@ +bugfixes: + - datadog_downtime - presence of ``rrule`` param lead to the Datadog API returning Bad Request due to a missing recurrence type (https://github.com/ansible-collections/community.general/pull/6811). diff --git a/plugins/modules/datadog_downtime.py b/plugins/modules/datadog_downtime.py index 6e506eb850..26daf16d3a 100644 --- a/plugins/modules/datadog_downtime.py +++ b/plugins/modules/datadog_downtime.py @@ -248,7 +248,8 @@ def build_downtime(module): downtime.timezone = module.params["timezone"] if module.params["rrule"]: downtime.recurrence = DowntimeRecurrence( - rrule=module.params["rrule"] + rrule=module.params["rrule"], + type="rrule", ) return downtime