Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_policy_objects_groups.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_policy_objects_groups
9 short_description: Resource module for organizations _policyobjects _groups
10 description:
11 - Manage operations create, update and delete of the resource organizations _policyobjects
12 _groups.
13 - Creates a new Policy Object Group.
14 - Deletes a Policy Object Group.
15 - Updates a Policy Object Group.
16 version_added: '1.0.0'
17 extends_documentation_fragment:
18 - cisco.meraki.module
19 author: Francisco Munoz (@fmunoz)
20 options:
21 category:
22 description: Category of a policy object group (one of NetworkObjectGroup, GeoLocationGroup,
23 PortObjectGroup, ApplicationGroup).
24 type: str
25 name:
26 description: A name for the group of network addresses, unique within the organization
27 (alphanumeric, space, dash, or underscore characters only).
28 type: str
29 objectIds:
30 description: A list of Policy Object ID's that this NetworkObjectGroup should
31 be associated to (note these ID's will replace the existing associated Policy
32 Objects).
33 elements: int
34 type: list
35 organizationId:
36 description: OrganizationId path parameter. Organization ID.
37 type: str
38 policyObjectGroupId:
39 description: PolicyObjectGroupId path parameter. Policy object group ID.
40 type: str
41 requirements:
42 - meraki >= 2.4.9
43 - python >= 3.5
44 seealso:
45 - name: Cisco Meraki documentation for organizations createOrganizationPolicyObjectsGroup
46 description: Complete reference of the createOrganizationPolicyObjectsGroup API.
47 link: https://developer.cisco.com/meraki/api-v1/#!create-organization-policy-objects-group
48 - name: Cisco Meraki documentation for organizations deleteOrganizationPolicyObjectsGroup
49 description: Complete reference of the deleteOrganizationPolicyObjectsGroup API.
50 link: https://developer.cisco.com/meraki/api-v1/#!delete-organization-policy-objects-group
51 - name: Cisco Meraki documentation for organizations updateOrganizationPolicyObjectsGroup
52 description: Complete reference of the updateOrganizationPolicyObjectsGroup API.
53 link: https://developer.cisco.com/meraki/api-v1/#!update-organization-policy-objects-group
54 notes:
55 - SDK Method used are
56 organizations.Organizations.create_organization_policy_objects_group,
57 organizations.Organizations.delete_organization_policy_objects_group,
58 organizations.Organizations.update_organization_policy_objects_group,
59 - Paths used are
60 post /organizations/{organizationId}/policyObjects/groups,
61 delete
62 /organizations/{organizationId}/policyObjects/groups/{policyObjectGroupId},
63 put
64 /organizations/{organizationId}/policyObjects/groups/{policyObjectGroupId},
65 """
66
67 EXAMPLES = r"""
68 - name: Create
69 cisco.meraki.organizations_policy_objects_groups:
70 meraki_api_key: "{{ meraki_api_key }}"
71 meraki_base_url: "{{ meraki_base_url }}"
72 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
73 meraki_certificate_path: "{{ meraki_certificate_path }}"
74 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
75 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
76 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
77 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
78 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
79 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
80 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
81 meraki_output_log: "{{ meraki_output_log }}"
82 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
83 meraki_log_path: "{{ meraki_log_path }}"
84 meraki_print_console: "{{ meraki_print_console }}"
85 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
86 meraki_simulate: "{{ meraki_simulate }}"
87 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
88 meraki_caller: "{{ meraki_caller }}"
89 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
90 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
91 state: present
92 category: NetworkObjectGroup
93 name: Web Servers - Datacenter 10
94 objectIds:
95 - 100
96 organizationId: string
97 - name: Update by id
98 cisco.meraki.organizations_policy_objects_groups:
99 meraki_api_key: "{{ meraki_api_key }}"
100 meraki_base_url: "{{ meraki_base_url }}"
101 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
102 meraki_certificate_path: "{{ meraki_certificate_path }}"
103 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
104 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
105 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
106 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
107 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
108 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
109 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
110 meraki_output_log: "{{ meraki_output_log }}"
111 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
112 meraki_log_path: "{{ meraki_log_path }}"
113 meraki_print_console: "{{ meraki_print_console }}"
114 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
115 meraki_simulate: "{{ meraki_simulate }}"
116 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
117 meraki_caller: "{{ meraki_caller }}"
118 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
119 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
120 state: present
121 name: Web Servers - Datacenter 10
122 objectIds:
123 - 100
124 organizationId: string
125 policyObjectGroupId: string
126 - name: Delete by id
127 cisco.meraki.organizations_policy_objects_groups:
128 meraki_api_key: "{{ meraki_api_key }}"
129 meraki_base_url: "{{ meraki_base_url }}"
130 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
131 meraki_certificate_path: "{{ meraki_certificate_path }}"
132 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
133 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
134 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
135 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
136 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
137 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
138 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
139 meraki_output_log: "{{ meraki_output_log }}"
140 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
141 meraki_log_path: "{{ meraki_log_path }}"
142 meraki_print_console: "{{ meraki_print_console }}"
143 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
144 meraki_simulate: "{{ meraki_simulate }}"
145 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
146 meraki_caller: "{{ meraki_caller }}"
147 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
148 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
149 state: absent
150 organizationId: string
151 policyObjectGroupId: string
152 """
153 RETURN = r"""
154 meraki_response:
155 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
156 returned: always
157 type: dict
158 sample: >
159 {
160 "id": "string",
161 "name": "string",
162 "category": "string",
163 "createdAt": "string",
164 "updatedAt": "string",
165 "objectIds": [
166 0
167 ],
168 "networkIds": [
169 "string"
170 ]
171 }
172 """