Update A Switch Port
PUT {{baseUrl}}/devices/:serial/switch/ports/:portId
Update a switch port #### Body Parameters Parameter|Type|Description :-------------: |:-------------: |:-------------: name| string| The name of the switch port tags| array| The list of tags of the switch port enabled| boolean| The status of the switch port type| string| The type of the switch port ('trunk' or 'access') vlan| integer| The VLAN of the switch port. A null value will clear the value set for trunk ports. voiceVlan| integer| The voice VLAN of the switch port. Only applicable to access ports. allowedVlans| string| The VLANs allowed on the switch port. Only applicable to trunk ports. poeEnabled| boolean| The PoE status of the switch port isolationEnabled| boolean| The isolation status of the switch port rstpEnabled| boolean| The rapid spanning tree protocol status stpGuard| string| The state of the STP guard ('disabled', 'root guard', 'bpdu guard' or 'loop guard') linkNegotiation| string| The link speed for the switch port portScheduleId| string| The ID of the port schedule. A value of null will clear the port schedule. udld| string| The action to take when Unidirectional Link is detected (Alert only, Enforce). Default configuration is Alert only. accessPolicyType| string| The type of the access policy of the switch port. Only applicable to access ports. Can be one of 'Open', 'Custom access policy', 'MAC allow list' or 'Sticky MAC allow list' accessPolicyNumber| integer| The number of a custom access policy to configure on the switch port. Only applicable when 'accessPolicyType' is 'Custom access policy' macAllowList| array| Only devices with MAC addresses specified in this list will have access to this port. Up to 20 MAC addresses can be defined. Only applicable when 'accessPolicyType' is 'MAC allow list' stickyMacAllowList| array| The initial list of MAC addresses for sticky Mac allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list' stickyMacAllowListLimit| integer| The maximum number of MAC addresses for sticky MAC allow list. Only applicable when 'accessPolicyType' is 'Sticky MAC allow list' stormControlEnabled| boolean| The storm control status of the switch port flexibleStackingEnabled| boolean| For supported switches (e.g. MS420/MS425), whether or not the port has flexible stacking enabled.
Supports Action Batches
Resource | Operation |
---|---|
/devices/{serial}/switch/ports/{portId} | update |
Request Body
{"name"=>"<string>", "tags"=>["<string>", "<string>"], "enabled"=>"<boolean>", "type"=>"<string>", "vlan"=>"<integer>", "voiceVlan"=>"<integer>", "allowedVlans"=>"<string>", "poeEnabled"=>"<boolean>", "isolationEnabled"=>"<boolean>", "rstpEnabled"=>"<boolean>", "stpGuard"=>"<string>", "linkNegotiation"=>"<string>", "portScheduleId"=>"<string>", "udld"=>"<string>", "accessPolicyType"=>"<string>", "accessPolicyNumber"=>"<integer>", "macAllowList"=>["<string>", "<string>"], "stickyMacAllowList"=>["<string>", "<string>"], "stickyMacAllowListLimit"=>"<integer>", "stormControlEnabled"=>"<boolean>", "flexibleStackingEnabled"=>"<boolean>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-Cisco-Meraki-API-Key | null | ||
Content-Type | string |
RESPONSES
status: OK
{"portId":"1","name":"My switch port","tags":["tag1","tag2"],"enabled":true,"poeEnabled":true,"type":"access","vlan":10,"voiceVlan":20,"isolationEnabled":false,"rstpEnabled":true,"stpGuard":"disabled","linkNegotiation":"Auto negotiate","portScheduleId":"1234","udld":"Alert only","accessPolicyType":"Sticky MAC allow list","stickyMacAllowList":["34:56:fe:ce:8e:b0","34:56:fe:ce:8e:b1"],"stickyMacAllowListLimit":5,"stormControlEnabled":true}