[PR #9401/df42f29e backport][stable-10] [def]*.py: normalize docs (#9413)

[def]*.py: normalize docs (#9401)

* [def]*.py: normalize docs

* Update plugins/modules/datadog_monitor.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit df42f29e53)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-26 22:44:35 +01:00 committed by GitHub
parent 1829ad4fdc
commit 0df708b15a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 1300 additions and 1431 deletions

View file

@ -14,81 +14,88 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: datadog_event
short_description: Posts events to Datadog service
description:
- "Allows to post events to Datadog (www.datadoghq.com) service."
- "Uses http://docs.datadoghq.com/api/#events API."
- Allows to post events to Datadog (www.datadoghq.com) service.
- Uses http://docs.datadoghq.com/api/#events API.
author:
- "Artūras 'arturaz' Šlajus (@arturaz)"
- "Naoya Nakazawa (@n0ts)"
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: none
diff_mode:
support: none
check_mode:
support: none
diff_mode:
support: none
options:
api_key:
type: str
description: ["Your DataDog API key."]
required: true
app_key:
type: str
description: ["Your DataDog app key."]
required: true
title:
type: str
description: ["The event title."]
required: true
text:
type: str
description: ["The body of the event."]
required: true
date_happened:
type: int
description:
- POSIX timestamp of the event.
- Default value is now.
priority:
type: str
description: ["The priority of the event."]
default: normal
choices: [normal, low]
host:
type: str
description:
- Host name to associate with the event.
- If not specified, it defaults to the remote system's hostname.
api_host:
type: str
description:
- DataDog API endpoint URL.
version_added: '3.3.0'
tags:
type: list
elements: str
description: ["Comma separated list of tags to apply to the event."]
alert_type:
type: str
description: ["Type of alert."]
default: info
choices: ['error', 'warning', 'info', 'success']
aggregation_key:
type: str
description: ["An arbitrary string to use for aggregation."]
validate_certs:
description:
- If V(false), SSL certificates will not be validated. This should only be used
on personally controlled sites using self-signed certificates.
type: bool
default: true
'''
api_key:
type: str
description:
- Your DataDog API key.
required: true
app_key:
type: str
description:
- Your DataDog app key.
required: true
title:
type: str
description:
- The event title.
required: true
text:
type: str
description:
- The body of the event.
required: true
date_happened:
type: int
description:
- POSIX timestamp of the event.
- Default value is now.
priority:
type: str
description:
- The priority of the event.
default: normal
choices: [normal, low]
host:
type: str
description:
- Host name to associate with the event.
- If not specified, it defaults to the remote system's hostname.
api_host:
type: str
description:
- DataDog API endpoint URL.
version_added: '3.3.0'
tags:
type: list
elements: str
description:
- Comma separated list of tags to apply to the event.
alert_type:
type: str
description:
- Type of alert.
default: info
choices: ['error', 'warning', 'info', 'success']
aggregation_key:
type: str
description:
- An arbitrary string to use for aggregation.
validate_certs:
description:
- If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using
self-signed certificates.
type: bool
default: true
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Post an event with low priority
community.general.datadog_event:
title: Testing from ansible
@ -116,8 +123,7 @@ EXAMPLES = '''
- aa
- b
- '#host:{{ inventory_hostname }}'
'''
"""
import platform
import traceback