Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_snmp.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_snmp
9 short_description: Resource module for networks _snmp
10 description:
11 - Manage operation update of the resource networks _snmp.
12 - Update the SNMP settings for a network.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 access:
19 description: The type of SNMP access. Can be one of 'none' (disabled), 'community'
20 (V1/V2c), or 'users' (V3).
21 type: str
22 communityString:
23 description: The SNMP community string. Only relevant if 'access' is set to 'community'.
24 type: str
25 networkId:
26 description: NetworkId path parameter. Network ID.
27 type: str
28 users:
29 description: The list of SNMP users. Only relevant if 'access' is set to 'users'.
30 elements: dict
31 suboptions:
32 passphrase:
33 description: The passphrase for the SNMP user. Required.
34 type: str
35 username:
36 description: The username for the SNMP user. Required.
37 type: str
38 type: list
39 requirements:
40 - meraki >= 2.4.9
41 - python >= 3.5
42 seealso:
43 - name: Cisco Meraki documentation for networks updateNetworkSnmp
44 description: Complete reference of the updateNetworkSnmp API.
45 link: https://developer.cisco.com/meraki/api-v1/#!update-network-snmp
46 notes:
47 - SDK Method used are
48 networks.Networks.update_network_snmp,
49 - Paths used are
50 put /networks/{networkId}/snmp,
51 """
52
53 EXAMPLES = r"""
54 - name: Update all
55 cisco.meraki.networks_snmp:
56 meraki_api_key: "{{ meraki_api_key }}"
57 meraki_base_url: "{{ meraki_base_url }}"
58 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
59 meraki_certificate_path: "{{ meraki_certificate_path }}"
60 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
61 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
62 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
63 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
64 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
65 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
66 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
67 meraki_output_log: "{{ meraki_output_log }}"
68 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
69 meraki_log_path: "{{ meraki_log_path }}"
70 meraki_print_console: "{{ meraki_print_console }}"
71 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
72 meraki_simulate: "{{ meraki_simulate }}"
73 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
74 meraki_caller: "{{ meraki_caller }}"
75 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
76 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
77 state: present
78 access: users
79 communityString: sample
80 networkId: string
81 users:
82 - passphrase: hunter2
83 username: AzureDiamond
84 """
85 RETURN = r"""
86 meraki_response:
87 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
88 returned: always
89 type: dict
90 sample: >
91 {
92 "access": "string",
93 "communityString": "string",
94 "users": [
95 {
96 "username": "string",
97 "passphrase": "string"
98 }
99 ]
100 }
101 """