diff --git a/changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml b/changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml new file mode 100644 index 0000000000..db8c6e2448 --- /dev/null +++ b/changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml @@ -0,0 +1,2 @@ +bugfixes: + - datadog_monitor - Corrects ``_update_monitor`` to use ``notification_message`` insteade of deprecated ``message`` (https://github.com/ansible-collections/community.general/pull/389). diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index e14081b307..64a69987d0 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -301,7 +301,7 @@ def _update_monitor(module, monitor, options): try: kwargs = dict(id=monitor['id'], query=module.params['query'], name=_fix_template_vars(module.params['name']), - message=_fix_template_vars(module.params['message']), + message=_fix_template_vars(module.params['notification_message']), escalation_message=_fix_template_vars(module.params['escalation_message']), options=options) if module.params['tags'] is not None: