| 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_traffic_analysis |
| 9 |
short_description: Resource module for networks _trafficanalysis |
| 10 |
description: |
| 11 |
- Manage operation update of the resource networks _trafficanalysis. |
| 12 |
- Update the traffic analysis 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 |
customPieChartItems: |
| 19 |
description: The list of items that make up the custom pie chart for traffic reporting. |
| 20 |
elements: dict |
| 21 |
suboptions: |
| 22 |
name: |
| 23 |
description: The name of the custom pie chart item. |
| 24 |
type: str |
| 25 |
type: |
| 26 |
description: The signature type for the custom pie chart item. Can be one |
| 27 |
of 'host', 'port' or 'ipRange'. |
| 28 |
type: str |
| 29 |
value: |
| 30 |
description: The value of the custom pie chart item. Valid syntax depends |
| 31 |
on the signature type of the chart item (see sample request/response for |
| 32 |
more details). |
| 33 |
type: str |
| 34 |
type: list |
| 35 |
mode: |
| 36 |
description: The traffic analysis mode for the network. Can be one of 'disabled' |
| 37 |
(do not collect traffic types), 'basic' (collect generic traffic categories), |
| 38 |
or 'detailed' (collect destination hostnames). |
| 39 |
type: str |
| 40 |
networkId: |
| 41 |
description: NetworkId path parameter. Network ID. |
| 42 |
type: str |
| 43 |
requirements: |
| 44 |
- meraki >= 2.4.9 |
| 45 |
- python >= 3.5 |
| 46 |
seealso: |
| 47 |
- name: Cisco Meraki documentation for networks updateNetworkTrafficAnalysis |
| 48 |
description: Complete reference of the updateNetworkTrafficAnalysis API. |
| 49 |
link: https://developer.cisco.com/meraki/api-v1/#!update-network-traffic-analysis |
| 50 |
notes: |
| 51 |
- SDK Method used are |
| 52 |
networks.Networks.update_network_traffic_analysis, |
| 53 |
- Paths used are |
| 54 |
put /networks/{networkId}/trafficAnalysis, |
| 55 |
""" |
| 56 |
|
| 57 |
EXAMPLES = r""" |
| 58 |
- name: Update all |
| 59 |
cisco.meraki.networks_traffic_analysis: |
| 60 |
meraki_api_key: "{{ meraki_api_key }}" |
| 61 |
meraki_base_url: "{{ meraki_base_url }}" |
| 62 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 63 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 64 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 65 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 66 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 67 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 68 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 69 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 70 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 71 |
meraki_output_log: "{{ meraki_output_log }}" |
| 72 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 73 |
meraki_log_path: "{{ meraki_log_path }}" |
| 74 |
meraki_print_console: "{{ meraki_print_console }}" |
| 75 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 76 |
meraki_simulate: "{{ meraki_simulate }}" |
| 77 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 78 |
meraki_caller: "{{ meraki_caller }}" |
| 79 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 80 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 81 |
state: present |
| 82 |
customPieChartItems: |
| 83 |
- name: Item from hostname |
| 84 |
type: host |
| 85 |
value: example.com |
| 86 |
mode: disabled |
| 87 |
networkId: string |
| 88 |
""" |
| 89 |
RETURN = r""" |
| 90 |
meraki_response: |
| 91 |
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK |
| 92 |
returned: always |
| 93 |
type: dict |
| 94 |
sample: > |
| 95 |
{ |
| 96 |
"mode": "string", |
| 97 |
"customPieChartItems": [ |
| 98 |
{ |
| 99 |
"name": "string", |
| 100 |
"type": "string", |
| 101 |
"value": "string" |
| 102 |
} |
| 103 |
] |
| 104 |
} |
| 105 |
""" |