Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_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_info
9 short_description: Information module for organizations
10 description:
11 - Information module for Organizations Info.
12 - Get all organizations.
13 - Get organizations by id.
14 - List the organizations that the user has privileges on.
15 - Return an organization.
16 version_added: '1.0.0'
17 extends_documentation_fragment:
18 - cisco.meraki.module_info
19 - cisco.meraki.module_info_pagination
20 author: Francisco Munoz (@fmunoz)
21 options:
22 headers:
23 description: Additional headers.
24 type: dict
25 perPage:
26 description:
27 - Information module for Organizations Info.
28 - PerPage query parameter. The number of entries per page returned. Acceptable
29 range is 3 - 9000. Default is 9000.
30 type: int
31 startingAfter:
32 description:
33 - Information module for Organizations Info.
34 - >
35 StartingAfter query parameter. A token used by the server to indicate the
36 start of the page. Often this is a timestamp or an ID but it is not limited
37 to those. This parameter should not be defined by client applications. The
38 link for the first, last, prev, or next page in the HTTP Link header should
39 define it.
40 type: str
41 endingBefore:
42 description:
43 - Information module for Organizations Info.
44 - >
45 EndingBefore query parameter. A token used by the server to indicate the end
46 of the page. Often this is a timestamp or an ID but it is not limited to those.
47 This parameter should not be defined by client applications. The link for
48 the first, last, prev, or next page in the HTTP Link header should define
49 it.
50 type: str
51 organizationId:
52 description:
53 - Information module for Organizations Info.
54 - OrganizationId path parameter. Organization ID.
55 type: str
56 requirements:
57 - meraki >= 2.4.9
58 - python >= 3.5
59 seealso:
60 - name: Cisco Meraki documentation for organizations getOrganization
61 description: Complete reference of the getOrganization API.
62 link: https://developer.cisco.com/meraki/api-v1/#!get-organization
63 - name: Cisco Meraki documentation for organizations getOrganizations
64 description: Complete reference of the getOrganizations API.
65 link: https://developer.cisco.com/meraki/api-v1/#!get-organizations
66 notes:
67 - SDK Method used are
68 organizations.Organizations.get_organization,
69 organizations.Organizations.get_organizations,
70 - Paths used are
71 get /organizations,
72 get /organizations/{organizationId},
73 """
74
75 EXAMPLES = r"""
76 - name: Get all organizations
77 cisco.meraki.organizations_info:
78 meraki_api_key: "{{ meraki_api_key }}"
79 meraki_base_url: "{{ meraki_base_url }}"
80 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
81 meraki_certificate_path: "{{ meraki_certificate_path }}"
82 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
83 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
84 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
85 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
86 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
87 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
88 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
89 meraki_output_log: "{{ meraki_output_log }}"
90 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
91 meraki_log_path: "{{ meraki_log_path }}"
92 meraki_print_console: "{{ meraki_print_console }}"
93 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
94 meraki_simulate: "{{ meraki_simulate }}"
95 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
96 meraki_caller: "{{ meraki_caller }}"
97 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
98 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
99 perPage: 0
100 startingAfter: string
101 endingBefore: string
102 total_pages: -1
103 direction: next
104 register: result
105 - name: Get organizations by id
106 cisco.meraki.organizations_info:
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 organizationId: string
129 register: result
130 """
131 RETURN = r"""
132 meraki_response:
133 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
134 returned: always
135 type: dict
136 sample: >
137 {
138 "id": "string",
139 "name": "string",
140 "url": "string",
141 "api": {
142 "enabled": true
143 },
144 "licensing": {
145 "model": "string"
146 },
147 "cloud": {
148 "region": {
149 "name": "string",
150 "host": {
151 "name": "string"
152 }
153 }
154 },
155 "management": {
156 "details": [
157 {
158 "name": "string",
159 "value": "string"
160 }
161 ]
162 }
163 }
164 """