From 5e7abed301d21f1ecef9420fb45151645e444020 Mon Sep 17 00:00:00 2001 From: "John M. Kuchta" Date: Thu, 5 Dec 2024 08:11:36 -0800 Subject: [PATCH] Automatically regenerated library to version 1.53.0. (#273) Co-authored-by: GitHub Action --- meraki/__init__.py | 2 +- meraki/aio/api/appliance.py | 2 +- meraki/aio/api/camera.py | 4 +- meraki/aio/api/licensing.py | 4 +- meraki/aio/api/networks.py | 4 +- meraki/aio/api/organizations.py | 7 ++- meraki/aio/api/switch.py | 90 ++++++++++++++++++++++++++++ meraki/aio/api/wireless.py | 4 +- meraki/aio/api/wirelessController.py | 24 ++++---- meraki/api/appliance.py | 2 +- meraki/api/batch/networks.py | 4 +- meraki/api/camera.py | 4 +- meraki/api/licensing.py | 4 +- meraki/api/networks.py | 4 +- meraki/api/organizations.py | 7 ++- meraki/api/switch.py | 90 ++++++++++++++++++++++++++++ meraki/api/wireless.py | 4 +- meraki/api/wirelessController.py | 24 ++++---- 18 files changed, 233 insertions(+), 51 deletions(-) diff --git a/meraki/__init__.py b/meraki/__init__.py index b6a344f8..09b72b13 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -43,7 +43,7 @@ ) from meraki.rest_session import * -__version__ = '1.52.0' +__version__ = '1.53.0' class DashboardAPI(object): diff --git a/meraki/aio/api/appliance.py b/meraki/aio/api/appliance.py index 988131fd..8ccf189c 100644 --- a/meraki/aio/api/appliance.py +++ b/meraki/aio/api/appliance.py @@ -2524,7 +2524,7 @@ def getOrganizationApplianceUplinksStatusesOverview(self, organizationId: str): """ metadata = { - 'tags': ['appliance', 'configure', 'uplinks', 'statuses', 'overview'], + 'tags': ['appliance', 'monitor', 'uplinks', 'statuses', 'overview'], 'operation': 'getOrganizationApplianceUplinksStatusesOverview' } organizationId = urllib.parse.quote(str(organizationId), safe='') diff --git a/meraki/aio/api/camera.py b/meraki/aio/api/camera.py index f6738612..67d956b9 100644 --- a/meraki/aio/api/camera.py +++ b/meraki/aio/api/camera.py @@ -486,7 +486,7 @@ def createNetworkCameraQualityRetentionProfile(self, networkId: str, name: str, - motionDetectorVersion (integer): The version of the motion detector that will be used by the camera. Only applies to Gen 2 cameras. Defaults to v2. - smartRetention (object): Smart Retention records footage in two qualities and intelligently retains higher quality when motion, people or vehicles are detected. - scheduleId (string): Schedule for which this camera will record video, or 'null' to always record. - - maxRetentionDays (integer): The maximum number of days for which the data will be stored, or 'null' to keep data until storage space runs out. If the former, it can be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 30, 60, 90] days. + - maxRetentionDays (integer): The maximum number of days for which the data will be stored, or 'null' to keep data until storage space runs out. If the former, it can be in the range of one to ninety days. - videoSettings (object): Video quality and resolution settings for all the camera models. """ @@ -542,7 +542,7 @@ def updateNetworkCameraQualityRetentionProfile(self, networkId: str, qualityRete - motionDetectorVersion (integer): The version of the motion detector that will be used by the camera. Only applies to Gen 2 cameras. Defaults to v2. - smartRetention (object): Smart Retention records footage in two qualities and intelligently retains higher quality when motion, people or vehicles are detected. - scheduleId (string): Schedule for which this camera will record video, or 'null' to always record. - - maxRetentionDays (integer): The maximum number of days for which the data will be stored, or 'null' to keep data until storage space runs out. If the former, it can be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 30, 60, 90] days. + - maxRetentionDays (integer): The maximum number of days for which the data will be stored, or 'null' to keep data until storage space runs out. If the former, it can be in the range of one to ninety days. - videoSettings (object): Video quality and resolution settings for all the camera models. """ diff --git a/meraki/aio/api/licensing.py b/meraki/aio/api/licensing.py index 136d0333..4e1d1c2f 100644 --- a/meraki/aio/api/licensing.py +++ b/meraki/aio/api/licensing.py @@ -157,14 +157,14 @@ def getAdministeredLicensingSubscriptionSubscriptionsComplianceStatuses(self, or - def bindAdministeredLicensingSubscriptionSubscription(self, subscriptionId: str, networkIds: list, **kwargs): + def bindAdministeredLicensingSubscriptionSubscription(self, subscriptionId: str, **kwargs): """ **Bind networks to a subscription** https://developer.cisco.com/meraki/api-v1/#!bind-administered-licensing-subscription-subscription - subscriptionId (string): Subscription ID - - networkIds (array): List of network ids to bind to the subscription - validate (boolean): Check if the provided networks can be bound to the subscription. Returns any licensing problems and does not commit the results. + - networkIds (array): List of network ids to bind to the subscription """ kwargs.update(locals()) diff --git a/meraki/aio/api/networks.py b/meraki/aio/api/networks.py index af3507b5..b30d21f4 100644 --- a/meraki/aio/api/networks.py +++ b/meraki/aio/api/networks.py @@ -2797,8 +2797,8 @@ def createNetworkWebhooksPayloadTemplate(self, networkId: str, name: str, **kwar - name (string): The name of the new template - body (string): The liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. - headers (array): The liquid template used with the webhook headers. - - bodyFile (string): A file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. - - headersFile (string): A file containing the liquid template used with the webhook headers. + - bodyFile (string): A Base64 encoded file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headersFile (string): A Base64 encoded file containing the liquid template used with the webhook headers. """ kwargs.update(locals()) diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 914ded51..3a6868d4 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -2839,16 +2839,17 @@ def getOrganizationInventoryOnboardingCloudMonitoringNetworks(self, organization - def createOrganizationInventoryOnboardingCloudMonitoringPrepare(self, organizationId: str, devices: list): + def createOrganizationInventoryOnboardingCloudMonitoringPrepare(self, organizationId: str, devices: list, **kwargs): """ **Initiates or updates an import session** https://developer.cisco.com/meraki/api-v1/#!create-organization-inventory-onboarding-cloud-monitoring-prepare - organizationId (string): Organization ID - devices (array): A set of devices to import (or update) + - options (object): Additional options for the import """ - kwargs = locals() + kwargs.update(locals()) metadata = { 'tags': ['organizations', 'configure', 'inventory', 'onboarding', 'cloudMonitoring', 'prepare'], @@ -2857,7 +2858,7 @@ def createOrganizationInventoryOnboardingCloudMonitoringPrepare(self, organizati organizationId = urllib.parse.quote(str(organizationId), safe='') resource = f'/organizations/{organizationId}/inventory/onboarding/cloudMonitoring/prepare' - body_params = ['devices', ] + body_params = ['devices', 'options', ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} return self._session.post(metadata, resource, payload) diff --git a/meraki/aio/api/switch.py b/meraki/aio/api/switch.py index 711f58f7..9e4ed6f9 100644 --- a/meraki/aio/api/switch.py +++ b/meraki/aio/api/switch.py @@ -2571,6 +2571,51 @@ def getOrganizationSwitchPortsBySwitch(self, organizationId: str, total_pages=1, + def getOrganizationSwitchPortsClientsOverviewByDevice(self, organizationId: str, total_pages=1, direction='next', **kwargs): + """ + **List the number of clients for all switchports with at least one online client in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-clients-overview-by-device + + - organizationId (string): Organization ID + - 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 - 20. Default is 20. + - 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['switch', 'monitor', 'ports', 'clients', 'overview', 'byDevice'], + 'operation': 'getOrganizationSwitchPortsClientsOverviewByDevice' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/switch/ports/clients/overview/byDevice' + + query_params = ['t0', 'timespan', 'perPage', 'startingAfter', 'endingBefore', 'configurationUpdatedAfter', 'mac', 'macs', 'name', 'networkIds', 'portProfileIds', 'serial', 'serials', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['macs', 'networkIds', 'portProfileIds', 'serials', ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f'{k.strip()}[]'] = kwargs[f'{k}'] + params.pop(k.strip()) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + + def getOrganizationSwitchPortsOverview(self, organizationId: str, **kwargs): """ **Returns the counts of all active ports for the requested timespan, grouped by speed** @@ -2639,3 +2684,48 @@ def getOrganizationSwitchPortsStatusesBySwitch(self, organizationId: str, total_ return self._session.get_pages(metadata, resource, params, total_pages, direction) + + + def getOrganizationSwitchPortsTopologyDiscoveryByDevice(self, organizationId: str, total_pages=1, direction='next', **kwargs): + """ + **List most recently seen LLDP/CDP discovery and topology information per switch port in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-topology-discovery-by-device + + - organizationId (string): Organization ID + - 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 - 20. 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['switch', 'monitor', 'ports', 'topology', 'discovery', 'byDevice'], + 'operation': 'getOrganizationSwitchPortsTopologyDiscoveryByDevice' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/switch/ports/topology/discovery/byDevice' + + query_params = ['t0', 'timespan', 'perPage', 'startingAfter', 'endingBefore', 'configurationUpdatedAfter', 'mac', 'macs', 'name', 'networkIds', 'portProfileIds', 'serial', 'serials', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['macs', 'networkIds', 'portProfileIds', 'serials', ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f'{k.strip()}[]'] = kwargs[f'{k}'] + params.pop(k.strip()) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index 844a197a..ddb3dccb 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -2554,7 +2554,7 @@ def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, to kwargs.update(locals()) metadata = { - 'tags': ['wireless', 'configure', 'clients', 'overview', 'byDevice'], + 'tags': ['wireless', 'monitor', 'clients', 'overview', 'byDevice'], 'operation': 'getOrganizationWirelessClientsOverviewByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -2918,7 +2918,7 @@ def getOrganizationWirelessDevicesWirelessControllersByDevice(self, organization kwargs.update(locals()) metadata = { - 'tags': ['wireless', 'configure', 'devices', 'wirelessControllers', 'byDevice'], + 'tags': ['wireless', 'monitor', 'devices', 'wirelessControllers', 'byDevice'], 'operation': 'getOrganizationWirelessDevicesWirelessControllersByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') diff --git a/meraki/aio/api/wirelessController.py b/meraki/aio/api/wirelessController.py index f5c32a95..c62decbb 100644 --- a/meraki/aio/api/wirelessController.py +++ b/meraki/aio/api/wirelessController.py @@ -106,7 +106,7 @@ def getOrganizationWirelessControllerConnections(self, organizationId: str, tota kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'connections'], + 'tags': ['wirelessController', 'monitor', 'connections'], 'operation': 'getOrganizationWirelessControllerConnections' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -145,7 +145,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL2ByDevice(self, organizat kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l2', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l2', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL2ByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -185,7 +185,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByD kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l2', 'statuses', 'changeHistory', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l2', 'statuses', 'changeHistory', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -224,7 +224,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByInterval(s kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l2', 'usage', 'history', 'byInterval'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l2', 'usage', 'history', 'byInterval'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByInterval' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -263,7 +263,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL3ByDevice(self, organizat kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l3', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l3', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL3ByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -303,7 +303,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByD kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l3', 'statuses', 'changeHistory', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l3', 'statuses', 'changeHistory', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -342,7 +342,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByInterval(s kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l3', 'usage', 'history', 'byInterval'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l3', 'usage', 'history', 'byInterval'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByInterval' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -382,7 +382,7 @@ def getOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDevice(se kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'packets', 'overview', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'packets', 'overview', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -422,7 +422,7 @@ def getOrganizationWirelessControllerDevicesInterfacesUsageHistoryByInterval(sel kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'usage', 'history', 'byInterval'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'usage', 'history', 'byInterval'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesUsageHistoryByInterval' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -461,7 +461,7 @@ def getOrganizationWirelessControllerDevicesRedundancyFailoverHistory(self, orga kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'redundancy', 'failover', 'history'], + 'tags': ['wirelessController', 'monitor', 'devices', 'redundancy', 'failover', 'history'], 'operation': 'getOrganizationWirelessControllerDevicesRedundancyFailoverHistory' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -497,7 +497,7 @@ def getOrganizationWirelessControllerDevicesRedundancyStatuses(self, organizatio kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'redundancy', 'statuses'], + 'tags': ['wirelessController', 'monitor', 'devices', 'redundancy', 'statuses'], 'operation': 'getOrganizationWirelessControllerDevicesRedundancyStatuses' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -573,7 +573,7 @@ def getOrganizationWirelessControllerOverviewByDevice(self, organizationId: str, kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'overview', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'overview', 'byDevice'], 'operation': 'getOrganizationWirelessControllerOverviewByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') diff --git a/meraki/api/appliance.py b/meraki/api/appliance.py index 4b30e4ee..0c2fe7dc 100644 --- a/meraki/api/appliance.py +++ b/meraki/api/appliance.py @@ -2524,7 +2524,7 @@ def getOrganizationApplianceUplinksStatusesOverview(self, organizationId: str): """ metadata = { - 'tags': ['appliance', 'configure', 'uplinks', 'statuses', 'overview'], + 'tags': ['appliance', 'monitor', 'uplinks', 'statuses', 'overview'], 'operation': 'getOrganizationApplianceUplinksStatusesOverview' } organizationId = urllib.parse.quote(str(organizationId), safe='') diff --git a/meraki/api/batch/networks.py b/meraki/api/batch/networks.py index d0a08705..6b73c032 100644 --- a/meraki/api/batch/networks.py +++ b/meraki/api/batch/networks.py @@ -1065,8 +1065,8 @@ def createNetworkWebhooksPayloadTemplate(self, networkId: str, name: str, **kwar - name (string): The name of the new template - body (string): The liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. - headers (array): The liquid template used with the webhook headers. - - bodyFile (string): A file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. - - headersFile (string): A file containing the liquid template used with the webhook headers. + - bodyFile (string): A Base64 encoded file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headersFile (string): A Base64 encoded file containing the liquid template used with the webhook headers. """ kwargs.update(locals()) diff --git a/meraki/api/camera.py b/meraki/api/camera.py index 35311f70..ed2e3803 100644 --- a/meraki/api/camera.py +++ b/meraki/api/camera.py @@ -486,7 +486,7 @@ def createNetworkCameraQualityRetentionProfile(self, networkId: str, name: str, - motionDetectorVersion (integer): The version of the motion detector that will be used by the camera. Only applies to Gen 2 cameras. Defaults to v2. - smartRetention (object): Smart Retention records footage in two qualities and intelligently retains higher quality when motion, people or vehicles are detected. - scheduleId (string): Schedule for which this camera will record video, or 'null' to always record. - - maxRetentionDays (integer): The maximum number of days for which the data will be stored, or 'null' to keep data until storage space runs out. If the former, it can be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 30, 60, 90] days. + - maxRetentionDays (integer): The maximum number of days for which the data will be stored, or 'null' to keep data until storage space runs out. If the former, it can be in the range of one to ninety days. - videoSettings (object): Video quality and resolution settings for all the camera models. """ @@ -542,7 +542,7 @@ def updateNetworkCameraQualityRetentionProfile(self, networkId: str, qualityRete - motionDetectorVersion (integer): The version of the motion detector that will be used by the camera. Only applies to Gen 2 cameras. Defaults to v2. - smartRetention (object): Smart Retention records footage in two qualities and intelligently retains higher quality when motion, people or vehicles are detected. - scheduleId (string): Schedule for which this camera will record video, or 'null' to always record. - - maxRetentionDays (integer): The maximum number of days for which the data will be stored, or 'null' to keep data until storage space runs out. If the former, it can be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 30, 60, 90] days. + - maxRetentionDays (integer): The maximum number of days for which the data will be stored, or 'null' to keep data until storage space runs out. If the former, it can be in the range of one to ninety days. - videoSettings (object): Video quality and resolution settings for all the camera models. """ diff --git a/meraki/api/licensing.py b/meraki/api/licensing.py index 1c3d6537..7e9ba3ff 100644 --- a/meraki/api/licensing.py +++ b/meraki/api/licensing.py @@ -157,14 +157,14 @@ def getAdministeredLicensingSubscriptionSubscriptionsComplianceStatuses(self, or - def bindAdministeredLicensingSubscriptionSubscription(self, subscriptionId: str, networkIds: list, **kwargs): + def bindAdministeredLicensingSubscriptionSubscription(self, subscriptionId: str, **kwargs): """ **Bind networks to a subscription** https://developer.cisco.com/meraki/api-v1/#!bind-administered-licensing-subscription-subscription - subscriptionId (string): Subscription ID - - networkIds (array): List of network ids to bind to the subscription - validate (boolean): Check if the provided networks can be bound to the subscription. Returns any licensing problems and does not commit the results. + - networkIds (array): List of network ids to bind to the subscription """ kwargs.update(locals()) diff --git a/meraki/api/networks.py b/meraki/api/networks.py index 9747ba60..820e04e4 100644 --- a/meraki/api/networks.py +++ b/meraki/api/networks.py @@ -2797,8 +2797,8 @@ def createNetworkWebhooksPayloadTemplate(self, networkId: str, name: str, **kwar - name (string): The name of the new template - body (string): The liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. - headers (array): The liquid template used with the webhook headers. - - bodyFile (string): A file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. - - headersFile (string): A file containing the liquid template used with the webhook headers. + - bodyFile (string): A Base64 encoded file containing liquid template used for the body of the webhook message. Either `body` or `bodyFile` must be specified. + - headersFile (string): A Base64 encoded file containing the liquid template used with the webhook headers. """ kwargs.update(locals()) diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 35b6a9bf..162a7f1d 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -2839,16 +2839,17 @@ def getOrganizationInventoryOnboardingCloudMonitoringNetworks(self, organization - def createOrganizationInventoryOnboardingCloudMonitoringPrepare(self, organizationId: str, devices: list): + def createOrganizationInventoryOnboardingCloudMonitoringPrepare(self, organizationId: str, devices: list, **kwargs): """ **Initiates or updates an import session** https://developer.cisco.com/meraki/api-v1/#!create-organization-inventory-onboarding-cloud-monitoring-prepare - organizationId (string): Organization ID - devices (array): A set of devices to import (or update) + - options (object): Additional options for the import """ - kwargs = locals() + kwargs.update(locals()) metadata = { 'tags': ['organizations', 'configure', 'inventory', 'onboarding', 'cloudMonitoring', 'prepare'], @@ -2857,7 +2858,7 @@ def createOrganizationInventoryOnboardingCloudMonitoringPrepare(self, organizati organizationId = urllib.parse.quote(str(organizationId), safe='') resource = f'/organizations/{organizationId}/inventory/onboarding/cloudMonitoring/prepare' - body_params = ['devices', ] + body_params = ['devices', 'options', ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} return self._session.post(metadata, resource, payload) diff --git a/meraki/api/switch.py b/meraki/api/switch.py index 2aef3e44..605a44bf 100644 --- a/meraki/api/switch.py +++ b/meraki/api/switch.py @@ -2571,6 +2571,51 @@ def getOrganizationSwitchPortsBySwitch(self, organizationId: str, total_pages=1, + def getOrganizationSwitchPortsClientsOverviewByDevice(self, organizationId: str, total_pages=1, direction='next', **kwargs): + """ + **List the number of clients for all switchports with at least one online client in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-clients-overview-by-device + + - organizationId (string): Organization ID + - 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 - 20. Default is 20. + - 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['switch', 'monitor', 'ports', 'clients', 'overview', 'byDevice'], + 'operation': 'getOrganizationSwitchPortsClientsOverviewByDevice' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/switch/ports/clients/overview/byDevice' + + query_params = ['t0', 'timespan', 'perPage', 'startingAfter', 'endingBefore', 'configurationUpdatedAfter', 'mac', 'macs', 'name', 'networkIds', 'portProfileIds', 'serial', 'serials', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['macs', 'networkIds', 'portProfileIds', 'serials', ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f'{k.strip()}[]'] = kwargs[f'{k}'] + params.pop(k.strip()) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + + def getOrganizationSwitchPortsOverview(self, organizationId: str, **kwargs): """ **Returns the counts of all active ports for the requested timespan, grouped by speed** @@ -2639,3 +2684,48 @@ def getOrganizationSwitchPortsStatusesBySwitch(self, organizationId: str, total_ return self._session.get_pages(metadata, resource, params, total_pages, direction) + + + def getOrganizationSwitchPortsTopologyDiscoveryByDevice(self, organizationId: str, total_pages=1, direction='next', **kwargs): + """ + **List most recently seen LLDP/CDP discovery and topology information per switch port in an organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-switch-ports-topology-discovery-by-device + + - organizationId (string): Organization ID + - 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 - 20. 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. + - configurationUpdatedAfter (string): Optional parameter to filter items to switches where the configuration has been updated after the given timestamp. + - mac (string): Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match. + - macs (array): Optional parameter to filter items to switches that have one of the provided MAC addresses. + - name (string): Optional parameter to filter items to switches with names that contain the search term or are an exact match. + - networkIds (array): Optional parameter to filter items to switches in one of the provided networks. + - portProfileIds (array): Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles. + - serial (string): Optional parameter to filter items to switches with serial number that contains the search term or are an exact match. + - serials (array): Optional parameter to filter items to switches that have one of the provided serials. + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['switch', 'monitor', 'ports', 'topology', 'discovery', 'byDevice'], + 'operation': 'getOrganizationSwitchPortsTopologyDiscoveryByDevice' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/switch/ports/topology/discovery/byDevice' + + query_params = ['t0', 'timespan', 'perPage', 'startingAfter', 'endingBefore', 'configurationUpdatedAfter', 'mac', 'macs', 'name', 'networkIds', 'portProfileIds', 'serial', 'serials', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['macs', 'networkIds', 'portProfileIds', 'serials', ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f'{k.strip()}[]'] = kwargs[f'{k}'] + params.pop(k.strip()) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index 0f122c0e..6bbd55ee 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -2554,7 +2554,7 @@ def getOrganizationWirelessClientsOverviewByDevice(self, organizationId: str, to kwargs.update(locals()) metadata = { - 'tags': ['wireless', 'configure', 'clients', 'overview', 'byDevice'], + 'tags': ['wireless', 'monitor', 'clients', 'overview', 'byDevice'], 'operation': 'getOrganizationWirelessClientsOverviewByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -2918,7 +2918,7 @@ def getOrganizationWirelessDevicesWirelessControllersByDevice(self, organization kwargs.update(locals()) metadata = { - 'tags': ['wireless', 'configure', 'devices', 'wirelessControllers', 'byDevice'], + 'tags': ['wireless', 'monitor', 'devices', 'wirelessControllers', 'byDevice'], 'operation': 'getOrganizationWirelessDevicesWirelessControllersByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') diff --git a/meraki/api/wirelessController.py b/meraki/api/wirelessController.py index d4e3c224..3e5d1bca 100644 --- a/meraki/api/wirelessController.py +++ b/meraki/api/wirelessController.py @@ -106,7 +106,7 @@ def getOrganizationWirelessControllerConnections(self, organizationId: str, tota kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'connections'], + 'tags': ['wirelessController', 'monitor', 'connections'], 'operation': 'getOrganizationWirelessControllerConnections' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -145,7 +145,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL2ByDevice(self, organizat kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l2', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l2', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL2ByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -185,7 +185,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByD kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l2', 'statuses', 'changeHistory', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l2', 'statuses', 'changeHistory', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -224,7 +224,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByInterval(s kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l2', 'usage', 'history', 'byInterval'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l2', 'usage', 'history', 'byInterval'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByInterval' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -263,7 +263,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL3ByDevice(self, organizat kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l3', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l3', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL3ByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -303,7 +303,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByD kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l3', 'statuses', 'changeHistory', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l3', 'statuses', 'changeHistory', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -342,7 +342,7 @@ def getOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByInterval(s kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'l3', 'usage', 'history', 'byInterval'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'l3', 'usage', 'history', 'byInterval'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByInterval' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -382,7 +382,7 @@ def getOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDevice(se kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'packets', 'overview', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'packets', 'overview', 'byDevice'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -422,7 +422,7 @@ def getOrganizationWirelessControllerDevicesInterfacesUsageHistoryByInterval(sel kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'interfaces', 'usage', 'history', 'byInterval'], + 'tags': ['wirelessController', 'monitor', 'devices', 'interfaces', 'usage', 'history', 'byInterval'], 'operation': 'getOrganizationWirelessControllerDevicesInterfacesUsageHistoryByInterval' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -461,7 +461,7 @@ def getOrganizationWirelessControllerDevicesRedundancyFailoverHistory(self, orga kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'redundancy', 'failover', 'history'], + 'tags': ['wirelessController', 'monitor', 'devices', 'redundancy', 'failover', 'history'], 'operation': 'getOrganizationWirelessControllerDevicesRedundancyFailoverHistory' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -497,7 +497,7 @@ def getOrganizationWirelessControllerDevicesRedundancyStatuses(self, organizatio kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'devices', 'redundancy', 'statuses'], + 'tags': ['wirelessController', 'monitor', 'devices', 'redundancy', 'statuses'], 'operation': 'getOrganizationWirelessControllerDevicesRedundancyStatuses' } organizationId = urllib.parse.quote(str(organizationId), safe='') @@ -573,7 +573,7 @@ def getOrganizationWirelessControllerOverviewByDevice(self, organizationId: str, kwargs.update(locals()) metadata = { - 'tags': ['wirelessController', 'configure', 'overview', 'byDevice'], + 'tags': ['wirelessController', 'monitor', 'overview', 'byDevice'], 'operation': 'getOrganizationWirelessControllerOverviewByDevice' } organizationId = urllib.parse.quote(str(organizationId), safe='')