From 7aab4ee854d6a7101a0710adc310626514e7fa3b Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 10 Sep 2024 16:46:41 +0000 Subject: [PATCH] Automatically regenerated library to version 1.50.0. --- meraki/__init__.py | 2 +- meraki/aio/api/camera.py | 6 +- meraki/aio/api/cellularGateway.py | 294 ++++++++++++++++++++++++++++ meraki/aio/api/networks.py | 5 +- meraki/aio/api/organizations.py | 21 +- meraki/api/batch/cellularGateway.py | 183 +++++++++++++++++ meraki/api/camera.py | 6 +- meraki/api/cellularGateway.py | 294 ++++++++++++++++++++++++++++ meraki/api/networks.py | 5 +- meraki/api/organizations.py | 21 +- 10 files changed, 820 insertions(+), 17 deletions(-) diff --git a/meraki/__init__.py b/meraki/__init__.py index d3f90f2..410824e 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -43,7 +43,7 @@ ) from meraki.rest_session import * -__version__ = '1.49.0' +__version__ = '1.50.0' class DashboardAPI(object): diff --git a/meraki/aio/api/camera.py b/meraki/aio/api/camera.py index f7dd8a2..f673861 100644 --- a/meraki/aio/api/camera.py +++ b/meraki/aio/api/camera.py @@ -484,6 +484,7 @@ def createNetworkCameraQualityRetentionProfile(self, networkId: str, name: str, - audioRecordingEnabled (boolean): Whether or not to record audio. Can be either true or false. Defaults to false. - cloudArchiveEnabled (boolean): Create redundant video backup using Cloud Archive. Can be either true or false. Defaults to false. - 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. - videoSettings (object): Video quality and resolution settings for all the camera models. @@ -498,7 +499,7 @@ def createNetworkCameraQualityRetentionProfile(self, networkId: str, name: str, networkId = urllib.parse.quote(str(networkId), safe='') resource = f'/networks/{networkId}/camera/qualityRetentionProfiles' - body_params = ['name', 'motionBasedRetentionEnabled', 'restrictedBandwidthModeEnabled', 'audioRecordingEnabled', 'cloudArchiveEnabled', 'motionDetectorVersion', 'scheduleId', 'maxRetentionDays', 'videoSettings', ] + body_params = ['name', 'motionBasedRetentionEnabled', 'restrictedBandwidthModeEnabled', 'audioRecordingEnabled', 'cloudArchiveEnabled', 'motionDetectorVersion', 'smartRetention', 'scheduleId', 'maxRetentionDays', 'videoSettings', ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} return self._session.post(metadata, resource, payload) @@ -539,6 +540,7 @@ def updateNetworkCameraQualityRetentionProfile(self, networkId: str, qualityRete - audioRecordingEnabled (boolean): Whether or not to record audio. Can be either true or false. Defaults to false. - cloudArchiveEnabled (boolean): Create redundant video backup using Cloud Archive. Can be either true or false. Defaults to false. - 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. - videoSettings (object): Video quality and resolution settings for all the camera models. @@ -554,7 +556,7 @@ def updateNetworkCameraQualityRetentionProfile(self, networkId: str, qualityRete qualityRetentionProfileId = urllib.parse.quote(str(qualityRetentionProfileId), safe='') resource = f'/networks/{networkId}/camera/qualityRetentionProfiles/{qualityRetentionProfileId}' - body_params = ['name', 'motionBasedRetentionEnabled', 'restrictedBandwidthModeEnabled', 'audioRecordingEnabled', 'cloudArchiveEnabled', 'motionDetectorVersion', 'scheduleId', 'maxRetentionDays', 'videoSettings', ] + body_params = ['name', 'motionBasedRetentionEnabled', 'restrictedBandwidthModeEnabled', 'audioRecordingEnabled', 'cloudArchiveEnabled', 'motionDetectorVersion', 'smartRetention', 'scheduleId', 'maxRetentionDays', 'videoSettings', ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} return self._session.put(metadata, resource, payload) diff --git a/meraki/aio/api/cellularGateway.py b/meraki/aio/api/cellularGateway.py index 7f41b60..22188a5 100644 --- a/meraki/aio/api/cellularGateway.py +++ b/meraki/aio/api/cellularGateway.py @@ -276,6 +276,300 @@ def updateNetworkCellularGatewayUplink(self, networkId: str, **kwargs): + def getOrganizationCellularGatewayEsimsInventory(self, organizationId: str, **kwargs): + """ + **The eSIM inventory of a given organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-inventory + + - organizationId (string): Organization ID + - eids (array): Optional parameter to filter the results by EID. + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'inventory'], + 'operation': 'getOrganizationCellularGatewayEsimsInventory' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/inventory' + + query_params = ['eids', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['eids', ] + 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(metadata, resource, params) + + + + def updateOrganizationCellularGatewayEsimsInventory(self, organizationId: str, id: str, **kwargs): + """ + **Toggle the status of an eSIM** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-inventory + + - organizationId (string): Organization ID + - id (string): ID + - status (string): Status the eSIM will be updated to + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'inventory'], + 'operation': 'updateOrganizationCellularGatewayEsimsInventory' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + id = urllib.parse.quote(str(id), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/inventory/{id}' + + body_params = ['status', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + return self._session.put(metadata, resource, payload) + + + + def getOrganizationCellularGatewayEsimsServiceProviders(self, organizationId: str): + """ + **Service providers customers can add accounts for.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-service-providers + + - organizationId (string): Organization ID + """ + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders'], + 'operation': 'getOrganizationCellularGatewayEsimsServiceProviders' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders' + + return self._session.get(metadata, resource) + + + + def getOrganizationCellularGatewayEsimsServiceProvidersAccounts(self, organizationId: str, **kwargs): + """ + **Inventory of service provider accounts tied to the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-service-providers-accounts + + - organizationId (string): Organization ID + - accountIds (array): Optional parameter to filter the results by service provider account IDs. + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'getOrganizationCellularGatewayEsimsServiceProvidersAccounts' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts' + + query_params = ['accountIds', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['accountIds', ] + 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(metadata, resource, params) + + + + def createOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str, apiKey: str, serviceProvider: dict, title: str, username: str): + """ + **Add a service provider account.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Service provider account ID + - apiKey (string): Service provider account API key + - serviceProvider (object): Service Provider information + - title (string): Service provider account name + - username (string): Service provider account username + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'createOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts' + + body_params = ['accountId', 'apiKey', 'serviceProvider', 'title', 'username', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + return self._session.post(metadata, resource, payload) + + + + def getOrganizationCellularGatewayEsimsServiceProvidersAccountsCommunicationPlans(self, organizationId: str, accountIds: list): + """ + **The communication plans available for a given provider.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-service-providers-accounts-communication-plans + + - organizationId (string): Organization ID + - accountIds (array): Account IDs that communication plans will be fetched for + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts', 'communicationPlans'], + 'operation': 'getOrganizationCellularGatewayEsimsServiceProvidersAccountsCommunicationPlans' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/communicationPlans' + + query_params = ['accountIds', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['accountIds', ] + 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(metadata, resource, params) + + + + def getOrganizationCellularGatewayEsimsServiceProvidersAccountsRatePlans(self, organizationId: str, accountIds: list): + """ + **The rate plans available for a given provider.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-service-providers-accounts-rate-plans + + - organizationId (string): Organization ID + - accountIds (array): Account IDs that rate plans will be fetched for + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts', 'ratePlans'], + 'operation': 'getOrganizationCellularGatewayEsimsServiceProvidersAccountsRatePlans' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/ratePlans' + + query_params = ['accountIds', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['accountIds', ] + 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(metadata, resource, params) + + + + def updateOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str, **kwargs): + """ + **Edit service provider account info stored in Meraki's database.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Account ID + - title (string): Service provider account name used on the Meraki UI + - apiKey (string): Service provider account API key + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'updateOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + accountId = urllib.parse.quote(str(accountId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/{accountId}' + + body_params = ['title', 'apiKey', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + return self._session.put(metadata, resource, payload) + + + + def deleteOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str): + """ + **Remove a service provider account's integration with the Dashboard.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Account ID + """ + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'deleteOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + accountId = urllib.parse.quote(str(accountId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/{accountId}' + + return self._session.delete(metadata, resource) + + + + def createOrganizationCellularGatewayEsimsSwap(self, organizationId: str, swaps: list): + """ + **Swap which profile an eSIM uses.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-cellular-gateway-esims-swap + + - organizationId (string): Organization ID + - swaps (array): Each object represents a swap for one eSIM + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'swap'], + 'operation': 'createOrganizationCellularGatewayEsimsSwap' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/swap' + + body_params = ['swaps', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + return self._session.post(metadata, resource, payload) + + + + def updateOrganizationCellularGatewayEsimsSwap(self, id: str, organizationId: str): + """ + **Get the status of a profile swap.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-swap + + - id (string): eSIM EID + - organizationId (string): Organization ID + """ + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'swap'], + 'operation': 'updateOrganizationCellularGatewayEsimsSwap' + } + id = urllib.parse.quote(str(id), safe='') + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/swap/{id}' + + return self._session.put(metadata, resource) + + + def getOrganizationCellularGatewayUplinkStatuses(self, organizationId: str, total_pages=1, direction='next', **kwargs): """ **List the uplink status of every Meraki MG cellular gateway in the organization** diff --git a/meraki/aio/api/networks.py b/meraki/aio/api/networks.py index 58f81db..ff33c06 100644 --- a/meraki/aio/api/networks.py +++ b/meraki/aio/api/networks.py @@ -744,6 +744,7 @@ def getNetworkEvents(self, networkId: str, total_pages=1, direction='prev', even - smDeviceName (string): The name of the Systems Manager device which the list of events will be filtered with - eventDetails (string): The details of the event(Catalyst device only) which the list of events will be filtered with - eventSeverity (string): The severity of the event(Catalyst device only) which the list of events will be filtered with + - isCatalyst (boolean): Boolean indicating that whether it is a Catalyst device. For Catalyst device, eventDetails and eventSeverity can be used to filter events. - 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. @@ -762,7 +763,7 @@ def getNetworkEvents(self, networkId: str, total_pages=1, direction='prev', even networkId = urllib.parse.quote(str(networkId), safe='') resource = f'/networks/{networkId}/events' - query_params = ['productType', 'includedEventTypes', 'excludedEventTypes', 'deviceMac', 'deviceSerial', 'deviceName', 'clientIp', 'clientMac', 'clientName', 'smDeviceMac', 'smDeviceName', 'eventDetails', 'eventSeverity', 'perPage', 'startingAfter', 'endingBefore', ] + query_params = ['productType', 'includedEventTypes', 'excludedEventTypes', 'deviceMac', 'deviceSerial', 'deviceName', 'clientIp', 'clientMac', 'clientName', 'smDeviceMac', 'smDeviceName', 'eventDetails', 'eventSeverity', 'isCatalyst', 'perPage', 'startingAfter', 'endingBefore', ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = ['includedEventTypes', 'excludedEventTypes', ] @@ -1440,7 +1441,7 @@ def getNetworkHealthAlerts(self, networkId: str): def getNetworkMerakiAuthUsers(self, networkId: str): """ - **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 MX network)** + **List the authorized users configured under Meraki Authentication for a network (splash guest or RADIUS users for a wireless network, or client VPN users for a MX network)** https://developer.cisco.com/meraki/api-v1/#!get-network-meraki-auth-users - networkId (string): Network ID diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 7b92610..38ab2ed 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -687,14 +687,17 @@ def updateOrganizationAdaptivePolicySettings(self, organizationId: str, **kwargs - def getOrganizationAdmins(self, organizationId: str): + def getOrganizationAdmins(self, organizationId: str, **kwargs): """ **List the dashboard administrators in this organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-admins - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter the result set by the included set of network IDs """ + kwargs.update(locals()) + metadata = { 'tags': ['organizations', 'configure', 'admins'], 'operation': 'getOrganizationAdmins' @@ -702,7 +705,16 @@ def getOrganizationAdmins(self, organizationId: str): organizationId = urllib.parse.quote(str(organizationId), safe='') resource = f'/organizations/{organizationId}/admins' - return self._session.get(metadata, resource) + query_params = ['networkIds', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['networkIds', ] + 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(metadata, resource, params) @@ -1900,6 +1912,7 @@ def getOrganizationDevicesAvailabilities(self, organizationId: str, total_pages= - serials (array): Optional parameter to filter device availabilities by device serial numbers. This filter uses multiple exact matches. - tags (array): An optional parameter to filter devices by tags. The filtering is case-sensitive. If tags are included, 'tagsFilterType' should also be included (see below). This filter uses multiple exact matches. - tagsFilterType (string): An optional parameter of value 'withAnyTags' or 'withAllTags' to indicate whether to return devices which contain ANY or ALL of the included tags. If no type is included, 'withAnyTags' will be selected. + - statuses (array): Optional parameter to filter device availabilities by device status. This filter uses multiple exact matches. """ kwargs.update(locals()) @@ -1915,10 +1928,10 @@ def getOrganizationDevicesAvailabilities(self, organizationId: str, total_pages= organizationId = urllib.parse.quote(str(organizationId), safe='') resource = f'/organizations/{organizationId}/devices/availabilities' - query_params = ['perPage', 'startingAfter', 'endingBefore', 'networkIds', 'productTypes', 'serials', 'tags', 'tagsFilterType', ] + query_params = ['perPage', 'startingAfter', 'endingBefore', 'networkIds', 'productTypes', 'serials', 'tags', 'tagsFilterType', 'statuses', ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - array_params = ['networkIds', 'productTypes', 'serials', 'tags', ] + array_params = ['networkIds', 'productTypes', 'serials', 'tags', 'statuses', ] for k, v in kwargs.items(): if k.strip() in array_params: params[f'{k.strip()}[]'] = kwargs[f'{k}'] diff --git a/meraki/api/batch/cellularGateway.py b/meraki/api/batch/cellularGateway.py index 767e269..6e785dd 100644 --- a/meraki/api/batch/cellularGateway.py +++ b/meraki/api/batch/cellularGateway.py @@ -195,3 +195,186 @@ def updateNetworkCellularGatewayUplink(self, networkId: str, **kwargs): + + + def updateOrganizationCellularGatewayEsimsInventory(self, organizationId: str, id: str, **kwargs): + """ + **Toggle the status of an eSIM** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-inventory + + - organizationId (string): Organization ID + - id (string): ID + - status (string): Status the eSIM will be updated to + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'inventory'], + 'operation': 'updateOrganizationCellularGatewayEsimsInventory' + } + resource = f'/organizations/{organizationId}/cellularGateway/esims/inventory/{id}' + + body_params = ['status', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "update", + "body": payload + } + return action + + + + + + + def createOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str, apiKey: str, serviceProvider: dict, title: str, username: str): + """ + **Add a service provider account.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Service provider account ID + - apiKey (string): Service provider account API key + - serviceProvider (object): Service Provider information + - title (string): Service provider account name + - username (string): Service provider account username + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'createOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts' + + body_params = ['accountId', 'apiKey', 'serviceProvider', 'title', 'username', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "create", + "body": payload + } + return action + + + + + + + def updateOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str, **kwargs): + """ + **Edit service provider account info stored in Meraki's database.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Account ID + - title (string): Service provider account name used on the Meraki UI + - apiKey (string): Service provider account API key + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'updateOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/{accountId}' + + body_params = ['title', 'apiKey', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "update", + "body": payload + } + return action + + + + + + + def deleteOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str): + """ + **Remove a service provider account's integration with the Dashboard.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Account ID + """ + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'deleteOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/{accountId}' + + action = { + "resource": resource, + "operation": "destroy", + } + return action + + + + + + + def createOrganizationCellularGatewayEsimsSwap(self, organizationId: str, swaps: list): + """ + **Swap which profile an eSIM uses.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-cellular-gateway-esims-swap + + - organizationId (string): Organization ID + - swaps (array): Each object represents a swap for one eSIM + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'swap'], + 'operation': 'createOrganizationCellularGatewayEsimsSwap' + } + resource = f'/organizations/{organizationId}/cellularGateway/esims/swap' + + body_params = ['swaps', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "swap", + "body": payload + } + return action + + + + + + + def updateOrganizationCellularGatewayEsimsSwap(self, id: str, organizationId: str): + """ + **Get the status of a profile swap.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-swap + + - id (string): eSIM EID + - organizationId (string): Organization ID + """ + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'swap'], + 'operation': 'updateOrganizationCellularGatewayEsimsSwap' + } + resource = f'/organizations/{organizationId}/cellularGateway/esims/swap/{id}' + + action = { + "resource": resource, + "operation": "status", + } + return action + + + + diff --git a/meraki/api/camera.py b/meraki/api/camera.py index de7cd41..35311f7 100644 --- a/meraki/api/camera.py +++ b/meraki/api/camera.py @@ -484,6 +484,7 @@ def createNetworkCameraQualityRetentionProfile(self, networkId: str, name: str, - audioRecordingEnabled (boolean): Whether or not to record audio. Can be either true or false. Defaults to false. - cloudArchiveEnabled (boolean): Create redundant video backup using Cloud Archive. Can be either true or false. Defaults to false. - 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. - videoSettings (object): Video quality and resolution settings for all the camera models. @@ -498,7 +499,7 @@ def createNetworkCameraQualityRetentionProfile(self, networkId: str, name: str, networkId = urllib.parse.quote(str(networkId), safe='') resource = f'/networks/{networkId}/camera/qualityRetentionProfiles' - body_params = ['name', 'motionBasedRetentionEnabled', 'restrictedBandwidthModeEnabled', 'audioRecordingEnabled', 'cloudArchiveEnabled', 'motionDetectorVersion', 'scheduleId', 'maxRetentionDays', 'videoSettings', ] + body_params = ['name', 'motionBasedRetentionEnabled', 'restrictedBandwidthModeEnabled', 'audioRecordingEnabled', 'cloudArchiveEnabled', 'motionDetectorVersion', 'smartRetention', 'scheduleId', 'maxRetentionDays', 'videoSettings', ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} return self._session.post(metadata, resource, payload) @@ -539,6 +540,7 @@ def updateNetworkCameraQualityRetentionProfile(self, networkId: str, qualityRete - audioRecordingEnabled (boolean): Whether or not to record audio. Can be either true or false. Defaults to false. - cloudArchiveEnabled (boolean): Create redundant video backup using Cloud Archive. Can be either true or false. Defaults to false. - 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. - videoSettings (object): Video quality and resolution settings for all the camera models. @@ -554,7 +556,7 @@ def updateNetworkCameraQualityRetentionProfile(self, networkId: str, qualityRete qualityRetentionProfileId = urllib.parse.quote(str(qualityRetentionProfileId), safe='') resource = f'/networks/{networkId}/camera/qualityRetentionProfiles/{qualityRetentionProfileId}' - body_params = ['name', 'motionBasedRetentionEnabled', 'restrictedBandwidthModeEnabled', 'audioRecordingEnabled', 'cloudArchiveEnabled', 'motionDetectorVersion', 'scheduleId', 'maxRetentionDays', 'videoSettings', ] + body_params = ['name', 'motionBasedRetentionEnabled', 'restrictedBandwidthModeEnabled', 'audioRecordingEnabled', 'cloudArchiveEnabled', 'motionDetectorVersion', 'smartRetention', 'scheduleId', 'maxRetentionDays', 'videoSettings', ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} return self._session.put(metadata, resource, payload) diff --git a/meraki/api/cellularGateway.py b/meraki/api/cellularGateway.py index 43555fe..90e30a3 100644 --- a/meraki/api/cellularGateway.py +++ b/meraki/api/cellularGateway.py @@ -276,6 +276,300 @@ def updateNetworkCellularGatewayUplink(self, networkId: str, **kwargs): + def getOrganizationCellularGatewayEsimsInventory(self, organizationId: str, **kwargs): + """ + **The eSIM inventory of a given organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-inventory + + - organizationId (string): Organization ID + - eids (array): Optional parameter to filter the results by EID. + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'inventory'], + 'operation': 'getOrganizationCellularGatewayEsimsInventory' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/inventory' + + query_params = ['eids', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['eids', ] + 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(metadata, resource, params) + + + + def updateOrganizationCellularGatewayEsimsInventory(self, organizationId: str, id: str, **kwargs): + """ + **Toggle the status of an eSIM** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-inventory + + - organizationId (string): Organization ID + - id (string): ID + - status (string): Status the eSIM will be updated to + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'inventory'], + 'operation': 'updateOrganizationCellularGatewayEsimsInventory' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + id = urllib.parse.quote(str(id), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/inventory/{id}' + + body_params = ['status', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + return self._session.put(metadata, resource, payload) + + + + def getOrganizationCellularGatewayEsimsServiceProviders(self, organizationId: str): + """ + **Service providers customers can add accounts for.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-service-providers + + - organizationId (string): Organization ID + """ + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders'], + 'operation': 'getOrganizationCellularGatewayEsimsServiceProviders' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders' + + return self._session.get(metadata, resource) + + + + def getOrganizationCellularGatewayEsimsServiceProvidersAccounts(self, organizationId: str, **kwargs): + """ + **Inventory of service provider accounts tied to the organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-service-providers-accounts + + - organizationId (string): Organization ID + - accountIds (array): Optional parameter to filter the results by service provider account IDs. + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'getOrganizationCellularGatewayEsimsServiceProvidersAccounts' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts' + + query_params = ['accountIds', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['accountIds', ] + 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(metadata, resource, params) + + + + def createOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str, apiKey: str, serviceProvider: dict, title: str, username: str): + """ + **Add a service provider account.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Service provider account ID + - apiKey (string): Service provider account API key + - serviceProvider (object): Service Provider information + - title (string): Service provider account name + - username (string): Service provider account username + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'createOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts' + + body_params = ['accountId', 'apiKey', 'serviceProvider', 'title', 'username', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + return self._session.post(metadata, resource, payload) + + + + def getOrganizationCellularGatewayEsimsServiceProvidersAccountsCommunicationPlans(self, organizationId: str, accountIds: list): + """ + **The communication plans available for a given provider.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-service-providers-accounts-communication-plans + + - organizationId (string): Organization ID + - accountIds (array): Account IDs that communication plans will be fetched for + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts', 'communicationPlans'], + 'operation': 'getOrganizationCellularGatewayEsimsServiceProvidersAccountsCommunicationPlans' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/communicationPlans' + + query_params = ['accountIds', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['accountIds', ] + 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(metadata, resource, params) + + + + def getOrganizationCellularGatewayEsimsServiceProvidersAccountsRatePlans(self, organizationId: str, accountIds: list): + """ + **The rate plans available for a given provider.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-cellular-gateway-esims-service-providers-accounts-rate-plans + + - organizationId (string): Organization ID + - accountIds (array): Account IDs that rate plans will be fetched for + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts', 'ratePlans'], + 'operation': 'getOrganizationCellularGatewayEsimsServiceProvidersAccountsRatePlans' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/ratePlans' + + query_params = ['accountIds', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['accountIds', ] + 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(metadata, resource, params) + + + + def updateOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str, **kwargs): + """ + **Edit service provider account info stored in Meraki's database.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Account ID + - title (string): Service provider account name used on the Meraki UI + - apiKey (string): Service provider account API key + """ + + kwargs.update(locals()) + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'updateOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + accountId = urllib.parse.quote(str(accountId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/{accountId}' + + body_params = ['title', 'apiKey', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + return self._session.put(metadata, resource, payload) + + + + def deleteOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organizationId: str, accountId: str): + """ + **Remove a service provider account's integration with the Dashboard.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-cellular-gateway-esims-service-providers-account + + - organizationId (string): Organization ID + - accountId (string): Account ID + """ + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'serviceProviders', 'accounts'], + 'operation': 'deleteOrganizationCellularGatewayEsimsServiceProvidersAccount' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + accountId = urllib.parse.quote(str(accountId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/{accountId}' + + return self._session.delete(metadata, resource) + + + + def createOrganizationCellularGatewayEsimsSwap(self, organizationId: str, swaps: list): + """ + **Swap which profile an eSIM uses.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-cellular-gateway-esims-swap + + - organizationId (string): Organization ID + - swaps (array): Each object represents a swap for one eSIM + """ + + kwargs = locals() + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'swap'], + 'operation': 'createOrganizationCellularGatewayEsimsSwap' + } + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/swap' + + body_params = ['swaps', ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + return self._session.post(metadata, resource, payload) + + + + def updateOrganizationCellularGatewayEsimsSwap(self, id: str, organizationId: str): + """ + **Get the status of a profile swap.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-cellular-gateway-esims-swap + + - id (string): eSIM EID + - organizationId (string): Organization ID + """ + + metadata = { + 'tags': ['cellularGateway', 'configure', 'esims', 'swap'], + 'operation': 'updateOrganizationCellularGatewayEsimsSwap' + } + id = urllib.parse.quote(str(id), safe='') + organizationId = urllib.parse.quote(str(organizationId), safe='') + resource = f'/organizations/{organizationId}/cellularGateway/esims/swap/{id}' + + return self._session.put(metadata, resource) + + + def getOrganizationCellularGatewayUplinkStatuses(self, organizationId: str, total_pages=1, direction='next', **kwargs): """ **List the uplink status of every Meraki MG cellular gateway in the organization** diff --git a/meraki/api/networks.py b/meraki/api/networks.py index b9e0dbe..a6ac741 100644 --- a/meraki/api/networks.py +++ b/meraki/api/networks.py @@ -744,6 +744,7 @@ def getNetworkEvents(self, networkId: str, total_pages=1, direction='prev', even - smDeviceName (string): The name of the Systems Manager device which the list of events will be filtered with - eventDetails (string): The details of the event(Catalyst device only) which the list of events will be filtered with - eventSeverity (string): The severity of the event(Catalyst device only) which the list of events will be filtered with + - isCatalyst (boolean): Boolean indicating that whether it is a Catalyst device. For Catalyst device, eventDetails and eventSeverity can be used to filter events. - 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. @@ -762,7 +763,7 @@ def getNetworkEvents(self, networkId: str, total_pages=1, direction='prev', even networkId = urllib.parse.quote(str(networkId), safe='') resource = f'/networks/{networkId}/events' - query_params = ['productType', 'includedEventTypes', 'excludedEventTypes', 'deviceMac', 'deviceSerial', 'deviceName', 'clientIp', 'clientMac', 'clientName', 'smDeviceMac', 'smDeviceName', 'eventDetails', 'eventSeverity', 'perPage', 'startingAfter', 'endingBefore', ] + query_params = ['productType', 'includedEventTypes', 'excludedEventTypes', 'deviceMac', 'deviceSerial', 'deviceName', 'clientIp', 'clientMac', 'clientName', 'smDeviceMac', 'smDeviceName', 'eventDetails', 'eventSeverity', 'isCatalyst', 'perPage', 'startingAfter', 'endingBefore', ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} array_params = ['includedEventTypes', 'excludedEventTypes', ] @@ -1440,7 +1441,7 @@ def getNetworkHealthAlerts(self, networkId: str): def getNetworkMerakiAuthUsers(self, networkId: str): """ - **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 MX network)** + **List the authorized users configured under Meraki Authentication for a network (splash guest or RADIUS users for a wireless network, or client VPN users for a MX network)** https://developer.cisco.com/meraki/api-v1/#!get-network-meraki-auth-users - networkId (string): Network ID diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index dd11bde..c7dcf36 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -687,14 +687,17 @@ def updateOrganizationAdaptivePolicySettings(self, organizationId: str, **kwargs - def getOrganizationAdmins(self, organizationId: str): + def getOrganizationAdmins(self, organizationId: str, **kwargs): """ **List the dashboard administrators in this organization** https://developer.cisco.com/meraki/api-v1/#!get-organization-admins - organizationId (string): Organization ID + - networkIds (array): Optional parameter to filter the result set by the included set of network IDs """ + kwargs.update(locals()) + metadata = { 'tags': ['organizations', 'configure', 'admins'], 'operation': 'getOrganizationAdmins' @@ -702,7 +705,16 @@ def getOrganizationAdmins(self, organizationId: str): organizationId = urllib.parse.quote(str(organizationId), safe='') resource = f'/organizations/{organizationId}/admins' - return self._session.get(metadata, resource) + query_params = ['networkIds', ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + array_params = ['networkIds', ] + 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(metadata, resource, params) @@ -1900,6 +1912,7 @@ def getOrganizationDevicesAvailabilities(self, organizationId: str, total_pages= - serials (array): Optional parameter to filter device availabilities by device serial numbers. This filter uses multiple exact matches. - tags (array): An optional parameter to filter devices by tags. The filtering is case-sensitive. If tags are included, 'tagsFilterType' should also be included (see below). This filter uses multiple exact matches. - tagsFilterType (string): An optional parameter of value 'withAnyTags' or 'withAllTags' to indicate whether to return devices which contain ANY or ALL of the included tags. If no type is included, 'withAnyTags' will be selected. + - statuses (array): Optional parameter to filter device availabilities by device status. This filter uses multiple exact matches. """ kwargs.update(locals()) @@ -1915,10 +1928,10 @@ def getOrganizationDevicesAvailabilities(self, organizationId: str, total_pages= organizationId = urllib.parse.quote(str(organizationId), safe='') resource = f'/organizations/{organizationId}/devices/availabilities' - query_params = ['perPage', 'startingAfter', 'endingBefore', 'networkIds', 'productTypes', 'serials', 'tags', 'tagsFilterType', ] + query_params = ['perPage', 'startingAfter', 'endingBefore', 'networkIds', 'productTypes', 'serials', 'tags', 'tagsFilterType', 'statuses', ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} - array_params = ['networkIds', 'productTypes', 'serials', 'tags', ] + array_params = ['networkIds', 'productTypes', 'serials', 'tags', 'statuses', ] for k, v in kwargs.items(): if k.strip() in array_params: params[f'{k.strip()}[]'] = kwargs[f'{k}']