Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_devices_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: organizations_devices_info
9 short_description: Information module for organizations _devices
10 description:
11 - Information module for Organizations Devices Info.
12 - Get all organizations _devices.
13 - List the devices in an organization that have been assigned to a 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 organizationId:
24 description:
25 - Information module for Organizations Devices Info.
26 - OrganizationId path parameter. Organization ID.
27 type: str
28 perPage:
29 description:
30 - Information module for Organizations Devices Info.
31 - PerPage query parameter. The number of entries per page returned. Acceptable
32 range is 3 - 5000. Default is 1000.
33 type: int
34 startingAfter:
35 description:
36 - Information module for Organizations Devices Info.
37 - >
38 StartingAfter query parameter. A token used by the server to indicate the
39 start of the page. Often this is a timestamp or an ID but it is not limited
40 to those. This parameter should not be defined by client applications. The
41 link for the first, last, prev, or next page in the HTTP Link header should
42 define it.
43 type: str
44 endingBefore:
45 description:
46 - Information module for Organizations Devices Info.
47 - >
48 EndingBefore query parameter. A token used by the server to indicate the end
49 of the page. Often this is a timestamp or an ID but it is not limited to those.
50 This parameter should not be defined by client applications. The link for
51 the first, last, prev, or next page in the HTTP Link header should define
52 it.
53 type: str
54 configurationUpdatedAfter:
55 description:
56 - Information module for Organizations Devices Info.
57 - >
58 ConfigurationUpdatedAfter query parameter. Filter results by whether or not
59 the device's configuration has been updated after the given timestamp.
60 type: str
61 networkIds:
62 description:
63 - Information module for Organizations Devices Info.
64 - NetworkIds query parameter. Optional parameter to filter devices by network.
65 elements: str
66 type: list
67 productTypes:
68 description:
69 - Information module for Organizations Devices Info.
70 - >
71 ProductTypes query parameter. Optional parameter to filter devices by product
72 type. Valid types are wireless, appliance, switch, systemsManager, camera,
73 cellularGateway, sensor, wirelessController, campusGateway, and secureConnect.
74 elements: str
75 type: list
76 tags:
77 description:
78 - Information module for Organizations Devices Info.
79 - Tags query parameter. Optional parameter to filter devices by tags.
80 elements: str
81 type: list
82 tagsFilterType:
83 description:
84 - Information module for Organizations Devices Info.
85 - >
86 TagsFilterType query parameter. Optional parameter of value 'withAnyTags'
87 or 'withAllTags' to indicate whether to return networks which contain ANY
88 or ALL of the included tags. If no type is included, 'withAnyTags' will be
89 selected.
90 type: str
91 name:
92 description:
93 - Information module for Organizations Devices Info.
94 - >
95 Name query parameter. Optional parameter to filter devices by name. All returned
96 devices will have a name that contains the search term or is an exact match.
97 type: str
98 mac:
99 description:
100 - Information module for Organizations Devices Info.
101 - >
102 Mac query parameter. Optional parameter to filter devices by MAC address.
103 All returned devices will have a MAC address that contains the search term
104 or is an exact match.
105 type: str
106 serial:
107 description:
108 - Information module for Organizations Devices Info.
109 - >
110 Serial query parameter. Optional parameter to filter devices by serial number.
111 All returned devices will have a serial number that contains the search term
112 or is an exact match.
113 type: str
114 model:
115 description:
116 - Information module for Organizations Devices Info.
117 - >
118 Model query parameter. Optional parameter to filter devices by model. All
119 returned devices will have a model that contains the search term or is an
120 exact match.
121 type: str
122 macs:
123 description:
124 - Information module for Organizations Devices Info.
125 - >
126 Macs query parameter. Optional parameter to filter devices by one or more
127 MAC addresses. All returned devices will have a MAC address that is an exact
128 match.
129 elements: str
130 type: list
131 serials:
132 description:
133 - Information module for Organizations Devices Info.
134 - >
135 Serials query parameter. Optional parameter to filter devices by one or more
136 serial numbers. All returned devices will have a serial number that is an
137 exact match.
138 elements: str
139 type: list
140 sensorMetrics:
141 description:
142 - Information module for Organizations Devices Info.
143 - >
144 SensorMetrics query parameter. Optional parameter to filter devices by the
145 metrics that they provide. Only applies to sensor devices.
146 elements: str
147 type: list
148 sensorAlertProfileIds:
149 description:
150 - Information module for Organizations Devices Info.
151 - >
152 SensorAlertProfileIds query parameter. Optional parameter to filter devices
153 by the alert profiles that are bound to them. Only applies to sensor devices.
154 elements: str
155 type: list
156 models:
157 description:
158 - Information module for Organizations Devices Info.
159 - >
160 Models query parameter. Optional parameter to filter devices by one or more
161 models. All returned devices will have a model that is an exact match.
162 elements: str
163 type: list
164 requirements:
165 - meraki >= 2.4.9
166 - python >= 3.5
167 seealso:
168 - name: Cisco Meraki documentation for organizations getOrganizationDevices
169 description: Complete reference of the getOrganizationDevices API.
170 link: https://developer.cisco.com/meraki/api-v1/#!get-organization-devices
171 notes:
172 - SDK Method used are
173 organizations.Organizations.get_organization_devices,
174 - Paths used are
175 get /organizations/{organizationId}/devices,
176 """
177
178 EXAMPLES = r"""
179 - name: Get all organizations _devices
180 cisco.meraki.organizations_devices_info:
181 meraki_api_key: "{{ meraki_api_key }}"
182 meraki_base_url: "{{ meraki_base_url }}"
183 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
184 meraki_certificate_path: "{{ meraki_certificate_path }}"
185 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
186 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
187 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
188 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
189 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
190 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
191 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
192 meraki_output_log: "{{ meraki_output_log }}"
193 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
194 meraki_log_path: "{{ meraki_log_path }}"
195 meraki_print_console: "{{ meraki_print_console }}"
196 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
197 meraki_simulate: "{{ meraki_simulate }}"
198 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
199 meraki_caller: "{{ meraki_caller }}"
200 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
201 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
202 perPage: 0
203 startingAfter: string
204 endingBefore: string
205 configurationUpdatedAfter: string
206 networkIds: []
207 productTypes: []
208 tags: []
209 tagsFilterType: string
210 name: string
211 mac: string
212 serial: string
213 model: string
214 macs: []
215 serials: []
216 sensorMetrics: []
217 sensorAlertProfileIds: []
218 models: []
219 organizationId: string
220 total_pages: -1
221 direction: next
222 register: result
223 """
224 RETURN = r"""
225 meraki_response:
226 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
227 returned: always
228 type: list
229 elements: dict
230 sample: >
231 [
232 {
233 "name": "string",
234 "lat": 0,
235 "lng": 0,
236 "address": "string",
237 "notes": "string",
238 "tags": [
239 "string"
240 ],
241 "networkId": "string",
242 "serial": "string",
243 "model": "string",
244 "imei": "string",
245 "mac": "string",
246 "lanIp": "string",
247 "firmware": "string",
248 "productType": "string",
249 "details": [
250 {
251 "name": "string",
252 "value": "string"
253 }
254 ]
255 }
256 ]
257 """