Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_events_info.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: networks_events_info
9 short_description: Information module for networks _events
10 description:
11 - Information module for Networks Events Info.
12 - Get all networks _events.
13 - List the events for the network.
14 version_added: '1.0.0'
15 extends_documentation_fragment:
16 - cisco.meraki.module_info
17 - cisco.meraki.module_info_pagination
18 author: Francisco Munoz (@fmunoz)
19 options:
20 headers:
21 description: Additional headers.
22 type: dict
23 networkId:
24 description:
25 - Information module for Networks Events Info.
26 - NetworkId path parameter. Network ID.
27 type: str
28 productType:
29 description:
30 - Information module for Networks Events Info.
31 - >
32 ProductType query parameter. The product type to fetch events for. This parameter
33 is required for networks with multiple device types. Valid types are wireless,
34 appliance, switch, systemsManager, camera, cellularGateway, wirelessController,
35 campusGateway, and secureConnect.
36 type: str
37 includedEventTypes:
38 description:
39 - Information module for Networks Events Info.
40 - >
41 IncludedEventTypes query parameter. A list of event types. The returned events
42 will be filtered to only include events with these types.
43 elements: str
44 type: list
45 excludedEventTypes:
46 description:
47 - Information module for Networks Events Info.
48 - >
49 ExcludedEventTypes query parameter. A list of event types. The returned events
50 will be filtered to exclude events with these types.
51 elements: str
52 type: list
53 deviceMac:
54 description:
55 - Information module for Networks Events Info.
56 - DeviceMac query parameter. The MAC address of the Meraki device which the
57 list of events will be filtered with.
58 type: str
59 deviceSerial:
60 description:
61 - Information module for Networks Events Info.
62 - DeviceSerial query parameter. The serial of the Meraki device which the list
63 of events will be filtered with.
64 type: str
65 deviceName:
66 description:
67 - Information module for Networks Events Info.
68 - DeviceName query parameter. The name of the Meraki device which the list of
69 events will be filtered with.
70 type: str
71 clientIp:
72 description:
73 - Information module for Networks Events Info.
74 - >
75 ClientIp query parameter. The IP of the client which the list of events will
76 be filtered with. Only supported for track-by-IP networks.
77 type: str
78 clientMac:
79 description:
80 - Information module for Networks Events Info.
81 - >
82 ClientMac query parameter. The MAC address of the client which the list of
83 events will be filtered with. Only supported for track-by-MAC networks.
84 type: str
85 clientName:
86 description:
87 - Information module for Networks Events Info.
88 - >
89 ClientName query parameter. The name, or partial name, of the client which
90 the list of events will be filtered with.
91 type: str
92 smDeviceMac:
93 description:
94 - Information module for Networks Events Info.
95 - >
96 SmDeviceMac query parameter. The MAC address of the Systems Manager device
97 which the list of events will be filtered with.
98 type: str
99 smDeviceName:
100 description:
101 - Information module for Networks Events Info.
102 - >
103 SmDeviceName query parameter. The name of the Systems Manager device which
104 the list of events will be filtered with.
105 type: str
106 eventDetails:
107 description:
108 - Information module for Networks Events Info.
109 - >
110 EventDetails query parameter. The details of the event(Catalyst device only)
111 which the list of events will be filtered with.
112 type: str
113 eventSeverity:
114 description:
115 - Information module for Networks Events Info.
116 - >
117 EventSeverity query parameter. The severity of the event(Catalyst device only)
118 which the list of events will be filtered with.
119 type: str
120 isCatalyst:
121 description:
122 - Information module for Networks Events Info.
123 - >
124 IsCatalyst query parameter. Boolean indicating that whether it is a Catalyst
125 device. For Catalyst device, eventDetails and eventSeverity can be used to
126 filter events.
127 type: bool
128 perPage:
129 description:
130 - Information module for Networks Events Info.
131 - PerPage query parameter. The number of entries per page returned. Acceptable
132 range is 3 - 1000. Default is 10.
133 type: int
134 startingAfter:
135 description:
136 - Information module for Networks Events Info.
137 - >
138 StartingAfter query parameter. A token used by the server to indicate the
139 start of the page. Often this is a timestamp or an ID but it is not limited
140 to those. This parameter should not be defined by client applications. The
141 link for the first, last, prev, or next page in the HTTP Link header should
142 define it.
143 type: str
144 endingBefore:
145 description:
146 - Information module for Networks Events Info.
147 - >
148 EndingBefore query parameter. A token used by the server to indicate the end
149 of the page. Often this is a timestamp or an ID but it is not limited to those.
150 This parameter should not be defined by client applications. The link for
151 the first, last, prev, or next page in the HTTP Link header should define
152 it.
153 type: str
154 requirements:
155 - meraki >= 2.4.9
156 - python >= 3.5
157 seealso:
158 - name: Cisco Meraki documentation for networks getNetworkEvents
159 description: Complete reference of the getNetworkEvents API.
160 link: https://developer.cisco.com/meraki/api-v1/#!get-network-events
161 notes:
162 - SDK Method used are
163 networks.Networks.get_network_events,
164 - Paths used are
165 get /networks/{networkId}/events,
166 """
167
168 EXAMPLES = r"""
169 - name: Get all networks _events
170 cisco.meraki.networks_events_info:
171 meraki_api_key: "{{ meraki_api_key }}"
172 meraki_base_url: "{{ meraki_base_url }}"
173 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
174 meraki_certificate_path: "{{ meraki_certificate_path }}"
175 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
176 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
177 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
178 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
179 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
180 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
181 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
182 meraki_output_log: "{{ meraki_output_log }}"
183 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
184 meraki_log_path: "{{ meraki_log_path }}"
185 meraki_print_console: "{{ meraki_print_console }}"
186 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
187 meraki_simulate: "{{ meraki_simulate }}"
188 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
189 meraki_caller: "{{ meraki_caller }}"
190 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
191 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
192 productType: string
193 includedEventTypes: []
194 excludedEventTypes: []
195 deviceMac: string
196 deviceSerial: string
197 deviceName: string
198 clientIp: string
199 clientMac: string
200 clientName: string
201 smDeviceMac: string
202 smDeviceName: string
203 eventDetails: string
204 eventSeverity: string
205 isCatalyst: true
206 perPage: 0
207 startingAfter: string
208 endingBefore: string
209 networkId: string
210 total_pages: -1
211 direction: next
212 register: result
213 """
214 RETURN = r"""
215 meraki_response:
216 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
217 returned: always
218 type: dict
219 sample: >
220 {
221 "message": "string",
222 "pageStartAt": "string",
223 "pageEndAt": "string",
224 "events": [
225 {
226 "occurredAt": "string",
227 "networkId": "string",
228 "type": "string",
229 "description": "string",
230 "category": "string",
231 "clientId": "string",
232 "clientDescription": "string",
233 "clientMac": "string",
234 "deviceSerial": "string",
235 "deviceName": "string",
236 "ssidNumber": 0,
237 "eventData": {
238 "radio": "string",
239 "vap": "string",
240 "client_mac": "string",
241 "client_ip": "string",
242 "channel": "string",
243 "rssi": "string",
244 "aid": "string"
245 }
246 }
247 ]
248 }
249 """