Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_admins.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_admins
9 short_description: Resource module for organizations _admins
10 description:
11 - Manage operations create, update and delete of the resource organizations _admins.
12 - Create a new dashboard administrator.
13 - Revoke all access for a dashboard administrator within this organization.
14 - Update an administrator.
15 version_added: '1.0.0'
16 extends_documentation_fragment:
17 - cisco.meraki.module
18 author: Francisco Munoz (@fmunoz)
19 options:
20 adminId:
21 description: AdminId path parameter. Admin ID.
22 type: str
23 authenticationMethod:
24 description: No longer used as of Cisco SecureX end-of-life. Can be one of 'Email'.
25 The default is Email authentication.
26 type: str
27 email:
28 description: The email of the dashboard administrator. This attribute can not
29 be updated.
30 type: str
31 name:
32 description: The name of the dashboard administrator.
33 type: str
34 networks:
35 description: The list of networks that the dashboard administrator has privileges
36 on.
37 elements: dict
38 suboptions:
39 access:
40 description: The privilege of the dashboard administrator on the network.
41 Can be one of 'full', 'read-only', 'guest-ambassador' or 'monitor-only'.
42 type: str
43 id:
44 description: The network ID.
45 type: str
46 type: list
47 orgAccess:
48 description: The privilege of the dashboard administrator on the organization.
49 Can be one of 'full', 'read-only', 'enterprise' or 'none'.
50 type: str
51 organizationId:
52 description: OrganizationId path parameter. Organization ID.
53 type: str
54 tags:
55 description: The list of tags that the dashboard administrator has privileges
56 on.
57 elements: dict
58 suboptions:
59 access:
60 description: The privilege of the dashboard administrator on the tag. Can
61 be one of 'full', 'read-only', 'guest-ambassador' or 'monitor-only'.
62 type: str
63 tag:
64 description: The name of the tag.
65 type: str
66 type: list
67 requirements:
68 - meraki >= 2.4.9
69 - python >= 3.5
70 seealso:
71 - name: Cisco Meraki documentation for organizations createOrganizationAdmin
72 description: Complete reference of the createOrganizationAdmin API.
73 link: https://developer.cisco.com/meraki/api-v1/#!create-organization-admin
74 - name: Cisco Meraki documentation for organizations deleteOrganizationAdmin
75 description: Complete reference of the deleteOrganizationAdmin API.
76 link: https://developer.cisco.com/meraki/api-v1/#!delete-organization-admin
77 - name: Cisco Meraki documentation for organizations updateOrganizationAdmin
78 description: Complete reference of the updateOrganizationAdmin API.
79 link: https://developer.cisco.com/meraki/api-v1/#!update-organization-admin
80 notes:
81 - SDK Method used are
82 organizations.Organizations.create_organization_admin,
83 organizations.Organizations.delete_organization_admin,
84 organizations.Organizations.update_organization_admin,
85 - Paths used are
86 post /organizations/{organizationId}/admins,
87 delete /organizations/{organizationId}/admins/{adminId},
88 put /organizations/{organizationId}/admins/{adminId},
89 """
90
91 EXAMPLES = r"""
92 - name: Create
93 cisco.meraki.organizations_admins:
94 meraki_api_key: "{{ meraki_api_key }}"
95 meraki_base_url: "{{ meraki_base_url }}"
96 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
97 meraki_certificate_path: "{{ meraki_certificate_path }}"
98 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
99 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
100 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
101 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
102 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
103 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
104 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
105 meraki_output_log: "{{ meraki_output_log }}"
106 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
107 meraki_log_path: "{{ meraki_log_path }}"
108 meraki_print_console: "{{ meraki_print_console }}"
109 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
110 meraki_simulate: "{{ meraki_simulate }}"
111 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
112 meraki_caller: "{{ meraki_caller }}"
113 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
114 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
115 state: present
116 authenticationMethod: Email
117 email: [email protected]
118 name: Miles Meraki
119 networks:
120 - access: full
121 id: N_24329156
122 orgAccess: none
123 organizationId: string
124 tags:
125 - access: read-only
126 tag: west
127 - name: Update by id
128 cisco.meraki.organizations_admins:
129 meraki_api_key: "{{ meraki_api_key }}"
130 meraki_base_url: "{{ meraki_base_url }}"
131 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
132 meraki_certificate_path: "{{ meraki_certificate_path }}"
133 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
134 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
135 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
136 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
137 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
138 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
139 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
140 meraki_output_log: "{{ meraki_output_log }}"
141 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
142 meraki_log_path: "{{ meraki_log_path }}"
143 meraki_print_console: "{{ meraki_print_console }}"
144 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
145 meraki_simulate: "{{ meraki_simulate }}"
146 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
147 meraki_caller: "{{ meraki_caller }}"
148 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
149 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
150 state: present
151 adminId: string
152 name: Miles Meraki
153 networks:
154 - access: full
155 id: N_24329156
156 orgAccess: none
157 organizationId: string
158 tags:
159 - access: read-only
160 tag: west
161 - name: Delete by id
162 cisco.meraki.organizations_admins:
163 meraki_api_key: "{{ meraki_api_key }}"
164 meraki_base_url: "{{ meraki_base_url }}"
165 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
166 meraki_certificate_path: "{{ meraki_certificate_path }}"
167 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
168 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
169 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
170 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
171 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
172 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
173 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
174 meraki_output_log: "{{ meraki_output_log }}"
175 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
176 meraki_log_path: "{{ meraki_log_path }}"
177 meraki_print_console: "{{ meraki_print_console }}"
178 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
179 meraki_simulate: "{{ meraki_simulate }}"
180 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
181 meraki_caller: "{{ meraki_caller }}"
182 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
183 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
184 state: absent
185 adminId: string
186 organizationId: string
187 """
188 RETURN = r"""
189 meraki_response:
190 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
191 returned: always
192 type: dict
193 sample: >
194 {
195 "id": "string",
196 "name": "string",
197 "email": "string",
198 "orgAccess": "string",
199 "accountStatus": "string",
200 "twoFactorAuthEnabled": true,
201 "hasApiKey": true,
202 "lastActive": "string",
203 "tags": [
204 {
205 "tag": "string",
206 "access": "string"
207 }
208 ],
209 "networks": [
210 {
211 "id": "string",
212 "access": "string"
213 }
214 ],
215 "authenticationMethod": "string"
216 }
217 """