Skip to content

Commit

Permalink
[PR #6811/fc74f9a4 backport][stable-6] [datadog_downtime] - added 'ty…
Browse files Browse the repository at this point in the history
…pe' to recurrence object when rrule param is present (#6890)

[datadog_downtime] - added 'type' to recurrence object when rrule param is present (#6811)

* added 'type' to recurrence object when rrule param is present

* formatting cleanup

(cherry picked from commit fc74f9a)

Co-authored-by: Simon Keil <freezer_xx@gmx.de>
  • Loading branch information
patchback[bot] and froznsm authored Jul 8, 2023
1 parent f3828eb commit 9ecfa37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/6811-datadog-downtime-rrule-type.yaml
Original file line number Diff line number Diff line change
@@ -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).
3 changes: 2 additions & 1 deletion plugins/modules/datadog_downtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9ecfa37

Please sign in to comment.