B `=@sGdddZdS)cseZdZfddZedddZedddZdeed d d Zed ddZed ddZ ed ddZ ed ddZ ed ddZ ed ddZ ed ddZed ddZeeddd Zeeed!d"d#Zed d$d%Zed d&d'Zed d(d)Zed d*d+Zed d,d-Zed d.d/Zed d0d1Zed d2d3Zeed4d5d6Zed d7d8Zeed4d9d:Zed d;d<Zeed4d=d>Zed d?d@Z eedAdBdCZ!eedAdDdEZ"ded dFdGZ#ed dHdIZ$ed dJdKZ%ed dLdMZ&eedNdOdPZ'ed dQdRZ(ed dSdTZ)ed dUdVZ*ed dWdXZ+eeeedYdZd[Z,eed\d]d^Z-eed\d_d`Z.eed\dadbZ/ed dcddZ0ed dedfZ1ed dgdhZ2eedidjdkZ3eedldmdnZ4eedldodpZ5eedldqdrZ6ed dsdtZ7ed dudvZ8ed dwdxZ9ed dydzZ:ed d{d|Z;ed d}d~Zed ddZ?ed ddZ@eedddZAeedddZBeedddZCed ddZDeeEdddZFed ddZGeedNddZHed ddZIeeEdddZJed ddZKdedddZLedddZMeedddZNdedddZOdedddZPdedddZQedddZReedddZSedddZTedddZUZVS)AsyncAppliancecst||_dS)N)super__init___session)selfsession) __class__s/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki/aio/api/appliance.pyrs zAsyncAppliance.__init__)serialcCs,ddddgdd}d|d}|j||S) z **Return the DHCP subnet information for an appliance** https://developer.cisco.com/meraki/api-v1/#!get-device-appliance-dhcp-subnets - serial (string): (required) appliancemonitorZdhcpsubnetsgetDeviceApplianceDhcpSubnets)tags operationz /devices/z/appliance/dhcp/subnets)rget)rr metadataresourcerrr rs  z,AsyncAppliance.getDeviceApplianceDhcpSubnetscCs*dddgdd}d|d}|j||S)z **Return the performance score for a single MX** https://developer.cisco.com/meraki/api-v1/#!get-device-appliance-performance - serial (string): (required) r r Z performancegetDeviceAppliancePerformance)rrz /devices/z/appliance/performance)rr)rr rrrrr rs  z,AsyncAppliance.getDeviceAppliancePerformancenext) networkIdclientIdc  s|td|kr@ddg}|d|ks@td|dd|dddd d gd d }d |d|d}dddddddgfdd|D} |j||| ||S)aZ **List the security events for a client** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-client-security-events - networkId (string): (required) - clientId (string): (required) - total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - t0 (string): The beginning of the timespan for the data. Data is gathered after the specified t0 value. The maximum lookback period is 791 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 791 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 791 days. The default is 31 days. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - sortOrder (string): Sorted order of security events based on event detection time. Order options are 'ascending' or 'descending'. Default is ascending order. sortOrder ascending descendingz"sortOrder" cannot be "z", & must be set to one of: r r Zclientssecurityevents'getNetworkApplianceClientSecurityEvents)rrz /networks/z/appliance/clients/z/security/eventst0t1timespanperPage startingAfter endingBeforecs&i|]\}}|kr||qSr)strip).0kv) query_paramsrr KszJAsyncAppliance.getNetworkApplianceClientSecurityEvents..)updatelocalsAssertionErroritemsr get_pages) rrr total_pages directionkwargsoptionsrrparamsr)r)r r,s $ z6AsyncAppliance.getNetworkApplianceClientSecurityEvents)rcCs*dddgdd}d|d}|j||S)z **Return the connectivity testing destinations for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-connectivity-monitoring-destinations - networkId (string): (required) r configure"connectivityMonitoringDestinations5getNetworkApplianceConnectivityMonitoringDestinations)rrz /networks/z-/appliance/connectivityMonitoringDestinations)rr)rrrrrrr r7Qs  zDAsyncAppliance.getNetworkApplianceConnectivityMonitoringDestinationsc sT|tdddgdd}d|d}dgfd d |D}|j|||S) aA **Update the connectivity testing destinations for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-connectivity-monitoring-destinations - networkId (string): (required) - destinations (array): The list of connectivity monitoring destinations r r5r68updateNetworkApplianceConnectivityMonitoringDestinations)rrz /networks/z-/appliance/connectivityMonitoringDestinations destinationscs&i|]\}}|kr||qSr)r%)r&r'r() body_paramsrr r*usz[AsyncAppliance.updateNetworkApplianceConnectivityMonitoringDestinations..)r+r,r.rput)rrr2rrpayloadr)r:r r8cs  zGAsyncAppliance.updateNetworkApplianceConnectivityMonitoringDestinationscCs*dddgdd}d|d}|j||S)z **Return the content filtering settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-content-filtering - networkId (string): (required) r r5contentFiltering#getNetworkApplianceContentFiltering)rrz /networks/z/appliance/contentFiltering)rr)rrrrrrr r>{s  z2AsyncAppliance.getNetworkApplianceContentFilteringc s|td|kr@ddg}|d|ks@td|dd|dddgd d }d |d }d dddgfdd|D}|j|||S)a$ **Update the content filtering settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-content-filtering - networkId (string): (required) - allowedUrlPatterns (array): A list of URL patterns that are allowed - blockedUrlPatterns (array): A list of URL patterns that are blocked - blockedUrlCategories (array): A list of URL categories to block - urlCategoryListSize (string): URL category list size which is either 'topSites' or 'fullList' ZurlCategoryListSizeZtopSitesZfullListz!"urlCategoryListSize" cannot be "z", & must be set to one of: r r5r=&updateNetworkApplianceContentFiltering)rrz /networks/z/appliance/contentFilteringZallowedUrlPatternsZblockedUrlPatternsZblockedUrlCategoriescs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szIAsyncAppliance.updateNetworkApplianceContentFiltering..)r+r,r-r.rr;)rrr2r3rrr<r)r:r r?s $  z5AsyncAppliance.updateNetworkApplianceContentFilteringcCs,ddddgdd}d|d}|j||S) z **List all available content filtering categories for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-content-filtering-categories - networkId (string): (required) r r5r= categories-getNetworkApplianceContentFilteringCategories)rrz /networks/z&/appliance/contentFiltering/categories)rr)rrrrrrr rAs  z.)r+r,r.rr;)rrr2rrr<r)r:r rEs   zBAsyncAppliance.updateNetworkApplianceFirewallCellularFirewallRulescCs,ddddgdd}d|d}|j||S) z **List the appliance services and their accessibility rules** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-firewall-firewalled-services - networkId (string): (required) r r5rBfirewalledServices-getNetworkApplianceFirewallFirewalledServices)rrz /networks/z&/appliance/firewall/firewalledServices)rr)rrrrrrr rHs  z.)r+r,r-r.rr;) rrrIrKr2r3rrr<r)r:r rL s  $ z>AsyncAppliance.updateNetworkApplianceFirewallFirewalledServicecCs,ddddgdd}d|d}|j||S) z **Return the inbound firewall rules for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-firewall-inbound-firewall-rules - networkId (string): (required) r r5rBinboundFirewallRules/getNetworkApplianceFirewallInboundFirewallRules)rrz /networks/z(/appliance/firewall/inboundFirewallRules)rr)rrrrrrr rN+s  z>AsyncAppliance.getNetworkApplianceFirewallInboundFirewallRulesc sX|tddddgdd}d|d}d d gfd d |D}|j|||S) a **Update the inbound firewall rules of an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-firewall-inbound-firewall-rules - networkId (string): (required) - rules (array): An ordered array of the firewall rules (not including the default rule) - syslogDefaultRule (boolean): Log the special default rule (boolean value - enable only if you've configured a syslog server) (optional) r r5rBrM2updateNetworkApplianceFirewallInboundFirewallRules)rrz /networks/z(/appliance/firewall/inboundFirewallRulesrFsyslogDefaultRulecs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*PszUAsyncAppliance.updateNetworkApplianceFirewallInboundFirewallRules..)r+r,r.rr;)rrr2rrr<r)r:r rO=s   zAAsyncAppliance.updateNetworkApplianceFirewallInboundFirewallRulescCs,ddddgdd}d|d}|j||S) z **Return the L3 firewall rules for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-firewall-l-3-firewall-rules - networkId (string): (required) r r5rBl3FirewallRules*getNetworkApplianceFirewallL3FirewallRules)rrz /networks/z#/appliance/firewall/l3FirewallRules)rr)rrrrrrr rRVs  z9AsyncAppliance.getNetworkApplianceFirewallL3FirewallRulesc sX|tddddgdd}d|d}d d gfd d |D}|j|||S) a **Update the L3 firewall rules of an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-firewall-l-3-firewall-rules - networkId (string): (required) - rules (array): An ordered array of the firewall rules (not including the default rule) - syslogDefaultRule (boolean): Log the special default rule (boolean value - enable only if you've configured a syslog server) (optional) r r5rBrQ-updateNetworkApplianceFirewallL3FirewallRules)rrz /networks/z#/appliance/firewall/l3FirewallRulesrFrPcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*{szPAsyncAppliance.updateNetworkApplianceFirewallL3FirewallRules..)r+r,r.rr;)rrr2rrr<r)r:r rShs   z.)r+r,r.rr;)rrr2rrr<r)r:r rVs   z.)r,r.rr;)rrrFr2rrr<r)r:r rZs   z>AsyncAppliance.updateNetworkApplianceFirewallOneToManyNatRulescCs,ddddgdd}d|d}|j||S) z **Return the 1:1 NAT mapping rules for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-firewall-one-to-one-nat-rules - networkId (string): (required) r r5rBoneToOneNatRules+getNetworkApplianceFirewallOneToOneNatRules)rrz /networks/z$/appliance/firewall/oneToOneNatRules)rr)rrrrrrr r\s  z:AsyncAppliance.getNetworkApplianceFirewallOneToOneNatRulescsPt}ddddgdd}d|d}d gfd d |D}|j|||S) a  **Set the 1:1 NAT mapping rules for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-firewall-one-to-one-nat-rules - networkId (string): (required) - rules (array): An array of 1:1 nat rules r r5rBr[.updateNetworkApplianceFirewallOneToOneNatRules)rrz /networks/z$/appliance/firewall/oneToOneNatRulesrFcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r* szQAsyncAppliance.updateNetworkApplianceFirewallOneToOneNatRules..)r,r.rr;)rrrFr2rrr<r)r:r r]s   z=AsyncAppliance.updateNetworkApplianceFirewallOneToOneNatRulescCs,ddddgdd}d|d}|j||S) z **Return the port forwarding rules for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-firewall-port-forwarding-rules - networkId (string): (required) r r5rBportForwardingRules.getNetworkApplianceFirewallPortForwardingRules)rrz /networks/z'/appliance/firewall/portForwardingRules)rr)rrrrrrr r_s  z=AsyncAppliance.getNetworkApplianceFirewallPortForwardingRulescsPt}ddddgdd}d|d}d gfd d |D}|j|||S) a **Update the port forwarding rules for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-firewall-port-forwarding-rules - networkId (string): (required) - rules (array): An array of port forwarding params r r5rBr^1updateNetworkApplianceFirewallPortForwardingRules)rrz /networks/z'/appliance/firewall/portForwardingRulesrFcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*5szTAsyncAppliance.updateNetworkApplianceFirewallPortForwardingRules..)r,r.rr;)rrrFr2rrr<r)r:r r`#s   z@AsyncAppliance.updateNetworkApplianceFirewallPortForwardingRulescCs*dddgdd}d|d}|j||S)z **List per-port VLAN settings for all ports of a MX.** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-ports - networkId (string): (required) r r5portsgetNetworkAppliancePorts)rrz /networks/z/appliance/ports)rr)rrrrrrr rb;s  z'AsyncAppliance.getNetworkAppliancePorts)rportIdcCs.dddgdd}d|d|}|j||S)z **Return per-port VLAN settings for a single MX port.** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-port - networkId (string): (required) - portId (string): (required) r r5ragetNetworkAppliancePort)rrz /networks/z/appliance/ports/)rr)rrrcrrrrr rdMs z&AsyncAppliance.getNetworkAppliancePortc sb|tdddgdd}d|d|}dd d d d d gfdd|D}|j|||S)a\ **Update the per-port VLAN settings for a single MX port.** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-port - networkId (string): (required) - portId (string): (required) - enabled (boolean): The status of the port - dropUntaggedTraffic (boolean): Trunk port can Drop all Untagged traffic. When true, no VLAN is required. Access ports cannot have dropUntaggedTraffic set to true. - type (string): The type of the port: 'access' or 'trunk'. - vlan (integer): Native VLAN when the port is in Trunk mode. Access VLAN when the port is in Access mode. - allowedVlans (string): Comma-delimited list of the VLAN ID's allowed on the port, or 'all' to permit all VLAN's on the port. - accessPolicy (string): The name of the policy. Only applicable to Access ports. Valid values are: 'open', '8021x-radius', 'mac-radius', 'hybris-radius' for MX64 or Z3 or any MX supporting the per port authentication feature. Otherwise, 'open' is the only valid value and 'open' is the default value if the field is missing. r r5raupdateNetworkAppliancePort)rrz /networks/z/appliance/ports/enabledZdropUntaggedTraffictypeZvlanZ allowedVlansZ accessPolicycs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*xsz=AsyncAppliance.updateNetworkAppliancePort..)r+r,r.rr;)rrrcr2rrr<r)r:r re`s z)AsyncAppliance.updateNetworkAppliancePortc  s|td|kr@ddg}|d|ks@td|dd|dddd gd d }d |d }dddddddgfdd|D}|j|||||S)a, **List the security events for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-security-events - networkId (string): (required) - total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - t0 (string): The beginning of the timespan for the data. Data is gathered after the specified t0 value. The maximum lookback period is 365 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 365 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 365 days. The default is 31 days. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - sortOrder (string): Sorted order of security events based on event detection time. Order options are 'ascending' or 'descending'. Default is ascending order. rrrz"sortOrder" cannot be "z", & must be set to one of: r r rr!getNetworkApplianceSecurityEvents)rrz /networks/z/appliance/security/eventsrr r!r"r#r$cs&i|]\}}|kr||qSr)r%)r&r'r()r)rr r*szDAsyncAppliance.getNetworkApplianceSecurityEvents..)r+r,r-r.rr/) rrr0r1r2r3rrr4r)r)r rh~s $  z0AsyncAppliance.getNetworkApplianceSecurityEventscCs,ddddgdd}d|d}|j||S) z **Returns all supported intrusion settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-security-intrusion - networkId (string): (required) r r5r intrusion$getNetworkApplianceSecurityIntrusion)rrz /networks/z/appliance/security/intrusion)rr)rrrrrrr rjs  z3AsyncAppliance.getNetworkApplianceSecurityIntrusionc s|td|krBdddg}|d|ksBtd|dd|d|krxdd d g}|d|ksxtd |dd|d d d dgdd}d|d}dddgfdd|D}|j|||S)a **Set the supported intrusion settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-security-intrusion - networkId (string): (required) - mode (string): Set mode to 'disabled'/'detection'/'prevention' (optional - omitting will leave current config unchanged) - idsRulesets (string): Set the detection ruleset 'connectivity'/'balanced'/'security' (optional - omitting will leave current config unchanged). Default value is 'balanced' if none currently saved - protectedNetworks (object): Set the included/excluded networks from the intrusion engine (optional - omitting will leave current config unchanged). This is available only in 'passthrough' mode modeZ preventionZ detectiondisabledz"mode" cannot be "z", & must be set to one of: Z idsRulesetsZ connectivityZbalancedrz"idsRulesets" cannot be "r r5ri'updateNetworkApplianceSecurityIntrusion)rrz /networks/z/appliance/security/intrusionZprotectedNetworkscs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szJAsyncAppliance.updateNetworkApplianceSecurityIntrusion..)r+r,r-r.rr;)rrr2r3rrr<r)r:r rms  $ $   z6AsyncAppliance.updateNetworkApplianceSecurityIntrusioncCs,ddddgdd}d|d}|j||S) z **Returns all supported malware settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-security-malware - networkId (string): (required) r r5rmalware"getNetworkApplianceSecurityMalware)rrz /networks/z/appliance/security/malware)rr)rrrrrrr ros  z1AsyncAppliance.getNetworkApplianceSecurityMalware)rrkc s|td|kr@ddg}|d|ks@td|dd|dddd gd d }d |d }dddgfdd|D}|j|||S)a **Set the supported malware settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-security-malware - networkId (string): (required) - mode (string): Set mode to 'enabled' to enable malware prevention, otherwise 'disabled' - allowedUrls (array): The urls that should be permitted by the malware detection engine. If omitted, the current config will remain unchanged. This is available only if your network supports AMP allow listing - allowedFiles (array): The sha256 digests of files that should be permitted by the malware detection engine. If omitted, the current config will remain unchanged. This is available only if your network supports AMP allow listing rkrfrlz"mode" cannot be "z", & must be set to one of: r r5rrn%updateNetworkApplianceSecurityMalware)rrz /networks/z/appliance/security/malwareZ allowedUrlsZ allowedFilescs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szHAsyncAppliance.updateNetworkApplianceSecurityMalware..)r+r,r-r.rr;)rrrkr2r3rrr<r)r:r rps $   z4AsyncAppliance.updateNetworkApplianceSecurityMalwarecCs*dddgdd}d|d}|j||S)z **Return the appliance settings for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-settings - networkId (string): (required) r r5settingsgetNetworkApplianceSettings)rrz /networks/z/appliance/settings)rr)rrrrrrr rrs  z*AsyncAppliance.getNetworkApplianceSettingscCs*dddgdd}d|d}|j||S)z **Return single LAN configuration** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-single-lan - networkId (string): (required) r r5 singleLangetNetworkApplianceSingleLan)rrz /networks/z/appliance/singleLan)rr)rrrrrrr rts  z+AsyncAppliance.getNetworkApplianceSingleLanc sV|tdddgdd}d|d}dd gfd d |D}|j|||S) aH **Update single LAN configuration** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-single-lan - networkId (string): (required) - subnet (string): The subnet of the single LAN configuration - applianceIp (string): The appliance IP address of the single LAN r r5rsupdateNetworkApplianceSingleLan)rrz /networks/z/appliance/singleLansubnet applianceIpcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*<szBAsyncAppliance.updateNetworkApplianceSingleLan..)r+r,r.rr;)rrr2rrr<r)r:r ru)s  z.AsyncAppliance.updateNetworkApplianceSingleLancCs*dddgdd}d|d}|j||S)z **List the static routes for an MX or teleworker network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-static-routes - networkId (string): (required) r r5 staticRoutesgetNetworkApplianceStaticRoutes)rrz /networks/z/appliance/staticRoutes)rr)rrrrrrr ryBs  z.AsyncAppliance.getNetworkApplianceStaticRoutes)rnamerv gatewayIpc sRt}dddgdd}d|d}dd d gfd d |D}|j|||S) a **Add a static route for an MX or teleworker network** https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-static-route - networkId (string): (required) - name (string): The name of the new static route - subnet (string): The subnet of the static route - gatewayIp (string): The gateway IP (next hop) of the static route r r5rx!createNetworkApplianceStaticRoute)rrz /networks/z/appliance/staticRoutesrzrvr{cs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*hszDAsyncAppliance.createNetworkApplianceStaticRoute..)r,r.rpost) rrrzrvr{r2rrr<r)r:r r|Ts   z0AsyncAppliance.createNetworkApplianceStaticRoute)r staticRouteIdcCs.dddgdd}d|d|}|j||S)z **Return a static route for an MX or teleworker network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-static-route - networkId (string): (required) - staticRouteId (string): (required) r r5rxgetNetworkApplianceStaticRoute)rrz /networks/z/appliance/staticRoutes/)rr)rrr~rrrrr rns z-AsyncAppliance.getNetworkApplianceStaticRoutec sb|tdddgdd}d|d|}dd d d d d gfdd|D}|j|||S)ae **Update a static route for an MX or teleworker network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-static-route - networkId (string): (required) - staticRouteId (string): (required) - name (string): The name of the static route - subnet (string): The subnet of the static route - gatewayIp (string): The gateway IP (next hop) of the static route - enabled (boolean): The enabled state of the static route - fixedIpAssignments (object): The DHCP fixed IP assignments on the static route. This should be an object that contains mappings from MAC addresses to objects that themselves each contain "ip" and "name" string fields. See the sample request/response for more details. - reservedIpRanges (array): The DHCP reserved IP ranges on the static route r r5rx!updateNetworkApplianceStaticRoute)rrz /networks/z/appliance/staticRoutes/rzrvr{rffixedIpAssignmentsreservedIpRangescs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szDAsyncAppliance.updateNetworkApplianceStaticRoute..)r+r,r.rr;)rrr~r2rrr<r)r:r rs z0AsyncAppliance.updateNetworkApplianceStaticRoutecCs.dddgdd}d|d|}|j||S)z **Delete a static route from an MX or teleworker network** https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-static-route - networkId (string): (required) - staticRouteId (string): (required) r r5rx!deleteNetworkApplianceStaticRoute)rrz /networks/z/appliance/staticRoutes/)rdelete)rrr~rrrrr rs z0AsyncAppliance.deleteNetworkApplianceStaticRoutecCs*dddgdd}d|d}|j||S)z **Display the traffic shaping settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-traffic-shaping - networkId (string): (required) r r5trafficShaping!getNetworkApplianceTrafficShaping)rrz /networks/z/appliance/trafficShaping)rr)rrrrrrr rs  z0AsyncAppliance.getNetworkApplianceTrafficShapingc sT|tdddgdd}d|d}dgfd d |D}|j|||S) a **Update the traffic shaping settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-traffic-shaping - networkId (string): (required) - globalBandwidthLimits (object): Global per-client bandwidth limit r r5r$updateNetworkApplianceTrafficShaping)rrz /networks/z/appliance/trafficShapingZglobalBandwidthLimitscs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szGAsyncAppliance.updateNetworkApplianceTrafficShaping..)r+r,r.rr;)rrr2rrr<r)r:r rs  z3AsyncAppliance.updateNetworkApplianceTrafficShapingcCs,ddddgdd}d|d}|j||S) z **List all custom performance classes for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-traffic-shaping-custom-performance-classes - networkId (string): (required) r r5rcustomPerformanceClasses9getNetworkApplianceTrafficShapingCustomPerformanceClasses)rrz /networks/z2/appliance/trafficShaping/customPerformanceClasses)rr)rrrrrrr rs  zHAsyncAppliance.getNetworkApplianceTrafficShapingCustomPerformanceClasses)rrzc s\|tddddgdd}d|d}d d d d gfd d|D}|j|||S)a **Add a custom performance class for an MX network** https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-traffic-shaping-custom-performance-class - networkId (string): (required) - name (string): Name of the custom performance class - maxLatency (integer): Maximum latency in milliseconds - maxJitter (integer): Maximum jitter in milliseconds - maxLossPercentage (integer): Maximum percentage of packet loss r r5rr:createNetworkApplianceTrafficShapingCustomPerformanceClass)rrz /networks/z2/appliance/trafficShaping/customPerformanceClassesrz maxLatency maxJittermaxLossPercentagecs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*sz]AsyncAppliance.createNetworkApplianceTrafficShapingCustomPerformanceClass..)r+r,r.rr})rrrzr2rrr<r)r:r rs    zIAsyncAppliance.createNetworkApplianceTrafficShapingCustomPerformanceClass)rcustomPerformanceClassIdcCs0ddddgdd}d|d|}|j||S) a **Return a custom performance class for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-traffic-shaping-custom-performance-class - networkId (string): (required) - customPerformanceClassId (string): (required) r r5rr7getNetworkApplianceTrafficShapingCustomPerformanceClass)rrz /networks/z3/appliance/trafficShaping/customPerformanceClasses/)rr)rrrrrrrr r s zFAsyncAppliance.getNetworkApplianceTrafficShapingCustomPerformanceClassc s`|tddddgdd}d|d|}d d d d gfd d|D}|j|||S)a& **Update a custom performance class for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-traffic-shaping-custom-performance-class - networkId (string): (required) - customPerformanceClassId (string): (required) - name (string): Name of the custom performance class - maxLatency (integer): Maximum latency in milliseconds - maxJitter (integer): Maximum jitter in milliseconds - maxLossPercentage (integer): Maximum percentage of packet loss r r5rr:updateNetworkApplianceTrafficShapingCustomPerformanceClass)rrz /networks/z3/appliance/trafficShaping/customPerformanceClasses/rzrrrcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*2sz]AsyncAppliance.updateNetworkApplianceTrafficShapingCustomPerformanceClass..)r+r,r.rr;)rrrr2rrr<r)r:r rs   zIAsyncAppliance.updateNetworkApplianceTrafficShapingCustomPerformanceClasscCs0ddddgdd}d|d|}|j||S) a" **Delete a custom performance class from an MX network** https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-traffic-shaping-custom-performance-class - networkId (string): (required) - customPerformanceClassId (string): (required) r r5rr:deleteNetworkApplianceTrafficShapingCustomPerformanceClass)rrz /networks/z3/appliance/trafficShaping/customPerformanceClasses/)rr)rrrrrrrr r8s zIAsyncAppliance.deleteNetworkApplianceTrafficShapingCustomPerformanceClassc sX|tddddgdd}d|d}d dgfd d |D}|j|||S) a **Update the traffic shaping settings rules for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-traffic-shaping-rules - networkId (string): (required) - defaultRulesEnabled (boolean): Whether default traffic shaping rules are enabled (true) or disabled (false). There are 4 default rules, which can be seen on your network's traffic shaping page. Note that default rules count against the rule limit of 8. - rules (array): An array of traffic shaping rules. Rules are applied in the order that they are specified in. An empty list (or null) means no rules. Note that you are allowed a maximum of 8 rules. r r5rrF)updateNetworkApplianceTrafficShapingRules)rrz /networks/z/appliance/trafficShaping/rulesZdefaultRulesEnabledcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*aszLAsyncAppliance.updateNetworkApplianceTrafficShapingRules..)r+r,r.rr;)rrr2rrr<r)r:r rKs   z8AsyncAppliance.updateNetworkApplianceTrafficShapingRulescCs,ddddgdd}d|d}|j||S) z **Display the traffic shaping settings rules for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-traffic-shaping-rules - networkId (string): (required) r r5rrF&getNetworkApplianceTrafficShapingRules)rrz /networks/z/appliance/trafficShaping/rules)rr)rrrrrrr rgs  z5AsyncAppliance.getNetworkApplianceTrafficShapingRulescCs,ddddgdd}d|d}|j||S) z **Returns the uplink bandwidth settings for your MX network.** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-traffic-shaping-uplink-bandwidth - networkId (string): (required) r r5ruplinkBandwidth0getNetworkApplianceTrafficShapingUplinkBandwidth)rrz /networks/z)/appliance/trafficShaping/uplinkBandwidth)rr)rrrrrrr rys  z?AsyncAppliance.getNetworkApplianceTrafficShapingUplinkBandwidthc sV|tddddgdd}d|d}d gfd d |D}|j|||S) a} **Updates the uplink bandwidth settings for your MX network.** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-traffic-shaping-uplink-bandwidth - networkId (string): (required) - bandwidthLimits (object): A mapping of uplinks to their bandwidth settings (be sure to check which uplinks are supported for your network) r r5rr3updateNetworkApplianceTrafficShapingUplinkBandwidth)rrz /networks/z)/appliance/trafficShaping/uplinkBandwidthZbandwidthLimitscs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szVAsyncAppliance.updateNetworkApplianceTrafficShapingUplinkBandwidth..)r+r,r.rr;)rrr2rrr<r)r:r rs   zBAsyncAppliance.updateNetworkApplianceTrafficShapingUplinkBandwidthcCs,ddddgdd}d|d}|j||S) z **Show uplink selection settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-traffic-shaping-uplink-selection - networkId (string): (required) r r5ruplinkSelection0getNetworkApplianceTrafficShapingUplinkSelection)rrz /networks/z)/appliance/trafficShaping/uplinkSelection)rr)rrrrrrr rs  z?AsyncAppliance.getNetworkApplianceTrafficShapingUplinkSelectionc s|td|kr@ddg}|d|ks@td|dd|dddd gd d }d |d }dddddgfdd|D}|j|||S)a **Update uplink selection settings for an MX network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-traffic-shaping-uplink-selection - networkId (string): (required) - activeActiveAutoVpnEnabled (boolean): Toggle for enabling or disabling active-active AutoVPN - defaultUplink (string): The default uplink. Must be one of: 'wan1' or 'wan2' - loadBalancingEnabled (boolean): Toggle for enabling or disabling load balancing - wanTrafficUplinkPreferences (array): Array of uplink preference rules for WAN traffic - vpnTrafficUplinkPreferences (array): Array of uplink preference rules for VPN traffic Z defaultUplinkZwan1Zwan2z"defaultUplink" cannot be "z", & must be set to one of: r r5rr3updateNetworkApplianceTrafficShapingUplinkSelection)rrz /networks/z)/appliance/trafficShaping/uplinkSelectionZactiveActiveAutoVpnEnabledZloadBalancingEnabledZwanTrafficUplinkPreferencesZvpnTrafficUplinkPreferencescs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szVAsyncAppliance.updateNetworkApplianceTrafficShapingUplinkSelection..)r+r,r-r.rr;)rrr2r3rrr<r)r:r rs $  zBAsyncAppliance.updateNetworkApplianceTrafficShapingUplinkSelectioncCs*dddgdd}d|d}|j||S)z **List the VLANs for an MX network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vlans - networkId (string): (required) r r5vlansgetNetworkApplianceVlans)rrz /networks/z/appliance/vlans)rr)rrrrrrr rs  z'AsyncAppliance.getNetworkApplianceVlans)ridrzc s\|tdddgdd}d|d}dd d d d gfd d|D}|j|||S)a **Add a VLAN** https://developer.cisco.com/meraki/api-v1/#!create-network-appliance-vlan - networkId (string): (required) - id (string): The VLAN ID of the new VLAN (must be between 1 and 4094) - name (string): The name of the new VLAN - subnet (string): The subnet of the VLAN - applianceIp (string): The local IP of the appliance on the VLAN - groupPolicyId (string): The id of the desired group policy to apply to the VLAN r r5rcreateNetworkApplianceVlan)rrz /networks/z/appliance/vlansrrzrvrw groupPolicyIdcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*sz=AsyncAppliance.createNetworkApplianceVlan..)r+r,r.rr})rrrrzr2rrr<r)r:r rs  z)AsyncAppliance.createNetworkApplianceVlancCs,ddddgdd}d|d}|j||S) z **Returns the enabled status of VLANs for the network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vlans-settings - networkId (string): (required) r r5rrq getNetworkApplianceVlansSettings)rrz /networks/z/appliance/vlans/settings)rr)rrrrrrr rs  z/AsyncAppliance.getNetworkApplianceVlansSettingsc sV|tddddgdd}d|d}d gfd d |D}|j|||S) a= **Enable/Disable VLANs for the given network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vlans-settings - networkId (string): (required) - vlansEnabled (boolean): Boolean indicating whether to enable (true) or disable (false) VLANs for the network r r5rrq#updateNetworkApplianceVlansSettings)rrz /networks/z/appliance/vlans/settingsZ vlansEnabledcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*'szFAsyncAppliance.updateNetworkApplianceVlansSettings..)r+r,r.rr;)rrr2rrr<r)r:r rs   z2AsyncAppliance.updateNetworkApplianceVlansSettings)rvlanIdcCs.dddgdd}d|d|}|j||S)z **Return a VLAN** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vlan - networkId (string): (required) - vlanId (string): (required) r r5rgetNetworkApplianceVlan)rrz /networks/z/appliance/vlans/)rr)rrrrrrrr r-s z&AsyncAppliance.getNetworkApplianceVlanc s|td|krBdddg}|d|ksBtd|dd|d|kr~dd d d d d g}|d|ks~td|dd|dddgdd}d|d|}ddddddddddddd d!d"gfd#d$|D}|j|||S)%a **Update a VLAN** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vlan - networkId (string): (required) - vlanId (string): (required) - name (string): The name of the VLAN - subnet (string): The subnet of the VLAN - applianceIp (string): The local IP of the appliance on the VLAN - groupPolicyId (string): The id of the desired group policy to apply to the VLAN - vpnNatSubnet (string): The translated VPN subnet if VPN and VPN subnet translation are enabled on the VLAN - dhcpHandling (string): The appliance's handling of DHCP requests on this VLAN. One of: 'Run a DHCP server', 'Relay DHCP to another server' or 'Do not respond to DHCP requests' - dhcpRelayServerIps (array): The IPs of the DHCP servers that DHCP requests should be relayed to - dhcpLeaseTime (string): The term of DHCP leases if the appliance is running a DHCP server on this VLAN. One of: '30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week' - dhcpBootOptionsEnabled (boolean): Use DHCP boot options specified in other properties - dhcpBootNextServer (string): DHCP boot option to direct boot clients to the server to load the boot file from - dhcpBootFilename (string): DHCP boot option for boot filename - fixedIpAssignments (object): The DHCP fixed IP assignments on the VLAN. This should be an object that contains mappings from MAC addresses to objects that themselves each contain "ip" and "name" string fields. See the sample request/response for more details. - reservedIpRanges (array): The DHCP reserved IP ranges on the VLAN - dnsNameservers (string): The DNS nameservers used for DHCP responses, either "upstream_dns", "google_dns", "opendns", or a newline seperated string of IP addresses or domain names - dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties. Z dhcpHandlingzRun a DHCP serverzRelay DHCP to another serverzDo not respond to DHCP requestsz"dhcpHandling" cannot be "z", & must be set to one of: Z dhcpLeaseTimez 30 minutesz1 hourz4 hoursz12 hoursz1 dayz1 weekz"dhcpLeaseTime" cannot be "r r5rupdateNetworkApplianceVlan)rrz /networks/z/appliance/vlans/rzrvrwrZ vpnNatSubnetZdhcpRelayServerIpsZdhcpBootOptionsEnabledZdhcpBootNextServerZdhcpBootFilenamerrZdnsNameserversZ dhcpOptionscs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*hsz=AsyncAppliance.updateNetworkApplianceVlan..)r+r,r-r.rr;)rrrr2r3rrr<r)r:r r@s  $$"z)AsyncAppliance.updateNetworkApplianceVlancCs.dddgdd}d|d|}|j||S)z **Delete a VLAN from a network** https://developer.cisco.com/meraki/api-v1/#!delete-network-appliance-vlan - networkId (string): (required) - vlanId (string): (required) r r5rdeleteNetworkApplianceVlan)rrz /networks/z/appliance/vlans/)rr)rrrrrrrr rns z)AsyncAppliance.deleteNetworkApplianceVlancCs,ddddgdd}d|d}|j||S) z **Return a Hub BGP Configuration** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vpn-bgp - networkId (string): (required) r r5vpnbgpgetNetworkApplianceVpnBgp)rrz /networks/z/appliance/vpn/bgp)rr)rrrrrrr rs  z(AsyncAppliance.getNetworkApplianceVpnBgp)rrfc s\|tddddgdd}d|d}d d d d gfd d|D}|j|||S)a **Update a Hub BGP Configuration** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vpn-bgp - networkId (string): (required) - enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured. - asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512. - ibgpHoldTimer (integer): The IBGP holdtimer in seconds. The IBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240. - neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated. r r5rrupdateNetworkApplianceVpnBgp)rrz /networks/z/appliance/vpn/bgprfZasNumberZ ibgpHoldTimerZ neighborscs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*sz?AsyncAppliance.updateNetworkApplianceVpnBgp..)r+r,r.rr;)rrrfr2rrr<r)r:r rs    z+AsyncAppliance.updateNetworkApplianceVpnBgpcCs,ddddgdd}d|d}|j||S) z **Return the site-to-site VPN settings of a network** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vpn-site-to-site-vpn - networkId (string): (required) r r5r siteToSiteVpn#getNetworkApplianceVpnSiteToSiteVpn)rrz /networks/z/appliance/vpn/siteToSiteVpn)rr)rrrrrrr rs  z2AsyncAppliance.getNetworkApplianceVpnSiteToSiteVpnc s|td|krBdddg}|d|ksBtd|dd|ddd d gd d }d |d}dddgfdd|D}|j|||S)a **Update the site-to-site VPN settings of a network** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vpn-site-to-site-vpn - networkId (string): (required) - mode (string): The site-to-site VPN mode. Can be one of 'none', 'spoke' or 'hub' - hubs (array): The list of VPN hubs, in order of preference. In spoke mode, at least 1 hub is required. - subnets (array): The list of subnets and their VPN presence. rknoneZspokeZhubz"mode" cannot be "z", & must be set to one of: r r5rr&updateNetworkApplianceVpnSiteToSiteVpn)rrz /networks/z/appliance/vpn/siteToSiteVpnZhubsr cs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szIAsyncAppliance.updateNetworkApplianceVpnSiteToSiteVpn..)r+r,r-r.rr;)rrrkr2r3rrr<r)r:r rs  $   z5AsyncAppliance.updateNetworkApplianceVpnSiteToSiteVpncCs*dddgdd}d|d}|j||S)z **Return MX warm spare settings** https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-warm-spare - networkId (string): (required) r r5 warmSparegetNetworkApplianceWarmSpare)rrz /networks/z/appliance/warmSpare)rr)rrrrrrr rs  z+AsyncAppliance.getNetworkApplianceWarmSparec s\|tdddgdd}d|d}dd d d d gfd d|D}|j|||S)a **Update MX warm spare settings** https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-warm-spare - networkId (string): (required) - enabled (boolean): Enable warm spare - spareSerial (string): Serial number of the warm spare appliance - uplinkMode (string): Uplink mode, either virtual or public - virtualIp1 (string): The WAN 1 shared IP - virtualIp2 (string): The WAN 2 shared IP r r5rupdateNetworkApplianceWarmSpare)rrz /networks/z/appliance/warmSparerfZ spareSerialZ uplinkModeZ virtualIp1Z virtualIp2cs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*szBAsyncAppliance.updateNetworkApplianceWarmSpare..)r+r,r.rr;)rrrfr2rrr<r)r:r rs  z.AsyncAppliance.updateNetworkApplianceWarmSparecCs*dddgdd}d|d}|j||S)z **Swap MX primary and warm spare appliances** https://developer.cisco.com/meraki/api-v1/#!swap-network-appliance-warm-spare - networkId (string): (required) r r5rswapNetworkApplianceWarmSpare)rrz /networks/z/appliance/warmSpare/swap)rr})rrrrrrr r s  z,AsyncAppliance.swapNetworkApplianceWarmSpare)organizationIdc  s|td|kr@ddg}|d|ks@td|dd|dddd gd d }d |d }dddddddgfdd|D}|j|||||S)a< **List the security events for an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-events - organizationId (string): (required) - total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - t0 (string): The beginning of the timespan for the data. Data is gathered after the specified t0 value. The maximum lookback period is 365 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 365 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 365 days. The default is 31 days. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 100. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - sortOrder (string): Sorted order of security events based on event detection time. Order options are 'ascending' or 'descending'. Default is ascending order. rrrz"sortOrder" cannot be "z", & must be set to one of: r r rr&getOrganizationApplianceSecurityEvents)rrz/organizations/z/appliance/security/eventsrr r!r"r#r$cs&i|]\}}|kr||qSr)r%)r&r'r()r)rr r*<szIAsyncAppliance.getOrganizationApplianceSecurityEvents..)r+r,r-r.rr/) rrr0r1r2r3rrr4r)r)r rs $  z5AsyncAppliance.getOrganizationApplianceSecurityEventscCs,ddddgdd}d|d}|j||S) z **Returns all supported intrusion settings for an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-security-intrusion - organizationId (string): (required) r r5rri)getOrganizationApplianceSecurityIntrusion)rrz/organizations/z/appliance/security/intrusion)rr)rrrrrrr rBs  z8AsyncAppliance.getOrganizationApplianceSecurityIntrusion)r allowedRulescsPt}ddddgdd}d|d}d gfd d |D}|j|||S) a1 **Sets supported intrusion settings for an organization** https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-security-intrusion - organizationId (string): (required) - allowedRules (array): Sets a list of specific SNORT signatures to allow r r5rri,updateOrganizationApplianceSecurityIntrusion)rrz/organizations/z/appliance/security/intrusionrcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*fszOAsyncAppliance.updateOrganizationApplianceSecurityIntrusion..)r,r.rr;)rrrr2rrr<r)r:r rTs   z;AsyncAppliance.updateOrganizationApplianceSecurityIntrusionc  s|tddddgdd}d|d}d d d d d dgfdd|D}d d dg}xF|D]:\} } | |krd|| || d<|| qdW|j|||||S)a( **List the uplink status of every Meraki MX and Z series appliances in the organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-uplink-statuses - organizationId (string): (required) - total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - networkIds (array): A list of network IDs. The returned devices will be filtered to only include these networks. - serials (array): A list of serial numbers. The returned devices will be filtered to only include these serials. - iccids (array): A list of ICCIDs. The returned devices will be filtered to only include these ICCIDs. r r Zuplinkstatuses&getOrganizationApplianceUplinkStatuses)rrz/organizations/z/appliance/uplink/statusesr"r#r$ networkIdsZserialsZiccidscs&i|]\}}|kr||qSr)r%)r&r'r()r)rr r*szIAsyncAppliance.getOrganizationApplianceUplinkStatuses..z[])r+r,r.r%poprr/) rrr0r1r2rrr4 array_paramsr'r(r)r)r rls     z5AsyncAppliance.getOrganizationApplianceUplinkStatusesc  s|tddddgdd}d|d}d d d d d ddgfdd|D}d g}xF|D]:\} } | |krb|| || d<|| qbW|j|||||S)a **Show VPN history stat for networks in an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-stats - organizationId (string): (required) - total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 300. Default is 300. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - networkIds (array): A list of Meraki network IDs to filter results to contain only specified networks. E.g.: networkIds[]=N_12345678&networkIds[]=L_3456 - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 31 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 31 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. r r rstats getOrganizationApplianceVpnStats)rrz/organizations/z/appliance/vpn/statsr"r#r$rrr r!cs&i|]\}}|kr||qSr)r%)r&r'r()r)rr r*szCAsyncAppliance.getOrganizationApplianceVpnStats..z[])r+r,r.r%rrr/) rrr0r1r2rrr4rr'r(r)r)r rs    z/AsyncAppliance.getOrganizationApplianceVpnStatsc  s|tddddgdd}d|d}d d d d gfd d|D}d g}xF|D]:\} } | |kr\|| || d<|| q\W|j|||||S)a; **Show VPN status for networks in an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-statuses - organizationId (string): (required) - total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages - direction (string): direction to paginate, either "next" (default) or "prev" page - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 300. Default is 300. - startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. - networkIds (array): A list of Meraki network IDs to filter results to contain only specified networks. E.g.: networkIds[]=N_12345678&networkIds[]=L_3456 r r rr#getOrganizationApplianceVpnStatuses)rrz/organizations/z/appliance/vpn/statusesr"r#r$rcs&i|]\}}|kr||qSr)r%)r&r'r()r)rr r*szFAsyncAppliance.getOrganizationApplianceVpnStatuses..z[])r+r,r.r%rrr/) rrr0r1r2rrr4rr'r(r)r)r rs     z2AsyncAppliance.getOrganizationApplianceVpnStatusescCs,ddddgdd}d|d}|j||S) z **Return the third party VPN peers for an organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-third-party-v-p-n-peers - organizationId (string): (required) r r5rthirdPartyVPNPeers-getOrganizationApplianceVpnThirdPartyVPNPeers)rrz/organizations/z!/appliance/vpn/thirdPartyVPNPeers)rr)rrrrrrr rs  z.)r,r.rr;)rrrr2rrr<r)r:r rs   z?AsyncAppliance.updateOrganizationApplianceVpnThirdPartyVPNPeerscCs,ddddgdd}d|d}|j||S) z **Return the firewall rules for an organization's site-to-site VPN** https://developer.cisco.com/meraki/api-v1/#!get-organization-appliance-vpn-vpn-firewall-rules - organizationId (string): (required) r r5rvpnFirewallRules+getOrganizationApplianceVpnVpnFirewallRules)rrz/organizations/z/appliance/vpn/vpnFirewallRules)rr)rrrrrrr rs  z:AsyncAppliance.getOrganizationApplianceVpnVpnFirewallRulesc sX|tddddgdd}d|d}d d gfd d |D}|j|||S) a **Update the firewall rules of an organization's site-to-site VPN** https://developer.cisco.com/meraki/api-v1/#!update-organization-appliance-vpn-vpn-firewall-rules - organizationId (string): (required) - rules (array): An ordered array of the firewall rules (not including the default rule) - syslogDefaultRule (boolean): Log the special default rule (boolean value - enable only if you've configured a syslog server) (optional) r r5rr.updateOrganizationApplianceVpnVpnFirewallRules)rrz/organizations/z/appliance/vpn/vpnFirewallRulesrFrPcs&i|]\}}|kr||qSr)r%)r&r'r()r:rr r*)szQAsyncAppliance.updateOrganizationApplianceVpnVpnFirewallRules..)r+r,r.rr;)rrr2rrr<r)r:r rs   z=AsyncAppliance.updateOrganizationApplianceVpnVpnFirewallRules)rr)rr)rr)rr)rr)rr)W__name__ __module__ __qualname__rstrrrrr7r8r>r?rArDrErHrJrLrNrOrRrSrUrVrWrYlistrZr\r]r_r`rbrdrerhrjrmrorprrrtruryr|rrrrrrrrrrrrrrrrrrrrrrrrboolrrrrrrrrrrrrrrrr __classcell__rr)rr rs %$! .$%&#rN)rrrrr