Create a Meraki REST API wrapper for the mx-l3-firewall ressource. See the online documentation for more information.
- Source:
Example
const apiKey = 'secret meraki api key'
const organizationId = 'meraki organization id'
const version = 'v0'
const target = 'n12'
const basePath = `/${target}/${version}/network`
const rateLimiter = {
enabled: true
}
const mxL3FirewallEndpoints = require('./lib/rest/mxL3Firewall')({ apiKey, target, basePath, baseUrl, rateLimiter })
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
apiKey |
string |
<optional> |
''
|
The Meraki api key |
target |
string |
<optional> |
'api'
|
The Meraki target |
basePath |
string |
<optional> |
'/'
|
The Meraki base path for the mx-l3-firewall ressource |
baseUrl |
string |
<optional> |
'https://api.meraki.com'
|
The Meraki base url for the ressource |
rateLimiter |
string | The rate limiter (bottleneck) configuration |
||
logger |
object |
<optional> |
Logger to use if logging is enabled |
Returns:
The initialized Meraki REST API wrapper for the mx-l3-firewall ressource
- Type
- Object
Methods
(static) listMxL3FirewallRules(apiKeyopt, targetopt, scopeopt, networkId) → {Promise}
- Source:
List the L3 firewall rules for a MX network.
Example
Example response
[
{
"comment": "Allow TCP traffic to subnet with HTTP servers.",
"policy": "allow",
"protocol": "tcp",
"destPort": 443,
"destCidr": "192.168.1.0/24",
"srcPort": "Any",
"srcCidr": "Any",
"syslogEnabled": false
}
]
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
apiKey |
string |
<optional> |
Optional custom apiKey for this request (if not set will take the inital apiKey) |
target |
string |
<optional> |
Optional custom target for this request (if not set will take the inital target) |
scope |
string |
<optional> |
Optional custom scope for rate limiter |
networkId |
string | The id of the MX network for which to list the L3 firewall rules |
Returns:
A promise holding the L3 firewall rules this MX network
- Type
- Promise
(static) updateMxL3FirewallRule(apiKeyopt, targetopt, scopeopt, networkId, rules, syslogDefaultRuleopt) → {Promise}
- Source:
Update the L3 firewall rules of an MX network. Pass an empty array to remove all rules but the default rule. If the network is bound to a template you have to pass the template id instead of the network id.
Examples
Example request data
{
"comment": "Allow TCP traffic to subnet with HTTP servers.",
"policy": "allow",
"protocol": "tcp",
"destPort": 443,
"destCidr": "192.168.1.0/24",
"srcPort": "Any",
"srcCidr": "Any",
"syslogEnabled": false
}
Example response
[
{
"comment": "Allow TCP traffic to subnet with HTTP servers.",
"policy": "allow",
"protocol": "tcp",
"destPort": 443,
"destCidr": "192.168.1.0/24",
"srcPort": "Any",
"srcCidr": "Any",
"syslogEnabled": false
}
]
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiKey |
string |
<optional> |
Optional custom apiKey for this request (if not set will take the inital apiKey) |
||||||||||||||||||||||||||||||||||||
target |
string |
<optional> |
Optional custom target for this request (if not set will take the inital target) |
||||||||||||||||||||||||||||||||||||
scope |
string |
<optional> |
Optional custom scope for rate limiter |
||||||||||||||||||||||||||||||||||||
networkId |
string | The id of the MX network for which to list the L3 firewall rules |
|||||||||||||||||||||||||||||||||||||
rules |
array |
Properties
|
|||||||||||||||||||||||||||||||||||||
syslogDefaultRule |
boolean |
<optional> |
Log the special default rule (boolean value - enable only if you've configured a syslog server) |
Returns:
A promise holding the updated L3 firewall rules this MX network
- Type
- Promise