digitalocean
Version:
nodejs wrapper for digitalocean v2 api
2,135 lines (539 loc) • 28.4 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Firewall</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Firewall</h1>
<section>
<header>
<h2>Firewall</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Firewall"><span class="type-signature"></span>new Firewall<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Firewall resource
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line5">line 5</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="addDroplets"><span class="type-signature"></span>addDroplets<span class="signature">(firewallId, dropletIds, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Add droplets to a firewall.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>firewallId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to update</td>
</tr>
<tr>
<td class="name"><code>dropletIds</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">Array.<number></span>
</td>
<td class="attributes">
</td>
<td class="description last">The ids of droplets to add. See the <a href="https://developers.digitalocean.com/documentation/v2/#firewalls">official docs</a> for valid attributes.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line85">line 85</a>
</li></ul></dd>
</dl>
<h4 class="name" id="addRules"><span class="type-signature"></span>addRules<span class="signature">(firewallId, rules, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Add rules to a firewall.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>firewallId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to update</td>
</tr>
<tr>
<td class="name"><code>rules</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="description last">The rule definition object. See the <a href="https://developers.digitalocean.com/documentation/v2/#firewalls">official docs</a> for valid attributes.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line149">line 149</a>
</li></ul></dd>
</dl>
<h4 class="name" id="addTags"><span class="type-signature"></span>addTags<span class="signature">(firewallId, tags, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Add tags to a firewall.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>firewallId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to update</td>
</tr>
<tr>
<td class="name"><code>tags</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">Array.<string></span>
</td>
<td class="attributes">
</td>
<td class="description last">Tags to add. See the <a href="https://developers.digitalocean.com/documentation/v2/#firewalls">official docs</a> for valid attributes.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line117">line 117</a>
</li></ul></dd>
</dl>
<h4 class="name" id="create"><span class="type-signature"></span>create<span class="signature">(attributes, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Create a firewall object.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>attributes</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="description last">The attributes with which to create the firewall. See the <a href="https://developers.digitalocean.com/documentation/v2/#firewalls">official docs</a> for valid attributes.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line34">line 34</a>
</li></ul></dd>
</dl>
<h4 class="name" id="delete"><span class="type-signature"></span>delete<span class="signature">(id, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Delete the identified firewall object.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to delete</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line58">line 58</a>
</li></ul></dd>
</dl>
<h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(id, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Get the identified firewall object.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to retrieve</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line45">line 45</a>
</li></ul></dd>
</dl>
<h4 class="name" id="removeDroplets"><span class="type-signature"></span>removeDroplets<span class="signature">(firewallId, dropletIds, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Remove droplets from a firewall.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>firewallId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to update</td>
</tr>
<tr>
<td class="name"><code>dropletIds</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">Array.<number></span>
</td>
<td class="attributes">
</td>
<td class="description last">The ids of droplets to remove. See the <a href="https://developers.digitalocean.com/documentation/v2/#firewalls">official docs</a> for valid attributes.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line101">line 101</a>
</li></ul></dd>
</dl>
<h4 class="name" id="removeRules"><span class="type-signature"></span>removeRules<span class="signature">(firewallId, rules, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Remove rules from a firewall.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>firewallId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to update</td>
</tr>
<tr>
<td class="name"><code>rules</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="description last">The rule definition object. See the <a href="https://developers.digitalocean.com/documentation/v2/#firewalls">official docs</a> for valid attributes.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line162">line 162</a>
</li></ul></dd>
</dl>
<h4 class="name" id="removeTags"><span class="type-signature"></span>removeTags<span class="signature">(firewallId, tags, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Remove tags from a firewall.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>firewallId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to update</td>
</tr>
<tr>
<td class="name"><code>tags</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">Array.<string></span>
</td>
<td class="attributes">
</td>
<td class="description last">Tags to add. See the <a href="https://developers.digitalocean.com/documentation/v2/#firewalls">official docs</a> for valid attributes.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line133">line 133</a>
</li></ul></dd>
</dl>
<h4 class="name" id="update"><span class="type-signature"></span>update<span class="signature">(id, attributes, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Update the identified firewall object.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The id of the firewall to update</td>
</tr>
<tr>
<td class="name"><code>attributes</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="description last">The attributes with which to create the firewall. See the <a href="https://developers.digitalocean.com/documentation/v2/#firewalls">official docs</a> for valid attributes.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="global.html#requestCallback">requestCallback</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">callback that handles the response</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="digitalocean_firewall.js.html">digitalocean/firewall.js</a>, <a href="digitalocean_firewall.js.html#line72">line 72</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Account.html">Account</a></li><li><a href="Action.html">Action</a></li><li><a href="Certificate.html">Certificate</a></li><li><a href="Client.html">Client</a></li><li><a href="Domain.html">Domain</a></li><li><a href="Droplet.html">Droplet</a></li><li><a href="Firewall.html">Firewall</a></li><li><a href="FloatingIp.html">FloatingIp</a></li><li><a href="Image.html">Image</a></li><li><a href="ListResponse.html">ListResponse</a></li><li><a href="LoadBalancer.html">LoadBalancer</a></li><li><a href="Region.html">Region</a></li><li><a href="Size.html">Size</a></li><li><a href="Snapshot.html">Snapshot</a></li><li><a href="Tag.html">Tag</a></li><li><a href="Volume.html">Volume</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>