Repository: ansible-collections/community.general

Issue:
datadog_monitor support for event-v2 monitors
### Summary

Datadog is deprecating the v1 event monitors in favor of a new v2 monitor type as documented https://docs.datadoghq.com/events/guides/migrating_to_new_events_features/ with the date of 6/30/2022 as the end date of v1 monitors.

They have been sending us emails about this, and I thought it was just a query change but it turns out that we need to set the type passed to the api to `event-v2 alert` instead of `event alert`

I have verified that this support can be added by adding the new event type into [datadog_monitor.py](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/monitoring/datadog/datadog_monitor.py) and have the changes pushed to our fork and will PR from there

### Issue Type

Bug Report

### Component Name

community.general.datadog_monitor

### Ansible Version

```ansible --version
ansible [core 2.12.0]
  config file = None
  configured module search path = ['/Users/emeaney/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/emeaney/.pyenv/versions/3.10.0/envs/ansible3/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/emeaney/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/emeaney/.pyenv/versions/ansible3/bin/ansible
  python version = 3.10.0 (default, Nov 30 2021, 15:16:48) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.3
  libyaml = True

```


### Community.general Version

```console (paste below)
 ansible-galaxy collection list community.general

# /Users/emeaney/.pyenv/versions/3.10.0/envs/ansible3/lib/python3.10/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 4.0.2

```


### Configuration

```console (paste below)
$ ansible-config dump --only-changed

```


### OS / Environment

_No response_

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- community.general.datadog_monitor:
    name: !unsafe "[kubernetes] {{env.name}} Insufficient CPU messages are climbing"
    type: event-v2 alert
    state: present
    notification_message: !unsafe ""
    query: !unsafe "events(\"\\\"Insufficient cpu\\\"\").rollup(\"count\").by(\"env\").last(\"10m\") > 15"
    tags: ["integration:kubernetes"]
    notify_audit: false
    notify_no_data: false
    escalation_message: !unsafe ""
    renotify_interval: 10
    thresholds:
      critical: 15
      warning: 10
    api_key: "{{ dd_api_key }}"
    app_key: "{{ dd_app_key }}"
```


### Expected Results

A monitor of `event-v2 alert` is created in datadog

### Actual Results

```console (paste below)
you get an error about invalid type
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:

Resolving patch:
diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py
--- a/plugins/modules/monitoring/datadog/datadog_monitor.py
+++ b/plugins/modules/monitoring/datadog/datadog_monitor.py
@@ -15,6 +15,7 @@
 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 @@
             - 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),


Test patch: