Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/devices_live_tools_ping_device.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # Copyright (c) 2021, Cisco Systems
5 # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 DOCUMENTATION = r"""
8 module: devices_live_tools_ping_device
9 short_description: Resource module for devices _livetools _pingdevice
10 description:
11 - Manage operation create of the resource devices _livetools _pingdevice.
12 - >
13 Enqueue a job to check connectivity status to the device. This endpoint has a
14 sustained rate limit of one request every five seconds per device, with an allowed
15 burst of five requests.
16 version_added: '1.0.0'
17 extends_documentation_fragment:
18 - cisco.meraki.module
19 author: Francisco Munoz (@fmunoz)
20 options:
21 callback:
22 description: Details for the callback. Please include either an httpServerId OR
23 url and sharedSecret.
24 suboptions:
25 httpServer:
26 description: The webhook receiver used for the callback webhook.
27 suboptions:
28 id:
29 description: The webhook receiver ID that will receive information. If
30 specifying this, please leave the url and sharedSecret fields blank.
31 type: str
32 type: dict
33 payloadTemplate:
34 description: The payload template of the webhook used for the callback.
35 suboptions:
36 id:
37 description: The ID of the payload template. Defaults to 'wpt_00005' for
38 the Callback (included) template.
39 type: str
40 type: dict
41 sharedSecret:
42 description: A shared secret that will be included in the requests sent to
43 the callback URL. It can be used to verify that the request was sent by
44 Meraki. If using this field, please also specify an url.
45 type: str
46 url:
47 description: The callback URL for the webhook target. If using this field,
48 please also specify a sharedSecret.
49 type: str
50 type: dict
51 count:
52 description: Count parameter to pass to ping. 1..5, default 5.
53 type: int
54 serial:
55 description: Serial path parameter.
56 type: str
57 requirements:
58 - meraki >= 2.4.9
59 - python >= 3.5
60 seealso:
61 - name: Cisco Meraki documentation for devices createDeviceLiveToolsPingDevice
62 description: Complete reference of the createDeviceLiveToolsPingDevice API.
63 link: https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-ping-device
64 notes:
65 - SDK Method used are
66 devices.Devices.create_device_live_tools_ping_device,
67 - Paths used are
68 post /devices/{serial}/liveTools/pingDevice,
69 """
70
71 EXAMPLES = r"""
72 - name: Create
73 cisco.meraki.devices_live_tools_ping_device:
74 meraki_api_key: "{{ meraki_api_key }}"
75 meraki_base_url: "{{ meraki_base_url }}"
76 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
77 meraki_certificate_path: "{{ meraki_certificate_path }}"
78 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
79 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
80 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
81 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
82 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
83 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
84 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
85 meraki_output_log: "{{ meraki_output_log }}"
86 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
87 meraki_log_path: "{{ meraki_log_path }}"
88 meraki_print_console: "{{ meraki_print_console }}"
89 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
90 meraki_simulate: "{{ meraki_simulate }}"
91 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
92 meraki_caller: "{{ meraki_caller }}"
93 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
94 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
95 state: present
96 callback:
97 httpServer:
98 id: aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=
99 payloadTemplate:
100 id: wpt_2100
101 sharedSecret: secret
102 url: https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031
103 count: 3
104 serial: string
105 """
106 RETURN = r"""
107 meraki_response:
108 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
109 returned: always
110 type: dict
111 sample: >
112 {
113 "pingId": "string",
114 "url": "string",
115 "request": {
116 "serial": "string",
117 "count": 0
118 },
119 "status": "string",
120 "callback": {
121 "id": "string",
122 "url": "string",
123 "status": "string"
124 }
125 }
126 """