Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_switch_access_policies_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: networks_switch_access_policies_info
9 short_description: Information module for networks _switch _accesspolicies
10 description:
11 - Information module for Networks Switch Accesspolicies Info.
12 - Get all networks _switch _accesspolicies.
13 - Get networks _switch _accesspolicies by id.
14 - >
15 List the access policies for a switch network. Only returns access policies with
16 'my RADIUS server' as authentication method.
17 - Return a specific access policy for a switch network.
18 version_added: '1.0.0'
19 extends_documentation_fragment:
20 - cisco.meraki.module_info
21 author: Francisco Munoz (@fmunoz)
22 options:
23 headers:
24 description: Additional headers.
25 type: dict
26 networkId:
27 description:
28 - Information module for Networks Switch Accesspolicies Info.
29 - NetworkId path parameter. Network ID.
30 type: str
31 accessPolicyNumber:
32 description:
33 - Information module for Networks Switch Accesspolicies Info.
34 - AccessPolicyNumber path parameter. Access policy number.
35 type: str
36 requirements:
37 - meraki >= 2.4.9
38 - python >= 3.5
39 seealso:
40 - name: Cisco Meraki documentation for switch getNetworkSwitchAccessPolicies
41 description: Complete reference of the getNetworkSwitchAccessPolicies API.
42 link: https://developer.cisco.com/meraki/api-v1/#!get-network-switch-access-policies
43 - name: Cisco Meraki documentation for switch getNetworkSwitchAccessPolicy
44 description: Complete reference of the getNetworkSwitchAccessPolicy API.
45 link: https://developer.cisco.com/meraki/api-v1/#!get-network-switch-access-policy
46 notes:
47 - SDK Method used are
48 switch.Switch.get_network_switch_access_policies,
49 switch.Switch.get_network_switch_access_policy,
50 - Paths used are
51 get /networks/{networkId}/switch/accessPolicies,
52 get /networks/{networkId}/switch/accessPolicies/{accessPolicyNumber},
53 """
54
55 EXAMPLES = r"""
56 - name: Get all networks _switch _accesspolicies
57 cisco.meraki.networks_switch_access_policies_info:
58 meraki_api_key: "{{ meraki_api_key }}"
59 meraki_base_url: "{{ meraki_base_url }}"
60 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
61 meraki_certificate_path: "{{ meraki_certificate_path }}"
62 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
63 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
64 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
65 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
66 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
67 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
68 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
69 meraki_output_log: "{{ meraki_output_log }}"
70 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
71 meraki_log_path: "{{ meraki_log_path }}"
72 meraki_print_console: "{{ meraki_print_console }}"
73 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
74 meraki_simulate: "{{ meraki_simulate }}"
75 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
76 meraki_caller: "{{ meraki_caller }}"
77 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
78 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
79 networkId: string
80 register: result
81 - name: Get networks _switch _accesspolicies by id
82 cisco.meraki.networks_switch_access_policies_info:
83 meraki_api_key: "{{ meraki_api_key }}"
84 meraki_base_url: "{{ meraki_base_url }}"
85 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
86 meraki_certificate_path: "{{ meraki_certificate_path }}"
87 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
88 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
89 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
90 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
91 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
92 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
93 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
94 meraki_output_log: "{{ meraki_output_log }}"
95 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
96 meraki_log_path: "{{ meraki_log_path }}"
97 meraki_print_console: "{{ meraki_print_console }}"
98 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
99 meraki_simulate: "{{ meraki_simulate }}"
100 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
101 meraki_caller: "{{ meraki_caller }}"
102 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
103 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
104 networkId: string
105 accessPolicyNumber: string
106 register: result
107 """
108 RETURN = r"""
109 meraki_response:
110 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
111 returned: always
112 type: dict
113 sample: >
114 {
115 "accessPolicyNumber": "string",
116 "name": "string",
117 "radiusServers": [
118 {
119 "serverId": "string",
120 "organizationRadiusServerId": "string",
121 "host": "string",
122 "port": 0
123 }
124 ],
125 "radius": {
126 "criticalAuth": {
127 "dataVlanId": 0,
128 "voiceVlanId": 0,
129 "suspendPortBounce": true,
130 "dataGroupPolicyId": "string",
131 "voiceGroupPolicyId": "string",
132 "dataSgtId": 0,
133 "voiceSgtId": 0
134 },
135 "failedAuthVlanId": 0,
136 "failedAuthGroupPolicyId": "string",
137 "failedAuthSgtId": 0,
138 "reAuthenticationInterval": 0,
139 "cache": {
140 "enabled": true,
141 "timeout": 0
142 },
143 "authentication": {
144 "mode": "string"
145 },
146 "preAuthenticationGroupPolicyId": "string"
147 },
148 "enforceRadiusMonitoring": true,
149 "guestPortBouncing": true,
150 "radiusTestingEnabled": true,
151 "radiusCoaSupportEnabled": true,
152 "radiusAccountingEnabled": true,
153 "radiusAccountingServers": [
154 {
155 "serverId": "string",
156 "organizationRadiusServerId": "string",
157 "host": "string",
158 "port": 0
159 }
160 ],
161 "radiusGroupAttribute": "string",
162 "hostMode": "string",
163 "accessPolicyType": "string",
164 "increaseAccessSpeed": true,
165 "guestVlanId": {},
166 "dot1x": {
167 "controlDirection": "string"
168 },
169 "voiceVlanClients": true,
170 "urlRedirectWalledGardenEnabled": true,
171 "urlRedirectWalledGardenRanges": [
172 "string"
173 ],
174 "counts": {
175 "ports": {
176 "withThisPolicy": 0
177 }
178 },
179 "guestGroupPolicyId": "string",
180 "guestSgtId": 0
181 }
182 """