Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/devices_live_tools_wake_on_lan.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_wake_on_lan
9 short_description: Resource module for devices _livetools _wakeonlan
10 description:
11 - Manage operation create of the resource devices _livetools _wakeonlan.
12 - >
13 Enqueue a job to send a Wake-on-LAN packet from the device. This endpoint has
14 a 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 mac:
52 description: The target's MAC address.
53 type: str
54 serial:
55 description: Serial path parameter.
56 type: str
57 vlanId:
58 description: The target's VLAN (1 to 4094).
59 type: int
60 requirements:
61 - meraki >= 2.4.9
62 - python >= 3.5
63 seealso:
64 - name: Cisco Meraki documentation for devices createDeviceLiveToolsWakeOnLan
65 description: Complete reference of the createDeviceLiveToolsWakeOnLan API.
66 link: https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-wake-on-lan
67 notes:
68 - SDK Method used are
69 devices.Devices.create_device_live_tools_wake_on_lan,
70 - Paths used are
71 post /devices/{serial}/liveTools/wakeOnLan,
72 """
73
74 EXAMPLES = r"""
75 - name: Create
76 cisco.meraki.devices_live_tools_wake_on_lan:
77 meraki_api_key: "{{ meraki_api_key }}"
78 meraki_base_url: "{{ meraki_base_url }}"
79 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
80 meraki_certificate_path: "{{ meraki_certificate_path }}"
81 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
82 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
83 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
84 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
85 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
86 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
87 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
88 meraki_output_log: "{{ meraki_output_log }}"
89 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
90 meraki_log_path: "{{ meraki_log_path }}"
91 meraki_print_console: "{{ meraki_print_console }}"
92 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
93 meraki_simulate: "{{ meraki_simulate }}"
94 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
95 meraki_caller: "{{ meraki_caller }}"
96 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
97 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
98 state: present
99 callback:
100 httpServer:
101 id: aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=
102 payloadTemplate:
103 id: wpt_2100
104 sharedSecret: secret
105 url: https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031
106 mac: 00:11:22:33:44:55
107 serial: string
108 vlanId: 12
109 """
110 RETURN = r"""
111 meraki_response:
112 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
113 returned: always
114 type: dict
115 sample: >
116 {
117 "wakeOnLanId": "string",
118 "url": "string",
119 "status": "string",
120 "request": {
121 "serial": "string",
122 "vlanId": 0,
123 "mac": "string"
124 },
125 "error": "string",
126 "callback": {
127 "id": "string",
128 "url": "string",
129 "status": "string"
130 }
131 }
132 """