Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_clients_policy.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_clients_policy
9 short_description: Resource module for networks _clients _policy
10 description:
11 - Manage operation update of the resource networks _clients _policy.
12 - >
13 Update the policy assigned to a client on the network. Clients can be identified
14 by a client key or either the MAC or IP depending on whether the network uses
15 Track-by-IP.
16 version_added: '1.0.0'
17 extends_documentation_fragment:
18 - cisco.meraki.module
19 author: Francisco Munoz (@fmunoz)
20 options:
21 clientId:
22 description: ClientId path parameter. Client ID.
23 type: str
24 devicePolicy:
25 description: The policy to assign. Can be 'Whitelisted', 'Blocked', 'Normal' or
26 'Group policy'. Required.
27 type: str
28 groupPolicyId:
29 description: Optional If 'devicePolicy' is set to 'Group policy' this param is
30 used to specify the group policy ID.
31 type: str
32 networkId:
33 description: NetworkId path parameter. Network ID.
34 type: str
35 requirements:
36 - meraki >= 2.4.9
37 - python >= 3.5
38 seealso:
39 - name: Cisco Meraki documentation for networks updateNetworkClientPolicy
40 description: Complete reference of the updateNetworkClientPolicy API.
41 link: https://developer.cisco.com/meraki/api-v1/#!update-network-client-policy
42 notes:
43 - SDK Method used are
44 networks.Networks.update_network_client_policy,
45 - Paths used are
46 put /networks/{networkId}/clients/{clientId}/policy,
47 """
48
49 EXAMPLES = r"""
50 - name: Update all
51 cisco.meraki.networks_clients_policy:
52 meraki_api_key: "{{ meraki_api_key }}"
53 meraki_base_url: "{{ meraki_base_url }}"
54 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
55 meraki_certificate_path: "{{ meraki_certificate_path }}"
56 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
57 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
58 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
59 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
60 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
61 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
62 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
63 meraki_output_log: "{{ meraki_output_log }}"
64 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
65 meraki_log_path: "{{ meraki_log_path }}"
66 meraki_print_console: "{{ meraki_print_console }}"
67 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
68 meraki_simulate: "{{ meraki_simulate }}"
69 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
70 meraki_caller: "{{ meraki_caller }}"
71 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
72 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
73 state: present
74 clientId: string
75 devicePolicy: Different policies by SSID
76 groupPolicyId: '101'
77 networkId: string
78 """
79 RETURN = r"""
80 meraki_response:
81 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
82 returned: always
83 type: dict
84 sample: >
85 {
86 "mac": "string",
87 "devicePolicy": "string",
88 "groupPolicyId": "string",
89 "policiesBySsid": [
90 {
91 "ssidNumber": 0,
92 "devicePolicy": "string",
93 "groupPolicyId": "string"
94 }
95 ]
96 }
97 """