Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations.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
9 short_description: Resource module for organizations
10 description:
11 - Manage operations create, update and delete of the resource organizations.
12 - Create a new organization.
13 - Delete an organization.
14 - Update an organization.
15 version_added: '1.0.0'
16 extends_documentation_fragment:
17 - cisco.meraki.module
18 author: Francisco Munoz (@fmunoz)
19 options:
20 api:
21 description: API-specific settings.
22 suboptions:
23 enabled:
24 description: If true, enable the access to the Cisco Meraki Dashboard API.
25 type: bool
26 type: dict
27 management:
28 description: Information about the organization's management system.
29 suboptions:
30 details:
31 description: Details related to organization management, possibly empty.
32 elements: dict
33 suboptions:
34 name:
35 description: Name of management data.
36 type: str
37 value:
38 description: Value of management data.
39 type: str
40 type: list
41 type: dict
42 name:
43 description: The name of the organization.
44 type: str
45 organizationId:
46 description: OrganizationId path parameter. Organization ID.
47 type: str
48 requirements:
49 - meraki >= 2.4.9
50 - python >= 3.5
51 seealso:
52 - name: Cisco Meraki documentation for organizations createOrganization
53 description: Complete reference of the createOrganization API.
54 link: https://developer.cisco.com/meraki/api-v1/#!create-organization
55 - name: Cisco Meraki documentation for organizations deleteOrganization
56 description: Complete reference of the deleteOrganization API.
57 link: https://developer.cisco.com/meraki/api-v1/#!delete-organization
58 - name: Cisco Meraki documentation for organizations updateOrganization
59 description: Complete reference of the updateOrganization API.
60 link: https://developer.cisco.com/meraki/api-v1/#!update-organization
61 notes:
62 - SDK Method used are
63 organizations.Organizations.create_organization,
64 organizations.Organizations.delete_organization,
65 organizations.Organizations.update_organization,
66 - Paths used are
67 post /organizations,
68 delete /organizations/{organizationId},
69 put
70 /organizations/{organizationId},
71 """
72
73 EXAMPLES = r"""
74 - name: Create
75 cisco.meraki.organizations:
76 meraki_api_key: "{{ meraki_api_key }}"
77 meraki_base_url: "{{ meraki_base_url }}"
78 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
79 meraki_certificate_path: "{{ meraki_certificate_path }}"
80 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
81 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
82 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
83 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
84 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
85 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
86 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
87 meraki_output_log: "{{ meraki_output_log }}"
88 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
89 meraki_log_path: "{{ meraki_log_path }}"
90 meraki_print_console: "{{ meraki_print_console }}"
91 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
92 meraki_simulate: "{{ meraki_simulate }}"
93 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
94 meraki_caller: "{{ meraki_caller }}"
95 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
96 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
97 state: present
98 management:
99 details:
100 - name: MSP ID
101 value: '123456'
102 name: My organization
103 - name: Update by id
104 cisco.meraki.organizations:
105 meraki_api_key: "{{ meraki_api_key }}"
106 meraki_base_url: "{{ meraki_base_url }}"
107 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
108 meraki_certificate_path: "{{ meraki_certificate_path }}"
109 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
110 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
111 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
112 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
113 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
114 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
115 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
116 meraki_output_log: "{{ meraki_output_log }}"
117 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
118 meraki_log_path: "{{ meraki_log_path }}"
119 meraki_print_console: "{{ meraki_print_console }}"
120 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
121 meraki_simulate: "{{ meraki_simulate }}"
122 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
123 meraki_caller: "{{ meraki_caller }}"
124 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
125 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
126 state: present
127 api:
128 enabled: true
129 management:
130 details:
131 - name: MSP ID
132 value: '123456'
133 name: My organization
134 organizationId: string
135 - name: Delete by id
136 cisco.meraki.organizations:
137 meraki_api_key: "{{ meraki_api_key }}"
138 meraki_base_url: "{{ meraki_base_url }}"
139 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
140 meraki_certificate_path: "{{ meraki_certificate_path }}"
141 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
142 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
143 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
144 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
145 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
146 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
147 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
148 meraki_output_log: "{{ meraki_output_log }}"
149 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
150 meraki_log_path: "{{ meraki_log_path }}"
151 meraki_print_console: "{{ meraki_print_console }}"
152 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
153 meraki_simulate: "{{ meraki_simulate }}"
154 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
155 meraki_caller: "{{ meraki_caller }}"
156 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
157 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
158 state: absent
159 organizationId: string
160 """
161 RETURN = r"""
162 meraki_response:
163 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
164 returned: always
165 type: dict
166 sample: >
167 {
168 "id": "string",
169 "name": "string",
170 "url": "string",
171 "api": {
172 "enabled": true
173 },
174 "licensing": {
175 "model": "string"
176 },
177 "cloud": {
178 "region": {
179 "name": "string",
180 "host": {
181 "name": "string"
182 }
183 }
184 },
185 "management": {
186 "details": [
187 {
188 "name": "string",
189 "value": "string"
190 }
191 ]
192 }
193 }
194 """