Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_api_requests_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_api_requests_info
9 short_description: Information module for organizations _apirequests
10 description:
11 - Information module for Organizations Apirequests Info.
12 - Get all organizations _apirequests.
13 - List the API requests made by an 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 Apirequests Info.
26 - OrganizationId path parameter. Organization ID.
27 type: str
28 t0:
29 description:
30 - Information module for Organizations Apirequests Info.
31 - T0 query parameter. The beginning of the timespan for the data. The maximum
32 lookback period is 31 days from today.
33 type: str
34 t1:
35 description:
36 - Information module for Organizations Apirequests Info.
37 - T1 query parameter. The end of the timespan for the data. T1 can be a maximum
38 of 31 days after t0.
39 type: str
40 timespan:
41 description:
42 - Information module for Organizations Apirequests Info.
43 - >
44 Timespan query parameter. The timespan for which the information will be fetched.
45 If specifying timespan, do not specify parameters t0 and t1. The value must
46 be in seconds and be less than or equal to 31 days. The default is 31 days.
47 type: float
48 perPage:
49 description:
50 - Information module for Organizations Apirequests Info.
51 - PerPage query parameter. The number of entries per page returned. Acceptable
52 range is 3 - 1000. Default is 50.
53 type: int
54 startingAfter:
55 description:
56 - Information module for Organizations Apirequests Info.
57 - >
58 StartingAfter query parameter. A token used by the server to indicate the
59 start of the page. Often this is a timestamp or an ID but it is not limited
60 to those. This parameter should not be defined by client applications. The
61 link for the first, last, prev, or next page in the HTTP Link header should
62 define it.
63 type: str
64 endingBefore:
65 description:
66 - Information module for Organizations Apirequests Info.
67 - >
68 EndingBefore query parameter. A token used by the server to indicate the end
69 of the page. Often this is a timestamp or an ID but it is not limited to those.
70 This parameter should not be defined by client applications. The link for
71 the first, last, prev, or next page in the HTTP Link header should define
72 it.
73 type: str
74 adminId:
75 description:
76 - Information module for Organizations Apirequests Info.
77 - AdminId query parameter. Filter the results by the ID of the admin who made
78 the API requests.
79 type: str
80 path:
81 description:
82 - Information module for Organizations Apirequests Info.
83 - Path query parameter. Filter the results by the path of the API requests.
84 type: str
85 method:
86 description:
87 - Information module for Organizations Apirequests Info.
88 - >
89 Method query parameter. Filter the results by the method of the API requests
90 (must be 'GET', 'PUT', 'POST' or 'DELETE').
91 type: str
92 responseCode:
93 description:
94 - Information module for Organizations Apirequests Info.
95 - ResponseCode query parameter. Filter the results by the response code of the
96 API requests.
97 type: int
98 sourceIp:
99 description:
100 - Information module for Organizations Apirequests Info.
101 - SourceIp query parameter. Filter the results by the IP address of the originating
102 API request.
103 type: str
104 userAgent:
105 description:
106 - Information module for Organizations Apirequests Info.
107 - UserAgent query parameter. Filter the results by the user agent string of
108 the API request.
109 type: str
110 version:
111 description:
112 - Information module for Organizations Apirequests Info.
113 - Version query parameter. Filter the results by the API version of the API
114 request.
115 type: int
116 operationIds:
117 description:
118 - Information module for Organizations Apirequests Info.
119 - OperationIds query parameter. Filter the results by one or more operation
120 IDs for the API request.
121 elements: str
122 type: list
123 requirements:
124 - meraki >= 2.4.9
125 - python >= 3.5
126 seealso:
127 - name: Cisco Meraki documentation for organizations getOrganizationApiRequests
128 description: Complete reference of the getOrganizationApiRequests API.
129 link: https://developer.cisco.com/meraki/api-v1/#!get-organization-api-requests
130 notes:
131 - SDK Method used are
132 organizations.Organizations.get_organization_api_requests,
133 - Paths used are
134 get /organizations/{organizationId}/apiRequests,
135 """
136
137 EXAMPLES = r"""
138 - name: Get all organizations _apirequests
139 cisco.meraki.organizations_api_requests_info:
140 meraki_api_key: "{{ meraki_api_key }}"
141 meraki_base_url: "{{ meraki_base_url }}"
142 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
143 meraki_certificate_path: "{{ meraki_certificate_path }}"
144 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
145 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
146 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
147 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
148 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
149 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
150 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
151 meraki_output_log: "{{ meraki_output_log }}"
152 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
153 meraki_log_path: "{{ meraki_log_path }}"
154 meraki_print_console: "{{ meraki_print_console }}"
155 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
156 meraki_simulate: "{{ meraki_simulate }}"
157 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
158 meraki_caller: "{{ meraki_caller }}"
159 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
160 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
161 t0: string
162 t1: string
163 timespan: 0
164 perPage: 0
165 startingAfter: string
166 endingBefore: string
167 adminId: string
168 path: string
169 method: string
170 responseCode: 0
171 sourceIp: string
172 userAgent: string
173 version: 0
174 operationIds: []
175 organizationId: string
176 total_pages: -1
177 direction: next
178 register: result
179 """
180 RETURN = r"""
181 meraki_response:
182 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
183 returned: always
184 type: list
185 elements: dict
186 sample: >
187 [
188 {
189 "adminId": "string",
190 "method": "string",
191 "host": "string",
192 "path": "string",
193 "queryString": "string",
194 "userAgent": "string",
195 "ts": "string",
196 "responseCode": 0,
197 "sourceIp": "string",
198 "version": 0,
199 "operationId": "string",
200 "client": {
201 "id": "string",
202 "type": "string"
203 }
204 }
205 ]
206 """