| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
DOCUMENTATION = r""" |
| 8 |
module: networks_appliance_sdwan_internet_policies |
| 9 |
short_description: Resource module for networks _appliance _sdwan _internet _policies |
| 10 |
description: |
| 11 |
- Manage operation update of the resource networks _appliance _sdwan _internet _policies. |
| 12 |
- Update SDWAN internet traffic preferences for an MX network. |
| 13 |
version_added: '1.0.0' |
| 14 |
extends_documentation_fragment: |
| 15 |
- cisco.meraki.module |
| 16 |
author: Francisco Munoz (@fmunoz) |
| 17 |
options: |
| 18 |
networkId: |
| 19 |
description: NetworkId path parameter. Network ID. |
| 20 |
type: str |
| 21 |
wanTrafficUplinkPreferences: |
| 22 |
description: Policies with respective traffic filters for an MX network. |
| 23 |
elements: dict |
| 24 |
suboptions: |
| 25 |
failOverCriterion: |
| 26 |
description: WAN failover and failback behavior. |
| 27 |
type: str |
| 28 |
performanceClass: |
| 29 |
description: Performance class setting for uplink preference rule. |
| 30 |
suboptions: |
| 31 |
builtinPerformanceClassName: |
| 32 |
description: Name of builtin performance class. Must be present when performanceClass |
| 33 |
type is 'builtin' and value must be one of 'VoIP'. |
| 34 |
type: str |
| 35 |
customPerformanceClassId: |
| 36 |
description: ID of created custom performance class, must be present when |
| 37 |
performanceClass type is "custom". |
| 38 |
type: str |
| 39 |
type: |
| 40 |
description: Type of this performance class. Must be one of 'builtin' |
| 41 |
or 'custom'. |
| 42 |
type: str |
| 43 |
type: dict |
| 44 |
preferredUplink: |
| 45 |
description: Preferred uplink for uplink preference rule. Must be one of 'wan1', |
| 46 |
'wan2', 'bestForVoIP', 'loadBalancing' or 'defaultUplink'. |
| 47 |
type: str |
| 48 |
trafficFilters: |
| 49 |
description: Traffic filters. |
| 50 |
elements: dict |
| 51 |
suboptions: |
| 52 |
type: |
| 53 |
description: Traffic filter type. Must be 'custom', 'major_application', |
| 54 |
'application (NBAR)', if type is 'application', you can pass either |
| 55 |
an NBAR App Category or Application. |
| 56 |
type: str |
| 57 |
value: |
| 58 |
description: Value of traffic filter. |
| 59 |
suboptions: |
| 60 |
destination: |
| 61 |
description: Destination of 'custom' type traffic filter. |
| 62 |
suboptions: |
| 63 |
applications: |
| 64 |
description: List of application objects (either majorApplication |
| 65 |
or nbar). |
| 66 |
elements: dict |
| 67 |
suboptions: |
| 68 |
id: |
| 69 |
description: Id of the major application, or a list of NBAR |
| 70 |
Application Category or Application selections. |
| 71 |
type: str |
| 72 |
name: |
| 73 |
description: Name of the major application or application |
| 74 |
category selected. |
| 75 |
type: str |
| 76 |
type: |
| 77 |
description: App type (major or nbar). |
| 78 |
type: str |
| 79 |
type: list |
| 80 |
cidr: |
| 81 |
description: CIDR format address (e.g."192.168.10.1", which is |
| 82 |
the same as "192.168.10.1/32"), or "any". |
| 83 |
type: str |
| 84 |
port: |
| 85 |
description: E.g. "any", "0" (also means "any"), "8080", "1-1024". |
| 86 |
type: str |
| 87 |
type: dict |
| 88 |
protocol: |
| 89 |
description: Protocol of the traffic filter. Must be one of 'tcp', |
| 90 |
'udp', 'icmp6' or 'any'. |
| 91 |
type: str |
| 92 |
source: |
| 93 |
description: Source of traffic filter. |
| 94 |
suboptions: |
| 95 |
cidr: |
| 96 |
description: CIDR format address (e.g."192.168.10.1", which is |
| 97 |
the same as "192.168.10.1/32"), or "any". Cannot be used in |
| 98 |
combination with the "vlan" property. |
| 99 |
type: str |
| 100 |
host: |
| 101 |
description: Host ID in the VLAN. Should not exceed the VLAN subnet |
| 102 |
capacity. Must be used along with the "vlan" property and is |
| 103 |
currently only available under a template network. |
| 104 |
type: int |
| 105 |
port: |
| 106 |
description: E.g. "any", "0" (also means "any"), "8080", "1-1024". |
| 107 |
type: str |
| 108 |
vlan: |
| 109 |
description: VLAN ID of the configured VLAN in the Meraki network. |
| 110 |
Cannot be used in combination with the "cidr" property and is |
| 111 |
currently only available under a template network. |
| 112 |
type: int |
| 113 |
type: dict |
| 114 |
type: dict |
| 115 |
type: list |
| 116 |
type: list |
| 117 |
requirements: |
| 118 |
- meraki >= 2.4.9 |
| 119 |
- python >= 3.5 |
| 120 |
seealso: |
| 121 |
- name: Cisco Meraki documentation for appliance updateNetworkApplianceSdwanInternetPolicies |
| 122 |
description: Complete reference of the updateNetworkApplianceSdwanInternetPolicies |
| 123 |
API. |
| 124 |
link: https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-sdwan-internet-policies |
| 125 |
notes: |
| 126 |
- SDK Method used are |
| 127 |
appliance.Appliance.update_network_appliance_sdwan_internet_policies, |
| 128 |
- Paths used are |
| 129 |
put /networks/{networkId}/appliance/sdwan/internetPolicies, |
| 130 |
""" |
| 131 |
|
| 132 |
EXAMPLES = r""" |
| 133 |
- name: Update all |
| 134 |
cisco.meraki.networks_appliance_sdwan_internet_policies: |
| 135 |
meraki_api_key: "{{ meraki_api_key }}" |
| 136 |
meraki_base_url: "{{ meraki_base_url }}" |
| 137 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 138 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 139 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 140 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 141 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 142 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 143 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 144 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 145 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 146 |
meraki_output_log: "{{ meraki_output_log }}" |
| 147 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 148 |
meraki_log_path: "{{ meraki_log_path }}" |
| 149 |
meraki_print_console: "{{ meraki_print_console }}" |
| 150 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 151 |
meraki_simulate: "{{ meraki_simulate }}" |
| 152 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 153 |
meraki_caller: "{{ meraki_caller }}" |
| 154 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 155 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 156 |
networkId: string |
| 157 |
wanTrafficUplinkPreferences: |
| 158 |
- failOverCriterion: poorPerformance |
| 159 |
performanceClass: |
| 160 |
builtinPerformanceClassName: VoIP |
| 161 |
customPerformanceClassId: '123456' |
| 162 |
type: custom |
| 163 |
preferredUplink: wan1 |
| 164 |
trafficFilters: |
| 165 |
- type: custom |
| 166 |
value: |
| 167 |
destination: |
| 168 |
applications: |
| 169 |
- id: meraki:layer7/application/3 |
| 170 |
name: DNS |
| 171 |
type: major |
| 172 |
cidr: any |
| 173 |
port: any |
| 174 |
protocol: tcp |
| 175 |
source: |
| 176 |
cidr: 192.168.1.0/24 |
| 177 |
host: 254 |
| 178 |
port: 1-1024 |
| 179 |
vlan: 10 |
| 180 |
""" |
| 181 |
RETURN = r""" |
| 182 |
meraki_response: |
| 183 |
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK |
| 184 |
returned: always |
| 185 |
type: dict |
| 186 |
sample: > |
| 187 |
{ |
| 188 |
"wanTrafficUplinkPreferences": [ |
| 189 |
{ |
| 190 |
"preferredUplink": "string", |
| 191 |
"failOverCriterion": "string", |
| 192 |
"performanceClass": { |
| 193 |
"type": "string", |
| 194 |
"builtinPerformanceClassName": "string", |
| 195 |
"customPerformanceClassId": "string" |
| 196 |
}, |
| 197 |
"trafficFilters": [ |
| 198 |
{ |
| 199 |
"type": "string", |
| 200 |
"value": { |
| 201 |
"protocol": "string", |
| 202 |
"source": { |
| 203 |
"port": "string", |
| 204 |
"cidr": "string", |
| 205 |
"vlan": 0, |
| 206 |
"host": 0 |
| 207 |
}, |
| 208 |
"destination": { |
| 209 |
"port": "string", |
| 210 |
"cidr": "string", |
| 211 |
"applications": [ |
| 212 |
{ |
| 213 |
"id": "string", |
| 214 |
"name": "string", |
| 215 |
"type": "string" |
| 216 |
} |
| 217 |
] |
| 218 |
} |
| 219 |
} |
| 220 |
} |
| 221 |
] |
| 222 |
} |
| 223 |
] |
| 224 |
} |
| 225 |
""" |