Interface ISwitchPorts
- Namespace
- Meraki.Api.Interfaces.Products.Switch
- Assembly
- Meraki.Api.dll
Represents a collection of functions to interact with the API endpoints
public interface ISwitchPorts
Methods
CycleDeviceSwitchPortsAsync(string, DeviceSwitchPortsCycleRequest, CancellationToken)
Cycle a set of switch ports
[Post("/devices/{serial}/switch/ports/cycle")]
Task<DeviceSwitchPortsCycleRequest> CycleDeviceSwitchPortsAsync(string serial, DeviceSwitchPortsCycleRequest deviceSwitchPortsCycleRequest, CancellationToken cancellationToken = default)
Parameters
serialstringThe serial number
deviceSwitchPortsCycleRequestDeviceSwitchPortsCycleRequestBody for cycling switch ports
cancellationTokenCancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
GetDeviceSwitchPortAsync(string, string, CancellationToken)
Return a switch port
[Get("/devices/{serial}/switch/ports/{portId}")]
Task<SwitchPort> GetDeviceSwitchPortAsync(string serial, string portId, CancellationToken cancellationToken = default)
Parameters
serialstringThe serial number
portIdstringThe port id
cancellationTokenCancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
GetDeviceSwitchPortsAsync(string, CancellationToken)
List the switch ports for a switch
[Get("/devices/{serial}/switch/ports")]
Task<List<SwitchPort>> GetDeviceSwitchPortsAsync(string serial, CancellationToken cancellationToken = default)
Parameters
serialstringThe serial number
cancellationTokenCancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
GetDeviceSwitchPortsStatusesAsync(string, string, double?, CancellationToken)
Return the status for all the ports of a switch
[Get("/devices/{serial}/switch/ports/statuses")]
Task<List<SwitchPortStatus>> GetDeviceSwitchPortsStatusesAsync(string serial, string t0 = null, double? timespan = null, CancellationToken cancellationToken = default)
Parameters
serialstringThe serial number
t0stringThe beginning of the timespan for the data. The maximum lookback period is 31 days from today. (optional)
timespandouble?The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. (optional)
cancellationTokenCancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
GetDeviceSwitchPortsStatusesPacketsAsync(string, string, double?, CancellationToken)
Return the packet counters for all the ports of a switch
[Get("/devices/{serial}/switch/ports/statuses/packets")]
Task<List<PacketsList>> GetDeviceSwitchPortsStatusesPacketsAsync(string serial, string t0 = null, double? timespan = null, CancellationToken cancellationToken = default)
Parameters
serialstringThe serial number
t0stringThe beginning of the timespan for the data. The maximum lookback period is 1 day from today. (optional)
timespandouble?The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 1 day. The default is 1 day. (optional)
cancellationTokenCancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
UpdateDeviceSwitchPortAsync(string, string, SwitchPort, CancellationToken)
Update a switch port
[Put("/devices/{serial}/switch/ports/{portId}")]
Task<SwitchPort> UpdateDeviceSwitchPortAsync(string serial, string portId, SwitchPort deviceSwitchPort, CancellationToken cancellationToken = default)
Parameters
serialstringThe serial number
portIdstringThe port id
deviceSwitchPortSwitchPortThe new configuration
cancellationTokenCancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
UpdateDeviceSwitchPortAsync(string, string, SwitchPortUpdateRequest, CancellationToken)
Update a switch port
[Put("/devices/{serial}/switch/ports/{portId}")]
Task<SwitchPort> UpdateDeviceSwitchPortAsync(string serial, string portId, SwitchPortUpdateRequest switchPortUpdateRequest, CancellationToken cancellationToken = default)
Parameters
serialstringThe serial number
portIdstringThe port id
switchPortUpdateRequestSwitchPortUpdateRequestThe switch port update request
cancellationTokenCancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call