Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_devices_statuses_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_statuses_info
9 short_description: Information module for organizations _devices _statuses
10 description:
11 - Information module for Organizations Devices Statuses Info.
12 - Get all organizations _devices _statuses.
13 - List the status of every Meraki device in the organization.
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 Statuses Info.
26 - OrganizationId path parameter. Organization ID.
27 type: str
28 perPage:
29 description:
30 - Information module for Organizations Devices Statuses Info.
31 - PerPage query parameter. The number of entries per page returned. Acceptable
32 range is 3 - 1000. Default is 1000.
33 type: int
34 startingAfter:
35 description:
36 - Information module for Organizations Devices Statuses 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 Statuses 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 networkIds:
55 description:
56 - Information module for Organizations Devices Statuses Info.
57 - NetworkIds query parameter. Optional parameter to filter devices by network
58 ids.
59 elements: str
60 type: list
61 serials:
62 description:
63 - Information module for Organizations Devices Statuses Info.
64 - Serials query parameter. Optional parameter to filter devices by serials.
65 elements: str
66 type: list
67 statuses:
68 description:
69 - Information module for Organizations Devices Statuses Info.
70 - >
71 Statuses query parameter. Optional parameter to filter devices by statuses.
72 Valid statuses are "online", "alerting", "offline", "dormant".
73 elements: str
74 type: list
75 productTypes:
76 description:
77 - Information module for Organizations Devices Statuses Info.
78 - >
79 ProductTypes query parameter. An optional parameter to filter device statuses
80 by product type. Valid types are wireless, appliance, switch, systemsManager,
81 camera, cellularGateway, sensor, wirelessController, campusGateway, and secureConnect.
82 elements: str
83 type: list
84 models:
85 description:
86 - Information module for Organizations Devices Statuses Info.
87 - Models query parameter. Optional parameter to filter devices by models.
88 elements: str
89 type: list
90 tags:
91 description:
92 - Information module for Organizations Devices Statuses Info.
93 - >
94 Tags query parameter. An optional parameter to filter devices by tags. The
95 filtering is case-sensitive. If tags are included, 'tagsFilterType' should
96 also be included (see below).
97 elements: str
98 type: list
99 tagsFilterType:
100 description:
101 - Information module for Organizations Devices Statuses Info.
102 - >
103 TagsFilterType query parameter. An optional parameter of value 'withAnyTags'
104 or 'withAllTags' to indicate whether to return devices which contain ANY or
105 ALL of the included tags. If no type is included, 'withAnyTags' will be selected.
106 type: str
107 requirements:
108 - meraki >= 2.4.9
109 - python >= 3.5
110 seealso:
111 - name: Cisco Meraki documentation for organizations getOrganizationDevicesStatuses
112 description: Complete reference of the getOrganizationDevicesStatuses API.
113 link: https://developer.cisco.com/meraki/api-v1/#!get-organization-devices-statuses
114 notes:
115 - SDK Method used are
116 organizations.Organizations.get_organization_devices_statuses,
117 - Paths used are
118 get /organizations/{organizationId}/devices/statuses,
119 """
120
121 EXAMPLES = r"""
122 - name: Get all organizations _devices _statuses
123 cisco.meraki.organizations_devices_statuses_info:
124 meraki_api_key: "{{ meraki_api_key }}"
125 meraki_base_url: "{{ meraki_base_url }}"
126 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
127 meraki_certificate_path: "{{ meraki_certificate_path }}"
128 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
129 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
130 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
131 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
132 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
133 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
134 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
135 meraki_output_log: "{{ meraki_output_log }}"
136 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
137 meraki_log_path: "{{ meraki_log_path }}"
138 meraki_print_console: "{{ meraki_print_console }}"
139 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
140 meraki_simulate: "{{ meraki_simulate }}"
141 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
142 meraki_caller: "{{ meraki_caller }}"
143 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
144 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
145 perPage: 0
146 startingAfter: string
147 endingBefore: string
148 networkIds: []
149 serials: []
150 statuses: []
151 productTypes: []
152 models: []
153 tags: []
154 tagsFilterType: string
155 organizationId: string
156 total_pages: -1
157 direction: next
158 register: result
159 """
160 RETURN = r"""
161 meraki_response:
162 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
163 returned: always
164 type: list
165 elements: dict
166 sample: >
167 [
168 {
169 "name": "string",
170 "serial": "string",
171 "mac": "string",
172 "publicIp": "string",
173 "networkId": "string",
174 "status": "string",
175 "lastReportedAt": "string",
176 "lanIp": "string",
177 "gateway": "string",
178 "ipType": "string",
179 "primaryDns": "string",
180 "secondaryDns": "string",
181 "productType": "string",
182 "components": {
183 "powerSupplies": [
184 {
185 "slot": 0,
186 "serial": "string",
187 "model": "string",
188 "status": "string",
189 "poe": {
190 "unit": "string",
191 "maximum": 0
192 }
193 }
194 ]
195 },
196 "model": "string",
197 "tags": [
198 "string"
199 ]
200 }
201 ]
202 """