B `2N@sGdddZdS)cseZdZfddZedddZedddZeddd Zedd d Zedd d Z eedddZ dedddZ eedddZ dedddZ deedddZedddZeeedd d!Zdeedd"d#Zeed$d%d&Zeed$d'd(Zeeed)d*d+Zeed$d,d-Zeeed.d/d0Zdeed$d1d2Zeed$d3d4Zedd5d6Zeed7d8d9Zeed:d;d<Zdedd?d@ZeddAdBZeddCdDZ eddEdFZ!eedGdHdIZ"eddJdKZ#eeedLdMdNZ$eedOdPdQZ%eedOdRdSZ&eedOdTdUZ'eddVdWZ(eedXdYdZZ)eed[d\d]Z*eed[d^d_Z+eed[d`daZ,eddbdcZ-eeeeedddedfZ.eedgdhdiZ/eedgdjdkZ0eedgdldmZ1eddndoZ2eeee3dpdqdrZ4eedsdtduZ5eedsdvdwZ6eedsdxdyZ7eddzd{Z8edd|d}Z9dedd~dZ:edddZ;edddZeedddZ?edddZ@edddZAedddZBedddZCedddZDedddZEedddZFedddZGedddZHeedddZIedddZJedddZKedddZLedddZMedddZNedddZOedddZPeeedddZQeedddZReedddZSeedddZTeedddZUeedddZVZWS) AsyncNetworkscst||_dS)N)super__init___session)selfsession) __class__r/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki/aio/api/networks.pyrs zAsyncNetworks.__init__) networkIdcCs&ddgdd}d|}|j||S)z **Return a network** https://developer.cisco.com/meraki/api-v1/#!get-network - networkId (string): (required) networks configure getNetwork)tags operationz /networks/)rget)rr metadataresourcerrr r s  zAsyncNetworks.getNetworkc sX|tddgdd}d|}dddd d gfd d |D}|j|||S) aR **Update a network** https://developer.cisco.com/meraki/api-v1/#!update-network - networkId (string): (required) - name (string): The name of the network - timeZone (string): The timezone of the network. For a list of allowed timezones, please see the 'TZ' column in the table in this article. - tags (array): A list of tags to be applied to the network - enrollmentString (string): A unique identifier which can be used for device enrollment or easy access through the Meraki SM Registration page or the Self Service Portal. Please note that changing this field may cause existing bookmarks to break. - notes (string): Add any notes or additional information about this network here. r r updateNetwork)rrz /networks/nameZtimeZonerZenrollmentStringZnotescs&i|]\}}|kr||qSr)strip).0kv) body_paramsrr 0sz/AsyncNetworks.updateNetwork..)updatelocalsitemsrput)rr kwargsrrpayloadr)rr rs  zAsyncNetworks.updateNetworkcCs&ddgdd}d|}|j||S)z **Delete a network** https://developer.cisco.com/meraki/api-v1/#!delete-network - networkId (string): (required) r r deleteNetwork)rrz /networks/)rdelete)rr rrrrr r!6s  zAsyncNetworks.deleteNetworkcCs,ddddgdd}d|d}|j||S) z **Return the alert configuration for this network** https://developer.cisco.com/meraki/api-v1/#!get-network-alerts-settings - networkId (string): (required) r r alertssettingsgetNetworkAlertsSettings)rrz /networks/z/alerts/settings)rr)rr rrrrr r%Hs  z&AsyncNetworks.getNetworkAlertsSettingsc sX|tddddgdd}d|d}d dgfd d |D}|j|||S) a **Update the alert configuration for this network** https://developer.cisco.com/meraki/api-v1/#!update-network-alerts-settings - networkId (string): (required) - defaultDestinations (object): The network-wide destinations for all alerts on the network. - alerts (array): Alert-specific configuration for each type. Only alerts that pertain to the network can be updated. r r r#r$updateNetworkAlertsSettings)rrz /networks/z/alerts/settingsZdefaultDestinationscs&i|]\}}|kr||qSr)r)rrr)rrr rmsz=AsyncNetworks.updateNetworkAlertsSettings..)rrrrr)rr rrrr r)rr r&Zs   z)AsyncNetworks.updateNetworkAlertsSettings)r configTemplateIdc sT|tddgdd}d|d}ddgfd d |D}|j|||S) aq **Bind a network to a template.** https://developer.cisco.com/meraki/api-v1/#!bind-network - networkId (string): (required) - configTemplateId (string): The ID of the template to which the network should be bound. - autoBind (boolean): Optional boolean indicating whether the network's switches should automatically bind to profiles of the same model. Defaults to false if left unspecified. This option only affects switch networks and switch templates. Auto-bind is not valid unless the switch template has at least one profile and has at most one profile per switch model. r r bindNetwork)rrz /networks/z/bindr'ZautoBindcs&i|]\}}|kr||qSr)r)rrr)rrr rsz-AsyncNetworks.bindNetwork..)rrrrpost)rr r'rrrr r)rr r(ss  zAsyncNetworks.bindNetworknextc sb|tdddgdd}d|d}dd d d d d gfdd|D}|j|||||S)aH **List the Bluetooth clients seen by APs in this network** https://developer.cisco.com/meraki/api-v1/#!get-network-bluetooth-clients - 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. The maximum lookback period is 7 days from today. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 7 days. The default is 1 day. - perPage (integer): The number of entries per page returned. Acceptable range is 5 - 1000. Default is 10. - 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. - includeConnectivityHistory (boolean): Include the connectivity history for this client r monitorbluetoothClientsgetNetworkBluetoothClients)rrz /networks/z/bluetoothClientst0timespanperPage startingAfter endingBeforeincludeConnectivityHistorycs&i|]\}}|kr||qSr)r)rrr) query_paramsrr rsz.)rrrr get_pages)rr total_pages directionrrrparamsr)r5r r.s  z(AsyncNetworks.getNetworkBluetoothClients)r bluetoothClientIdc sZ|tdddgdd}d|d|}dd gfd d |D}|j|||S) a **Return a Bluetooth client** https://developer.cisco.com/meraki/api-v1/#!get-network-bluetooth-client - networkId (string): (required) - bluetoothClientId (string): (required) - includeConnectivityHistory (boolean): Include the connectivity history for this client - connectivityHistoryTimespan (integer): The timespan, in seconds, for the connectivityHistory data. By default 1 day, 86400, will be used. r r,r-getNetworkBluetoothClient)rrz /networks/z/bluetoothClients/r4ZconnectivityHistoryTimespancs&i|]\}}|kr||qSr)r)rrr)r5rr rsz;AsyncNetworks.getNetworkBluetoothClient..)rrrrr)rr r:rrrr9r)r5r r;s z'AsyncNetworks.getNetworkBluetoothClientc s`|tdddgdd}d|d}dd d d d gfd d|D}|j|||||S)a **List the clients that have used this network in the timespan** https://developer.cisco.com/meraki/api-v1/#!get-network-clients - 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. The maximum lookback period is 31 days from today. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. - 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. r r,clientsgetNetworkClients)rrz /networks/z/clientsr/r0r1r2r3cs&i|]\}}|kr||qSr)r)rrr)r5rr rsz3AsyncNetworks.getNetworkClients..)rrrrr6)rr r7r8rrrr9r)r5r r=s  zAsyncNetworks.getNetworkClients)r r<c  s|td|krZdddddddd d d d d dddg}|d|ksZtd|dd|ddddgdd}d|d}dddddddd gfd!d"|D} |j||| ||S)#a/ **Return the application usage data for clients** https://developer.cisco.com/meraki/api-v1/#!get-network-clients-application-usage - networkId (string): (required) - clients (string): A list of client keys, MACs or IPs separated by comma. - 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 - ssidNumber (integer): An SSID number to include. If not specified, eveusage histories application usagents for all SSIDs will be returned. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 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. - 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. ssidNumberr* z"ssidNumber" cannot be "z", & must be set to one of: r r,r<ZapplicationUsage!getNetworkClientsApplicationUsage)rrz /networks/z/clients/applicationUsager1r2r3r/t1r0cs&i|]\}}|kr||qSr)r)rrr)r5rr rszCAsyncNetworks.getNetworkClientsApplicationUsage..)rrAssertionErrorrrr6) rr r<r7r8roptionsrrr9r)r5r rMs "$  z/AsyncNetworks.getNetworkClientsApplicationUsagec s\|tddddgdd}d|d}d d d d gfd d|D}|j|||S)a( **Return overview statistics for network clients** https://developer.cisco.com/meraki/api-v1/#!get-network-clients-overview - networkId (string): (required) - 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. - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 7200, 86400, 604800, 2592000. The default is 604800. r r,r<ZoverviewgetNetworkClientsOverview)rrz /networks/z/clients/overviewr/rNr0 resolutioncs&i|]\}}|kr||qSr)r)rrr)r5rr rsz;AsyncNetworks.getNetworkClientsOverview..)rrrrr)rr rrrr9r)r5r rQs    z'AsyncNetworks.getNetworkClientsOverview)r r< devicePolicyc  s|td|krFdddddg}|d|ksFtd|dd|d d d gd d }d|d}d ddddgfdd|D}|j|||S)a **Provisions a client with a name and policy** https://developer.cisco.com/meraki/api-v1/#!provision-network-clients - networkId (string): (required) - clients (array): The array of clients to provision - devicePolicy (string): The policy to apply to the specified client. Can be 'Group policy', 'Allowed', 'Blocked', 'Per connection' or 'Normal'. Required. - groupPolicyId (string): The ID of the desired group policy to apply to the client. Required if 'devicePolicy' is set to "Group policy". Otherwise this is ignored. - policiesBySecurityAppliance (object): An object, describing what the policy-connection association is for the security appliance. (Only relevant if the security appliance is actually within the network) - policiesBySsid (object): An object, describing the policy-connection associations for each active SSID within the network. Keys should be the number of enabled SSIDs, mapping to an object describing the client's policy rSz Group policyZAllowedZBlockedzPer connectionZNormalz"devicePolicy" cannot be "z", & must be set to one of: r r r<provisionNetworkClients)rrz /networks/z/clients/provision groupPolicyIdZpoliciesBySecurityApplianceZpoliciesBySsidcs&i|]\}}|kr||qSr)r)rrr)rrr r=sz9AsyncNetworks.provisionNetworkClients..)rrrOrrr)) rr r<rSrrPrrr r)rr rT#s $ z%AsyncNetworks.provisionNetworkClientsc  s|td|krZdddddddd d d d d dddg}|d|ksZtd|dd|ddddgdd}d|d}dddddddd gfd!d"|D} |j||| ||S)#a **Return the usage histories for clients** https://developer.cisco.com/meraki/api-v1/#!get-network-clients-usage-histories - networkId (string): (required) - clients (string): A list of client keys, MACs or IPs separated by comma. - 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 - ssidNumber (integer): An SSID number to include. If not specified, events for all SSIDs will be returned. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 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. - 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?r*r@rArBrCrDrErFrGrHrIrJrKrLz"ssidNumber" cannot be "z", & must be set to one of: r r,r<ZusageHistoriesgetNetworkClientsUsageHistories)rrz /networks/z/clients/usageHistoriesr1r2r3r/rNr0cs&i|]\}}|kr||qSr)r)rrr)r5rr rbszAAsyncNetworks.getNetworkClientsUsageHistories..)rrrOrrr6) rr r<r7r8rrPrrr9r)r5r rVCs "$  z-AsyncNetworks.getNetworkClientsUsageHistories)r clientIdcCs.dddgdd}d|d|}|j||S)z **Return the client associated with the given identifier** https://developer.cisco.com/meraki/api-v1/#!get-network-client - networkId (string): (required) - clientId (string): (required) r r,r<getNetworkClient)rrz /networks/z /clients/)rr)rr rWrrrrr rXhs zAsyncNetworks.getNetworkClientcCs2ddddgdd}d|d|d }|j||S) z **Return the policy assigned to a client on the network** https://developer.cisco.com/meraki/api-v1/#!get-network-client-policy - networkId (string): (required) - clientId (string): (required) r r r<policygetNetworkClientPolicy)rrz /networks/z /clients/z/policy)rr)rr rWrrrrr rZ{s z$AsyncNetworks.getNetworkClientPolicy)r rWrSc s^|tddddgdd}d|d|d }d d gfd d |D}|j|||S)a **Update the policy assigned to a client on the network** https://developer.cisco.com/meraki/api-v1/#!update-network-client-policy - networkId (string): (required) - clientId (string): (required) - devicePolicy (string): The policy to assign. Can be 'Whitelisted', 'Blocked', 'Normal' or 'Group policy'. Required. - groupPolicyId (string): [optional] If 'devicePolicy' is set to 'Group policy' this param is used to specify the group policy ID. r r r<rYupdateNetworkClientPolicy)rrz /networks/z /clients/z/policyrSrUcs&i|]\}}|kr||qSr)r)rrr)rrr rsz;AsyncNetworks.updateNetworkClientPolicy..)rrrrr)rr rWrSrrrr r)rr r[s  z'AsyncNetworks.updateNetworkClientPolicycCs2ddddgdd}d|d|d }|j||S) a- **Return the splash authorization for a client, for each SSID they've associated with through splash** https://developer.cisco.com/meraki/api-v1/#!get-network-client-splash-authorization-status - networkId (string): (required) - clientId (string): (required) r r r<splashAuthorizationStatus)getNetworkClientSplashAuthorizationStatus)rrz /networks/z /clients/z/splashAuthorizationStatus)rr)rr rWrrrrr r]s z7AsyncNetworks.getNetworkClientSplashAuthorizationStatus)r rWssidscsVt}ddddgdd}d|d|d }d gfd d |D}|j|||S) a **Update a client's splash authorization** https://developer.cisco.com/meraki/api-v1/#!update-network-client-splash-authorization-status - networkId (string): (required) - clientId (string): (required) - ssids (object): The target SSIDs. Each SSID must be enabled and must have Click-through splash enabled. For each SSID where isAuthorized is true, the expiration time will automatically be set according to the SSID's splash frequency. Not all networks support configuring all SSIDs r r r<r\,updateNetworkClientSplashAuthorizationStatus)rrz /networks/z /clients/z/splashAuthorizationStatusr^cs&i|]\}}|kr||qSr)r)rrr)rrr rszNAsyncNetworks.updateNetworkClientSplashAuthorizationStatus..)rrrr)rr rWr^rrrr r)rr r_s  z:AsyncNetworks.updateNetworkClientSplashAuthorizationStatusc  sd|tddddgdd}d|d|d }d d d gfd d|D}|j|||||S)a **Return the client's network traffic data over time** https://developer.cisco.com/meraki/api-v1/#!get-network-client-traffic-history - 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 - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 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. r r,r<ZtrafficHistorygetNetworkClientTrafficHistory)rrz /networks/z /clients/z/trafficHistoryr1r2r3cs&i|]\}}|kr||qSr)r)rrr)r5rr rsz@AsyncNetworks.getNetworkClientTrafficHistory..)rrrrr6) rr rWr7r8rrrr9r)r5r r`s   z,AsyncNetworks.getNetworkClientTrafficHistorycCs2ddddgdd}d|d|d }|j||S) z **Return the client's daily usage history** https://developer.cisco.com/meraki/api-v1/#!get-network-client-usage-history - networkId (string): (required) - clientId (string): (required) r r,r<Z usageHistorygetNetworkClientUsageHistory)rrz /networks/z /clients/z /usageHistory)rr)rr rWrrrrr ras z*AsyncNetworks.getNetworkClientUsageHistorycCs*dddgdd}d|d}|j||S)z **List the devices in a network** https://developer.cisco.com/meraki/api-v1/#!get-network-devices - networkId (string): (required) r r devicesgetNetworkDevices)rrz /networks/z/devices)rr)rr rrrrr rcs  zAsyncNetworks.getNetworkDevices)r serialscsNt}dddgdd}d|d}dgfd d |D}|j|||S) aW **Claim devices into a network. (Note: for recently claimed devices, it may take a few minutes for API requsts against that device to succeed)** https://developer.cisco.com/meraki/api-v1/#!claim-network-devices - networkId (string): (required) - serials (array): A list of serials of devices to claim r r rbclaimNetworkDevices)rrz /networks/z/devices/claimrdcs&i|]\}}|kr||qSr)r)rrr)rrr r(sz5AsyncNetworks.claimNetworkDevices..)rrrr))rr rdrrrr r)rr res  z!AsyncNetworks.claimNetworkDevices)r serialcsNt}dddgdd}d|d}dgfd d |D}|j|||S) z **Remove a single device** https://developer.cisco.com/meraki/api-v1/#!remove-network-devices - networkId (string): (required) - serial (string): The serial of a device r r rbremoveNetworkDevices)rrz /networks/z/devices/removerfcs&i|]\}}|kr||qSr)r)rrr)rrr r@sz6AsyncNetworks.removeNetworkDevices..)rrrr))rr rfrrrr r)rr rg.s  z"AsyncNetworks.removeNetworkDevicesprevNc  s|tdddgdd}d|d}dd d d d d ddddddddgfdd|D}d d g} xF|D]:\} } | | krp|| || d<|| qpW|j||||||S)a **List the events for the network** https://developer.cisco.com/meraki/api-v1/#!get-network-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" or "prev" (default) page - event_log_end_time (string): ISO8601 Zulu/UTC time, to use in conjunction with startingAfter, to retrieve events within a time window - productType (string): The product type to fetch events for. This parameter is required for networks with multiple device types. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, and environmental - includedEventTypes (array): A list of event types. The returned events will be filtered to only include events with these types. - excludedEventTypes (array): A list of event types. The returned events will be filtered to exclude events with these types. - deviceMac (string): The MAC address of the Meraki device which the list of events will be filtered with - deviceSerial (string): The serial of the Meraki device which the list of events will be filtered with - deviceName (string): The name of the Meraki device which the list of events will be filtered with - clientIp (string): The IP of the client which the list of events will be filtered with. Only supported for track-by-IP networks. - clientMac (string): The MAC address of the client which the list of events will be filtered with. Only supported for track-by-MAC networks. - clientName (string): The name, or partial name, of the client which the list of events will be filtered with - smDeviceMac (string): The MAC address of the Systems Manager device which the list of events will be filtered with - smDeviceName (string): The name of the Systems Manager device which the list of events will be filtered with - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10. - 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. r r,eventsgetNetworkEvents)rrz /networks/z/eventsZ productTypeZincludedEventTypesZexcludedEventTypesZ deviceMacZ deviceSerialZ deviceNameZclientIpZ clientMacZ clientNameZ smDeviceMacZ smDeviceNamer1r2r3cs&i|]\}}|kr||qSr)r)rrr)r5rr rhsz2AsyncNetworks.getNetworkEvents..z[])rrrrpoprr6) rr r7r8Zevent_log_end_timerrrr9Z array_paramsrrr)r5r rjFs    zAsyncNetworks.getNetworkEventscCs,ddddgdd}d|d}|j||S) z **List the event type to human-readable description** https://developer.cisco.com/meraki/api-v1/#!get-network-events-event-types - networkId (string): (required) r r,riZ eventTypesgetNetworkEventsEventTypes)rrz /networks/z/events/eventTypes)rr)rr rrrrr rlts  z(AsyncNetworks.getNetworkEventsEventTypescCs*dddgdd}d|d}|j||S)z **Get firmware upgrade information for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-firmware-upgrades - networkId (string): (required) r r firmwareUpgradesgetNetworkFirmwareUpgrades)rrz /networks/z/firmwareUpgrades)rr)rr rrrrr rns  z(AsyncNetworks.getNetworkFirmwareUpgradesc sX|tdddgdd}d|d}dd d gfd d |D}|j|||S) a **Update firmware upgrade information for a network** https://developer.cisco.com/meraki/api-v1/#!update-network-firmware-upgrades - networkId (string): (required) - upgradeWindow (object): Upgrade window for devices in network - timezone (string): The timezone for the network - products (object): Contains information about the network to update r r rmupdateNetworkFirmwareUpgrades)rrz /networks/z/firmwareUpgradesZ upgradeWindowtimezoneZproductscs&i|]\}}|kr||qSr)r)rrr)rrr rsz?AsyncNetworks.updateNetworkFirmwareUpgrades..)rrrrr)rr rrrr r)rr ros   z+AsyncNetworks.updateNetworkFirmwareUpgrades)r reasonsc s|td|krHddddddg}|d|ksHtd|dd |d d d d gdd}d|d}ddddgfdd|D}|j|||S)a **Rollback a Firmware Upgrade For A Network** https://developer.cisco.com/meraki/api-v1/#!create-network-firmware-upgrades-rollback - networkId (string): (required) - reasons (array): Reasons for the rollback - product (string): Product type to rollback (if the network is a combined network) - time (string): Scheduled time for the rollback - toVersion (object): Version to downgrade to (if the network has firmware flexibility) productwirelessswitch applianceZcameraZvmxHostZcellularGatewayz"product" cannot be "z", & must be set to one of: r r rmZ rollbacks%createNetworkFirmwareUpgradesRollback)rrz /networks/z/firmwareUpgrades/rollbackstimerqZ toVersioncs&i|]\}}|kr||qSr)r)rrr)rrr rszGAsyncNetworks.createNetworkFirmwareUpgradesRollback..)rrrOrrr))rr rqrrPrrr r)rr rvs $   z3AsyncNetworks.createNetworkFirmwareUpgradesRollbackcCs*dddgdd}d|d}|j||S)z **List the floor plans that belong to your network** https://developer.cisco.com/meraki/api-v1/#!get-network-floor-plans - networkId (string): (required) r r floorPlansgetNetworkFloorPlans)rrz /networks/z /floorPlans)rr)rr rrrrr rys  z"AsyncNetworks.getNetworkFloorPlans)r r imageContentsc s`|tdddgdd}d|d}dd d d d d dgfdd|D}|j|||S)a **Upload a floor plan** https://developer.cisco.com/meraki/api-v1/#!create-network-floor-plan - networkId (string): (required) - name (string): The name of your floor plan. - imageContents (string): The file contents (a base 64 encoded string) of your image. Supported formats are PNG, GIF, and JPG. Note that all images are saved as PNG files, regardless of the format they are uploaded in. - center (object): The longitude and latitude of the center of your floor plan. The 'center' or two adjacent corners (e.g. 'topLeftCorner' and 'bottomLeftCorner') must be specified. If 'center' is specified, the floor plan is placed over that point with no rotation. If two adjacent corners are specified, the floor plan is rotated to line up with the two specified points. The aspect ratio of the floor plan's image is preserved regardless of which corners/center are specified. (This means if that more than two corners are specified, only two corners may be used to preserve the floor plan's aspect ratio.). No two points can have the same latitude, longitude pair. - bottomLeftCorner (object): The longitude and latitude of the bottom left corner of your floor plan. - bottomRightCorner (object): The longitude and latitude of the bottom right corner of your floor plan. - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. r r rxcreateNetworkFloorPlan)rrz /networks/z /floorPlansrcenterbottomLeftCornerbottomRightCorner topLeftCornertopRightCornerrzcs&i|]\}}|kr||qSr)r)rrr)rrr rsz8AsyncNetworks.createNetworkFloorPlan..)rrrrr))rr rrzrrrr r)rr r{s  z$AsyncNetworks.createNetworkFloorPlan)r floorPlanIdcCs.dddgdd}d|d|}|j||S)z **Find a floor plan by ID** https://developer.cisco.com/meraki/api-v1/#!get-network-floor-plan - networkId (string): (required) - floorPlanId (string): (required) r r rxgetNetworkFloorPlan)rrz /networks/z /floorPlans/)rr)rr rrrrrr rs z!AsyncNetworks.getNetworkFloorPlanc sd|tdddgdd}d|d|}dd d d d d dgfdd|D}|j|||S)a **Update a floor plan's geolocation and other meta data** https://developer.cisco.com/meraki/api-v1/#!update-network-floor-plan - networkId (string): (required) - floorPlanId (string): (required) - name (string): The name of your floor plan. - center (object): The longitude and latitude of the center of your floor plan. If you want to change the geolocation data of your floor plan, either the 'center' or two adjacent corners (e.g. 'topLeftCorner' and 'bottomLeftCorner') must be specified. If 'center' is specified, the floor plan is placed over that point with no rotation. If two adjacent corners are specified, the floor plan is rotated to line up with the two specified points. The aspect ratio of the floor plan's image is preserved regardless of which corners/center are specified. (This means if that more than two corners are specified, only two corners may be used to preserve the floor plan's aspect ratio.). No two points can have the same latitude, longitude pair. - bottomLeftCorner (object): The longitude and latitude of the bottom left corner of your floor plan. - bottomRightCorner (object): The longitude and latitude of the bottom right corner of your floor plan. - topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan. - topRightCorner (object): The longitude and latitude of the top right corner of your floor plan. - imageContents (string): The file contents (a base 64 encoded string) of your new image. Supported formats are PNG, GIF, and JPG. Note that all images are saved as PNG files, regardless of the format they are uploaded in. If you upload a new image, and you do NOT specify any new geolocation fields ('center, 'topLeftCorner', etc), the floor plan will be recentered with no rotation in order to maintain the aspect ratio of your new image. r r rxupdateNetworkFloorPlan)rrz /networks/z /floorPlans/rr|r}r~rrrzcs&i|]\}}|kr||qSr)r)rrr)rrr r-sz8AsyncNetworks.updateNetworkFloorPlan..)rrrrr)rr rrrrr r)rr rs z$AsyncNetworks.updateNetworkFloorPlancCs.dddgdd}d|d|}|j||S)z **Destroy a floor plan** https://developer.cisco.com/meraki/api-v1/#!delete-network-floor-plan - networkId (string): (required) - floorPlanId (string): (required) r r rxdeleteNetworkFloorPlan)rrz /networks/z /floorPlans/)rr")rr rrrrrr r3s z$AsyncNetworks.deleteNetworkFloorPlancCs*dddgdd}d|d}|j||S)z **List the group policies in a network** https://developer.cisco.com/meraki/api-v1/#!get-network-group-policies - networkId (string): (required) r r groupPoliciesgetNetworkGroupPolicies)rrz /networks/z/groupPolicies)rr)rr rrrrr rFs  z%AsyncNetworks.getNetworkGroupPolicies)r rc s|td|kr@ddg}|d|ks@td|dd|dddgd d }d |d }d dddddddgfdd|D}|j|||S)a **Create a group policy** https://developer.cisco.com/meraki/api-v1/#!create-network-group-policy - networkId (string): (required) - name (string): The name for your group policy. Required. - scheduling (object): The schedule for the group policy. Schedules are applied to days of the week. - bandwidth (object): The bandwidth settings for clients bound to your group policy. - firewallAndTrafficShaping (object): The firewall and traffic shaping rules and settings for your policy. - contentFiltering (object): The content filtering settings for your group policy - splashAuthSettings (string): Whether clients bound to your policy will bypass splash authorization or behave according to the network's rules. Can be one of 'network default' or 'bypass'. Only available if your network has a wireless configuration. - vlanTagging (object): The VLAN tagging settings for your group policy. Only available if your network has a wireless configuration. - bonjourForwarding (object): The Bonjour settings for your group policy. Only valid if your network has a wireless configuration. splashAuthSettingsznetwork defaultbypassz "splashAuthSettings" cannot be "z", & must be set to one of: r r rcreateNetworkGroupPolicy)rrz /networks/z/groupPoliciesr scheduling bandwidthfirewallAndTrafficShapingcontentFiltering vlanTaggingbonjourForwardingcs&i|]\}}|kr||qSr)r)rrr)rrr rxsz:AsyncNetworks.createNetworkGroupPolicy..)rrrOrrr))rr rrrPrrr r)rr rXs $ z&AsyncNetworks.createNetworkGroupPolicy)r rUcCs.dddgdd}d|d|}|j||S)z **Display a group policy** https://developer.cisco.com/meraki/api-v1/#!get-network-group-policy - networkId (string): (required) - groupPolicyId (string): (required) r r rgetNetworkGroupPolicy)rrz /networks/z/groupPolicies/)rr)rr rUrrrrr r~s z#AsyncNetworks.getNetworkGroupPolicyc s|td|kr@ddg}|d|ks@td|dd|dddgd d }d |d |}d dddddddgfdd|D}|j|||S)a **Update a group policy** https://developer.cisco.com/meraki/api-v1/#!update-network-group-policy - networkId (string): (required) - groupPolicyId (string): (required) - name (string): The name for your group policy. - scheduling (object): The schedule for the group policy. Schedules are applied to days of the week. - bandwidth (object): The bandwidth settings for clients bound to your group policy. - firewallAndTrafficShaping (object): The firewall and traffic shaping rules and settings for your policy. - contentFiltering (object): The content filtering settings for your group policy - splashAuthSettings (string): Whether clients bound to your policy will bypass splash authorization or behave according to the network's rules. Can be one of 'network default' or 'bypass'. Only available if your network has a wireless configuration. - vlanTagging (object): The VLAN tagging settings for your group policy. Only available if your network has a wireless configuration. - bonjourForwarding (object): The Bonjour settings for your group policy. Only valid if your network has a wireless configuration. rznetwork defaultrz "splashAuthSettings" cannot be "z", & must be set to one of: r r rupdateNetworkGroupPolicy)rrz /networks/z/groupPolicies/rrrrrrrcs&i|]\}}|kr||qSr)r)rrr)rrr rsz:AsyncNetworks.updateNetworkGroupPolicy..)rrrOrrr)rr rUrrPrrr r)rr rs $z&AsyncNetworks.updateNetworkGroupPolicycCs.dddgdd}d|d|}|j||S)z **Delete a group policy** https://developer.cisco.com/meraki/api-v1/#!delete-network-group-policy - networkId (string): (required) - groupPolicyId (string): (required) r r rdeleteNetworkGroupPolicy)rrz /networks/z/groupPolicies/)rr")rr rUrrrrr rs z&AsyncNetworks.deleteNetworkGroupPolicycCs*dddgdd}d|d}|j||S)a4 **List the users configured under Meraki Authentication for a network (splash guest or RADIUS users for a wireless network, or client VPN users for a wired network)** https://developer.cisco.com/meraki/api-v1/#!get-network-meraki-auth-users - networkId (string): (required) r r merakiAuthUsersgetNetworkMerakiAuthUsers)rrz /networks/z/merakiAuthUsers)rr)rr rrrrr rs  z'AsyncNetworks.getNetworkMerakiAuthUsers)r emailrpasswordauthorizationsc  s|td|krBdddg}|d|ksBtd|dd|ddd gd d }d |d } ddddddgfdd|D} |j|| | S)aa **Authorize a user configured with Meraki Authentication for a network (currently supports 802.1X, splash guest, and client VPN users, and currently, organizations have a 50,000 user cap)** https://developer.cisco.com/meraki/api-v1/#!create-network-meraki-auth-user - networkId (string): (required) - email (string): Email address of the user - name (string): Name of the user - password (string): The password for this user account - authorizations (array): Authorization zones and expiration dates for the user. - accountType (string): Authorization type for user. Can be 'Guest' or '802.1X' for wireless networks, or 'Client VPN' for wired networks. Defaults to '802.1X'. - emailPasswordToUser (boolean): Whether or not Meraki should email the password to user. Default is false. Z accountTypeZGuestz802.1Xz Client VPNz"accountType" cannot be "z", & must be set to one of: r r rcreateNetworkMerakiAuthUser)rrz /networks/z/merakiAuthUsersrrremailPasswordToUserrcs&i|]\}}|kr||qSr)r)rrr)rrr rsz=AsyncNetworks.createNetworkMerakiAuthUser..)rrrOrrr)) rr rrrrrrPrrr r)rr rs  $ z)AsyncNetworks.createNetworkMerakiAuthUser)r merakiAuthUserIdcCs.dddgdd}d|d|}|j||S)a **Return the Meraki Auth splash guest, RADIUS, or client VPN user** https://developer.cisco.com/meraki/api-v1/#!get-network-meraki-auth-user - networkId (string): (required) - merakiAuthUserId (string): (required) r r rgetNetworkMerakiAuthUser)rrz /networks/z/merakiAuthUsers/)rr)rr rrrrrr rs z&AsyncNetworks.getNetworkMerakiAuthUsercCs.dddgdd}d|d|}|j||S)z **Deauthorize a user** https://developer.cisco.com/meraki/api-v1/#!delete-network-meraki-auth-user - networkId (string): (required) - merakiAuthUserId (string): (required) r r rdeleteNetworkMerakiAuthUser)rrz /networks/z/merakiAuthUsers/)rr")rr rrrrrr rs z)AsyncNetworks.deleteNetworkMerakiAuthUserc s^|tdddgdd}d|d|}dd d d gfd d |D}|j|||S)a| **Update a user configured with Meraki Authentication (currently, 802.1X RADIUS, splash guest, and client VPN users can be updated)** https://developer.cisco.com/meraki/api-v1/#!update-network-meraki-auth-user - networkId (string): (required) - merakiAuthUserId (string): (required) - name (string): Name of the user - password (string): The password for this user account - emailPasswordToUser (boolean): Whether or not Meraki should email the password to user. Default is false. - authorizations (array): Authorization zones and expiration dates for the user. r r rupdateNetworkMerakiAuthUser)rrz /networks/z/merakiAuthUsers/rrrrcs&i|]\}}|kr||qSr)r)rrr)rrr r:sz=AsyncNetworks.updateNetworkMerakiAuthUser..)rrrrr)rr rrrrr r)rr r$s  z)AsyncNetworks.updateNetworkMerakiAuthUsercCs*dddgdd}d|d}|j||S)z **List the MQTT brokers for this network** https://developer.cisco.com/meraki/api-v1/#!get-network-mqtt-brokers - networkId (string): (required) r r mqttBrokersgetNetworkMqttBrokers)rrz /networks/z /mqttBrokers)rr)rr rrrrr r@s  z#AsyncNetworks.getNetworkMqttBrokers)r rhostportc sRt}dddgdd}d|d}dd d gfd d |D}|j|||S) ac **Add an MQTT broker** https://developer.cisco.com/meraki/api-v1/#!create-network-mqtt-broker - networkId (string): (required) - name (string): Name of the MQTT broker - host (string): Host name/IP address where MQTT broker runs - port (integer): Host port though which MQTT broker can be reached r r rcreateNetworkMqttBroker)rrz /networks/z /mqttBrokersrrrcs&i|]\}}|kr||qSr)r)rrr)rrr rfsz9AsyncNetworks.createNetworkMqttBroker..)rrrr)) rr rrrrrrr r)rr rRs   z%AsyncNetworks.createNetworkMqttBroker)r mqttBrokerIdcCs.dddgdd}d|d|}|j||S)z **Return an MQTT broker** https://developer.cisco.com/meraki/api-v1/#!get-network-mqtt-broker - networkId (string): (required) - mqttBrokerId (string): (required) r r rgetNetworkMqttBroker)rrz /networks/z /mqttBrokers/)rr)rr rrrrrr rls z"AsyncNetworks.getNetworkMqttBrokerc s\|tdddgdd}d|d|}dd d gfd d |D}|j|||S) a **Update an MQTT broker** https://developer.cisco.com/meraki/api-v1/#!update-network-mqtt-broker - networkId (string): (required) - mqttBrokerId (string): (required) - name (string): Name of the mqtt config - host (string): Host name where mqtt broker runs - port (integer): Host port though which mqtt broker can be reached r r rupdateNetworkMqttBroker)rrz /networks/z /mqttBrokers/rrrcs&i|]\}}|kr||qSr)r)rrr)rrr rsz9AsyncNetworks.updateNetworkMqttBroker..)rrrrr)rr rrrrr r)rr rs  z%AsyncNetworks.updateNetworkMqttBrokercCs.dddgdd}d|d|}|j||S)z **Delete an MQTT broker** https://developer.cisco.com/meraki/api-v1/#!delete-network-mqtt-broker - networkId (string): (required) - mqttBrokerId (string): (required) r r rdeleteNetworkMqttBroker)rrz /networks/z /mqttBrokers/)rr")rr rrrrrr rs z%AsyncNetworks.deleteNetworkMqttBrokercCs*dddgdd}d|d}|j||S)z **Return the NetFlow traffic reporting settings for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-netflow - networkId (string): (required) r r netflowgetNetworkNetflow)rrz /networks/z/netflow)rr)rr rrrrr rs  zAsyncNetworks.getNetworkNetflowc sX|tdddgdd}d|d}dd d gfd d |D}|j|||S) a **Update the NetFlow traffic reporting settings for a network** https://developer.cisco.com/meraki/api-v1/#!update-network-netflow - networkId (string): (required) - reportingEnabled (boolean): Boolean indicating whether NetFlow traffic reporting is enabled (true) or disabled (false). - collectorIp (string): The IPv4 address of the NetFlow collector. - collectorPort (integer): The port that the NetFlow collector will be listening on. r r rupdateNetworkNetflow)rrz /networks/z/netflowZreportingEnabledZ collectorIpZ collectorPortcs&i|]\}}|kr||qSr)r)rrr)rrr rsz6AsyncNetworks.updateNetworkNetflow..)rrrrr)rr rrrr r)rr rs   z"AsyncNetworks.updateNetworkNetflowc sf|tddddgdd}d|d}d d d d d ddgfdd|D}|j|||||S)a **Get the channel utilization over each radio for all APs in a network.** https://developer.cisco.com/meraki/api-v1/#!get-network-network-health-channel-utilization - 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. 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. - resolution (integer): The time resolution in seconds for returned data. The valid resolutions are: 600. The default is 600. - perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 10. - 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. r r,Z networkHealthZchannelUtilization)getNetworkNetworkHealthChannelUtilization)rrz /networks/z!/networkHealth/channelUtilizationr/rNr0rRr1r2r3cs&i|]\}}|kr||qSr)r)rrr)r5rr rszKAsyncNetworks.getNetworkNetworkHealthChannelUtilization..)rrrrr6)rr r7r8rrrr9r)r5r rs   z7AsyncNetworks.getNetworkNetworkHealthChannelUtilizationc s`|tddddgdd}d|d}d d d d d dgfdd|D}|j|||S)a **List the keys required to access Personally Identifiable Information (PII) for a given identifier** https://developer.cisco.com/meraki/api-v1/#!get-network-pii-pii-keys - networkId (string): (required) - username (string): The username of a Systems Manager user - email (string): The email of a network user account or a Systems Manager device - mac (string): The MAC of a network client device or a Systems Manager device - serial (string): The serial of a Systems Manager device - imei (string): The IMEI of a Systems Manager device - bluetoothMac (string): The MAC of a Bluetooth client r r piiZpiiKeysgetNetworkPiiPiiKeys)rrz /networks/z /pii/piiKeysusernamermacrfimei bluetoothMaccs&i|]\}}|kr||qSr)r)rrr)r5rr rsz6AsyncNetworks.getNetworkPiiPiiKeys..)rrrrr)rr rrrr9r)r5r rs   z"AsyncNetworks.getNetworkPiiPiiKeyscCs,ddddgdd}d|d}|j||S) z **List the PII requests for this network or organization** https://developer.cisco.com/meraki/api-v1/#!get-network-pii-requests - networkId (string): (required) r r rrequestsgetNetworkPiiRequests)rrz /networks/z /pii/requests)rr)rr rrrrr rs  z#AsyncNetworks.getNetworkPiiRequestsc s|td|kr@ddg}|d|ks@td|dd|dddd gd d }d |d }dddddddgfdd|D}|j|||S)a **Submit a new delete or restrict processing PII request** https://developer.cisco.com/meraki/api-v1/#!create-network-pii-request - networkId (string): (required) - type (string): One of "delete" or "restrict processing" - datasets (array): The datasets related to the provided key that should be deleted. Only applies to "delete" requests. The value "all" will be expanded to all datasets applicable to this type. The datasets by applicable to each type are: mac (usage, events, traffic), email (users, loginAttempts), username (users, loginAttempts), bluetoothMac (client, connectivity), smDeviceId (device), smUserId (user) - username (string): The username of a network log in. Only applies to "delete" requests. - email (string): The email of a network user account. Only applies to "delete" requests. - mac (string): The MAC of a network client device. Applies to both "restrict processing" and "delete" requests. - smDeviceId (string): The sm_device_id of a Systems Manager device. The only way to "restrict processing" or "delete" a Systems Manager device. Must include "device" in the dataset for a "delete" request to destroy the device. - smUserId (string): The sm_user_id of a Systems Manager user. The only way to "restrict processing" or "delete" a Systems Manager user. Must include "user" in the dataset for a "delete" request to destroy the user. typer"zrestrict processingz"type" cannot be "z", & must be set to one of: r r rrcreateNetworkPiiRequest)rrz /networks/z /pii/requestsZdatasetsrrrZ smDeviceIdZsmUserIdcs&i|]\}}|kr||qSr)r)rrr)rrr rDsz9AsyncNetworks.createNetworkPiiRequest..)rrrOrrr))rr rrPrrr r)rr r(s $  z%AsyncNetworks.createNetworkPiiRequest)r requestIdcCs0ddddgdd}d|d|}|j||S) z **Return a PII request** https://developer.cisco.com/meraki/api-v1/#!get-network-pii-request - networkId (string): (required) - requestId (string): (required) r r rrgetNetworkPiiRequest)rrz /networks/z/pii/requests/)rr)rr rrrrrr rJs z"AsyncNetworks.getNetworkPiiRequestcCs0ddddgdd}d|d|}|j||S) z **Delete a restrict processing PII request** https://developer.cisco.com/meraki/api-v1/#!delete-network-pii-request - networkId (string): (required) - requestId (string): (required) r r rrdeleteNetworkPiiRequest)rrz /networks/z/pii/requests/)rr")rr rrrrrr r]s z%AsyncNetworks.deleteNetworkPiiRequestc s`|tddddgdd}d|d}d d d d d dgfdd|D}|j|||S)a **Given a piece of Personally Identifiable Information (PII), return the Systems Manager device ID(s) associated with that identifier** https://developer.cisco.com/meraki/api-v1/#!get-network-pii-sm-devices-for-key - networkId (string): (required) - username (string): The username of a Systems Manager user - email (string): The email of a network user account or a Systems Manager device - mac (string): The MAC of a network client device or a Systems Manager device - serial (string): The serial of a Systems Manager device - imei (string): The IMEI of a Systems Manager device - bluetoothMac (string): The MAC of a Bluetooth client r r rZsmDevicesForKeygetNetworkPiiSmDevicesForKey)rrz /networks/z/pii/smDevicesForKeyrrrrfrrcs&i|]\}}|kr||qSr)r)rrr)r5rr rsz>AsyncNetworks.getNetworkPiiSmDevicesForKey..)rrrrr)rr rrrr9r)r5r rps   z*AsyncNetworks.getNetworkPiiSmDevicesForKeyc s`|tddddgdd}d|d}d d d d d dgfdd|D}|j|||S)a **Given a piece of Personally Identifiable Information (PII), return the Systems Manager owner ID(s) associated with that identifier** https://developer.cisco.com/meraki/api-v1/#!get-network-pii-sm-owners-for-key - networkId (string): (required) - username (string): The username of a Systems Manager user - email (string): The email of a network user account or a Systems Manager device - mac (string): The MAC of a network client device or a Systems Manager device - serial (string): The serial of a Systems Manager device - imei (string): The IMEI of a Systems Manager device - bluetoothMac (string): The MAC of a Bluetooth client r r rZsmOwnersForKeygetNetworkPiiSmOwnersForKey)rrz /networks/z/pii/smOwnersForKeyrrrrfrrcs&i|]\}}|kr||qSr)r)rrr)r5rr rsz=AsyncNetworks.getNetworkPiiSmOwnersForKey..)rrrrr)rr rrrr9r)r5r rs   z)AsyncNetworks.getNetworkPiiSmOwnersForKeycCs*dddgdd}d|d}|j||S)z **Return the settings for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-settings - networkId (string): (required) r r r$getNetworkSettings)rrz /networks/z /settings)rr)rr rrrrr rs  z AsyncNetworks.getNetworkSettingsc sX|tdddgdd}d|d}dd d gfd d |D}|j|||S) at **Update the settings for a network** https://developer.cisco.com/meraki/api-v1/#!update-network-settings - networkId (string): (required) - localStatusPageEnabled (boolean): Enables / disables the local device status pages (my.meraki.com, ap.meraki.com, switch.meraki.com, wired.meraki.com). Optional (defaults to false) - remoteStatusPageEnabled (boolean): Enables / disables access to the device status page (http://[device's LAN IP]). Optional. Can only be set if localStatusPageEnabled is set to true - secureConnect (object): A hash of SecureConnect options applied to the Network. r r r$updateNetworkSettings)rrz /networks/z /settingsZlocalStatusPageEnabledZremoteStatusPageEnabledZ secureConnectcs&i|]\}}|kr||qSr)r)rrr)rrr rsz7AsyncNetworks.updateNetworkSettings..)rrrrr)rr rrrr r)rr rs   z#AsyncNetworks.updateNetworkSettingscCs*dddgdd}d|d}|j||S)z **Return the SNMP settings for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-snmp - networkId (string): (required) r r snmpgetNetworkSnmp)rrz /networks/z/snmp)rr)rr rrrrr rs  zAsyncNetworks.getNetworkSnmpc s|td|krBdddg}|d|ksBtd|dd|ddd gd d }d |d }dddgfdd|D}|j|||S)a **Update the SNMP settings for a network** https://developer.cisco.com/meraki/api-v1/#!update-network-snmp - networkId (string): (required) - access (string): The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3). - communityString (string): The SNMP community string. Only relevant if 'access' is set to 'community'. - users (array): The list of SNMP users. Only relevant if 'access' is set to 'users'. accessnoneZ communityZusersz"access" cannot be "z", & must be set to one of: r r rupdateNetworkSnmp)rrz /networks/z/snmpZcommunityStringcs&i|]\}}|kr||qSr)r)rrr)rrr rsz3AsyncNetworks.updateNetworkSnmp..)rrrOrrr)rr rrPrrr r)rr rs  $  zAsyncNetworks.updateNetworkSnmpc s|td|krZdddddddd d d d d dddg}|d|ksZtd|dd|dddgdd}d|d}dddgfdd|D}|j|||S)a **List the splash login attempts for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-splash-login-attempts - networkId (string): (required) - ssidNumber (integer): Only return the login attempts for the specified SSID - loginIdentifier (string): The username, email, or phone number used during login - timespan (integer): The timespan, in seconds, for the login attempts. The period will be from [timespan] seconds ago until now. The maximum timespan is 3 months r>r?r*r@rArBrCrDrErFrGrHrIrJrKrLz"ssidNumber" cannot be "z", & must be set to one of: r r,ZsplashLoginAttemptsgetNetworkSplashLoginAttempts)rrz /networks/z/splashLoginAttemptsZloginIdentifierr0cs&i|]\}}|kr||qSr)r)rrr)r5rr rsz?AsyncNetworks.getNetworkSplashLoginAttempts..)rrrOrrr)rr rrPrrr9r)r5r rs "$  z+AsyncNetworks.getNetworkSplashLoginAttemptscCs(ddgdd}d|d}|j||S)z **Split a combined network into individual networks for each type of device** https://developer.cisco.com/meraki/api-v1/#!split-network - networkId (string): (required) r r splitNetwork)rrz /networks/z/split)rr))rr rrrrr r$s  zAsyncNetworks.splitNetworkcCs*dddgdd}d|d}|j||S)z **List the syslog servers for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-syslog-servers - networkId (string): (required) r r syslogServersgetNetworkSyslogServers)rrz /networks/z/syslogServers)rr)rr rrrrr r6s  z%AsyncNetworks.getNetworkSyslogServers)r serverscsNt}dddgdd}d|d}dgfd d |D}|j|||S) a **Update the syslog servers for a network** https://developer.cisco.com/meraki/api-v1/#!update-network-syslog-servers - networkId (string): (required) - servers (array): A list of the syslog servers for this network r r rupdateNetworkSyslogServers)rrz /networks/z/syslogServersrcs&i|]\}}|kr||qSr)r)rrr)rrr rZsz.)rrrr)rr rrrrr r)rr rHs  z(AsyncNetworks.updateNetworkSyslogServersc s|td|krDddddg}|d|ksDtd|dd|dd d gd d }d |d}dddgfdd|D}|j|||S)a **Return the traffic analysis data for this network** https://developer.cisco.com/meraki/api-v1/#!get-network-traffic - networkId (string): (required) - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 30 days from today. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 30 days. - deviceType (string): Filter the data by device type: 'combined', 'wireless', 'switch' or 'appliance'. Defaults to 'combined'. When using 'combined', for each rule the data will come from the device type with the most usage. Z deviceTypeZcombinedrsrtruz"deviceType" cannot be "z", & must be set to one of: r r,ZtrafficgetNetworkTraffic)rrz /networks/z/trafficr/r0cs&i|]\}}|kr||qSr)r)rrr)r5rr rxsz3AsyncNetworks.getNetworkTraffic..)rrrOrrr)rr rrPrrr9r)r5r r`s  $  zAsyncNetworks.getNetworkTrafficcCs*dddgdd}d|d}|j||S)z **Return the traffic analysis settings for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-traffic-analysis - networkId (string): (required) r r trafficAnalysisgetNetworkTrafficAnalysis)rrz /networks/z/trafficAnalysis)rr)rr rrrrr r~s  z'AsyncNetworks.getNetworkTrafficAnalysisc s|td|krBdddg}|d|ksBtd|dd|ddd gd d }d |d }ddgfdd|D}|j|||S)a **Update the traffic analysis settings for a network** https://developer.cisco.com/meraki/api-v1/#!update-network-traffic-analysis - networkId (string): (required) - mode (string): The traffic analysis mode for the network. Can be one of 'disabled' (do not collect traffic types), 'basic' (collect generic traffic categories), or 'detailed' (collect destination hostnames). - customPieChartItems (array): The list of items that make up the custom pie chart for traffic reporting. modedisabledbasicZdetailedz"mode" cannot be "z", & must be set to one of: r r rupdateNetworkTrafficAnalysis)rrz /networks/z/trafficAnalysisZcustomPieChartItemscs&i|]\}}|kr||qSr)r)rrr)rrr rsz>AsyncNetworks.updateNetworkTrafficAnalysis..)rrrOrrr)rr rrPrrr r)rr rs  $ z*AsyncNetworks.updateNetworkTrafficAnalysiscCs,ddddgdd}d|d}|j||S) z **Returns the application categories for traffic shaping rules.** https://developer.cisco.com/meraki/api-v1/#!get-network-traffic-shaping-application-categories - networkId (string): (required) r r trafficShapingZapplicationCategories-getNetworkTrafficShapingApplicationCategories)rrz /networks/z%/trafficShaping/applicationCategories)rr)rr rrrrr rs  z;AsyncNetworks.getNetworkTrafficShapingApplicationCategoriescCs,ddddgdd}d|d}|j||S) z **Returns the available DSCP tagging options for your traffic shaping rules.** https://developer.cisco.com/meraki/api-v1/#!get-network-traffic-shaping-dscp-tagging-options - networkId (string): (required) r r rZdscpTaggingOptions*getNetworkTrafficShapingDscpTaggingOptions)rrz /networks/z"/trafficShaping/dscpTaggingOptions)rr)rr rrrrr rs  z8AsyncNetworks.getNetworkTrafficShapingDscpTaggingOptionscCs(ddgdd}d|d}|j||S)z **Unbind a network from a template.** https://developer.cisco.com/meraki/api-v1/#!unbind-network - networkId (string): (required) r r unbindNetwork)rrz /networks/z/unbind)rr))rr rrrrr rs  zAsyncNetworks.unbindNetworkcCs,ddddgdd}d|d}|j||S) z **List the HTTP servers for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-webhooks-http-servers - networkId (string): (required) r r webhooks httpServersgetNetworkWebhooksHttpServers)rrz /networks/z/webhooks/httpServers)rr)rr rrrrr rs  z+AsyncNetworks.getNetworkWebhooksHttpServers)r rurlc sZ|tddddgdd}d|d}d d d gfd d |D}|j|||S)a **Add an HTTP server to a network** https://developer.cisco.com/meraki/api-v1/#!create-network-webhooks-http-server - networkId (string): (required) - name (string): A name for easy reference to the HTTP server - url (string): The URL of the HTTP server - sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki. r r rrcreateNetworkWebhooksHttpServer)rrz /networks/z/webhooks/httpServersrr sharedSecretcs&i|]\}}|kr||qSr)r)rrr)rrr r szAAsyncNetworks.createNetworkWebhooksHttpServer..)rrrrr))rr rrrrrr r)rr rs    z-AsyncNetworks.createNetworkWebhooksHttpServer)r httpServerIdcCs0ddddgdd}d|d|}|j||S) z **Return an HTTP server for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-webhooks-http-server - networkId (string): (required) - httpServerId (string): (required) r r rrgetNetworkWebhooksHttpServer)rrz /networks/z/webhooks/httpServers/)rr)rr rrrrrr rs z*AsyncNetworks.getNetworkWebhooksHttpServerc s^|tddddgdd}d|d|}d d d gfd d |D}|j|||S)a **Update an HTTP server** https://developer.cisco.com/meraki/api-v1/#!update-network-webhooks-http-server - networkId (string): (required) - httpServerId (string): (required) - name (string): A name for easy reference to the HTTP server - url (string): The URL of the HTTP server - sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki. r r rrupdateNetworkWebhooksHttpServer)rrz /networks/z/webhooks/httpServers/rrrcs&i|]\}}|kr||qSr)r)rrr)rrr r9szAAsyncNetworks.updateNetworkWebhooksHttpServer..)rrrrr)rr rrrrr r)rr r$s   z-AsyncNetworks.updateNetworkWebhooksHttpServercCs0ddddgdd}d|d|}|j||S) z **Delete an HTTP server from a network** https://developer.cisco.com/meraki/api-v1/#!delete-network-webhooks-http-server - networkId (string): (required) - httpServerId (string): (required) r r rrdeleteNetworkWebhooksHttpServer)rrz /networks/z/webhooks/httpServers/)rr")rr rrrrrr r?s z-AsyncNetworks.deleteNetworkWebhooksHttpServer)r rc sX|tddddgdd}d|d}d d gfd d |D}|j|||S) at **Send a test webhook for a network** https://developer.cisco.com/meraki/api-v1/#!create-network-webhooks-webhook-test - networkId (string): (required) - url (string): The URL where the test webhook will be sent - sharedSecret (string): The shared secret the test webhook will send. Optional. Defaults to an empty string. r r r webhookTests createNetworkWebhooksWebhookTest)rrz /networks/z/webhooks/webhookTestsrrcs&i|]\}}|kr||qSr)r)rrr)rrr reszBAsyncNetworks.createNetworkWebhooksWebhookTest..)rrrrr))rr rrrrr r)rr rRs   z.AsyncNetworks.createNetworkWebhooksWebhookTest)r webhookTestIdcCs0ddddgdd}d|d|}|j||S) z **Return the status of a webhook test for a network** https://developer.cisco.com/meraki/api-v1/#!get-network-webhooks-webhook-test - networkId (string): (required) - webhookTestId (string): (required) r r rrgetNetworkWebhooksWebhookTest)rrz /networks/z/webhooks/webhookTests/)rr)rr rrrrrr rks z+AsyncNetworks.getNetworkWebhooksWebhookTest)r*r+)r*r+)r*r+)r*r+)r*r+)r*rhN)r*r+)X__name__ __module__ __qualname__rstrr rr!r%r&r(r.r;r=rMrQlistrTrVrXrZr[r]dictr_r`rarcrergrjrlrnrorvryr{rrrrrrrrrrrrrrintrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr __classcell__rr)rr rs % %.&'! "rN)rrrrr