Table of Contents

Interface ISwitchAccessPolicies

Namespace
Meraki.Api.Interfaces.Products.Switch
Assembly
Meraki.Api.dll

Represents a collection of functions to interact with the API endpoints

public interface ISwitchAccessPolicies

Methods

CreateNetworkSwitchAccessPolicyAsync(string, AccessPolicy, CancellationToken)

Create an access policy for a switch network.

[Post("/networks/{networkId}/switch/accessPolicies")]
Task<AccessPolicy> CreateNetworkSwitchAccessPolicyAsync(string networkId, AccessPolicy createNetworkSwitchAccessPolicy, CancellationToken cancellationToken = default)

Parameters

networkId string

The network id

createNetworkSwitchAccessPolicy AccessPolicy

Body for creating network switch access policy

cancellationToken CancellationToken

Returns

Task<AccessPolicy>

Exceptions

ApiException

Thrown when fails to make API call

DeleteNetworkSwitchAccessPolicyAsync(string, string, CancellationToken)

Delete an access policy for a switch network

[Delete("/networks/{networkId}/switch/accessPolicies/{accessPolicyNumber}")]
Task DeleteNetworkSwitchAccessPolicyAsync(string networkId, string accessPolicyNumber, CancellationToken cancellationToken = default)

Parameters

networkId string

The network id

accessPolicyNumber string

The access policy number

cancellationToken CancellationToken

Returns

Task

Exceptions

ApiException

Thrown when fails to make API call

GetNetworkSwitchAccessPoliciesAsync(string, CancellationToken)

List the access policies for a switch network.

[Get("/networks/{networkId}/switch/accessPolicies")]
Task<List<AccessPolicy>> GetNetworkSwitchAccessPoliciesAsync(string networkId, CancellationToken cancellationToken = default)

Parameters

networkId string

The network id

cancellationToken CancellationToken

Returns

Task<List<AccessPolicy>>

Exceptions

ApiException

Thrown when fails to make API call

GetNetworkSwitchAccessPolicyAsync(string, string, CancellationToken)

Return a specific access policy for a switch network

[Get("/networks/{networkId}/switch/accessPolicies/{accessPolicyNumber}")]
Task<AccessPolicy> GetNetworkSwitchAccessPolicyAsync(string networkId, string accessPolicyNumber, CancellationToken cancellationToken = default)

Parameters

networkId string

The network id

accessPolicyNumber string

The access policy number

cancellationToken CancellationToken

Returns

Task<AccessPolicy>

Exceptions

ApiException

Thrown when fails to make API call

UpdateNetworkSwitchAccessPolicyAsync(string, string, AccessPolicy, CancellationToken)

Update an access policy for a switch network.

[Put("/networks/{networkId}/switch/accessPolicies/{accessPolicyNumber}")]
Task<AccessPolicy> UpdateNetworkSwitchAccessPolicyAsync(string networkId, string accessPolicyNumber, AccessPolicy updateNetworkSwitchAccessPolicy, CancellationToken cancellationToken = default)

Parameters

networkId string

The network id

accessPolicyNumber string

The access policy number

updateNetworkSwitchAccessPolicy AccessPolicy

Body for updating network switch access policy

cancellationToken CancellationToken

Returns

Task<AccessPolicy>

Exceptions

ApiException

Thrown when fails to make API call