diff --git a/docs/generation-report.md b/docs/generation-report.md index 1dcef4f..4c99cba 100644 --- a/docs/generation-report.md +++ b/docs/generation-report.md @@ -1,5 +1,11 @@ # Generation Report +## 2026-06-04 | Library v4.2.0b0 | API 1.71.0-beta.0 + + +No Python keyword parameter conflicts detected. + + ## 2026-05-27 | Library v4.1.0b3 | API 1.70.0-beta.3 diff --git a/meraki/__init__.py b/meraki/__init__.py index d9d54a6..5d3ed06 100644 --- a/meraki/__init__.py +++ b/meraki/__init__.py @@ -59,7 +59,7 @@ from meraki._version import __version__ # noqa: F401 from datetime import datetime -__api_version__ = "1.70.0-beta.3" +__api_version__ = "1.71.0-beta.0" __all__ = [ "APIError", diff --git a/meraki/_version.py b/meraki/_version.py index 89f03b3..dcb01d6 100644 --- a/meraki/_version.py +++ b/meraki/_version.py @@ -1 +1 @@ -__version__ = "4.1.0b3" +__version__ = "4.2.0b0" diff --git a/meraki/aio/api/assistant.py b/meraki/aio/api/assistant.py new file mode 100644 index 0000000..a8fc082 --- /dev/null +++ b/meraki/aio/api/assistant.py @@ -0,0 +1,443 @@ +import urllib + + +class AsyncAssistant: + def __init__(self, session): + super().__init__() + self._session = session + + + def getOrganizationAssistantCapabilities(self, organizationId: str): + """ + **List the AI assistant's available capabilities and agents for this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-capabilities + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["assistant", "configure", "capabilities"], + "operation": "getOrganizationAssistantCapabilities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/capabilities" + + return self._session.get(metadata, resource) + + + def createOrganizationAssistantChatCompletion(self, organizationId: str, **kwargs): + """ + **Create a chat completion with the AI assistant** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-completion + + - organizationId (string): Organization ID + - query (string): Simple text question or instruction to send to the AI assistant. Provide either 'query' for text-only requests or 'content' for multi-modal input. + - content (array): List of multi-modal content blocks. Use instead of 'query' to send text or images. Supports text and image types only; for audio and file support, use the messages endpoint. Maximum 8 parts. + - threadId (string): An existing thread ID to continue a conversation. If omitted, a new thread is created. + - networkId (string): Optional network ID to scope the query to a specific network. Defaults to the user's last visited network. + - platform (string): Platform identifier. Defaults to MERAKI when omitted. Case-insensitive. + - language (string): Optional language override. Defaults to the user's preferred language. + - country (string): Optional country override. Defaults to the user's country. + """ + + kwargs.update(locals()) + + if "platform" in kwargs: + options = ['DIGITAL_TWIN', 'DNAC', 'MERAKI', 'digital_twin', 'dnac', 'meraki'] + assert kwargs["platform"] in options, f'''"platform" cannot be "{kwargs['platform']}", & must be set to one of: {options}''' + + metadata = { + "tags": ["assistant", "configure", "chat", "completions"], + "operation": "createOrganizationAssistantChatCompletion", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/completions" + + body_params = ["query", "content", "threadId", "networkId", "platform", "language", "country", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatCompletion: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + + def getOrganizationAssistantChatThreads(self, organizationId: str, total_pages=1, direction='next', **kwargs): + """ + **List all active conversation threads for the authenticated user.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-threads + + - 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sort (string): Field to sort results by. Defaults to dateModified. + - sortOrder (string): Sort direction for results. Defaults to desc. + - from (string): Filter threads modified after this timestamp. + - to (string): Filter threads modified before this timestamp. + """ + + kwargs.update(locals()) + + if "sort" in kwargs: + options = ['dateModified', 'id', 'name'] + assert kwargs["sort"] in options, f'''"sort" cannot be "{kwargs['sort']}", & must be set to one of: {options}''' + if "sortOrder" in kwargs: + options = ['asc', 'desc'] + assert kwargs["sortOrder"] in options, f'''"sortOrder" cannot be "{kwargs['sortOrder']}", & must be set to one of: {options}''' + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getOrganizationAssistantChatThreads", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads" + + query_params = ["perPage", "sort", "sortOrder", "from", "to", ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssistantChatThreads: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + + def createOrganizationAssistantChatThread(self, organizationId: str, **kwargs): + """ + **Create a new conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadName (string): Display name for the new thread. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "createOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads" + + body_params = ["threadName", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + + def getOrganizationAssistantChatThread(self, organizationId: str, threadId: str): + """ + **Return a single conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + return self._session.get(metadata, resource) + + + def updateOrganizationAssistantChatThread(self, organizationId: str, threadId: str, threadName: str, **kwargs): + """ + **Update the name of a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - threadName (string): New display name for the thread. + """ + + kwargs = locals() + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "updateOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + body_params = ["threadName", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + + def deleteOrganizationAssistantChatThread(self, organizationId: str, threadId: str): + """ + **Delete a conversation thread and all its messages.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "deleteOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + return self._session.delete(metadata, resource) + + + def getOrganizationAssistantChatThreadMessages(self, organizationId: str, threadId: str, total_pages=1, direction='next', **kwargs): + """ + **List messages in a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-messages + + - organizationId (string): Organization ID + - threadId (string): Thread 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sortOrder (string): Sort direction for results by timestamp. Defaults to asc. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ['asc', 'desc'] + assert kwargs["sortOrder"] in options, f'''"sortOrder" cannot be "{kwargs['sortOrder']}", & must be set to one of: {options}''' + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getOrganizationAssistantChatThreadMessages", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages" + + query_params = ["perPage", "sortOrder", ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssistantChatThreadMessages: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + + def createOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, content: list, **kwargs): + """ + **Create a new chat message in a thread.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - content (array): List of message content parts. Supports text, image, audio, and file types. Maximum 8 parts. + - networkName (string): Name of the target network. + - networkId (string): Optional Meraki network ID for thread context. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "createOrganizationAssistantChatThreadMessage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages" + + body_params = ["content", "networkName", "networkId", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThreadMessage: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + + def getOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, messageId: str): + """ + **Return a single message in a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getOrganizationAssistantChatThreadMessage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}" + + return self._session.get(metadata, resource) + + + def getOrganizationAssistantChatThreadMessageArtifacts(self, organizationId: str, threadId: str, messageId: str): + """ + **List artifacts attached to a specific message** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-artifacts + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], + "operation": "getOrganizationAssistantChatThreadMessageArtifacts", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts" + + return self._session.get(metadata, resource) + + + def getOrganizationAssistantChatThreadMessageArtifact(self, organizationId: str, threadId: str, messageId: str, artifactId: str): + """ + **Return a single artifact with its full content.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-artifact + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + - artifactId (string): Artifact ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], + "operation": "getOrganizationAssistantChatThreadMessageArtifact", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + artifactId = urllib.parse.quote(str(artifactId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts/{artifactId}" + + return self._session.get(metadata, resource) + + + def getOrganizationAssistantChatThreadMessageFeedback(self, organizationId: str, threadId: str, messageId: str): + """ + **Return all feedback entries previously submitted for a specific message in a thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-feedback + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "feedback"], + "operation": "getOrganizationAssistantChatThreadMessageFeedback", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/feedback" + + return self._session.get(metadata, resource) + + + def createOrganizationAssistantChatThreadMessageFeedback(self, organizationId: str, threadId: str, messageId: str, vote: bool, **kwargs): + """ + **Submit or replace feedback for a specific assistant message.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message-feedback + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + - vote (boolean): True for positive, false for negative. + - reason (string): Optional free-text reason for the feedback (e.g., 'inaccurate', 'incomplete', 'helpful'). Not constrained to a fixed set of values. + - comment (string): Optional free-text comment providing additional detail. + - message (string): The assistant message text the feedback refers to. Captured for analytics; not required. + - prompt (string): The user prompt that produced the assistant message. Captured for analytics; not required. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "feedback"], + "operation": "createOrganizationAssistantChatThreadMessageFeedback", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/feedback" + + body_params = ["vote", "reason", "comment", "message", "prompt", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThreadMessageFeedback: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + + def getOrganizationAssistantQuery-limits(self, organizationId: str): + """ + **Get query limits for the AI assistant for this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-query--limits + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["assistant", "configure", "query-limits"], + "operation": "getOrganizationAssistantQuery-limits", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/query-limits" + + return self._session.get(metadata, resource) diff --git a/meraki/aio/api/devices.py b/meraki/aio/api/devices.py index 1b77816..b149f8c 100644 --- a/meraki/aio/api/devices.py +++ b/meraki/aio/api/devices.py @@ -964,6 +964,56 @@ def getDeviceLiveToolsPortsStatus(self, serial: str, jobId: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsPowerUsage(self, serial: str, **kwargs): + """ + **Enqueues a live tool job that retrieves details about a device's overall power usage** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-power-usage + + - serial (string): Serial + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["devices", "liveTools", "power", "usage"], + "operation": "createDeviceLiveToolsPowerUsage", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/power/usage" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsPowerUsage: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsPowerUsage(self, serial: str, jobId: str): + """ + **Retrieve the status and results of a previously created live tool job fetching details about a device's overall power usage.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-power-usage + + - serial (string): Serial + - jobId (string): Job ID + """ + + metadata = { + "tags": ["devices", "liveTools", "power", "usage"], + "operation": "getDeviceLiveToolsPowerUsage", + } + serial = urllib.parse.quote(str(serial), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") + resource = f"/devices/{serial}/liveTools/power/usage/{jobId}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsReboot(self, serial: str, **kwargs): """ **Enqueue a job to reboot a device** diff --git a/meraki/aio/api/organizations.py b/meraki/aio/api/organizations.py index 9be8b7a..7591f10 100644 --- a/meraki/aio/api/organizations.py +++ b/meraki/aio/api/organizations.py @@ -98,6 +98,7 @@ def updateOrganization(self, organizationId: str, **kwargs): - name (string): The name of the organization - management (object): Information about the organization's management system - api (object): API-specific settings + - privacy (object): Privacy-related settings for the organization. """ kwargs.update(locals()) @@ -113,6 +114,7 @@ def updateOrganization(self, organizationId: str, **kwargs): "name", "management", "api", + "privacy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2369,6 +2371,9 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s - organizationId (string): Organization ID - networkId (string): Network ID to query. + - serials (array): A list of serials of AP devices + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssidNumbers (array): Filter results by SSID number - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 7 days. The default is 8 hours. If interval is provided, the timespan will be autocalculated. @@ -2386,6 +2391,9 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s query_params = [ "networkId", + "serials", + "bands", + "ssidNumbers", "t0", "t1", "timespan", @@ -2393,8 +2401,18 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + array_params = [ + "serials", + "bands", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( @@ -8752,6 +8770,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): - enforceTwoFactorAuth (boolean): Boolean indicating whether users in this organization will be required to use an extra verification code when logging in to Dashboard. This code will be sent to their mobile phone via SMS, or can be generated by the authenticator application. - enforceLoginIpRanges (boolean): Boolean indicating whether organization will restrict access to Dashboard (including the API) from certain IP addresses. - loginIpRanges (array): List of acceptable IP ranges. Entries can be single IP addresses, IP address ranges, and CIDR subnets. + - enforceLockedIpSessions (boolean): Boolean indicating whether Dashboard sessions are locked to the IP address from which they were established. Only applicable to organizations that support locked-IP sessions; otherwise the parameter is ignored. - apiAuthentication (object): Details for indicating whether organization will restrict access to API (but not Dashboard) to certain IP addresses. """ @@ -8778,6 +8797,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): "enforceTwoFactorAuth", "enforceLoginIpRanges", "loginIpRanges", + "enforceLockedIpSessions", "apiAuthentication", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/aio/api/wireless.py b/meraki/aio/api/wireless.py index d33b5d8..2f79637 100644 --- a/meraki/aio/api/wireless.py +++ b/meraki/aio/api/wireless.py @@ -2686,7 +2686,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds). - radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5). - radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds. - - radiusRadsec (object): The current settings for RADIUS RADSec + - radiusRadsec (object): The current settings for RADIUS RadSec - radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server. - radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access') - radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin') @@ -5429,6 +5429,49 @@ def getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organizationId: str, **kwargs): + """ + **Returns the most impacted wireless experience networks and the top failure contributor for each network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-networks + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 days after t0. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - limit (integer): Number of most impacted networks to return. Default is 5. Maximum is 10. + """ + + kwargs.update(locals()) + + if "limit" in kwargs: + options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + assert kwargs["limit"] in options, f'''"limit" cannot be "{kwargs["limit"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "configure", "experience", "mostImpactedNetworks"], + "operation": "getOrganizationAssuranceWirelessExperienceMostImpactedNetworks", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/mostImpactedNetworks" + + query_params = [ + "t0", + "t1", + "timespan", + "limit", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceMostImpactedNetworks: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -8759,7 +8802,7 @@ def getOrganizationWirelessDevicesProvisioningRecommendationsTags(self, organiza def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): """ - **Query for details on the organization's RADSEC device Certificate Authority certificates (CAs)** + **Query for details on the organization's RadSec device Certificate Authority certificates (CAs)** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities - organizationId (string): Organization ID @@ -8800,7 +8843,7 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizati def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): """ - **Update an organization's RADSEC device Certificate Authority (CA) state** + **Update an organization's RadSec device Certificate Authority (CA) state** https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-radsec-certificates-authorities - organizationId (string): Organization ID @@ -8835,7 +8878,7 @@ def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organiz def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizationId: str): """ - **Create an organization's RADSEC device Certificate Authority (CA)** + **Create an organization's RadSec device Certificate Authority (CA)** https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-radsec-certificates-authority - organizationId (string): Organization ID @@ -8852,7 +8895,7 @@ def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizat def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organizationId: str, **kwargs): """ - **Query for certificate revocation list (CRL) for the organization's RADSEC device Certificate Authorities (CAs).** + **Query for certificate revocation list (CRL) for the organization's RadSec device Certificate Authorities (CAs).** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls - organizationId (string): Organization ID @@ -8893,7 +8936,7 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organi def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, organizationId: str, **kwargs): """ - **Query for all delta certificate revocation list (CRL) for the organization's RADSEC device Certificate Authority (CA) with the given id.** + **Query for all delta certificate revocation list (CRL) for the organization's RadSec device Certificate Authority (CA) with the given id.** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls-deltas - organizationId (string): Organization ID diff --git a/meraki/api/assistant.py b/meraki/api/assistant.py new file mode 100644 index 0000000..37e3df2 --- /dev/null +++ b/meraki/api/assistant.py @@ -0,0 +1,443 @@ +import urllib + + +class Assistant(object): + def __init__(self, session): + super(Assistant, self).__init__() + self._session = session + + + def getOrganizationAssistantCapabilities(self, organizationId: str): + """ + **List the AI assistant's available capabilities and agents for this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-capabilities + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["assistant", "configure", "capabilities"], + "operation": "getOrganizationAssistantCapabilities", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/capabilities" + + return self._session.get(metadata, resource) + + + def createOrganizationAssistantChatCompletion(self, organizationId: str, **kwargs): + """ + **Create a chat completion with the AI assistant** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-completion + + - organizationId (string): Organization ID + - query (string): Simple text question or instruction to send to the AI assistant. Provide either 'query' for text-only requests or 'content' for multi-modal input. + - content (array): List of multi-modal content blocks. Use instead of 'query' to send text or images. Supports text and image types only; for audio and file support, use the messages endpoint. Maximum 8 parts. + - threadId (string): An existing thread ID to continue a conversation. If omitted, a new thread is created. + - networkId (string): Optional network ID to scope the query to a specific network. Defaults to the user's last visited network. + - platform (string): Platform identifier. Defaults to MERAKI when omitted. Case-insensitive. + - language (string): Optional language override. Defaults to the user's preferred language. + - country (string): Optional country override. Defaults to the user's country. + """ + + kwargs.update(locals()) + + if "platform" in kwargs: + options = ['DIGITAL_TWIN', 'DNAC', 'MERAKI', 'digital_twin', 'dnac', 'meraki'] + assert kwargs["platform"] in options, f'''"platform" cannot be "{kwargs['platform']}", & must be set to one of: {options}''' + + metadata = { + "tags": ["assistant", "configure", "chat", "completions"], + "operation": "createOrganizationAssistantChatCompletion", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/completions" + + body_params = ["query", "content", "threadId", "networkId", "platform", "language", "country", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatCompletion: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + + def getOrganizationAssistantChatThreads(self, organizationId: str, total_pages=1, direction='next', **kwargs): + """ + **List all active conversation threads for the authenticated user.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-threads + + - 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sort (string): Field to sort results by. Defaults to dateModified. + - sortOrder (string): Sort direction for results. Defaults to desc. + - from (string): Filter threads modified after this timestamp. + - to (string): Filter threads modified before this timestamp. + """ + + kwargs.update(locals()) + + if "sort" in kwargs: + options = ['dateModified', 'id', 'name'] + assert kwargs["sort"] in options, f'''"sort" cannot be "{kwargs['sort']}", & must be set to one of: {options}''' + if "sortOrder" in kwargs: + options = ['asc', 'desc'] + assert kwargs["sortOrder"] in options, f'''"sortOrder" cannot be "{kwargs['sortOrder']}", & must be set to one of: {options}''' + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getOrganizationAssistantChatThreads", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads" + + query_params = ["perPage", "sort", "sortOrder", "from", "to", ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssistantChatThreads: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + + def createOrganizationAssistantChatThread(self, organizationId: str, **kwargs): + """ + **Create a new conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadName (string): Display name for the new thread. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "createOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads" + + body_params = ["threadName", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + + def getOrganizationAssistantChatThread(self, organizationId: str, threadId: str): + """ + **Return a single conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "getOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + return self._session.get(metadata, resource) + + + def updateOrganizationAssistantChatThread(self, organizationId: str, threadId: str, threadName: str, **kwargs): + """ + **Update the name of a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!update-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - threadName (string): New display name for the thread. + """ + + kwargs = locals() + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "updateOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + body_params = ["threadName", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"updateOrganizationAssistantChatThread: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.put(metadata, resource, payload) + + + def deleteOrganizationAssistantChatThread(self, organizationId: str, threadId: str): + """ + **Delete a conversation thread and all its messages.** + https://developer.cisco.com/meraki/api-v1/#!delete-organization-assistant-chat-thread + + - organizationId (string): Organization ID + - threadId (string): Thread ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads"], + "operation": "deleteOrganizationAssistantChatThread", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}" + + return self._session.delete(metadata, resource) + + + def getOrganizationAssistantChatThreadMessages(self, organizationId: str, threadId: str, total_pages=1, direction='next', **kwargs): + """ + **List messages in a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-messages + + - organizationId (string): Organization ID + - threadId (string): Thread 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 + - perPage (integer): Number of entries per page. Defaults to 100. Maximum 1000. + - sortOrder (string): Sort direction for results by timestamp. Defaults to asc. + """ + + kwargs.update(locals()) + + if "sortOrder" in kwargs: + options = ['asc', 'desc'] + assert kwargs["sortOrder"] in options, f'''"sortOrder" cannot be "{kwargs['sortOrder']}", & must be set to one of: {options}''' + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getOrganizationAssistantChatThreadMessages", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages" + + query_params = ["perPage", "sortOrder", ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssistantChatThreadMessages: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get_pages(metadata, resource, params, total_pages, direction) + + + def createOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, content: list, **kwargs): + """ + **Create a new chat message in a thread.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - content (array): List of message content parts. Supports text, image, audio, and file types. Maximum 8 parts. + - networkName (string): Name of the target network. + - networkId (string): Optional Meraki network ID for thread context. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "createOrganizationAssistantChatThreadMessage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages" + + body_params = ["content", "networkName", "networkId", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThreadMessage: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + + def getOrganizationAssistantChatThreadMessage(self, organizationId: str, threadId: str, messageId: str): + """ + **Return a single message in a conversation thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages"], + "operation": "getOrganizationAssistantChatThreadMessage", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}" + + return self._session.get(metadata, resource) + + + def getOrganizationAssistantChatThreadMessageArtifacts(self, organizationId: str, threadId: str, messageId: str): + """ + **List artifacts attached to a specific message** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-artifacts + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], + "operation": "getOrganizationAssistantChatThreadMessageArtifacts", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts" + + return self._session.get(metadata, resource) + + + def getOrganizationAssistantChatThreadMessageArtifact(self, organizationId: str, threadId: str, messageId: str, artifactId: str): + """ + **Return a single artifact with its full content.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-artifact + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + - artifactId (string): Artifact ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "artifacts"], + "operation": "getOrganizationAssistantChatThreadMessageArtifact", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + artifactId = urllib.parse.quote(str(artifactId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/artifacts/{artifactId}" + + return self._session.get(metadata, resource) + + + def getOrganizationAssistantChatThreadMessageFeedback(self, organizationId: str, threadId: str, messageId: str): + """ + **Return all feedback entries previously submitted for a specific message in a thread.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-chat-thread-message-feedback + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + """ + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "feedback"], + "operation": "getOrganizationAssistantChatThreadMessageFeedback", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/feedback" + + return self._session.get(metadata, resource) + + + def createOrganizationAssistantChatThreadMessageFeedback(self, organizationId: str, threadId: str, messageId: str, vote: bool, **kwargs): + """ + **Submit or replace feedback for a specific assistant message.** + https://developer.cisco.com/meraki/api-v1/#!create-organization-assistant-chat-thread-message-feedback + + - organizationId (string): Organization ID + - threadId (string): Thread ID + - messageId (string): Message ID + - vote (boolean): True for positive, false for negative. + - reason (string): Optional free-text reason for the feedback (e.g., 'inaccurate', 'incomplete', 'helpful'). Not constrained to a fixed set of values. + - comment (string): Optional free-text comment providing additional detail. + - message (string): The assistant message text the feedback refers to. Captured for analytics; not required. + - prompt (string): The user prompt that produced the assistant message. Captured for analytics; not required. + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["assistant", "configure", "chat", "threads", "messages", "feedback"], + "operation": "createOrganizationAssistantChatThreadMessageFeedback", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + threadId = urllib.parse.quote(str(threadId), safe="") + messageId = urllib.parse.quote(str(messageId), safe="") + resource = f"/organizations/{organizationId}/assistant/chat/threads/{threadId}/messages/{messageId}/feedback" + + body_params = ["vote", "reason", "comment", "message", "prompt", ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"createOrganizationAssistantChatThreadMessageFeedback: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.post(metadata, resource, payload) + + + def getOrganizationAssistantQuery-limits(self, organizationId: str): + """ + **Get query limits for the AI assistant for this organization.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assistant-query--limits + + - organizationId (string): Organization ID + """ + + metadata = { + "tags": ["assistant", "configure", "query-limits"], + "operation": "getOrganizationAssistantQuery-limits", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assistant/query-limits" + + return self._session.get(metadata, resource) diff --git a/meraki/api/batch/appliance.py b/meraki/api/batch/appliance.py index eac132d..1f10f7e 100644 --- a/meraki/api/batch/appliance.py +++ b/meraki/api/batch/appliance.py @@ -31,7 +31,7 @@ def createDeviceApplianceInterfacesPortsUpdate(self, serial: str, **kwargs): f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' ) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/appliance/interfaces/ports/update" body_params = [ @@ -77,8 +77,8 @@ def updateDeviceApplianceInterfacesPort(self, serial: str, number: str, **kwargs f'''"duplex" cannot be "{kwargs["duplex"]}", & must be set to one of: {options}''' ) - serial = urllib.parse.quote(serial, safe="") - number = urllib.parse.quote(number, safe="") + serial = urllib.parse.quote(str(serial), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/devices/{serial}/appliance/interfaces/ports/{number}" body_params = [ @@ -110,7 +110,7 @@ def updateDeviceApplianceRadioSettings(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/appliance/radio/settings" body_params = [ @@ -137,7 +137,7 @@ def updateDeviceApplianceUplinksSettings(self, serial: str, interfaces: dict, ** kwargs = locals() - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/appliance/uplinks/settings" body_params = [ @@ -159,7 +159,7 @@ def createDeviceApplianceVmxAuthenticationToken(self, serial: str): - serial (string): Serial """ - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/appliance/vmx/authenticationToken" action = { @@ -179,7 +179,7 @@ def updateNetworkApplianceConnectivityMonitoringDestinations(self, networkId: st kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/connectivityMonitoringDestinations" body_params = [ @@ -211,7 +211,7 @@ def updateNetworkApplianceDevicesRedundancy(self, networkId: str, enabled: bool, options = ["active-active", "active-passive", "disabled"] assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/devices/redundancy" body_params = [ @@ -236,7 +236,7 @@ def createNetworkApplianceDevicesRedundancySwap(self, networkId: str): - networkId (string): Network ID """ - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/devices/redundancy/swap" action = { @@ -256,7 +256,7 @@ def updateNetworkApplianceFirewallL7FirewallRules(self, networkId: str, **kwargs kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/firewall/l7FirewallRules" body_params = [ @@ -281,7 +281,7 @@ def updateNetworkApplianceFirewallMulticastForwarding(self, networkId: str, rule kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/firewall/multicastForwarding" body_params = [ @@ -307,7 +307,7 @@ def createNetworkApplianceInterfacesL3(self, networkId: str, ipv4: dict, **kwarg kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/interfaces/l3" body_params = [ @@ -335,8 +335,8 @@ def updateNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str, * kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - interfaceId = urllib.parse.quote(interfaceId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") resource = f"/networks/{networkId}/appliance/interfaces/l3/{interfaceId}" body_params = [ @@ -360,8 +360,8 @@ def deleteNetworkApplianceInterfacesL3(self, networkId: str, interfaceId: str): - interfaceId (string): Interface ID """ - networkId = urllib.parse.quote(networkId, safe="") - interfaceId = urllib.parse.quote(interfaceId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") resource = f"/networks/{networkId}/appliance/interfaces/l3/{interfaceId}" action = { @@ -390,8 +390,8 @@ def updateNetworkAppliancePort(self, networkId: str, portId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - portId = urllib.parse.quote(portId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + portId = urllib.parse.quote(str(portId), safe="") resource = f"/networks/{networkId}/appliance/ports/{portId}" body_params = [ @@ -426,7 +426,7 @@ def createNetworkAppliancePrefixesDelegatedStatic(self, networkId: str, prefix: kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/prefixes/delegated/statics" body_params = [ @@ -456,8 +456,8 @@ def updateNetworkAppliancePrefixesDelegatedStatic(self, networkId: str, staticDe kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - staticDelegatedPrefixId = urllib.parse.quote(staticDelegatedPrefixId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + staticDelegatedPrefixId = urllib.parse.quote(str(staticDelegatedPrefixId), safe="") resource = f"/networks/{networkId}/appliance/prefixes/delegated/statics/{staticDelegatedPrefixId}" body_params = [ @@ -482,8 +482,8 @@ def deleteNetworkAppliancePrefixesDelegatedStatic(self, networkId: str, staticDe - staticDelegatedPrefixId (string): Static delegated prefix ID """ - networkId = urllib.parse.quote(networkId, safe="") - staticDelegatedPrefixId = urllib.parse.quote(staticDelegatedPrefixId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + staticDelegatedPrefixId = urllib.parse.quote(str(staticDelegatedPrefixId), safe="") resource = f"/networks/{networkId}/appliance/prefixes/delegated/statics/{staticDelegatedPrefixId}" action = { @@ -506,7 +506,7 @@ def createNetworkApplianceRfProfile(self, networkId: str, name: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/rfProfiles" body_params = [ @@ -538,8 +538,8 @@ def updateNetworkApplianceRfProfile(self, networkId: str, rfProfileId: str, **kw kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - rfProfileId = urllib.parse.quote(rfProfileId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + rfProfileId = urllib.parse.quote(str(rfProfileId), safe="") resource = f"/networks/{networkId}/appliance/rfProfiles/{rfProfileId}" body_params = [ @@ -565,8 +565,8 @@ def deleteNetworkApplianceRfProfile(self, networkId: str, rfProfileId: str): - rfProfileId (string): Rf profile ID """ - networkId = urllib.parse.quote(networkId, safe="") - rfProfileId = urllib.parse.quote(rfProfileId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + rfProfileId = urllib.parse.quote(str(rfProfileId), safe="") resource = f"/networks/{networkId}/appliance/rfProfiles/{rfProfileId}" action = { @@ -586,7 +586,7 @@ def updateNetworkApplianceSdwanInternetPolicies(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/sdwan/internetPolicies" body_params = [ @@ -624,7 +624,7 @@ def updateNetworkApplianceSettings(self, networkId: str, **kwargs): f'''"deploymentMode" cannot be "{kwargs["deploymentMode"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/settings" body_params = [ @@ -655,7 +655,7 @@ def updateNetworkApplianceSingleLan(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/singleLan" body_params = [ @@ -711,8 +711,8 @@ def updateNetworkApplianceSsid(self, networkId: str, number: str, **kwargs): f'''"wpaEncryptionMode" cannot be "{kwargs["wpaEncryptionMode"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/appliance/ssids/{number}" body_params = [ @@ -750,7 +750,7 @@ def createNetworkApplianceTrafficShapingCustomPerformanceClass(self, networkId: kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/trafficShaping/customPerformanceClasses" body_params = [ @@ -784,8 +784,8 @@ def updateNetworkApplianceTrafficShapingCustomPerformanceClass( kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - customPerformanceClassId = urllib.parse.quote(customPerformanceClassId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + customPerformanceClassId = urllib.parse.quote(str(customPerformanceClassId), safe="") resource = f"/networks/{networkId}/appliance/trafficShaping/customPerformanceClasses/{customPerformanceClassId}" body_params = [ @@ -811,8 +811,8 @@ def deleteNetworkApplianceTrafficShapingCustomPerformanceClass(self, networkId: - customPerformanceClassId (string): Custom performance class ID """ - networkId = urllib.parse.quote(networkId, safe="") - customPerformanceClassId = urllib.parse.quote(customPerformanceClassId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + customPerformanceClassId = urllib.parse.quote(str(customPerformanceClassId), safe="") resource = f"/networks/{networkId}/appliance/trafficShaping/customPerformanceClasses/{customPerformanceClassId}" action = { @@ -836,7 +836,7 @@ def updateNetworkApplianceTrafficShapingRules(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/trafficShaping/rules" body_params = [ @@ -862,7 +862,7 @@ def updateNetworkApplianceTrafficShapingUplinkBandwidth(self, networkId: str, ** kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/trafficShaping/uplinkBandwidth" body_params = [ @@ -892,7 +892,7 @@ def updateNetworkApplianceTrafficShapingUplinkSelection(self, networkId: str, ** kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/trafficShaping/uplinkSelection" body_params = [ @@ -924,7 +924,7 @@ def updateNetworkApplianceTrafficShapingVpnExclusions(self, networkId: str, **kw kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/trafficShaping/vpnExclusions" body_params = [ @@ -951,7 +951,7 @@ def connectNetworkApplianceUmbrellaAccount(self, networkId: str, api: dict, **kw kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/account/connect" body_params = [ @@ -973,7 +973,7 @@ def disconnectNetworkApplianceUmbrellaAccount(self, networkId: str): - networkId (string): Network ID """ - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/account/disconnect" action = { @@ -990,7 +990,7 @@ def disableNetworkApplianceUmbrellaProtection(self, networkId: str): - networkId (string): Network ID """ - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/disableProtection" action = { @@ -1010,7 +1010,7 @@ def exclusionsNetworkApplianceUmbrellaDomains(self, networkId: str, domains: lis kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/domains/exclusions" body_params = [ @@ -1032,7 +1032,7 @@ def enableNetworkApplianceUmbrellaProtection(self, networkId: str): - networkId (string): Network ID """ - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/enableProtection" action = { @@ -1052,7 +1052,7 @@ def policiesNetworkApplianceUmbrella(self, networkId: str, policyIds: list, **kw kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/policies" body_params = [ @@ -1077,7 +1077,7 @@ def addNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, **kw kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/policies/add" body_params = [ @@ -1102,7 +1102,7 @@ def removeNetworkApplianceUmbrellaPolicies(self, networkId: str, policy: dict, * kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/policies/remove" body_params = [ @@ -1127,7 +1127,7 @@ def protectionNetworkApplianceUmbrella(self, networkId: str, enabled: bool, **kw kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/umbrella/protection" body_params = [ @@ -1152,7 +1152,7 @@ def updateNetworkApplianceUplinksNat(self, networkId: str, uplinks: list, **kwar kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/uplinks/nat" body_params = [ @@ -1213,7 +1213,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg f'''"dhcpLeaseTime" cannot be "{kwargs["dhcpLeaseTime"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/vlans" body_params = [ @@ -1258,7 +1258,7 @@ def updateNetworkApplianceVlansSettings(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/vlans/settings" body_params = [ @@ -1323,8 +1323,8 @@ def updateNetworkApplianceVlan(self, networkId: str, vlanId: str, **kwargs): f'''"templateVlanType" cannot be "{kwargs["templateVlanType"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - vlanId = urllib.parse.quote(vlanId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + vlanId = urllib.parse.quote(str(vlanId), safe="") resource = f"/networks/{networkId}/appliance/vlans/{vlanId}" body_params = [ @@ -1370,8 +1370,8 @@ def deleteNetworkApplianceVlan(self, networkId: str, vlanId: str): - vlanId (string): Vlan ID """ - networkId = urllib.parse.quote(networkId, safe="") - vlanId = urllib.parse.quote(vlanId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + vlanId = urllib.parse.quote(str(vlanId), safe="") resource = f"/networks/{networkId}/appliance/vlans/{vlanId}" action = { @@ -1395,7 +1395,7 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/vpn/bgp" body_params = [ @@ -1425,8 +1425,8 @@ def updateNetworkApplianceVpnSiteToSiteHubVrfs(self, networkId: str, hubNetworkI kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") - hubNetworkId = urllib.parse.quote(hubNetworkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + hubNetworkId = urllib.parse.quote(str(hubNetworkId), safe="") resource = f"/networks/{networkId}/appliance/vpn/siteToSite/hubs/{hubNetworkId}/vrfs" body_params = [ @@ -1461,7 +1461,7 @@ def updateNetworkApplianceVpnSiteToSiteVpn(self, networkId: str, mode: str, **kw options = ["hub", "none", "spoke"] assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/vpn/siteToSiteVpn" body_params = [ @@ -1496,7 +1496,7 @@ def updateNetworkApplianceWarmSpare(self, networkId: str, enabled: bool, **kwarg kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/warmSpare" body_params = [ @@ -1522,7 +1522,7 @@ def swapNetworkApplianceWarmSpare(self, networkId: str): - networkId (string): Network ID """ - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/appliance/warmSpare/swap" action = { @@ -1542,7 +1542,7 @@ def createOrganizationApplianceDnsLocalProfile(self, organizationId: str, name: kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/local/profiles" body_params = [ @@ -1567,7 +1567,7 @@ def bulkOrganizationApplianceDnsLocalProfilesAssignmentsCreate(self, organizatio kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/local/profiles/assignments/bulkCreate" body_params = [ @@ -1592,7 +1592,7 @@ def createOrganizationApplianceDnsLocalProfilesAssignmentsBulkDelete(self, organ kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/local/profiles/assignments/bulkDelete" body_params = [ @@ -1618,8 +1618,8 @@ def updateOrganizationApplianceDnsLocalProfile(self, organizationId: str, profil kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/local/profiles/{profileId}" body_params = [ @@ -1642,8 +1642,8 @@ def deleteOrganizationApplianceDnsLocalProfile(self, organizationId: str, profil - profileId (string): Profile ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/local/profiles/{profileId}" action = { @@ -1667,7 +1667,7 @@ def createOrganizationApplianceDnsLocalRecord( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/local/records" body_params = [ @@ -1697,8 +1697,8 @@ def updateOrganizationApplianceDnsLocalRecord(self, organizationId: str, recordI kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - recordId = urllib.parse.quote(recordId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + recordId = urllib.parse.quote(str(recordId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/local/records/{recordId}" body_params = [ @@ -1723,8 +1723,8 @@ def deleteOrganizationApplianceDnsLocalRecord(self, organizationId: str, recordI - recordId (string): Record ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - recordId = urllib.parse.quote(recordId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + recordId = urllib.parse.quote(str(recordId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/local/records/{recordId}" action = { @@ -1748,7 +1748,7 @@ def createOrganizationApplianceDnsSplitProfile( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/split/profiles" body_params = [ @@ -1775,7 +1775,7 @@ def createOrganizationApplianceDnsSplitProfilesAssignmentsBulkCreate(self, organ kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/split/profiles/assignments/bulkCreate" body_params = [ @@ -1800,7 +1800,7 @@ def createOrganizationApplianceDnsSplitProfilesAssignmentsBulkDelete(self, organ kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/split/profiles/assignments/bulkDelete" body_params = [ @@ -1828,8 +1828,8 @@ def updateOrganizationApplianceDnsSplitProfile(self, organizationId: str, profil kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/split/profiles/{profileId}" body_params = [ @@ -1854,8 +1854,8 @@ def deleteOrganizationApplianceDnsSplitProfile(self, organizationId: str, profil - profileId (string): Profile ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = f"/organizations/{organizationId}/appliance/dns/split/profiles/{profileId}" action = { @@ -1875,7 +1875,7 @@ def updateOrganizationApplianceRoutingVrfsSettings(self, organizationId: str, en kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/routing/vrfs/settings" body_params = [ @@ -1900,7 +1900,7 @@ def updateOrganizationApplianceVpnSiteToSiteIpsecPeersSlas(self, organizationId: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/vpn/siteToSite/ipsec/peers/slas" body_params = [ @@ -1928,7 +1928,7 @@ def updateOrganizationApplianceVpnThirdPartyVPNPeers(self, organizationId: str, kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/appliance/vpn/thirdPartyVPNPeers" body_params = [ @@ -1956,7 +1956,7 @@ def assignOrganizationPoliciesGlobalGroupPoliciesApplianceVlans( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policies/global/group/policies/appliance/vlans/assign" body_params = [ @@ -1985,7 +1985,7 @@ def removeOrganizationPoliciesGlobalGroupPoliciesApplianceVlans( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policies/global/group/policies/appliance/vlans/remove" body_params = [ diff --git a/meraki/api/batch/assistant.py b/meraki/api/batch/assistant.py new file mode 100644 index 0000000..31bf678 --- /dev/null +++ b/meraki/api/batch/assistant.py @@ -0,0 +1,3 @@ +class ActionBatchAssistant(object): + def __init__(self): + super(ActionBatchAssistant, self).__init__() diff --git a/meraki/api/batch/camera.py b/meraki/api/batch/camera.py index 6f2993c..de7d570 100644 --- a/meraki/api/batch/camera.py +++ b/meraki/api/batch/camera.py @@ -18,7 +18,7 @@ def updateDeviceCameraCustomAnalytics(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/camera/customAnalytics" body_params = [ @@ -67,7 +67,7 @@ def updateDeviceCameraQualityAndRetention(self, serial: str, **kwargs): f'''"motionDetectorVersion" cannot be "{kwargs["motionDetectorVersion"]}", & must be set to one of: {options}''' ) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/camera/qualityAndRetention" body_params = [ @@ -101,7 +101,7 @@ def updateDeviceCameraSense(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/camera/sense" body_params = [ @@ -129,7 +129,7 @@ def updateDeviceCameraVideoSettings(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/camera/video/settings" body_params = [ @@ -154,7 +154,7 @@ def updateDeviceCameraWirelessProfiles(self, serial: str, ids: dict, **kwargs): kwargs = locals() - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/camera/wirelessProfiles" body_params = [ @@ -181,7 +181,7 @@ def createNetworkCameraVideoWall(self, networkId: str, name: str, tiles: list, * kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/camera/videoWalls" body_params = [ @@ -211,8 +211,8 @@ def updateNetworkCameraVideoWall(self, networkId: str, id: str, name: str, tiles kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - id = urllib.parse.quote(id, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/networks/{networkId}/camera/videoWalls/{id}" body_params = [ @@ -237,8 +237,8 @@ def deleteNetworkCameraVideoWall(self, networkId: str, id: str): - id (string): ID """ - networkId = urllib.parse.quote(networkId, safe="") - id = urllib.parse.quote(id, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/networks/{networkId}/camera/videoWalls/{id}" action = { diff --git a/meraki/api/batch/campusGateway.py b/meraki/api/batch/campusGateway.py index 60c995d..fb9aa94 100644 --- a/meraki/api/batch/campusGateway.py +++ b/meraki/api/batch/campusGateway.py @@ -24,7 +24,7 @@ def createNetworkCampusGatewayCluster( kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/campusGateway/clusters" body_params = [ @@ -62,8 +62,8 @@ def updateNetworkCampusGatewayCluster(self, networkId: str, clusterId: str, **kw kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - clusterId = urllib.parse.quote(clusterId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + clusterId = urllib.parse.quote(str(clusterId), safe="") resource = f"/networks/{networkId}/campusGateway/clusters/{clusterId}" body_params = [ @@ -92,8 +92,8 @@ def deleteNetworkCampusGatewayCluster(self, networkId: str, clusterId: str): - clusterId (string): Cluster ID """ - networkId = urllib.parse.quote(networkId, safe="") - clusterId = urllib.parse.quote(clusterId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + clusterId = urllib.parse.quote(str(clusterId), safe="") resource = f"/networks/{networkId}/campusGateway/clusters/{clusterId}" action = { @@ -115,8 +115,8 @@ def updateNetworkCampusGatewaySsidMdns(self, networkId: str, number: str, **kwar kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/campusGateway/ssids/{number}/mdns" body_params = [ @@ -162,7 +162,7 @@ def provisionOrganizationCampusGatewayClusters( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/campusGateway/clusters/provision" body_params = [ @@ -196,7 +196,7 @@ def batchOrganizationCampusGatewayClustersTunnelingByClusterByNetworkUpdate(self kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/campusGateway/clusters/tunneling/byCluster/byNetwork/batchUpdate" body_params = [ diff --git a/meraki/api/batch/cellularGateway.py b/meraki/api/batch/cellularGateway.py index e57b950..2c2f7a6 100644 --- a/meraki/api/batch/cellularGateway.py +++ b/meraki/api/batch/cellularGateway.py @@ -17,7 +17,7 @@ def updateDeviceCellularGatewayLan(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/cellularGateway/lan" body_params = [ @@ -43,7 +43,7 @@ def updateDeviceCellularGatewayPortForwardingRules(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/cellularGateway/portForwardingRules" body_params = [ @@ -68,7 +68,7 @@ def updateNetworkCellularGatewayConnectivityMonitoringDestinations(self, network kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/cellularGateway/connectivityMonitoringDestinations" body_params = [ @@ -95,7 +95,7 @@ def updateNetworkCellularGatewayDhcp(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/cellularGateway/dhcp" body_params = [ @@ -123,7 +123,7 @@ def updateNetworkCellularGatewaySubnetPool(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/cellularGateway/subnetPool" body_params = [ @@ -149,7 +149,7 @@ def updateNetworkCellularGatewayUplink(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/cellularGateway/uplink" body_params = [ @@ -175,8 +175,8 @@ def updateOrganizationCellularGatewayEsimsInventory(self, organizationId: str, i kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/cellularGateway/esims/inventory/{id}" body_params = [ @@ -207,7 +207,7 @@ def createOrganizationCellularGatewayEsimsServiceProvidersAccount( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts" body_params = [ @@ -238,8 +238,8 @@ def updateOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organiza kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - accountId = urllib.parse.quote(accountId, safe="") + 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 = [ @@ -263,8 +263,8 @@ def deleteOrganizationCellularGatewayEsimsServiceProvidersAccount(self, organiza - accountId (string): Account ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - accountId = urllib.parse.quote(accountId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + accountId = urllib.parse.quote(str(accountId), safe="") resource = f"/organizations/{organizationId}/cellularGateway/esims/serviceProviders/accounts/{accountId}" action = { @@ -284,7 +284,7 @@ def createOrganizationCellularGatewayEsimsSwap(self, organizationId: str, swaps: kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/cellularGateway/esims/swap" body_params = [ @@ -307,8 +307,8 @@ def updateOrganizationCellularGatewayEsimsSwap(self, id: str, organizationId: st - organizationId (string): Organization ID """ - id = urllib.parse.quote(id, safe="") - organizationId = urllib.parse.quote(organizationId, safe="") + id = urllib.parse.quote(str(id), safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/cellularGateway/esims/swap/{id}" action = { diff --git a/meraki/api/batch/devices.py b/meraki/api/batch/devices.py index c3c5b13..e7a3cd3 100644 --- a/meraki/api/batch/devices.py +++ b/meraki/api/batch/devices.py @@ -24,7 +24,7 @@ def updateDevice(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}" body_params = [ @@ -57,7 +57,7 @@ def updateDeviceCellularGeolocations(self, serial: str, enabled: bool, **kwargs) kwargs = locals() - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/cellular/geolocations" body_params = [ @@ -91,7 +91,7 @@ def createDeviceCellularUplinksBandsMasksUpdate(self, serial: str, slot: str, ty options = ["5GNSA", "5GSA", "LTE"] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/cellular/uplinks/bands/masks/update" body_params = [ @@ -119,8 +119,8 @@ def updateDeviceCliConfigFavorite(self, serial: str, configId: str, favorite: bo kwargs = locals() - serial = urllib.parse.quote(serial, safe="") - configId = urllib.parse.quote(configId, safe="") + serial = urllib.parse.quote(str(serial), safe="") + configId = urllib.parse.quote(str(configId), safe="") resource = f"/devices/{serial}/cli/configs/{configId}" body_params = [ @@ -146,8 +146,8 @@ def createDeviceConfigRestore(self, serial: str, configId: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") - configId = urllib.parse.quote(configId, safe="") + serial = urllib.parse.quote(str(serial), safe="") + configId = urllib.parse.quote(str(configId), safe="") resource = f"/devices/{serial}/cli/configs/{configId}/restores" body_params = [ @@ -173,7 +173,7 @@ def createDeviceLiveToolsLedsBlink(self, serial: str, duration: int, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/liveTools/leds/blink" body_params = [ @@ -199,7 +199,7 @@ def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/liveTools/ports/status" body_params = [ @@ -213,6 +213,31 @@ def createDeviceLiveToolsPortsStatus(self, serial: str, **kwargs): } return action + def createDeviceLiveToolsPowerUsage(self, serial: str, **kwargs): + """ + **Enqueues a live tool job that retrieves details about a device's overall power usage. This endpoint has a sustained rate limit of one request every five seconds per device, with an allowed burst of five requests.** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-power-usage + + - serial (string): Serial + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/power/usage" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + action = { + "resource": resource, + "operation": "job", + "body": payload, + } + return action + def createDeviceLiveToolsReboot(self, serial: str, **kwargs): """ **Enqueue a job to reboot a device. This endpoint has a rate limit of one request every 60 seconds.** @@ -224,7 +249,7 @@ def createDeviceLiveToolsReboot(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/liveTools/reboot" body_params = [ @@ -273,7 +298,7 @@ def createDeviceLiveToolsRoutingTableLookup(self, serial: str, **kwargs): ] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/liveTools/routingTable/lookups" body_params = [ @@ -302,7 +327,7 @@ def createDeviceLiveToolsRoutingTableSummary(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/liveTools/routingTable/summaries" body_params = [ @@ -327,7 +352,7 @@ def createDeviceLiveToolsThroughputTest(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/liveTools/throughputTest" body_params = [ @@ -353,7 +378,7 @@ def updateDeviceManagementInterface(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/managementInterface" body_params = [ diff --git a/meraki/api/batch/insight.py b/meraki/api/batch/insight.py index c2057ff..aa6666f 100644 --- a/meraki/api/batch/insight.py +++ b/meraki/api/batch/insight.py @@ -18,7 +18,7 @@ def createOrganizationInsightApplication(self, organizationId: str, counterSetRu kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/insight/applications" body_params = [ @@ -47,8 +47,8 @@ def updateOrganizationInsightApplication(self, organizationId: str, applicationI kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - applicationId = urllib.parse.quote(applicationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + applicationId = urllib.parse.quote(str(applicationId), safe="") resource = f"/organizations/{organizationId}/insight/applications/{applicationId}" body_params = [ @@ -72,8 +72,8 @@ def deleteOrganizationInsightApplication(self, organizationId: str, applicationI - applicationId (string): Application ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - applicationId = urllib.parse.quote(applicationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + applicationId = urllib.parse.quote(str(applicationId), safe="") resource = f"/organizations/{organizationId}/insight/applications/{applicationId}" action = { @@ -95,7 +95,7 @@ def createOrganizationInsightMonitoredMediaServer(self, organizationId: str, nam kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/insight/monitoredMediaServers" body_params = [ @@ -125,8 +125,8 @@ def updateOrganizationInsightMonitoredMediaServer(self, organizationId: str, mon kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - monitoredMediaServerId = urllib.parse.quote(monitoredMediaServerId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + monitoredMediaServerId = urllib.parse.quote(str(monitoredMediaServerId), safe="") resource = f"/organizations/{organizationId}/insight/monitoredMediaServers/{monitoredMediaServerId}" body_params = [ @@ -151,8 +151,8 @@ def deleteOrganizationInsightMonitoredMediaServer(self, organizationId: str, mon - monitoredMediaServerId (string): Monitored media server ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - monitoredMediaServerId = urllib.parse.quote(monitoredMediaServerId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + monitoredMediaServerId = urllib.parse.quote(str(monitoredMediaServerId), safe="") resource = f"/organizations/{organizationId}/insight/monitoredMediaServers/{monitoredMediaServerId}" action = { @@ -173,7 +173,7 @@ def createOrganizationInsightWebApp(self, organizationId: str, name: str, hostna kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/insight/webApps" body_params = [ @@ -201,8 +201,8 @@ def updateOrganizationInsightWebApp(self, organizationId: str, customCounterSetR kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - customCounterSetRuleId = urllib.parse.quote(customCounterSetRuleId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + customCounterSetRuleId = urllib.parse.quote(str(customCounterSetRuleId), safe="") resource = f"/organizations/{organizationId}/insight/webApps/{customCounterSetRuleId}" body_params = [ @@ -226,8 +226,8 @@ def deleteOrganizationInsightWebApp(self, organizationId: str, customCounterSetR - customCounterSetRuleId (string): Custom counter set rule ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - customCounterSetRuleId = urllib.parse.quote(customCounterSetRuleId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + customCounterSetRuleId = urllib.parse.quote(str(customCounterSetRuleId), safe="") resource = f"/organizations/{organizationId}/insight/webApps/{customCounterSetRuleId}" action = { diff --git a/meraki/api/batch/nac.py b/meraki/api/batch/nac.py index 7a6720b..6852539 100644 --- a/meraki/api/batch/nac.py +++ b/meraki/api/batch/nac.py @@ -20,7 +20,7 @@ def createOrganizationNacCertificatesAuthoritiesCrl( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls" body_params = [ @@ -45,8 +45,8 @@ def deleteOrganizationNacCertificatesAuthoritiesCrl(self, organizationId: str, c - crlId (string): Crl ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - crlId = urllib.parse.quote(crlId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + crlId = urllib.parse.quote(str(crlId), safe="") resource = f"/organizations/{organizationId}/nac/certificates/authorities/crls/{crlId}" action = { @@ -68,7 +68,7 @@ def createOrganizationNacCertificatesImport(self, organizationId: str, contents: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/nac/certificates/import" body_params = [ @@ -96,8 +96,8 @@ def updateOrganizationNacCertificate(self, organizationId: str, certificateId: s kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") - certificateId = urllib.parse.quote(certificateId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + certificateId = urllib.parse.quote(str(certificateId), safe="") resource = f"/organizations/{organizationId}/nac/certificates/{certificateId}" body_params = [ @@ -122,7 +122,7 @@ def bulkOrganizationNacClientsDelete(self, organizationId: str, clientIds: list, kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/nac/clients/bulkDelete" action = { @@ -144,7 +144,7 @@ def createOrganizationNacClientsBulkEdit(self, organizationId: str, clientIds: l kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/nac/clients/bulkEdit" body_params = [ @@ -175,7 +175,7 @@ def createOrganizationNacClientsBulkUpload( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/nac/clients/bulkUpload" body_params = [ @@ -204,7 +204,7 @@ def createOrganizationNacClientsGroup(self, organizationId: str, name: str, **kw kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/nac/clients/groups" body_params = [ @@ -234,8 +234,8 @@ def updateOrganizationNacClientsGroup(self, organizationId: str, groupId: str, * kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - groupId = urllib.parse.quote(groupId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") resource = f"/organizations/{organizationId}/nac/clients/groups/{groupId}" body_params = [ @@ -260,8 +260,8 @@ def deleteOrganizationNacClientsGroup(self, organizationId: str, groupId: str): - groupId (string): Group ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - groupId = urllib.parse.quote(groupId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") resource = f"/organizations/{organizationId}/nac/clients/groups/{groupId}" action = { @@ -293,8 +293,8 @@ def updateOrganizationNacClient(self, organizationId: str, clientId: str, mac: s options = ["BYOD", "corporate"] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - organizationId = urllib.parse.quote(organizationId, safe="") - clientId = urllib.parse.quote(clientId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") resource = f"/organizations/{organizationId}/nac/clients/{clientId}" body_params = [ diff --git a/meraki/api/batch/networks.py b/meraki/api/batch/networks.py index 3b6e6d9..5099ef4 100644 --- a/meraki/api/batch/networks.py +++ b/meraki/api/batch/networks.py @@ -20,7 +20,7 @@ def updateNetwork(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}" body_params = [ @@ -46,7 +46,7 @@ def deleteNetwork(self, networkId: str): - networkId (string): Network ID """ - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}" action = { @@ -67,7 +67,7 @@ def bindNetwork(self, networkId: str, configTemplateId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/bind" body_params = [ @@ -103,7 +103,7 @@ def provisionNetworkClients(self, networkId: str, clients: list, devicePolicy: s f'''"devicePolicy" cannot be "{kwargs["devicePolicy"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/clients/provision" body_params = [ @@ -134,7 +134,7 @@ def claimNetworkDevices(self, networkId: str, serials: list, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/devices/claim" body_params = [ @@ -164,7 +164,7 @@ def vmxNetworkDevicesClaim(self, networkId: str, size: str, **kwargs): options = ["100", "large", "medium", "small", "xlarge"] assert kwargs["size"] in options, f'''"size" cannot be "{kwargs["size"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/devices/claim/vmx" body_params = [ @@ -189,7 +189,7 @@ def removeNetworkDevices(self, networkId: str, serial: str, **kwargs): kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/devices/remove" body_params = [ @@ -214,7 +214,7 @@ def updateNetworkDevicesSyslogServers(self, networkId: str, servers: list, **kwa kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/devices/syslog/servers" body_params = [ @@ -241,7 +241,7 @@ def updateNetworkFirmwareUpgrades(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/firmwareUpgrades" body_params = [ @@ -287,7 +287,7 @@ def createNetworkFirmwareUpgradesRollback(self, networkId: str, reasons: list, * f'''"product" cannot be "{kwargs["product"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/firmwareUpgrades/rollbacks" body_params = [ @@ -319,7 +319,7 @@ def createNetworkFirmwareUpgradesStagedGroup(self, networkId: str, name: str, is kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/firmwareUpgrades/staged/groups" body_params = [ @@ -345,8 +345,8 @@ def deleteNetworkFirmwareUpgradesStagedGroup(self, networkId: str, groupId: str) - groupId (string): Group ID """ - networkId = urllib.parse.quote(networkId, safe="") - groupId = urllib.parse.quote(groupId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") resource = f"/networks/{networkId}/firmwareUpgrades/staged/groups/{groupId}" action = { @@ -366,7 +366,7 @@ def batchNetworkFloorPlansAutoLocateJobs(self, networkId: str, jobs: list, **kwa kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/floorPlans/autoLocate/jobs/batch" body_params = [ @@ -389,8 +389,8 @@ def cancelNetworkFloorPlansAutoLocateJob(self, networkId: str, jobId: str): - jobId (string): Job ID """ - networkId = urllib.parse.quote(networkId, safe="") - jobId = urllib.parse.quote(jobId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") resource = f"/networks/{networkId}/floorPlans/autoLocate/jobs/{jobId}/cancel" action = { @@ -411,8 +411,8 @@ def publishNetworkFloorPlansAutoLocateJob(self, networkId: str, jobId: str, **kw kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - jobId = urllib.parse.quote(jobId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") resource = f"/networks/{networkId}/floorPlans/autoLocate/jobs/{jobId}/publish" body_params = [ @@ -438,8 +438,8 @@ def recalculateNetworkFloorPlansAutoLocateJob(self, networkId: str, jobId: str, kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - jobId = urllib.parse.quote(jobId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") resource = f"/networks/{networkId}/floorPlans/autoLocate/jobs/{jobId}/recalculate" body_params = [ @@ -464,7 +464,7 @@ def batchNetworkFloorPlansDevicesUpdate(self, networkId: str, assignments: list, kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/floorPlans/devices/batchUpdate" body_params = [ @@ -498,8 +498,8 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - floorPlanId = urllib.parse.quote(floorPlanId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + floorPlanId = urllib.parse.quote(str(floorPlanId), safe="") resource = f"/networks/{networkId}/floorPlans/{floorPlanId}" body_params = [ @@ -530,8 +530,8 @@ def deleteNetworkFloorPlan(self, networkId: str, floorPlanId: str): - floorPlanId (string): Floor plan ID """ - networkId = urllib.parse.quote(networkId, safe="") - floorPlanId = urllib.parse.quote(floorPlanId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + floorPlanId = urllib.parse.quote(str(floorPlanId), safe="") resource = f"/networks/{networkId}/floorPlans/{floorPlanId}" action = { @@ -567,7 +567,7 @@ def createNetworkGroupPolicy(self, networkId: str, name: str, **kwargs): f'''"splashAuthSettings" cannot be "{kwargs["splashAuthSettings"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/groupPolicies" body_params = [ @@ -616,8 +616,8 @@ def updateNetworkGroupPolicy(self, networkId: str, groupPolicyId: str, **kwargs) f'''"splashAuthSettings" cannot be "{kwargs["splashAuthSettings"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - groupPolicyId = urllib.parse.quote(groupPolicyId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + groupPolicyId = urllib.parse.quote(str(groupPolicyId), safe="") resource = f"/networks/{networkId}/groupPolicies/{groupPolicyId}" body_params = [ @@ -650,8 +650,8 @@ def deleteNetworkGroupPolicy(self, networkId: str, groupPolicyId: str, **kwargs) kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - groupPolicyId = urllib.parse.quote(groupPolicyId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + groupPolicyId = urllib.parse.quote(str(groupPolicyId), safe="") resource = f"/networks/{networkId}/groupPolicies/{groupPolicyId}" action = { @@ -672,7 +672,7 @@ def updateNetworkLocationScanning(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/locationScanning" body_params = [ @@ -698,7 +698,7 @@ def updateNetworkLocationScanningHttpServers(self, networkId: str, endpoints: li kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/locationScanning/httpServers" body_params = [ @@ -735,7 +735,7 @@ def createNetworkMerakiAuthUser(self, networkId: str, email: str, authorizations f'''"accountType" cannot be "{kwargs["accountType"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/merakiAuthUsers" body_params = [ @@ -767,8 +767,8 @@ def deleteNetworkMerakiAuthUser(self, networkId: str, merakiAuthUserId: str, **k kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - merakiAuthUserId = urllib.parse.quote(merakiAuthUserId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + merakiAuthUserId = urllib.parse.quote(str(merakiAuthUserId), safe="") resource = f"/networks/{networkId}/merakiAuthUsers/{merakiAuthUserId}" action = { @@ -792,8 +792,8 @@ def updateNetworkMerakiAuthUser(self, networkId: str, merakiAuthUserId: str, **k kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - merakiAuthUserId = urllib.parse.quote(merakiAuthUserId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + merakiAuthUserId = urllib.parse.quote(str(merakiAuthUserId), safe="") resource = f"/networks/{networkId}/merakiAuthUsers/{merakiAuthUserId}" body_params = [ @@ -832,7 +832,7 @@ def createNetworkMqttBroker(self, networkId: str, name: str, host: str, port: in f'''"productType" cannot be "{kwargs["productType"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/mqttBrokers" body_params = [ @@ -867,8 +867,8 @@ def updateNetworkMqttBroker(self, networkId: str, mqttBrokerId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - mqttBrokerId = urllib.parse.quote(mqttBrokerId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + mqttBrokerId = urllib.parse.quote(str(mqttBrokerId), safe="") resource = f"/networks/{networkId}/mqttBrokers/{mqttBrokerId}" body_params = [ @@ -895,8 +895,8 @@ def deleteNetworkMqttBroker(self, networkId: str, mqttBrokerId: str): - mqttBrokerId (string): Mqtt broker ID """ - networkId = urllib.parse.quote(networkId, safe="") - mqttBrokerId = urllib.parse.quote(mqttBrokerId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + mqttBrokerId = urllib.parse.quote(str(mqttBrokerId), safe="") resource = f"/networks/{networkId}/mqttBrokers/{mqttBrokerId}" action = { @@ -921,7 +921,7 @@ def updateNetworkSettings(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/settings" body_params = [ @@ -952,7 +952,7 @@ def createNetworkSitesBuilding(self, networkId: str, name: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/sites/buildings" body_params = [ @@ -976,8 +976,8 @@ def deleteNetworkSitesBuilding(self, networkId: str, buildingId: str): - buildingId (string): Building ID """ - networkId = urllib.parse.quote(networkId, safe="") - buildingId = urllib.parse.quote(buildingId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") resource = f"/networks/{networkId}/sites/buildings/{buildingId}" action = { @@ -999,8 +999,8 @@ def updateNetworkSitesBuilding(self, networkId: str, buildingId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - buildingId = urllib.parse.quote(buildingId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + buildingId = urllib.parse.quote(str(buildingId), safe="") resource = f"/networks/{networkId}/sites/buildings/{buildingId}" body_params = [ @@ -1033,7 +1033,7 @@ def updateNetworkSnmpTraps(self, networkId: str, **kwargs): options = ["disabled", "v1/v2c", "v3"] assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/snmp/traps" body_params = [ @@ -1058,7 +1058,7 @@ def splitNetwork(self, networkId: str): - networkId (string): Network ID """ - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/split" action = { @@ -1078,7 +1078,7 @@ def unbindNetwork(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/unbind" body_params = [ @@ -1107,7 +1107,7 @@ def createNetworkVlanProfile(self, networkId: str, name: str, vlanNames: list, v kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/vlanProfiles" body_params = [ @@ -1134,8 +1134,8 @@ def deleteNetworkVlanProfile(self, networkId: str, iname: str): - iname (string): Iname """ - networkId = urllib.parse.quote(networkId, safe="") - iname = urllib.parse.quote(iname, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + iname = urllib.parse.quote(str(iname), safe="") resource = f"/networks/{networkId}/vlanProfiles/{iname}" action = { @@ -1159,7 +1159,7 @@ def createNetworkWebhooksPayloadTemplate(self, networkId: str, name: str, **kwar kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/webhooks/payloadTemplates" body_params = [ @@ -1186,8 +1186,8 @@ def deleteNetworkWebhooksPayloadTemplate(self, networkId: str, payloadTemplateId - payloadTemplateId (string): Payload template ID """ - networkId = urllib.parse.quote(networkId, safe="") - payloadTemplateId = urllib.parse.quote(payloadTemplateId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") resource = f"/networks/{networkId}/webhooks/payloadTemplates/{payloadTemplateId}" action = { @@ -1212,8 +1212,8 @@ def updateNetworkWebhooksPayloadTemplate(self, networkId: str, payloadTemplateId kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - payloadTemplateId = urllib.parse.quote(payloadTemplateId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") resource = f"/networks/{networkId}/webhooks/payloadTemplates/{payloadTemplateId}" body_params = [ diff --git a/meraki/api/batch/organizations.py b/meraki/api/batch/organizations.py index 202a0cc..6cf5f0a 100644 --- a/meraki/api/batch/organizations.py +++ b/meraki/api/batch/organizations.py @@ -25,7 +25,7 @@ def createOrganizationAdaptivePolicyAcl(self, organizationId: str, name: str, ru f'''"ipVersion" cannot be "{kwargs["ipVersion"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/acls" body_params = [ @@ -63,8 +63,8 @@ def updateOrganizationAdaptivePolicyAcl(self, organizationId: str, aclId: str, * f'''"ipVersion" cannot be "{kwargs["ipVersion"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") - aclId = urllib.parse.quote(aclId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + aclId = urllib.parse.quote(str(aclId), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/acls/{aclId}" body_params = [ @@ -90,8 +90,8 @@ def deleteOrganizationAdaptivePolicyAcl(self, organizationId: str, aclId: str): - aclId (string): Acl ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - aclId = urllib.parse.quote(aclId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + aclId = urllib.parse.quote(str(aclId), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/acls/{aclId}" action = { @@ -114,7 +114,7 @@ def createOrganizationAdaptivePolicyGroup(self, organizationId: str, name: str, kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/groups" body_params = [ @@ -146,8 +146,8 @@ def updateOrganizationAdaptivePolicyGroup(self, organizationId: str, id: str, ** kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/groups/{id}" body_params = [ @@ -173,8 +173,8 @@ def deleteOrganizationAdaptivePolicyGroup(self, organizationId: str, id: str): - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/groups/{id}" action = { @@ -203,7 +203,7 @@ def createOrganizationAdaptivePolicyPolicy(self, organizationId: str, sourceGrou f'''"lastEntryRule" cannot be "{kwargs["lastEntryRule"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/policies" body_params = [ @@ -241,8 +241,8 @@ def updateOrganizationAdaptivePolicyPolicy(self, organizationId: str, id: str, * f'''"lastEntryRule" cannot be "{kwargs["lastEntryRule"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/policies/{id}" body_params = [ @@ -268,8 +268,8 @@ def deleteOrganizationAdaptivePolicyPolicy(self, organizationId: str, id: str): - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/policies/{id}" action = { @@ -289,7 +289,7 @@ def updateOrganizationAdaptivePolicySettings(self, organizationId: str, **kwargs kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/adaptivePolicy/settings" body_params = [ @@ -333,7 +333,7 @@ def createOrganizationAlertsProfile( ] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/alerts/profiles" body_params = [ @@ -381,8 +381,8 @@ def updateOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st ] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - organizationId = urllib.parse.quote(organizationId, safe="") - alertConfigId = urllib.parse.quote(alertConfigId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + alertConfigId = urllib.parse.quote(str(alertConfigId), safe="") resource = f"/organizations/{organizationId}/alerts/profiles/{alertConfigId}" body_params = [ @@ -410,8 +410,8 @@ def deleteOrganizationAlertsProfile(self, organizationId: str, alertConfigId: st - alertConfigId (string): Alert config ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - alertConfigId = urllib.parse.quote(alertConfigId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + alertConfigId = urllib.parse.quote(str(alertConfigId), safe="") resource = f"/organizations/{organizationId}/alerts/profiles/{alertConfigId}" action = { @@ -435,7 +435,7 @@ def createOrganizationApiPushProfile(self, organizationId: str, iname: str, topi kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/api/push/profiles" body_params = [ @@ -468,8 +468,8 @@ def updateOrganizationApiPushProfile(self, organizationId: str, iname: str, **kw kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - iname = urllib.parse.quote(iname, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") resource = f"/organizations/{organizationId}/api/push/profiles/{iname}" body_params = [ @@ -495,8 +495,8 @@ def deleteOrganizationApiPushProfile(self, organizationId: str, iname: str): - iname (string): Iname """ - organizationId = urllib.parse.quote(organizationId, safe="") - iname = urllib.parse.quote(iname, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") resource = f"/organizations/{organizationId}/api/push/profiles/{iname}" action = { @@ -519,7 +519,7 @@ def createOrganizationApiPushReceiversProfile(self, organizationId: str, iname: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/api/push/receivers/profiles" body_params = [ @@ -545,8 +545,8 @@ def deleteOrganizationApiPushReceiversProfile(self, organizationId: str, iname: - iname (string): Iname """ - organizationId = urllib.parse.quote(organizationId, safe="") - iname = urllib.parse.quote(iname, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") resource = f"/organizations/{organizationId}/api/push/receivers/profiles/{iname}" action = { @@ -569,8 +569,8 @@ def updateOrganizationApiPushReceiversProfile(self, organizationId: str, iname: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - iname = urllib.parse.quote(iname, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + iname = urllib.parse.quote(str(iname), safe="") resource = f"/organizations/{organizationId}/api/push/receivers/profiles/{iname}" body_params = [ @@ -600,7 +600,7 @@ def createOrganizationAuthRadiusServer(self, organizationId: str, address: str, kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/auth/radius/servers" body_params = [ @@ -632,8 +632,8 @@ def updateOrganizationAuthRadiusServer(self, organizationId: str, serverId: str, kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - serverId = urllib.parse.quote(serverId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" body_params = [ @@ -659,8 +659,8 @@ def deleteOrganizationAuthRadiusServer(self, organizationId: str, serverId: str) - serverId (string): Server ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - serverId = urllib.parse.quote(serverId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + serverId = urllib.parse.quote(str(serverId), safe="") resource = f"/organizations/{organizationId}/auth/radius/servers/{serverId}" action = { @@ -688,7 +688,7 @@ def createOrganizationBrandingPolicy(self, organizationId: str, name: str, **kwa kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/brandingPolicies" body_params = [ @@ -718,7 +718,7 @@ def updateOrganizationBrandingPoliciesPriorities(self, organizationId: str, **kw kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/brandingPolicies/priorities" body_params = [ @@ -752,8 +752,8 @@ def updateOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - brandingPolicyId = urllib.parse.quote(brandingPolicyId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + brandingPolicyId = urllib.parse.quote(str(brandingPolicyId), safe="") resource = f"/organizations/{organizationId}/brandingPolicies/{brandingPolicyId}" body_params = [ @@ -780,8 +780,8 @@ def deleteOrganizationBrandingPolicy(self, organizationId: str, brandingPolicyId - brandingPolicyId (string): Branding policy ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - brandingPolicyId = urllib.parse.quote(brandingPolicyId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + brandingPolicyId = urllib.parse.quote(str(brandingPolicyId), safe="") resource = f"/organizations/{organizationId}/brandingPolicies/{brandingPolicyId}" action = { @@ -809,7 +809,7 @@ def importOrganizationCertificates(self, organizationId: str, managedBy: str, co f'''"managedBy" cannot be "{kwargs["managedBy"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/certificates/import" body_params = [ @@ -838,7 +838,7 @@ def createOrganizationConfigTemplate(self, organizationId: str, name: str, **kwa kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/configTemplates" body_params = [ @@ -867,8 +867,8 @@ def updateOrganizationConfigTemplate(self, organizationId: str, configTemplateId kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - configTemplateId = urllib.parse.quote(configTemplateId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + configTemplateId = urllib.parse.quote(str(configTemplateId), safe="") resource = f"/organizations/{organizationId}/configTemplates/{configTemplateId}" body_params = [ @@ -898,7 +898,7 @@ def createOrganizationDevicesCellularDataProfile( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/cellular/data/profiles" body_params = [ @@ -925,7 +925,7 @@ def batchOrganizationDevicesCellularDataProfilesAssignmentsCreate(self, organiza kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/cellular/data/profiles/assignments/batchCreate" body_params = [ @@ -950,7 +950,7 @@ def bulkOrganizationDevicesCellularDataProfilesAssignmentsDelete(self, organizat kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/cellular/data/profiles/assignments/bulkDelete" action = { @@ -972,8 +972,8 @@ def updateOrganizationDevicesCellularDataProfile(self, organizationId: str, rule kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = f"/organizations/{organizationId}/devices/cellular/data/profiles/{profileId}" body_params = [ @@ -998,8 +998,8 @@ def deleteOrganizationDevicesCellularDataProfile(self, organizationId: str, prof - profileId (string): Profile ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = f"/organizations/{organizationId}/devices/cellular/data/profiles/{profileId}" action = { @@ -1026,7 +1026,7 @@ def createOrganizationDevicesControllerMigration(self, organizationId: str, seri f'''"target" cannot be "{kwargs["target"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/controller/migrations" body_params = [ @@ -1053,7 +1053,7 @@ def bulkUpdateOrganizationDevicesDetails(self, organizationId: str, serials: lis kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/details/bulkUpdate" body_params = [ @@ -1079,7 +1079,7 @@ def bulkOrganizationDevicesPacketCaptureCapturesDelete(self, organizationId: str kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/packetCapture/captures/bulkDelete" action = { @@ -1097,8 +1097,8 @@ def deleteOrganizationDevicesPacketCaptureCapture(self, organizationId: str, cap - captureId (string): Capture ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - captureId = urllib.parse.quote(captureId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + captureId = urllib.parse.quote(str(captureId), safe="") resource = f"/organizations/{organizationId}/devices/packetCapture/captures/{captureId}" action = { @@ -1124,7 +1124,7 @@ def createOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, de kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/packetCapture/schedules" body_params = [ @@ -1155,7 +1155,7 @@ def bulkOrganizationDevicesPacketCaptureSchedulesDelete(self, organizationId: st kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/packetCapture/schedules/bulkDelete" action = { @@ -1175,7 +1175,7 @@ def reorderOrganizationDevicesPacketCaptureSchedules(self, organizationId: str, kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/packetCapture/schedules/reorder" body_params = [ @@ -1207,8 +1207,8 @@ def updateOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, sc kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - scheduleId = urllib.parse.quote(scheduleId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + scheduleId = urllib.parse.quote(str(scheduleId), safe="") resource = f"/organizations/{organizationId}/devices/packetCapture/schedules/{scheduleId}" body_params = [ @@ -1239,8 +1239,8 @@ def deleteOrganizationDevicesPacketCaptureSchedule(self, organizationId: str, sc kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") - scheduleId = urllib.parse.quote(scheduleId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + scheduleId = urllib.parse.quote(str(scheduleId), safe="") resource = f"/organizations/{organizationId}/devices/packetCapture/schedules/{scheduleId}" action = { @@ -1266,8 +1266,8 @@ def tasksOrganizationDevicesPacketCapture(self, organizationId: str, packetId: s options = ["analysis", "flow", "highlights", "reasoning", "summary", "title"] assert kwargs["task"] in options, f'''"task" cannot be "{kwargs["task"]}", & must be set to one of: {options}''' - organizationId = urllib.parse.quote(organizationId, safe="") - packetId = urllib.parse.quote(packetId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + packetId = urllib.parse.quote(str(packetId), safe="") resource = f"/organizations/{organizationId}/devices/packetCaptures/{packetId}/tasks" body_params = [ @@ -1294,7 +1294,7 @@ def bulkOrganizationDevicesPlacementPositionsUpdate(self, organizationId: str, s kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/devices/placement/positions/bulkUpdate" body_params = [ @@ -1321,8 +1321,8 @@ def updateOrganizationEarlyAccessFeaturesOptIn(self, organizationId: str, optInI kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - optInId = urllib.parse.quote(optInId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + optInId = urllib.parse.quote(str(optInId), safe="") resource = f"/organizations/{organizationId}/earlyAccess/features/optIns/{optInId}" body_params = [ @@ -1351,8 +1351,8 @@ def updateOrganizationExtensionsSdwanmanagerInterconnect( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") - interconnectId = urllib.parse.quote(interconnectId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + interconnectId = urllib.parse.quote(str(interconnectId), safe="") resource = f"/organizations/{organizationId}/extensions/sdwanmanager/interconnects/{interconnectId}" body_params = [ @@ -1380,7 +1380,7 @@ def createOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, e kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks" body_params = [ @@ -1408,8 +1408,8 @@ def updateOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, n kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") - networkId = urllib.parse.quote(networkId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" body_params = [ @@ -1432,8 +1432,8 @@ def deleteOrganizationExtensionsThousandEyesNetwork(self, organizationId: str, n - networkId (string): Network ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - networkId = urllib.parse.quote(networkId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/organizations/{organizationId}/extensions/thousandEyes/networks/{networkId}" action = { @@ -1453,7 +1453,7 @@ def createOrganizationExtensionsThousandEyesTest(self, organizationId: str, **kw kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/extensions/thousandEyes/tests" body_params = [ @@ -1484,7 +1484,7 @@ def resolveOrganizationIamAdminsAdministratorsMePermissions( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/iam/admins/administrators/me/permissions/resolve" body_params = [ @@ -1511,7 +1511,7 @@ def disableOrganizationIntegrationsXdrNetworks(self, organizationId: str, networ kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/integrations/xdr/networks/disable" body_params = [ @@ -1536,7 +1536,7 @@ def enableOrganizationIntegrationsXdrNetworks(self, organizationId: str, network kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/integrations/xdr/networks/enable" body_params = [ @@ -1562,7 +1562,7 @@ def claimOrganizationInventoryOrders(self, organizationId: str, claimId: str, ** kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/inventory/orders/claim" body_params = [ @@ -1590,7 +1590,7 @@ def assignOrganizationLicensesSeats(self, organizationId: str, licenseId: str, n kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/licenses/assignSeats" body_params = [ @@ -1618,7 +1618,7 @@ def moveOrganizationLicenses(self, organizationId: str, destOrganizationId: str, kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/licenses/move" body_params = [ @@ -1648,7 +1648,7 @@ def moveOrganizationLicensesSeats( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/licenses/moveSeats" body_params = [ @@ -1676,7 +1676,7 @@ def renewOrganizationLicensesSeats(self, organizationId: str, licenseIdToRenew: kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/licenses/renewSeats" body_params = [ @@ -1703,8 +1703,8 @@ def updateOrganizationLicense(self, organizationId: str, licenseId: str, **kwarg kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - licenseId = urllib.parse.quote(licenseId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + licenseId = urllib.parse.quote(str(licenseId), safe="") resource = f"/organizations/{organizationId}/licenses/{licenseId}" body_params = [ @@ -1737,12 +1737,13 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): - enforceTwoFactorAuth (boolean): Boolean indicating whether users in this organization will be required to use an extra verification code when logging in to Dashboard. This code will be sent to their mobile phone via SMS, or can be generated by the authenticator application. - enforceLoginIpRanges (boolean): Boolean indicating whether organization will restrict access to Dashboard (including the API) from certain IP addresses. - loginIpRanges (array): List of acceptable IP ranges. Entries can be single IP addresses, IP address ranges, and CIDR subnets. + - enforceLockedIpSessions (boolean): Boolean indicating whether Dashboard sessions are locked to the IP address from which they were established. Only applicable to organizations that support locked-IP sessions; otherwise the parameter is ignored. - apiAuthentication (object): Details for indicating whether organization will restrict access to API (but not Dashboard) to certain IP addresses. """ kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/loginSecurity" body_params = [ @@ -1759,6 +1760,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): "enforceTwoFactorAuth", "enforceLoginIpRanges", "loginIpRanges", + "enforceLockedIpSessions", "apiAuthentication", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -1786,7 +1788,7 @@ def createOrganizationNetwork(self, organizationId: str, name: str, productTypes kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/networks" body_params = [ @@ -1819,7 +1821,7 @@ def combineOrganizationNetworks(self, organizationId: str, name: str, networkIds kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/networks/combine" body_params = [ @@ -1846,7 +1848,7 @@ def createOrganizationNetworksGroup(self, organizationId: str, name: str, **kwar kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/networks/groups" body_params = [ @@ -1872,8 +1874,8 @@ def updateOrganizationNetworksGroup(self, organizationId: str, groupId: str, nam kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") - groupId = urllib.parse.quote(groupId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") resource = f"/organizations/{organizationId}/networks/groups/{groupId}" body_params = [ @@ -1896,8 +1898,8 @@ def deleteOrganizationNetworksGroup(self, organizationId: str, groupId: str): - groupId (string): Group ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - groupId = urllib.parse.quote(groupId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") resource = f"/organizations/{organizationId}/networks/groups/{groupId}" action = { @@ -1918,8 +1920,8 @@ def bulkOrganizationNetworksGroupAssign(self, organizationId: str, groupId: str, kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") - groupId = urllib.parse.quote(groupId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") resource = f"/organizations/{organizationId}/networks/groups/{groupId}/bulkAssign" body_params = [ @@ -1945,8 +1947,8 @@ def bulkOrganizationNetworksGroupUnassign(self, organizationId: str, groupId: st kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") - groupId = urllib.parse.quote(groupId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + groupId = urllib.parse.quote(str(groupId), safe="") resource = f"/organizations/{organizationId}/networks/groups/{groupId}/bulkUnassign" body_params = [ @@ -1969,8 +1971,8 @@ def deleteOrganizationOpenRoamingCertificate(self, organizationId: str, id: str) - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/openRoaming/certificates/{id}" action = { @@ -1991,7 +1993,7 @@ def createOrganizationPoliciesGlobalFirewallRuleset(self, organizationId: str, n kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policies/global/firewall/rulesets" body_params = [ @@ -2032,7 +2034,7 @@ def createOrganizationPoliciesGlobalFirewallRulesetsRule( f'''"policy" cannot be "{kwargs["policy"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policies/global/firewall/rulesets/rules" body_params = [ @@ -2062,8 +2064,8 @@ def deleteOrganizationPoliciesGlobalFirewallRulesetsRule(self, organizationId: s - ruleId (string): Rule ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - ruleId = urllib.parse.quote(ruleId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") resource = f"/organizations/{organizationId}/policies/global/firewall/rulesets/rules/{ruleId}" action = { @@ -2097,8 +2099,8 @@ def updateOrganizationPoliciesGlobalFirewallRulesetsRule(self, organizationId: s f'''"policy" cannot be "{kwargs["policy"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") - ruleId = urllib.parse.quote(ruleId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") resource = f"/organizations/{organizationId}/policies/global/firewall/rulesets/rules/{ruleId}" body_params = [ @@ -2132,8 +2134,8 @@ def updateOrganizationPoliciesGlobalFirewallRuleset(self, organizationId: str, r kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - rulesetId = urllib.parse.quote(rulesetId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + rulesetId = urllib.parse.quote(str(rulesetId), safe="") resource = f"/organizations/{organizationId}/policies/global/firewall/rulesets/{rulesetId}" body_params = [ @@ -2157,8 +2159,8 @@ def deleteOrganizationPoliciesGlobalFirewallRuleset(self, organizationId: str, r - rulesetId (string): Ruleset ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - rulesetId = urllib.parse.quote(rulesetId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + rulesetId = urllib.parse.quote(str(rulesetId), safe="") resource = f"/organizations/{organizationId}/policies/global/firewall/rulesets/{rulesetId}" action = { @@ -2179,7 +2181,7 @@ def createOrganizationPoliciesGlobalGroupPolicy(self, organizationId: str, name: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policies/global/group/policies" body_params = [ @@ -2208,7 +2210,7 @@ def assignOrganizationPoliciesGlobalGroupPoliciesAdaptivePolicyGroups( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policies/global/group/policies/adaptivePolicyGroups/assign" body_params = [ @@ -2237,7 +2239,7 @@ def removeOrganizationPoliciesGlobalGroupPoliciesAdaptivePolicyGroups( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policies/global/group/policies/adaptivePolicyGroups/remove" body_params = [ @@ -2267,7 +2269,7 @@ def createOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policies/global/group/policies/firewall/rulesets/assignments" body_params = [ @@ -2299,8 +2301,8 @@ def updateOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - assignmentId = urllib.parse.quote(assignmentId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + assignmentId = urllib.parse.quote(str(assignmentId), safe="") resource = ( f"/organizations/{organizationId}/policies/global/group/policies/firewall/rulesets/assignments/{assignmentId}" ) @@ -2327,8 +2329,8 @@ def deleteOrganizationPoliciesGlobalGroupPoliciesFirewallRulesetsAssignment(self - assignmentId (string): Assignment ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - assignmentId = urllib.parse.quote(assignmentId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + assignmentId = urllib.parse.quote(str(assignmentId), safe="") resource = ( f"/organizations/{organizationId}/policies/global/group/policies/firewall/rulesets/assignments/{assignmentId}" ) @@ -2352,8 +2354,8 @@ def updateOrganizationPoliciesGlobalGroupPolicy(self, organizationId: str, polic kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - policyId = urllib.parse.quote(policyId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") resource = f"/organizations/{organizationId}/policies/global/group/policies/{policyId}" body_params = [ @@ -2377,8 +2379,8 @@ def deleteOrganizationPoliciesGlobalGroupPolicy(self, organizationId: str, polic - policyId (string): Policy ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - policyId = urllib.parse.quote(policyId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyId = urllib.parse.quote(str(policyId), safe="") resource = f"/organizations/{organizationId}/policies/global/group/policies/{policyId}" action = { @@ -2405,7 +2407,7 @@ def createOrganizationPolicyObject(self, organizationId: str, name: str, categor kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policyObjects" body_params = [ @@ -2439,7 +2441,7 @@ def createOrganizationPolicyObjectsGroup(self, organizationId: str, name: str, * kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/policyObjects/groups" body_params = [ @@ -2468,8 +2470,8 @@ def updateOrganizationPolicyObjectsGroup(self, organizationId: str, policyObject kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - policyObjectGroupId = urllib.parse.quote(policyObjectGroupId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyObjectGroupId = urllib.parse.quote(str(policyObjectGroupId), safe="") resource = f"/organizations/{organizationId}/policyObjects/groups/{policyObjectGroupId}" body_params = [ @@ -2493,8 +2495,8 @@ def deleteOrganizationPolicyObjectsGroup(self, organizationId: str, policyObject - policyObjectGroupId (string): Policy object group ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - policyObjectGroupId = urllib.parse.quote(policyObjectGroupId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyObjectGroupId = urllib.parse.quote(str(policyObjectGroupId), safe="") resource = f"/organizations/{organizationId}/policyObjects/groups/{policyObjectGroupId}" action = { @@ -2520,8 +2522,8 @@ def updateOrganizationPolicyObject(self, organizationId: str, policyObjectId: st kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - policyObjectId = urllib.parse.quote(policyObjectId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyObjectId = urllib.parse.quote(str(policyObjectId), safe="") resource = f"/organizations/{organizationId}/policyObjects/{policyObjectId}" body_params = [ @@ -2549,8 +2551,8 @@ def deleteOrganizationPolicyObject(self, organizationId: str, policyObjectId: st - policyObjectId (string): Policy object ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - policyObjectId = urllib.parse.quote(policyObjectId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + policyObjectId = urllib.parse.quote(str(policyObjectId), safe="") resource = f"/organizations/{organizationId}/policyObjects/{policyObjectId}" action = { @@ -2574,7 +2576,7 @@ def createOrganizationRoutingVrf(self, organizationId: str, name: str, **kwargs) kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/routing/vrfs" body_params = [ @@ -2608,8 +2610,8 @@ def updateOrganizationRoutingVrf(self, organizationId: str, vrfId: str, **kwargs kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - vrfId = urllib.parse.quote(vrfId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + vrfId = urllib.parse.quote(str(vrfId), safe="") resource = f"/organizations/{organizationId}/routing/vrfs/{vrfId}" body_params = [ @@ -2636,8 +2638,8 @@ def deleteOrganizationRoutingVrf(self, organizationId: str, vrfId: str): - vrfId (string): Vrf ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - vrfId = urllib.parse.quote(vrfId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + vrfId = urllib.parse.quote(str(vrfId), safe="") resource = f"/organizations/{organizationId}/routing/vrfs/{vrfId}" action = { @@ -2659,7 +2661,7 @@ def createOrganizationSamlIdp(self, organizationId: str, x509certSha1Fingerprint kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/saml/idps" body_params = [ @@ -2689,8 +2691,8 @@ def updateOrganizationSamlIdp(self, organizationId: str, idpId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - idpId = urllib.parse.quote(idpId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + idpId = urllib.parse.quote(str(idpId), safe="") resource = f"/organizations/{organizationId}/saml/idps/{idpId}" body_params = [ @@ -2715,8 +2717,8 @@ def deleteOrganizationSamlIdp(self, organizationId: str, idpId: str): - idpId (string): Idp ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - idpId = urllib.parse.quote(idpId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + idpId = urllib.parse.quote(str(idpId), safe="") resource = f"/organizations/{organizationId}/saml/idps/{idpId}" action = { @@ -2736,7 +2738,7 @@ def batchOrganizationSaseConnectorsDelete(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sase/connectors/batchDelete" body_params = [ @@ -2761,7 +2763,7 @@ def createOrganizationSaseIntegration(self, organizationId: str, api: dict, **kw kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sase/integrations" body_params = [ @@ -2784,8 +2786,8 @@ def deleteOrganizationSaseIntegration(self, organizationId: str, integrationId: - integrationId (string): Integration ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - integrationId = urllib.parse.quote(integrationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + integrationId = urllib.parse.quote(str(integrationId), safe="") resource = f"/organizations/{organizationId}/sase/integrations/{integrationId}" action = { @@ -2806,7 +2808,7 @@ def attachOrganizationSaseSites(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sase/sites/attach" body_params = [ @@ -2833,7 +2835,7 @@ def detachOrganizationSaseSites(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sase/sites/detach" action = { @@ -2854,7 +2856,7 @@ def enrollOrganizationSaseSites(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sase/sites/enroll" body_params = [ @@ -2881,8 +2883,8 @@ def updateOrganizationSaseSite(self, organizationId: str, siteId: str, **kwargs) kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - siteId = urllib.parse.quote(siteId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + siteId = urllib.parse.quote(str(siteId), safe="") resource = f"/organizations/{organizationId}/sase/sites/{siteId}" body_params = [ @@ -2906,8 +2908,8 @@ def deleteOrganizationSplashAsset(self, organizationId: str, id: str): - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/splash/assets/{id}" action = { @@ -2928,7 +2930,7 @@ def createOrganizationSplashTheme(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/splash/themes" body_params = [ @@ -2952,8 +2954,8 @@ def deleteOrganizationSplashTheme(self, organizationId: str, id: str): - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/splash/themes/{id}" action = { @@ -2975,8 +2977,8 @@ def createOrganizationSplashThemeAsset(self, organizationId: str, themeIdentifie kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - themeIdentifier = urllib.parse.quote(themeIdentifier, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + themeIdentifier = urllib.parse.quote(str(themeIdentifier), safe="") resource = f"/organizations/{organizationId}/splash/themes/{themeIdentifier}/assets" body_params = [ @@ -3007,7 +3009,7 @@ def createOrganizationWebhooksPayloadTemplate(self, organizationId: str, name: s kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/webhooks/payloadTemplates" body_params = [ @@ -3035,8 +3037,8 @@ def deleteOrganizationWebhooksPayloadTemplate(self, organizationId: str, payload - payloadTemplateId (string): Payload template ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - payloadTemplateId = urllib.parse.quote(payloadTemplateId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" action = { @@ -3062,8 +3064,8 @@ def updateOrganizationWebhooksPayloadTemplate(self, organizationId: str, payload kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - payloadTemplateId = urllib.parse.quote(payloadTemplateId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + payloadTemplateId = urllib.parse.quote(str(payloadTemplateId), safe="") resource = f"/organizations/{organizationId}/webhooks/payloadTemplates/{payloadTemplateId}" body_params = [ diff --git a/meraki/api/batch/secureConnect.py b/meraki/api/batch/secureConnect.py index aa0b6f8..20a5f64 100644 --- a/meraki/api/batch/secureConnect.py +++ b/meraki/api/batch/secureConnect.py @@ -18,7 +18,7 @@ def createOrganizationSecureConnectPrivateResourceGroup(self, organizationId: st kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups" body_params = [ @@ -48,8 +48,8 @@ def updateOrganizationSecureConnectPrivateResourceGroup(self, organizationId: st kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups/{id}" body_params = [ @@ -74,8 +74,8 @@ def deleteOrganizationSecureConnectPrivateResourceGroup(self, organizationId: st - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/secureConnect/privateResourceGroups/{id}" action = { @@ -101,7 +101,7 @@ def createOrganizationSecureConnectPrivateResource( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/secureConnect/privateResources" body_params = [ @@ -137,8 +137,8 @@ def updateOrganizationSecureConnectPrivateResource( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/secureConnect/privateResources/{id}" body_params = [ @@ -165,8 +165,8 @@ def deleteOrganizationSecureConnectPrivateResource(self, organizationId: str, id - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/secureConnect/privateResources/{id}" action = { @@ -187,7 +187,7 @@ def createOrganizationSecureConnectSite(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/secureConnect/sites" body_params = [ @@ -214,7 +214,7 @@ def deleteOrganizationSecureConnectSites(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/secureConnect/sites" action = { diff --git a/meraki/api/batch/sensor.py b/meraki/api/batch/sensor.py index 63e5f43..567ac66 100644 --- a/meraki/api/batch/sensor.py +++ b/meraki/api/batch/sensor.py @@ -23,7 +23,7 @@ def createDeviceSensorCommand(self, serial: str, operation: str, **kwargs): f'''"operation" cannot be "{kwargs["operation"]}", & must be set to one of: {options}''' ) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/sensor/commands" body_params = [ @@ -49,7 +49,7 @@ def updateDeviceSensorRelationships(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/sensor/relationships" body_params = [ @@ -80,7 +80,7 @@ def createNetworkSensorAlertsProfile(self, networkId: str, name: str, conditions kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/sensor/alerts/profiles" body_params = [ @@ -118,8 +118,8 @@ def updateNetworkSensorAlertsProfile(self, networkId: str, id: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - id = urllib.parse.quote(id, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/networks/{networkId}/sensor/alerts/profiles/{id}" body_params = [ @@ -148,8 +148,8 @@ def deleteNetworkSensorAlertsProfile(self, networkId: str, id: str): - id (string): ID """ - networkId = urllib.parse.quote(networkId, safe="") - id = urllib.parse.quote(id, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/networks/{networkId}/sensor/alerts/profiles/{id}" action = { @@ -170,8 +170,8 @@ def updateNetworkSensorMqttBroker(self, networkId: str, mqttBrokerId: str, enabl kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") - mqttBrokerId = urllib.parse.quote(mqttBrokerId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + mqttBrokerId = urllib.parse.quote(str(mqttBrokerId), safe="") resource = f"/networks/{networkId}/sensor/mqttBrokers/{mqttBrokerId}" body_params = [ diff --git a/meraki/api/batch/sm.py b/meraki/api/batch/sm.py index 738e149..a3a1549 100644 --- a/meraki/api/batch/sm.py +++ b/meraki/api/batch/sm.py @@ -34,7 +34,7 @@ def createNetworkSmScript(self, networkId: str, name: str, platform: str, **kwar options = ["all", "none", "withAll", "withAny", "withoutAll", "withoutAny"] assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/sm/scripts" body_params = [ @@ -76,7 +76,7 @@ def createNetworkSmScriptsJob(self, networkId: str, scriptId: str, **kwargs): f'''"deviceFilter" cannot be "{kwargs["deviceFilter"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/sm/scripts/jobs" body_params = [ @@ -122,8 +122,8 @@ def updateNetworkSmScript(self, networkId: str, scriptId: str, **kwargs): options = ["all", "none", "withAll", "withAny", "withoutAll", "withoutAny"] assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") - scriptId = urllib.parse.quote(scriptId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + scriptId = urllib.parse.quote(str(scriptId), safe="") resource = f"/networks/{networkId}/sm/scripts/{scriptId}" body_params = [ @@ -155,8 +155,8 @@ def deleteNetworkSmScript(self, networkId: str, scriptId: str): - scriptId (string): Script ID """ - networkId = urllib.parse.quote(networkId, safe="") - scriptId = urllib.parse.quote(scriptId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + scriptId = urllib.parse.quote(str(scriptId), safe="") resource = f"/networks/{networkId}/sm/scripts/{scriptId}" action = { @@ -174,8 +174,8 @@ def deleteNetworkSmUserAccessDevice(self, networkId: str, userAccessDeviceId: st - userAccessDeviceId (string): User access device ID """ - networkId = urllib.parse.quote(networkId, safe="") - userAccessDeviceId = urllib.parse.quote(userAccessDeviceId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + userAccessDeviceId = urllib.parse.quote(str(userAccessDeviceId), safe="") resource = f"/networks/{networkId}/sm/userAccessDevices/{userAccessDeviceId}" action = { @@ -201,7 +201,7 @@ def createOrganizationSmAdminsRole(self, organizationId: str, name: str, **kwarg options = ["all_tags", "some", "without_all_tags", "without_some"] assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sm/admins/roles" body_params = [ @@ -235,8 +235,8 @@ def updateOrganizationSmAdminsRole(self, organizationId: str, roleId: str, **kwa options = ["all_tags", "some", "without_all_tags", "without_some"] assert kwargs["scope"] in options, f'''"scope" cannot be "{kwargs["scope"]}", & must be set to one of: {options}''' - organizationId = urllib.parse.quote(organizationId, safe="") - roleId = urllib.parse.quote(roleId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + roleId = urllib.parse.quote(str(roleId), safe="") resource = f"/organizations/{organizationId}/sm/admins/roles/{roleId}" body_params = [ @@ -261,8 +261,8 @@ def deleteOrganizationSmAdminsRole(self, organizationId: str, roleId: str): - roleId (string): Role ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - roleId = urllib.parse.quote(roleId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + roleId = urllib.parse.quote(str(roleId), safe="") resource = f"/organizations/{organizationId}/sm/admins/roles/{roleId}" action = { @@ -283,7 +283,7 @@ def createOrganizationSmAppleCloudEnrollmentSyncJob(self, organizationId: str, * kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sm/apple/cloudEnrollment/syncJobs" body_params = [ @@ -310,7 +310,7 @@ def createOrganizationSmBulkEnrollmentToken(self, organizationId: str, networkId kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token" body_params = [ @@ -338,8 +338,8 @@ def updateOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - tokenId = urllib.parse.quote(tokenId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + tokenId = urllib.parse.quote(str(tokenId), safe="") resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" body_params = [ @@ -363,8 +363,8 @@ def deleteOrganizationSmBulkEnrollmentToken(self, organizationId: str, tokenId: - tokenId (string): Token ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - tokenId = urllib.parse.quote(tokenId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + tokenId = urllib.parse.quote(str(tokenId), safe="") resource = f"/organizations/{organizationId}/sm/bulkEnrollment/token/{tokenId}" action = { @@ -384,7 +384,7 @@ def updateOrganizationSmSentryPoliciesAssignments(self, organizationId: str, ite kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/sm/sentry/policies/assignments" body_params = [ diff --git a/meraki/api/batch/spaces.py b/meraki/api/batch/spaces.py index 990bdca..66623f3 100644 --- a/meraki/api/batch/spaces.py +++ b/meraki/api/batch/spaces.py @@ -13,7 +13,7 @@ def removeOrganizationSpacesIntegration(self, organizationId: str): - organizationId (string): Organization ID """ - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/spaces/integration/remove" action = { diff --git a/meraki/api/batch/switch.py b/meraki/api/batch/switch.py index 71d3516..466c7bd 100644 --- a/meraki/api/batch/switch.py +++ b/meraki/api/batch/switch.py @@ -16,7 +16,7 @@ def cycleDeviceSwitchPorts(self, serial: str, ports: list, **kwargs): kwargs = locals() - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/switch/ports/cycle" body_params = [ @@ -45,7 +45,7 @@ def updateDeviceSwitchPortsMirror(self, serial: str, source: dict, destination: kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/switch/ports/mirror" body_params = [ @@ -123,8 +123,8 @@ def updateDeviceSwitchPort(self, serial: str, portId: str, **kwargs): f'''"accessPolicyType" cannot be "{kwargs["accessPolicyType"]}", & must be set to one of: {options}''' ) - serial = urllib.parse.quote(serial, safe="") - portId = urllib.parse.quote(portId, safe="") + serial = urllib.parse.quote(str(serial), safe="") + portId = urllib.parse.quote(str(portId), safe="") resource = f"/devices/{serial}/switch/ports/{portId}" body_params = [ @@ -205,7 +205,7 @@ def createDeviceSwitchRoutingInterface(self, serial: str, name: str, **kwargs): f'''"multicastRouting" cannot be "{kwargs["multicastRouting"]}", & must be set to one of: {options}''' ) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/switch/routing/interfaces" body_params = [ @@ -272,8 +272,8 @@ def updateDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str, **kw f'''"multicastRouting" cannot be "{kwargs["multicastRouting"]}", & must be set to one of: {options}''' ) - serial = urllib.parse.quote(serial, safe="") - interfaceId = urllib.parse.quote(interfaceId, safe="") + serial = urllib.parse.quote(str(serial), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") resource = f"/devices/{serial}/switch/routing/interfaces/{interfaceId}" body_params = [ @@ -313,8 +313,8 @@ def deleteDeviceSwitchRoutingInterface(self, serial: str, interfaceId: str): - interfaceId (string): Interface ID """ - serial = urllib.parse.quote(serial, safe="") - interfaceId = urllib.parse.quote(interfaceId, safe="") + serial = urllib.parse.quote(str(serial), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") resource = f"/devices/{serial}/switch/routing/interfaces/{interfaceId}" action = { @@ -366,8 +366,8 @@ def updateDeviceSwitchRoutingInterfaceDhcp(self, serial: str, interfaceId: str, f'''"dnsNameserversOption" cannot be "{kwargs["dnsNameserversOption"]}", & must be set to one of: {options}''' ) - serial = urllib.parse.quote(serial, safe="") - interfaceId = urllib.parse.quote(interfaceId, safe="") + serial = urllib.parse.quote(str(serial), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") resource = f"/devices/{serial}/switch/routing/interfaces/{interfaceId}/dhcp" body_params = [ @@ -407,7 +407,7 @@ def createDeviceSwitchRoutingStaticRoute(self, serial: str, subnet: str, nextHop kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/switch/routing/staticRoutes" body_params = [ @@ -444,8 +444,8 @@ def updateDeviceSwitchRoutingStaticRoute(self, serial: str, staticRouteId: str, kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") - staticRouteId = urllib.parse.quote(staticRouteId, safe="") + serial = urllib.parse.quote(str(serial), safe="") + staticRouteId = urllib.parse.quote(str(staticRouteId), safe="") resource = f"/devices/{serial}/switch/routing/staticRoutes/{staticRouteId}" body_params = [ @@ -474,8 +474,8 @@ def deleteDeviceSwitchRoutingStaticRoute(self, serial: str, staticRouteId: str): - staticRouteId (string): Static route ID """ - serial = urllib.parse.quote(serial, safe="") - staticRouteId = urllib.parse.quote(staticRouteId, safe="") + serial = urllib.parse.quote(str(serial), safe="") + staticRouteId = urllib.parse.quote(str(staticRouteId), safe="") resource = f"/devices/{serial}/switch/routing/staticRoutes/{staticRouteId}" action = { @@ -496,7 +496,7 @@ def updateDeviceSwitchWarmSpare(self, serial: str, enabled: bool, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/switch/warmSpare" body_params = [ @@ -553,7 +553,7 @@ def createNetworkSwitchAccessPolicy( f'''"accessPolicyType" cannot be "{kwargs["accessPolicyType"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/accessPolicies" body_params = [ @@ -626,8 +626,8 @@ def updateNetworkSwitchAccessPolicy(self, networkId: str, accessPolicyNumber: st f'''"accessPolicyType" cannot be "{kwargs["accessPolicyType"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - accessPolicyNumber = urllib.parse.quote(accessPolicyNumber, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + accessPolicyNumber = urllib.parse.quote(str(accessPolicyNumber), safe="") resource = f"/networks/{networkId}/switch/accessPolicies/{accessPolicyNumber}" body_params = [ @@ -668,8 +668,8 @@ def deleteNetworkSwitchAccessPolicy(self, networkId: str, accessPolicyNumber: st - accessPolicyNumber (string): Access policy number """ - networkId = urllib.parse.quote(networkId, safe="") - accessPolicyNumber = urllib.parse.quote(accessPolicyNumber, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + accessPolicyNumber = urllib.parse.quote(str(accessPolicyNumber), safe="") resource = f"/networks/{networkId}/switch/accessPolicies/{accessPolicyNumber}" action = { @@ -692,7 +692,7 @@ def updateNetworkSwitchAlternateManagementInterface(self, networkId: str, **kwar kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/alternateManagementInterface" body_params = [ @@ -730,7 +730,7 @@ def updateNetworkSwitchDhcpServerPolicy(self, networkId: str, **kwargs): f'''"defaultPolicy" cannot be "{kwargs["defaultPolicy"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/dhcpServerPolicy" body_params = [ @@ -763,7 +763,7 @@ def createNetworkSwitchDhcpServerPolicyArpInspectionTrustedServer( kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/dhcpServerPolicy/arpInspection/trustedServers" body_params = [ @@ -793,8 +793,8 @@ def updateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServer(self, networkI kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - trustedServerId = urllib.parse.quote(trustedServerId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + trustedServerId = urllib.parse.quote(str(trustedServerId), safe="") resource = f"/networks/{networkId}/switch/dhcpServerPolicy/arpInspection/trustedServers/{trustedServerId}" body_params = [ @@ -819,8 +819,8 @@ def deleteNetworkSwitchDhcpServerPolicyArpInspectionTrustedServer(self, networkI - trustedServerId (string): Trusted server ID """ - networkId = urllib.parse.quote(networkId, safe="") - trustedServerId = urllib.parse.quote(trustedServerId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + trustedServerId = urllib.parse.quote(str(trustedServerId), safe="") resource = f"/networks/{networkId}/switch/dhcpServerPolicy/arpInspection/trustedServers/{trustedServerId}" action = { @@ -840,7 +840,7 @@ def updateNetworkSwitchDscpToCosMappings(self, networkId: str, mappings: list, * kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/dscpToCosMappings" body_params = [ @@ -867,7 +867,7 @@ def createNetworkSwitchLinkAggregation(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/linkAggregations" body_params = [ @@ -896,8 +896,8 @@ def updateNetworkSwitchLinkAggregation(self, networkId: str, linkAggregationId: kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - linkAggregationId = urllib.parse.quote(linkAggregationId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + linkAggregationId = urllib.parse.quote(str(linkAggregationId), safe="") resource = f"/networks/{networkId}/switch/linkAggregations/{linkAggregationId}" body_params = [ @@ -921,8 +921,8 @@ def deleteNetworkSwitchLinkAggregation(self, networkId: str, linkAggregationId: - linkAggregationId (string): Link aggregation ID """ - networkId = urllib.parse.quote(networkId, safe="") - linkAggregationId = urllib.parse.quote(linkAggregationId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + linkAggregationId = urllib.parse.quote(str(linkAggregationId), safe="") resource = f"/networks/{networkId}/switch/linkAggregations/{linkAggregationId}" action = { @@ -943,7 +943,7 @@ def updateNetworkSwitchMtu(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/mtu" body_params = [ @@ -974,8 +974,8 @@ def updateNetworkSwitchPortSchedule(self, networkId: str, portScheduleId: str, * kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - portScheduleId = urllib.parse.quote(portScheduleId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + portScheduleId = urllib.parse.quote(str(portScheduleId), safe="") resource = f"/networks/{networkId}/switch/portSchedules/{portScheduleId}" body_params = [ @@ -1006,7 +1006,7 @@ def createNetworkSwitchPortsProfile(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/ports/profiles" body_params = [ @@ -1042,8 +1042,8 @@ def updateNetworkSwitchPortsProfile(self, networkId: str, id: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - id = urllib.parse.quote(id, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/networks/{networkId}/switch/ports/profiles/{id}" body_params = [ @@ -1071,8 +1071,8 @@ def deleteNetworkSwitchPortsProfile(self, networkId: str, id: str): - id (string): ID """ - networkId = urllib.parse.quote(networkId, safe="") - id = urllib.parse.quote(id, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/networks/{networkId}/switch/ports/profiles/{id}" action = { @@ -1104,7 +1104,7 @@ def createNetworkSwitchQosRule(self, networkId: str, vlan: int, **kwargs): f'''"protocol" cannot be "{kwargs["protocol"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/qosRules" body_params = [ @@ -1135,7 +1135,7 @@ def updateNetworkSwitchQosRulesOrder(self, networkId: str, ruleIds: list, **kwar kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/qosRules/order" body_params = [ @@ -1158,8 +1158,8 @@ def deleteNetworkSwitchQosRule(self, networkId: str, qosRuleId: str): - qosRuleId (string): Qos rule ID """ - networkId = urllib.parse.quote(networkId, safe="") - qosRuleId = urllib.parse.quote(qosRuleId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + qosRuleId = urllib.parse.quote(str(qosRuleId), safe="") resource = f"/networks/{networkId}/switch/qosRules/{qosRuleId}" action = { @@ -1192,8 +1192,8 @@ def updateNetworkSwitchQosRule(self, networkId: str, qosRuleId: str, **kwargs): f'''"protocol" cannot be "{kwargs["protocol"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - qosRuleId = urllib.parse.quote(qosRuleId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + qosRuleId = urllib.parse.quote(str(qosRuleId), safe="") resource = f"/networks/{networkId}/switch/qosRules/{qosRuleId}" body_params = [ @@ -1225,7 +1225,7 @@ def updateNetworkSwitchRoutingMulticast(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/routing/multicast" body_params = [ @@ -1255,7 +1255,7 @@ def createNetworkSwitchRoutingMulticastRendezvousPoint( kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/routing/multicast/rendezvousPoints" body_params = [ @@ -1280,8 +1280,8 @@ def deleteNetworkSwitchRoutingMulticastRendezvousPoint(self, networkId: str, ren - rendezvousPointId (string): Rendezvous point ID """ - networkId = urllib.parse.quote(networkId, safe="") - rendezvousPointId = urllib.parse.quote(rendezvousPointId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + rendezvousPointId = urllib.parse.quote(str(rendezvousPointId), safe="") resource = f"/networks/{networkId}/switch/routing/multicast/rendezvousPoints/{rendezvousPointId}" action = { @@ -1306,8 +1306,8 @@ def updateNetworkSwitchRoutingMulticastRendezvousPoint( kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - rendezvousPointId = urllib.parse.quote(rendezvousPointId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + rendezvousPointId = urllib.parse.quote(str(rendezvousPointId), safe="") resource = f"/networks/{networkId}/switch/routing/multicast/rendezvousPoints/{rendezvousPointId}" body_params = [ @@ -1341,7 +1341,7 @@ def updateNetworkSwitchRoutingOspf(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/routing/ospf" body_params = [ @@ -1378,7 +1378,7 @@ def updateNetworkSwitchSettings(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/settings" body_params = [ @@ -1415,7 +1415,7 @@ def updateNetworkSwitchSpanningTree(self, networkId: str, **kwargs): options = ["mst", "rpvst+"] assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/spanningTree" body_params = [ @@ -1444,8 +1444,8 @@ def updateNetworkSwitchStack(self, networkId: str, switchStackId: str, **kwargs) kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}" body_params = [ @@ -1478,8 +1478,8 @@ def updateNetworkSwitchStackPortsMirror( kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/ports/mirror" body_params = [ @@ -1536,8 +1536,8 @@ def createNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId f'''"multicastRouting" cannot be "{kwargs["multicastRouting"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces" body_params = [ @@ -1605,9 +1605,9 @@ def updateNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId f'''"multicastRouting" cannot be "{kwargs["multicastRouting"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") - interfaceId = urllib.parse.quote(interfaceId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces/{interfaceId}" body_params = [ @@ -1648,9 +1648,9 @@ def deleteNetworkSwitchStackRoutingInterface(self, networkId: str, switchStackId - interfaceId (string): Interface ID """ - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") - interfaceId = urllib.parse.quote(interfaceId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces/{interfaceId}" action = { @@ -1704,9 +1704,9 @@ def updateNetworkSwitchStackRoutingInterfaceDhcp(self, networkId: str, switchSta f'''"dnsNameserversOption" cannot be "{kwargs["dnsNameserversOption"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") - interfaceId = urllib.parse.quote(interfaceId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + interfaceId = urllib.parse.quote(str(interfaceId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/routing/interfaces/{interfaceId}/dhcp" body_params = [ @@ -1749,8 +1749,8 @@ def createNetworkSwitchStackRoutingStaticRoute( kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/routing/staticRoutes" body_params = [ @@ -1788,9 +1788,9 @@ def updateNetworkSwitchStackRoutingStaticRoute(self, networkId: str, switchStack kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") - staticRouteId = urllib.parse.quote(staticRouteId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + staticRouteId = urllib.parse.quote(str(staticRouteId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/routing/staticRoutes/{staticRouteId}" body_params = [ @@ -1820,9 +1820,9 @@ def deleteNetworkSwitchStackRoutingStaticRoute(self, networkId: str, switchStack - staticRouteId (string): Static route ID """ - networkId = urllib.parse.quote(networkId, safe="") - switchStackId = urllib.parse.quote(switchStackId, safe="") - staticRouteId = urllib.parse.quote(staticRouteId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + switchStackId = urllib.parse.quote(str(switchStackId), safe="") + staticRouteId = urllib.parse.quote(str(staticRouteId), safe="") resource = f"/networks/{networkId}/switch/stacks/{switchStackId}/routing/staticRoutes/{staticRouteId}" action = { @@ -1845,7 +1845,7 @@ def updateNetworkSwitchStormControl(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/stormControl" body_params = [ @@ -1874,7 +1874,7 @@ def updateNetworkSwitchStp(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/switch/stp" body_params = [ @@ -1908,9 +1908,9 @@ def updateOrganizationConfigTemplateSwitchProfilePortsMirror( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - configTemplateId = urllib.parse.quote(configTemplateId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + configTemplateId = urllib.parse.quote(str(configTemplateId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = ( f"/organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/mirror" ) @@ -1991,10 +1991,10 @@ def updateOrganizationConfigTemplateSwitchProfilePort( f'''"accessPolicyType" cannot be "{kwargs["accessPolicyType"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") - configTemplateId = urllib.parse.quote(configTemplateId, safe="") - profileId = urllib.parse.quote(profileId, safe="") - portId = urllib.parse.quote(portId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + configTemplateId = urllib.parse.quote(str(configTemplateId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") + portId = urllib.parse.quote(str(portId), safe="") resource = ( f"/organizations/{organizationId}/configTemplates/{configTemplateId}/switch/profiles/{profileId}/ports/{portId}" ) @@ -2049,7 +2049,7 @@ def cloneOrganizationSwitchProfilesToTemplateNetwork(self, organizationId: str, kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/cloneProfilesToTemplateNetwork" body_params = [ @@ -2076,7 +2076,7 @@ def cloneOrganizationSwitchDevices(self, organizationId: str, sourceSerial: str, kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/devices/clone" body_params = [ @@ -2110,7 +2110,7 @@ def createOrganizationSwitchPortsProfile(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles" body_params = [ @@ -2143,7 +2143,7 @@ def batchOrganizationSwitchPortsProfilesAssignmentsAssign(self, organizationId: kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/assignments/batchAssign" body_params = [ @@ -2172,7 +2172,7 @@ def createOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, * kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/automations" body_params = [ @@ -2206,8 +2206,8 @@ def updateOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, i kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/automations/{id}" body_params = [ @@ -2234,8 +2234,8 @@ def deleteOrganizationSwitchPortsProfilesAutomation(self, organizationId: str, i - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/automations/{id}" action = { @@ -2259,7 +2259,7 @@ def createOrganizationSwitchPortsProfilesNetworksAssignment( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments" body_params = [ @@ -2286,7 +2286,7 @@ def batchOrganizationSwitchPortsProfilesNetworksAssignmentsCreate(self, organiza kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/batchCreate" body_params = [ @@ -2311,7 +2311,7 @@ def bulkOrganizationSwitchPortsProfilesNetworksAssignmentsDelete(self, organizat kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/bulkDelete" body_params = [ @@ -2334,8 +2334,8 @@ def deleteOrganizationSwitchPortsProfilesNetworksAssignment(self, organizationId - assignmentId (string): Assignment ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - assignmentId = urllib.parse.quote(assignmentId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + assignmentId = urllib.parse.quote(str(assignmentId), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/networks/assignments/{assignmentId}" action = { @@ -2357,7 +2357,7 @@ def createOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments" body_params = [ @@ -2387,8 +2387,8 @@ def updateOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" body_params = [ @@ -2413,8 +2413,8 @@ def deleteOrganizationSwitchPortsProfilesRadiusAssignment(self, organizationId: - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/radius/assignments/{id}" action = { @@ -2443,8 +2443,8 @@ def updateOrganizationSwitchPortsProfile(self, organizationId: str, id: str, **k kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" body_params = [ @@ -2475,8 +2475,8 @@ def deleteOrganizationSwitchPortsProfile(self, organizationId: str, id: str): - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/switch/ports/profiles/{id}" action = { @@ -2497,7 +2497,7 @@ def createOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems" body_params = [ @@ -2525,8 +2525,8 @@ def updateOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - autonomousSystemId = urllib.parse.quote(autonomousSystemId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + autonomousSystemId = urllib.parse.quote(str(autonomousSystemId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/{autonomousSystemId}" body_params = [ @@ -2550,8 +2550,8 @@ def deleteOrganizationSwitchRoutingBgpAutonomousSystem(self, organizationId: str - autonomousSystemId (string): Autonomous system ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - autonomousSystemId = urllib.parse.quote(autonomousSystemId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + autonomousSystemId = urllib.parse.quote(str(autonomousSystemId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/autonomousSystems/{autonomousSystemId}" action = { @@ -2575,7 +2575,7 @@ def createOrganizationSwitchRoutingBgpFiltersFilterListsDeploy( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/deploy" body_params = [ @@ -2600,8 +2600,8 @@ def deleteOrganizationSwitchRoutingBgpFiltersFilterList(self, organizationId: st - listId (string): List ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - listId = urllib.parse.quote(listId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + listId = urllib.parse.quote(str(listId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/filterLists/{listId}" action = { @@ -2625,7 +2625,7 @@ def createOrganizationSwitchRoutingBgpFiltersPrefixListsDeploy( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/deploy" body_params = [ @@ -2650,8 +2650,8 @@ def deleteOrganizationSwitchRoutingBgpFiltersPrefixList(self, organizationId: st - listId (string): List ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - listId = urllib.parse.quote(listId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + listId = urllib.parse.quote(str(listId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/filters/prefixLists/{listId}" action = { @@ -2689,7 +2689,7 @@ def createOrganizationSwitchRoutingBgpPeersGroupsDeploy( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/groups/deploy" body_params = [ @@ -2736,7 +2736,7 @@ def createOrganizationSwitchRoutingBgpPeersNeighborsDeploy( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/peers/neighbors/deploy" body_params = [ @@ -2781,7 +2781,7 @@ def createOrganizationSwitchRoutingBgpRoutersDeploy( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/deploy" body_params = [ @@ -2815,7 +2815,7 @@ def createOrganizationSwitchRoutingBgpRoutersPeersDeploy( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/peers/deploy" body_params = [ @@ -2840,8 +2840,8 @@ def deleteOrganizationSwitchRoutingBgpRouter(self, organizationId: str, routerId - routerId (string): Router ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - routerId = urllib.parse.quote(routerId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + routerId = urllib.parse.quote(str(routerId), safe="") resource = f"/organizations/{organizationId}/switch/routing/bgp/routers/{routerId}" action = { diff --git a/meraki/api/batch/users.py b/meraki/api/batch/users.py index a194ca6..ef21c3e 100644 --- a/meraki/api/batch/users.py +++ b/meraki/api/batch/users.py @@ -20,7 +20,7 @@ def createOrganizationIamUsersAuthorization(self, organizationId: str, authZone: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/iam/users/authorizations" body_params = [ @@ -53,7 +53,7 @@ def updateOrganizationIamUsersAuthorizations(self, organizationId: str, **kwargs kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/iam/users/authorizations" body_params = [ @@ -84,7 +84,7 @@ def revokeOrganizationIamUsersAuthorizationsAuthorization(self, organizationId: kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/iam/users/authorizations/authorization/revoke" body_params = [ @@ -109,8 +109,8 @@ def deleteOrganizationIamUsersAuthorization(self, organizationId: str, authoriza - authorizationId (string): Authorization ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - authorizationId = urllib.parse.quote(authorizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + authorizationId = urllib.parse.quote(str(authorizationId), safe="") resource = f"/organizations/{organizationId}/iam/users/authorizations/{authorizationId}" action = { @@ -143,7 +143,7 @@ def createOrganizationIamUsersIdp(self, organizationId: str, name: str, type: st f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/iam/users/idps" body_params = [ @@ -173,7 +173,7 @@ def createOrganizationIamUsersIdpsTestConnectivity(self, organizationId: str, ** kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/iam/users/idps/testConnectivity" body_params = [ @@ -202,7 +202,7 @@ def createOrganizationIamUsersIdpsUser(self, organizationId: str, **kwargs): kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/iam/users/idps/users" body_params = [ @@ -234,8 +234,8 @@ def updateOrganizationIamUsersIdpsUser(self, organizationId: str, id: str, **kwa kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/iam/users/idps/users/{id}" body_params = [ @@ -261,8 +261,8 @@ def deleteOrganizationIamUsersIdpsUser(self, organizationId: str, id: str): - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/iam/users/idps/users/{id}" action = { @@ -284,8 +284,8 @@ def createOrganizationIamUsersIdpSync(self, organizationId: str, idpId: str, **k kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - idpId = urllib.parse.quote(idpId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + idpId = urllib.parse.quote(str(idpId), safe="") resource = f"/organizations/{organizationId}/iam/users/idps/{idpId}/sync" body_params = [ @@ -321,8 +321,8 @@ def updateOrganizationIamUsersIdp(self, organizationId: str, id: str, **kwargs): f'''"syncType" cannot be "{kwargs["syncType"]}", & must be set to one of: {options}''' ) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/iam/users/idps/{id}" body_params = [ @@ -348,8 +348,8 @@ def deleteOrganizationIamUsersIdp(self, organizationId: str, id: str): - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/iam/users/idps/{id}" action = { diff --git a/meraki/api/batch/wireless.py b/meraki/api/batch/wireless.py index ca73d36..d1bdede 100644 --- a/meraki/api/batch/wireless.py +++ b/meraki/api/batch/wireless.py @@ -16,7 +16,7 @@ def updateDeviceWirelessAlternateManagementInterfaceIpv6(self, serial: str, **kw kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/wireless/alternateManagementInterface/ipv6" body_params = [ @@ -47,7 +47,7 @@ def updateDeviceWirelessBluetoothSettings(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/wireless/bluetooth/settings" body_params = [ @@ -76,7 +76,7 @@ def updateDeviceWirelessElectronicShelfLabel(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/wireless/electronicShelfLabel" body_params = [ @@ -103,7 +103,7 @@ def updateDeviceWirelessRadioAfcPosition(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/wireless/radio/afc/position" body_params = [ @@ -130,7 +130,7 @@ def updateDeviceWirelessRadioOverrides(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/wireless/radio/overrides" body_params = [ @@ -158,7 +158,7 @@ def updateDeviceWirelessRadioSettings(self, serial: str, **kwargs): kwargs.update(locals()) - serial = urllib.parse.quote(serial, safe="") + serial = urllib.parse.quote(str(serial), safe="") resource = f"/devices/{serial}/wireless/radio/settings" body_params = [ @@ -190,7 +190,7 @@ def createNetworkWirelessAirMarshalRule(self, networkId: str, type: str, match: options = ["alert", "allow", "block"] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/airMarshal/rules" body_params = [ @@ -222,8 +222,8 @@ def updateNetworkWirelessAirMarshalRule(self, networkId: str, ruleId: str, **kwa options = ["alert", "allow", "block"] assert kwargs["type"] in options, f'''"type" cannot be "{kwargs["type"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") - ruleId = urllib.parse.quote(ruleId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") resource = f"/networks/{networkId}/wireless/airMarshal/rules/{ruleId}" body_params = [ @@ -247,8 +247,8 @@ def deleteNetworkWirelessAirMarshalRule(self, networkId: str, ruleId: str): - ruleId (string): Rule ID """ - networkId = urllib.parse.quote(networkId, safe="") - ruleId = urllib.parse.quote(ruleId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + ruleId = urllib.parse.quote(str(ruleId), safe="") resource = f"/networks/{networkId}/wireless/airMarshal/rules/{ruleId}" action = { @@ -274,7 +274,7 @@ def updateNetworkWirelessAirMarshalSettings(self, networkId: str, defaultPolicy: f'''"defaultPolicy" cannot be "{kwargs["defaultPolicy"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/airMarshal/settings" body_params = [ @@ -302,7 +302,7 @@ def updateNetworkWirelessAlternateManagementInterface(self, networkId: str, **kw kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/alternateManagementInterface" body_params = [ @@ -331,7 +331,7 @@ def updateNetworkWirelessBilling(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/billing" body_params = [ @@ -363,7 +363,7 @@ def updateNetworkWirelessElectronicShelfLabel(self, networkId: str, **kwargs): options = ["Bluetooth", "high frequency"] assert kwargs["mode"] in options, f'''"mode" cannot be "{kwargs["mode"]}", & must be set to one of: {options}''' - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/electronicShelfLabel" body_params = [ @@ -393,7 +393,7 @@ def createNetworkWirelessEthernetPortsProfile(self, networkId: str, name: str, p kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/ethernet/ports/profiles" body_params = [ @@ -422,7 +422,7 @@ def assignNetworkWirelessEthernetPortsProfiles(self, networkId: str, serials: li kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/ethernet/ports/profiles/assign" body_params = [ @@ -448,7 +448,7 @@ def setNetworkWirelessEthernetPortsProfilesDefault(self, networkId: str, profile kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/ethernet/ports/profiles/setDefault" body_params = [ @@ -477,8 +477,8 @@ def updateNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: s kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = f"/networks/{networkId}/wireless/ethernet/ports/profiles/{profileId}" body_params = [ @@ -504,8 +504,8 @@ def deleteNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: s - profileId (string): Profile ID """ - networkId = urllib.parse.quote(networkId, safe="") - profileId = urllib.parse.quote(profileId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + profileId = urllib.parse.quote(str(profileId), safe="") resource = f"/networks/{networkId}/wireless/ethernet/ports/profiles/{profileId}" action = { @@ -526,7 +526,7 @@ def updateNetworkWirelessLocationScanning(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/location/scanning" body_params = [ @@ -553,7 +553,7 @@ def updateNetworkWirelessLocationWayfinding(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/location/wayfinding" body_params = [ @@ -579,7 +579,7 @@ def updateNetworkWirelessOpportunisticPcap(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/opportunisticPcap" body_params = [ @@ -607,7 +607,7 @@ def updateNetworkWirelessRadioAutoRf(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/radio/autoRf" body_params = [ @@ -638,7 +638,7 @@ def updateNetworkWirelessRadioRrm(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/radio/rrm" body_params = [ @@ -687,7 +687,7 @@ def createNetworkWirelessRfProfile(self, networkId: str, name: str, bandSelectio f'''"bandSelectionType" cannot be "{kwargs["bandSelectionType"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/rfProfiles" body_params = [ @@ -746,8 +746,8 @@ def updateNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str, **kwa f'''"bandSelectionType" cannot be "{kwargs["bandSelectionType"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - rfProfileId = urllib.parse.quote(rfProfileId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + rfProfileId = urllib.parse.quote(str(rfProfileId), safe="") resource = f"/networks/{networkId}/wireless/rfProfiles/{rfProfileId}" body_params = [ @@ -782,8 +782,8 @@ def deleteNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str): - rfProfileId (string): Rf profile ID """ - networkId = urllib.parse.quote(networkId, safe="") - rfProfileId = urllib.parse.quote(rfProfileId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + rfProfileId = urllib.parse.quote(str(rfProfileId), safe="") resource = f"/networks/{networkId}/wireless/rfProfiles/{rfProfileId}" action = { @@ -816,7 +816,7 @@ def updateNetworkWirelessSettings(self, networkId: str, **kwargs): f'''"upgradeStrategy" cannot be "{kwargs["upgradeStrategy"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/settings" body_params = [ @@ -869,7 +869,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds). - radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5). - radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds. - - radiusRadsec (object): The current settings for RADIUS RADSec + - radiusRadsec (object): The current settings for RADIUS RadSec - radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server. - radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access') - radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin') @@ -989,8 +989,8 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): f'''"radiusAttributeForGroupPolicies" cannot be "{kwargs["radiusAttributeForGroupPolicies"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}" body_params = [ @@ -1084,8 +1084,8 @@ def updateNetworkWirelessSsidBonjourForwarding(self, networkId: str, number: str kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/bonjourForwarding" body_params = [ @@ -1114,8 +1114,8 @@ def updateNetworkWirelessSsidDeviceTypeGroupPolicies(self, networkId: str, numbe kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/deviceTypeGroupPolicies" body_params = [ @@ -1145,8 +1145,8 @@ def updateNetworkWirelessSsidEapOverride(self, networkId: str, number: str, **kw kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/eapOverride" body_params = [ @@ -1176,8 +1176,8 @@ def updateNetworkWirelessSsidFirewallL3FirewallRules(self, networkId: str, numbe kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/firewall/l3FirewallRules" body_params = [ @@ -1204,8 +1204,8 @@ def updateNetworkWirelessSsidFirewallL7FirewallRules(self, networkId: str, numbe kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/firewall/l7FirewallRules" body_params = [ @@ -1253,8 +1253,8 @@ def updateNetworkWirelessSsidHotspot20(self, networkId: str, number: str, **kwar f'''"networkAccessType" cannot be "{kwargs["networkAccessType"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/hotspot20" body_params = [ @@ -1290,8 +1290,8 @@ def createNetworkWirelessSsidIdentityPsk(self, networkId: str, number: str, name kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/identityPsks" body_params = [ @@ -1324,9 +1324,9 @@ def updateNetworkWirelessSsidIdentityPsk(self, networkId: str, number: str, iden kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") - identityPskId = urllib.parse.quote(identityPskId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + identityPskId = urllib.parse.quote(str(identityPskId), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/identityPsks/{identityPskId}" body_params = [ @@ -1353,9 +1353,9 @@ def deleteNetworkWirelessSsidIdentityPsk(self, networkId: str, number: str, iden - identityPskId (string): Identity psk ID """ - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") - identityPskId = urllib.parse.quote(identityPskId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") + identityPskId = urllib.parse.quote(str(identityPskId), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/identityPsks/{identityPskId}" action = { @@ -1377,8 +1377,8 @@ def updateNetworkWirelessSsidOpenRoaming(self, networkId: str, number: str, **kw kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/openRoaming" body_params = [ @@ -1406,8 +1406,8 @@ def updateNetworkWirelessSsidPoliciesClientExclusion(self, networkId: str, numbe kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion" body_params = [ @@ -1436,8 +1436,8 @@ def updateNetworkWirelessSsidPoliciesClientExclusionStaticExclusions( kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions" body_params = [ @@ -1465,8 +1465,8 @@ def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkAdd( kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions/bulkAdd" body_params = [ @@ -1494,8 +1494,8 @@ def createNetworkWirelessSsidPoliciesClientExclusionStaticExclusionsBulkRemove( kwargs = locals() - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/policies/clientExclusion/static/exclusions/bulkRemove" action = { @@ -1518,8 +1518,8 @@ def updateNetworkWirelessSsidSchedules(self, networkId: str, number: str, **kwar kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/schedules" body_params = [ @@ -1602,8 +1602,8 @@ def updateNetworkWirelessSsidSplashSettings(self, networkId: str, number: str, * f'''"controllerDisconnectionBehavior" cannot be "{kwargs["controllerDisconnectionBehavior"]}", & must be set to one of: {options}''' ) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/splash/settings" body_params = [ @@ -1652,8 +1652,8 @@ def updateNetworkWirelessSsidTrafficShapingRules(self, networkId: str, number: s kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/trafficShaping/rules" body_params = [ @@ -1683,8 +1683,8 @@ def updateNetworkWirelessSsidVpn(self, networkId: str, number: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") - number = urllib.parse.quote(number, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") + number = urllib.parse.quote(str(number), safe="") resource = f"/networks/{networkId}/wireless/ssids/{number}/vpn" body_params = [ @@ -1714,7 +1714,7 @@ def updateNetworkWirelessZigbee(self, networkId: str, **kwargs): kwargs.update(locals()) - networkId = urllib.parse.quote(networkId, safe="") + networkId = urllib.parse.quote(str(networkId), safe="") resource = f"/networks/{networkId}/wireless/zigbee" body_params = [ @@ -1743,8 +1743,8 @@ def createOrganizationWirelessDevicesLiveToolsClientDisconnect(self, organizatio kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - clientId = urllib.parse.quote(clientId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + clientId = urllib.parse.quote(str(clientId), safe="") resource = f"/organizations/{organizationId}/wireless/devices/liveTools/clients/{clientId}/disconnect" body_params = [ @@ -1770,7 +1770,7 @@ def createOrganizationWirelessDevicesProvisioningDeployment(self, organizationId kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" body_params = [ @@ -1797,7 +1797,7 @@ def updateOrganizationWirelessDevicesProvisioningDeployments(self, organizationI kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments" body_params = [ @@ -1821,8 +1821,8 @@ def deleteOrganizationWirelessDevicesProvisioningDeployment(self, organizationId - deploymentId (string): Deployment ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - deploymentId = urllib.parse.quote(deploymentId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + deploymentId = urllib.parse.quote(str(deploymentId), safe="") resource = f"/organizations/{organizationId}/wireless/devices/provisioning/deployments/{deploymentId}" action = { @@ -1848,7 +1848,7 @@ def createOrganizationWirelessLocationScanningReceiver( kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers" body_params = [ @@ -1880,8 +1880,8 @@ def updateOrganizationWirelessLocationScanningReceiver(self, organizationId: str kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - receiverId = urllib.parse.quote(receiverId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + receiverId = urllib.parse.quote(str(receiverId), safe="") resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" body_params = [ @@ -1906,8 +1906,8 @@ def deleteOrganizationWirelessLocationScanningReceiver(self, organizationId: str - receiverId (string): Receiver ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - receiverId = urllib.parse.quote(receiverId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + receiverId = urllib.parse.quote(str(receiverId), safe="") resource = f"/organizations/{organizationId}/wireless/location/scanning/receivers/{receiverId}" action = { @@ -1930,7 +1930,7 @@ def updateOrganizationWirelessMqttSettings(self, organizationId: str, network: d kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/mqtt/settings" body_params = [ @@ -1958,7 +1958,7 @@ def recalculateOrganizationWirelessRadioAutoRfChannels(self, organizationId: str kwargs = locals() - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/radio/autoRf/channels/recalculate" body_params = [ @@ -1988,7 +1988,7 @@ def createOrganizationWirelessSsidsFirewallIsolationAllowlistEntry( kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries" body_params = [ @@ -2014,8 +2014,8 @@ def deleteOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organiz - entryId (string): Entry ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - entryId = urllib.parse.quote(entryId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + entryId = urllib.parse.quote(str(entryId), safe="") resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" action = { @@ -2037,8 +2037,8 @@ def updateOrganizationWirelessSsidsFirewallIsolationAllowlistEntry(self, organiz kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - entryId = urllib.parse.quote(entryId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + entryId = urllib.parse.quote(str(entryId), safe="") resource = f"/organizations/{organizationId}/wireless/ssids/firewall/isolation/allowlist/entries/{entryId}" body_params = [ @@ -2066,7 +2066,7 @@ def createOrganizationWirelessSsidsProfile(self, organizationId: str, name: str, kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/ssids/profiles" body_params = [ @@ -2095,7 +2095,7 @@ def createOrganizationWirelessSsidsProfilesAssignment(self, organizationId: str, kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" body_params = [ @@ -2123,7 +2123,7 @@ def deleteOrganizationWirelessSsidsProfilesAssignments(self, organizationId: str kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") resource = f"/organizations/{organizationId}/wireless/ssids/profiles/assignments" action = { @@ -2145,8 +2145,8 @@ def updateOrganizationWirelessSsidsProfile(self, organizationId: str, id: str, * kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/wireless/ssids/profiles/{id}" body_params = [ @@ -2170,8 +2170,8 @@ def deleteOrganizationWirelessSsidsProfile(self, organizationId: str, id: str): - id (string): ID """ - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/wireless/ssids/profiles/{id}" action = { @@ -2193,8 +2193,8 @@ def updateOrganizationWirelessZigbeeDevice(self, organizationId: str, id: str, e kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - id = urllib.parse.quote(id, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + id = urllib.parse.quote(str(id), safe="") resource = f"/organizations/{organizationId}/wireless/zigbee/devices/{id}" body_params = [ @@ -2221,8 +2221,8 @@ def updateOrganizationWirelessZigbeeDoorLock(self, organizationId: str, doorLock kwargs.update(locals()) - organizationId = urllib.parse.quote(organizationId, safe="") - doorLockId = urllib.parse.quote(doorLockId, safe="") + organizationId = urllib.parse.quote(str(organizationId), safe="") + doorLockId = urllib.parse.quote(str(doorLockId), safe="") resource = f"/organizations/{organizationId}/wireless/zigbee/doorLocks/{doorLockId}" body_params = [ diff --git a/meraki/api/devices.py b/meraki/api/devices.py index e1f5909..d8a95e4 100644 --- a/meraki/api/devices.py +++ b/meraki/api/devices.py @@ -964,6 +964,56 @@ def getDeviceLiveToolsPortsStatus(self, serial: str, jobId: str): return self._session.get(metadata, resource) + def createDeviceLiveToolsPowerUsage(self, serial: str, **kwargs): + """ + **Enqueues a live tool job that retrieves details about a device's overall power usage** + https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-power-usage + + - serial (string): Serial + - callback (object): Details for the callback. Please include either an httpServerId OR url and sharedSecret + """ + + kwargs.update(locals()) + + metadata = { + "tags": ["devices", "liveTools", "power", "usage"], + "operation": "createDeviceLiveToolsPowerUsage", + } + serial = urllib.parse.quote(str(serial), safe="") + resource = f"/devices/{serial}/liveTools/power/usage" + + body_params = [ + "callback", + ] + payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} + + if self._session._validate_kwargs: + all_params = [] + body_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning(f"createDeviceLiveToolsPowerUsage: ignoring unrecognized kwargs: {invalid}") + + return self._session.post(metadata, resource, payload) + + def getDeviceLiveToolsPowerUsage(self, serial: str, jobId: str): + """ + **Retrieve the status and results of a previously created live tool job fetching details about a device's overall power usage.** + https://developer.cisco.com/meraki/api-v1/#!get-device-live-tools-power-usage + + - serial (string): Serial + - jobId (string): Job ID + """ + + metadata = { + "tags": ["devices", "liveTools", "power", "usage"], + "operation": "getDeviceLiveToolsPowerUsage", + } + serial = urllib.parse.quote(str(serial), safe="") + jobId = urllib.parse.quote(str(jobId), safe="") + resource = f"/devices/{serial}/liveTools/power/usage/{jobId}" + + return self._session.get(metadata, resource) + def createDeviceLiveToolsReboot(self, serial: str, **kwargs): """ **Enqueue a job to reboot a device** diff --git a/meraki/api/organizations.py b/meraki/api/organizations.py index 080ddf3..dc2fe75 100644 --- a/meraki/api/organizations.py +++ b/meraki/api/organizations.py @@ -98,6 +98,7 @@ def updateOrganization(self, organizationId: str, **kwargs): - name (string): The name of the organization - management (object): Information about the organization's management system - api (object): API-specific settings + - privacy (object): Privacy-related settings for the organization. """ kwargs.update(locals()) @@ -113,6 +114,7 @@ def updateOrganization(self, organizationId: str, **kwargs): "name", "management", "api", + "privacy", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} @@ -2369,6 +2371,9 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s - organizationId (string): Organization ID - networkId (string): Network ID to query. + - serials (array): A list of serials of AP devices + - bands (array): Filter results by band. Valid bands are: 2.4, 5, and 6. + - ssidNumbers (array): Filter results by SSID number - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. - t1 (string): The end of the timespan for the data. t1 can be a maximum of 7 days after t0. - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 7 days. The default is 8 hours. If interval is provided, the timespan will be autocalculated. @@ -2386,6 +2391,9 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s query_params = [ "networkId", + "serials", + "bands", + "ssidNumbers", "t0", "t1", "timespan", @@ -2393,8 +2401,18 @@ def getOrganizationAssuranceClientsConnectedCountHistory(self, organizationId: s ] params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + array_params = [ + "serials", + "bands", + "ssidNumbers", + ] + for k, v in kwargs.items(): + if k.strip() in array_params: + params[f"{k.strip()}[]"] = kwargs[f"{k}"] + params.pop(k.strip()) + if self._session._validate_kwargs: - all_params = query_params + all_params = query_params + array_params invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] if invalid and self._session._logger: self._session._logger.warning( @@ -8752,6 +8770,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): - enforceTwoFactorAuth (boolean): Boolean indicating whether users in this organization will be required to use an extra verification code when logging in to Dashboard. This code will be sent to their mobile phone via SMS, or can be generated by the authenticator application. - enforceLoginIpRanges (boolean): Boolean indicating whether organization will restrict access to Dashboard (including the API) from certain IP addresses. - loginIpRanges (array): List of acceptable IP ranges. Entries can be single IP addresses, IP address ranges, and CIDR subnets. + - enforceLockedIpSessions (boolean): Boolean indicating whether Dashboard sessions are locked to the IP address from which they were established. Only applicable to organizations that support locked-IP sessions; otherwise the parameter is ignored. - apiAuthentication (object): Details for indicating whether organization will restrict access to API (but not Dashboard) to certain IP addresses. """ @@ -8778,6 +8797,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs): "enforceTwoFactorAuth", "enforceLoginIpRanges", "loginIpRanges", + "enforceLockedIpSessions", "apiAuthentication", ] payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params} diff --git a/meraki/api/wireless.py b/meraki/api/wireless.py index e87ed42..fba8a5d 100644 --- a/meraki/api/wireless.py +++ b/meraki/api/wireless.py @@ -2686,7 +2686,7 @@ def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs): - radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds). - radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5). - radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds. - - radiusRadsec (object): The current settings for RADIUS RADSec + - radiusRadsec (object): The current settings for RADIUS RadSec - radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server. - radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access') - radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin') @@ -5429,6 +5429,49 @@ def getOrganizationAssuranceWirelessExperienceMetricsOverviewHistoryByNetwork( return self._session.get_pages(metadata, resource, params, total_pages, direction) + def getOrganizationAssuranceWirelessExperienceMostImpactedNetworks(self, organizationId: str, **kwargs): + """ + **Returns the most impacted wireless experience networks and the top failure contributor for each network.** + https://developer.cisco.com/meraki/api-v1/#!get-organization-assurance-wireless-experience-most-impacted-networks + + - organizationId (string): Organization ID + - t0 (string): The beginning of the timespan for the data. The maximum lookback period is 14 days from today. + - t1 (string): The end of the timespan for the data. t1 can be a maximum of 14 days after t0. + - timespan (number): The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be greater than or equal to 15 minutes and be less than or equal to 14 days. The default is 2 hours. + - limit (integer): Number of most impacted networks to return. Default is 5. Maximum is 10. + """ + + kwargs.update(locals()) + + if "limit" in kwargs: + options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + assert kwargs["limit"] in options, f'''"limit" cannot be "{kwargs["limit"]}", & must be set to one of: {options}''' + + metadata = { + "tags": ["wireless", "configure", "experience", "mostImpactedNetworks"], + "operation": "getOrganizationAssuranceWirelessExperienceMostImpactedNetworks", + } + organizationId = urllib.parse.quote(str(organizationId), safe="") + resource = f"/organizations/{organizationId}/assurance/wireless/experience/mostImpactedNetworks" + + query_params = [ + "t0", + "t1", + "timespan", + "limit", + ] + params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params} + + if self._session._validate_kwargs: + all_params = query_params + invalid = [k for k in kwargs if k.strip() not in all_params and k != "self"] + if invalid and self._session._logger: + self._session._logger.warning( + f"getOrganizationAssuranceWirelessExperienceMostImpactedNetworks: ignoring unrecognized kwargs: {invalid}" + ) + + return self._session.get(metadata, resource, params) + def getOrganizationAssuranceWirelessExperienceSuccessfulConnectsByNetwork( self, organizationId: str, total_pages=1, direction="next", **kwargs ): @@ -8759,7 +8802,7 @@ def getOrganizationWirelessDevicesProvisioningRecommendationsTags(self, organiza def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): """ - **Query for details on the organization's RADSEC device Certificate Authority certificates (CAs)** + **Query for details on the organization's RadSec device Certificate Authority certificates (CAs)** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities - organizationId (string): Organization ID @@ -8800,7 +8843,7 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizati def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organizationId: str, **kwargs): """ - **Update an organization's RADSEC device Certificate Authority (CA) state** + **Update an organization's RadSec device Certificate Authority (CA) state** https://developer.cisco.com/meraki/api-v1/#!update-organization-wireless-devices-radsec-certificates-authorities - organizationId (string): Organization ID @@ -8835,7 +8878,7 @@ def updateOrganizationWirelessDevicesRadsecCertificatesAuthorities(self, organiz def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizationId: str): """ - **Create an organization's RADSEC device Certificate Authority (CA)** + **Create an organization's RadSec device Certificate Authority (CA)** https://developer.cisco.com/meraki/api-v1/#!create-organization-wireless-devices-radsec-certificates-authority - organizationId (string): Organization ID @@ -8852,7 +8895,7 @@ def createOrganizationWirelessDevicesRadsecCertificatesAuthority(self, organizat def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organizationId: str, **kwargs): """ - **Query for certificate revocation list (CRL) for the organization's RADSEC device Certificate Authorities (CAs).** + **Query for certificate revocation list (CRL) for the organization's RadSec device Certificate Authorities (CAs).** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls - organizationId (string): Organization ID @@ -8893,7 +8936,7 @@ def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrls(self, organi def getOrganizationWirelessDevicesRadsecCertificatesAuthoritiesCrlsDeltas(self, organizationId: str, **kwargs): """ - **Query for all delta certificate revocation list (CRL) for the organization's RADSEC device Certificate Authority (CA) with the given id.** + **Query for all delta certificate revocation list (CRL) for the organization's RadSec device Certificate Authority (CA) with the given id.** https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-devices-radsec-certificates-authorities-crls-deltas - organizationId (string): Organization ID diff --git a/pyproject.toml b/pyproject.toml index 97cfbbf..8a707b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "meraki" -version = "4.1.0b3" +version = "4.2.0b0" description = "Cisco Meraki Dashboard API library" authors = [ {name = "Cisco Meraki", email = "api-feedback@meraki.net"} diff --git a/uv.lock b/uv.lock index 692a5a5..f1e132f 100644 --- a/uv.lock +++ b/uv.lock @@ -302,7 +302,7 @@ wheels = [ [[package]] name = "meraki" -version = "4.1.0b3" +version = "4.2.0b0" source = { editable = "." } dependencies = [ { name = "httpx" },