Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_action_batches.py

raw symbols SCIP
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_action_batches
9 short_description: Resource module for organizations _actionbatches
10 description:
11 - Manage operations create, update and delete of the resource organizations _actionbatches.
12 - Create an action batch.
13 - Delete an action batch.
14 - Update an action batch.
15 version_added: '1.0.0'
16 extends_documentation_fragment:
17 - cisco.meraki.module
18 author: Francisco Munoz (@fmunoz)
19 options:
20 actionBatchId:
21 description: ActionBatchId path parameter. Action batch ID.
22 type: str
23 actions:
24 description: A set of changes to make as part of this action (<a href='https //developer.cisco.com/meraki/api/#...
25 details</a>).
26 elements: dict
27 suboptions:
28 body:
29 description: The body of the action.
30 type: dict
31 operation:
32 description: The operation to be used.
33 type: str
34 resource:
35 description: Unique identifier for the resource to be acted on.
36 type: str
37 type: list
38 callback:
39 description: Details for the callback. Please include either an httpServerId OR
40 url and sharedSecret.
41 suboptions:
42 httpServer:
43 description: The webhook receiver used for the callback webhook.
44 suboptions:
45 id:
46 description: The webhook receiver ID that will receive information. If
47 specifying this, please leave the url and sharedSecret fields blank.
48 type: str
49 type: dict
50 payloadTemplate:
51 description: The payload template of the webhook used for the callback.
52 suboptions:
53 id:
54 description: The ID of the payload template. Defaults to 'wpt_00005' for
55 the Callback (included) template.
56 type: str
57 type: dict
58 sharedSecret:
59 description: A shared secret that will be included in the requests sent to
60 the callback URL. It can be used to verify that the request was sent by
61 Meraki. If using this field, please also specify an url.
62 type: str
63 url:
64 description: The callback URL for the webhook target. If using this field,
65 please also specify a sharedSecret.
66 type: str
67 type: dict
68 confirmed:
69 description: Set to true for immediate execution. Set to false if the action should
70 be previewed before executing. This property cannot be unset once it is true.
71 Defaults to false.
72 type: bool
73 organizationId:
74 description: OrganizationId path parameter. Organization ID.
75 type: str
76 synchronous:
77 description: Set to true to force the batch to run synchronous. There can be at
78 most 20 actions in synchronous batch. Defaults to false.
79 type: bool
80 requirements:
81 - meraki >= 2.4.9
82 - python >= 3.5
83 seealso:
84 - name: Cisco Meraki documentation for organizations createOrganizationActionBatch
85 description: Complete reference of the createOrganizationActionBatch API.
86 link: https://developer.cisco.com/meraki/api-v1/#!create-organization-action-batch
87 - name: Cisco Meraki documentation for organizations deleteOrganizationActionBatch
88 description: Complete reference of the deleteOrganizationActionBatch API.
89 link: https://developer.cisco.com/meraki/api-v1/#!delete-organization-action-batch
90 - name: Cisco Meraki documentation for organizations updateOrganizationActionBatch
91 description: Complete reference of the updateOrganizationActionBatch API.
92 link: https://developer.cisco.com/meraki/api-v1/#!update-organization-action-batch
93 notes:
94 - SDK Method used are
95 organizations.Organizations.create_organization_action_batch,
96 organizations.Organizations.delete_organization_action_batch,
97 organizations.Organizations.update_organization_action_batch,
98 - Paths used are
99 post /organizations/{organizationId}/actionBatches,
100 delete /organizations/{organizationId}/actionBatches/{actionBatchId},
101 put /organizations/{organizationId}/actionBatches/{actionBatchId},
102 """
103
104 EXAMPLES = r"""
105 - name: Create
106 cisco.meraki.organizations_action_batches:
107 meraki_api_key: "{{ meraki_api_key }}"
108 meraki_base_url: "{{ meraki_base_url }}"
109 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
110 meraki_certificate_path: "{{ meraki_certificate_path }}"
111 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
112 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
113 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
114 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
115 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
116 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
117 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
118 meraki_output_log: "{{ meraki_output_log }}"
119 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
120 meraki_log_path: "{{ meraki_log_path }}"
121 meraki_print_console: "{{ meraki_print_console }}"
122 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
123 meraki_simulate: "{{ meraki_simulate }}"
124 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
125 meraki_caller: "{{ meraki_caller }}"
126 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
127 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
128 state: present
129 actions:
130 - operation: create
131 resource: /devices/QXXX-XXXX-XXXX/switch/ports/3
132 callback:
133 httpServer:
134 id: aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=
135 payloadTemplate:
136 id: wpt_2100
137 sharedSecret: secret
138 url: https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031
139 confirmed: true
140 organizationId: string
141 synchronous: true
142 - name: Delete by id
143 cisco.meraki.organizations_action_batches:
144 meraki_api_key: "{{ meraki_api_key }}"
145 meraki_base_url: "{{ meraki_base_url }}"
146 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
147 meraki_certificate_path: "{{ meraki_certificate_path }}"
148 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
149 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
150 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
151 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
152 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
153 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
154 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
155 meraki_output_log: "{{ meraki_output_log }}"
156 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
157 meraki_log_path: "{{ meraki_log_path }}"
158 meraki_print_console: "{{ meraki_print_console }}"
159 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
160 meraki_simulate: "{{ meraki_simulate }}"
161 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
162 meraki_caller: "{{ meraki_caller }}"
163 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
164 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
165 state: absent
166 actionBatchId: string
167 organizationId: string
168 - name: Update by id
169 cisco.meraki.organizations_action_batches:
170 meraki_api_key: "{{ meraki_api_key }}"
171 meraki_base_url: "{{ meraki_base_url }}"
172 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
173 meraki_certificate_path: "{{ meraki_certificate_path }}"
174 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
175 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
176 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
177 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
178 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
179 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
180 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
181 meraki_output_log: "{{ meraki_output_log }}"
182 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
183 meraki_log_path: "{{ meraki_log_path }}"
184 meraki_print_console: "{{ meraki_print_console }}"
185 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
186 meraki_simulate: "{{ meraki_simulate }}"
187 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
188 meraki_caller: "{{ meraki_caller }}"
189 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
190 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
191 state: present
192 actionBatchId: string
193 confirmed: true
194 organizationId: string
195 synchronous: false
196 """
197 RETURN = r"""
198 meraki_response:
199 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
200 returned: always
201 type: dict
202 sample: >
203 {
204 "id": "string",
205 "organizationId": "string",
206 "confirmed": true,
207 "synchronous": true,
208 "status": {
209 "completed": true,
210 "failed": true,
211 "errors": [
212 "string"
213 ],
214 "createdResources": [
215 {
216 "id": "string",
217 "uri": "string"
218 }
219 ]
220 },
221 "actions": [
222 {
223 "resource": "string",
224 "operation": "string",
225 "body": {}
226 }
227 ],
228 "callback": {
229 "id": "string",
230 "url": "string",
231 "status": "string"
232 }
233 }
234 """