Updating the switchport configuration of a Meraki device
So far, we have retrieved information and sent requests to carry out operations. But what we have not done yet is update a resource. In this recipe, we are going to change the switchport maximum number of sticky MAC addresses allowed on our switch port to 10
.
Getting ready
Open your code editor and start by creating a file called update.py
. Next, navigate your terminal to the same directory that you just created the update.py
file in.
In your terminal, you'll also have to set an environment variable called MERAKI_DASHBOARD_API_KEY
, whose value is the API key for your Meraki organization. Please refer to the Authenticating web requests recipe for an introduction on how to set environment variables on different operating systems.
How to do it…
Follow these steps to authenticate your request against the Meraki API and update the switch port configuration:
- Set up a
requests
session using the API...