|
6 | 6 | <language>en-US</language> |
7 | 7 | <author>Enthusiastic Hugo User</author> |
8 | 8 | <rights>Copyright (c) 2014, Enthusiastic Hugo User; all rights reserved.</rights> |
9 | | - <updated>Wed, 09 Aug 2017 00:00:00 UTC</updated> |
| 9 | + <updated>Mon, 02 Oct 2017 00:00:00 UTC</updated> |
| 10 | + |
| 11 | + <item> |
| 12 | + <title>Add, get, edit and remove Security Group rules</title> |
| 13 | + <link>https://softlayer.github.io/rest/addgeteditremovesecuritygrouprules/</link> |
| 14 | + <pubDate>Mon, 02 Oct 2017 00:00:00 UTC</pubDate> |
| 15 | + <author>Enthusiastic Hugo User</author> |
| 16 | + <guid>https://softlayer.github.io/rest/addgeteditremovesecuritygrouprules/</guid> |
| 17 | + <description> |
| 18 | + |
| 19 | +<h3 id="add-rules">Add rules</h3> |
| 20 | + |
| 21 | +<p>Operation: <code>POST</code></p> |
| 22 | + |
| 23 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}/addRules</code></p> |
| 24 | + |
| 25 | +<p>Example CURL:</p> |
| 26 | + |
| 27 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -X POST 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/136741/addRules' -d '{&quot;parameters&quot;: [[{&quot;direction&quot;: &quot;ingress&quot;,&quot;portRangeMin&quot;:100,&quot;portRangeMax&quot;:101,&quot;protocol&quot;:&quot;tcp&quot;}]]}' |
| 28 | +</code></pre> |
| 29 | + |
| 30 | +<hr /> |
| 31 | + |
| 32 | +<h3 id="get-rules">Get rules</h3> |
| 33 | + |
| 34 | +<p>Operation: <code>GET</code></p> |
| 35 | + |
| 36 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}/getObject?objectMask=mask[rules]</code></p> |
| 37 | + |
| 38 | +<p>Example CURL:</p> |
| 39 | + |
| 40 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -g -X GET 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/42401/getObject?objectMask=mask[rules]' |
| 41 | +</code></pre> |
| 42 | + |
| 43 | +<p>Example Response:</p> |
| 44 | + |
| 45 | +<pre><code>{ |
| 46 | + &quot;createDate&quot;: &quot;2017-05-19T14:00:15-05:00&quot;, |
| 47 | + &quot;description&quot;: &quot;VSIs in this group respond to ping requests.&quot;, |
| 48 | + &quot;id&quot;: 42401, |
| 49 | + &quot;modifyDate&quot;: null, |
| 50 | + &quot;name&quot;: &quot;allow_ping&quot;, |
| 51 | + &quot;rules&quot;: [ |
| 52 | + { |
| 53 | + &quot;direction&quot;: &quot;ingress&quot;, |
| 54 | + &quot;ethertype&quot;: &quot;IPv4&quot;, |
| 55 | + &quot;id&quot;: 43001, |
| 56 | + &quot;portRangeMax&quot;: 0, |
| 57 | + &quot;portRangeMin&quot;: 8, |
| 58 | + &quot;protocol&quot;: &quot;icmp&quot;, |
| 59 | + &quot;remoteGroupId&quot;: null, |
| 60 | + &quot;securityGroupId&quot;: 42401 |
| 61 | + } |
| 62 | + ] |
| 63 | +} |
| 64 | + |
| 65 | +</code></pre> |
| 66 | + |
| 67 | +<hr /> |
| 68 | + |
| 69 | +<h3 id="edit-rules">Edit Rules</h3> |
| 70 | + |
| 71 | +<p>Operation: <code>PUT</code></p> |
| 72 | + |
| 73 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}/editRules</code></p> |
| 74 | + |
| 75 | +<p>Example CURL:</p> |
| 76 | + |
| 77 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -X PUT 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/123456/editRules' -d '{&quot;parameters&quot;: [[{&quot;id&quot;: 11111,&quot;portRangeMin&quot;: 99},{&quot;id&quot;: 22222,&quot;portRangeMin&quot;: 199}]]}' |
| 78 | +</code></pre> |
| 79 | + |
| 80 | +<hr /> |
| 81 | + |
| 82 | +<h3 id="remove-rules">Remove Rules</h3> |
| 83 | + |
| 84 | +<p>Operation: <code>PUT</code></p> |
| 85 | + |
| 86 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}/removeRules</code></p> |
| 87 | + |
| 88 | +<p>Example CURL:</p> |
| 89 | + |
| 90 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -X PUT 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/123456/removeRules' -d '{&quot;parameters&quot;: [[11111]]}' |
| 91 | +</code></pre> |
| 92 | +</description> |
| 93 | + </item> |
| 94 | + |
| 95 | + <item> |
| 96 | + <title>Create, get, edit and delete Security Groups</title> |
| 97 | + <link>https://softlayer.github.io/rest/creategeteditdeletesecuritygroup/</link> |
| 98 | + <pubDate>Mon, 02 Oct 2017 00:00:00 UTC</pubDate> |
| 99 | + <author>Enthusiastic Hugo User</author> |
| 100 | + <guid>https://softlayer.github.io/rest/creategeteditdeletesecuritygroup/</guid> |
| 101 | + <description> |
| 102 | + |
| 103 | +<h3 id="create-security-group">Create Security Group</h3> |
| 104 | + |
| 105 | +<p>Operation: <code>POST</code></p> |
| 106 | + |
| 107 | +<p>URL: <code>SoftLayer_Network_SecurityGroup</code></p> |
| 108 | + |
| 109 | +<p>Example CURL:</p> |
| 110 | + |
| 111 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -k -X POST 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup' -d '{&quot;parameters&quot;: [{&quot;name&quot;: &quot;some name&quot;,&quot;description&quot;:&quot;some description&quot;}]}' |
| 112 | +</code></pre> |
| 113 | + |
| 114 | +<p>Example Response:</p> |
| 115 | + |
| 116 | +<pre><code>{ |
| 117 | + &quot;createDate&quot;: &quot;2017-10-11T11:04:42-05:00&quot;, |
| 118 | + &quot;description&quot;: &quot;some description&quot;, |
| 119 | + &quot;id&quot;: 123456, |
| 120 | + &quot;modifyDate&quot;: null, |
| 121 | + &quot;name&quot;: &quot;some name&quot; |
| 122 | +} |
| 123 | +</code></pre> |
| 124 | + |
| 125 | +<hr /> |
| 126 | + |
| 127 | +<h3 id="get-security-group">Get Security Group</h3> |
| 128 | + |
| 129 | +<p>Operation: <code>GET</code></p> |
| 130 | + |
| 131 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}</code></p> |
| 132 | + |
| 133 | +<p>Example CURL:</p> |
| 134 | + |
| 135 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -k -X GET 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/123456' |
| 136 | +</code></pre> |
| 137 | + |
| 138 | +<p>Example Response:</p> |
| 139 | + |
| 140 | +<pre><code>{ |
| 141 | + &quot;createDate&quot;: &quot;2017-10-11T11:04:42-05:00&quot;, |
| 142 | + &quot;description&quot;: &quot;some description&quot;, |
| 143 | + &quot;id&quot;: 123456, |
| 144 | + &quot;modifyDate&quot;: null, |
| 145 | + &quot;name&quot;: &quot;some name&quot; |
| 146 | +} |
| 147 | +</code></pre> |
| 148 | + |
| 149 | +<hr /> |
| 150 | + |
| 151 | +<h3 id="edit-security-group">Edit Security Group</h3> |
| 152 | + |
| 153 | +<p>Operation: <code>PUT</code></p> |
| 154 | + |
| 155 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}</code></p> |
| 156 | + |
| 157 | +<p>Example CURL:</p> |
| 158 | + |
| 159 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -k -X PUT 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/123456' -d '{&quot;parameters&quot;: [{&quot;description&quot;: &quot;new description&quot;}]}' |
| 160 | +</code></pre> |
| 161 | + |
| 162 | +<p>Example Response:</p> |
| 163 | + |
| 164 | +<pre><code>true |
| 165 | +</code></pre> |
| 166 | + |
| 167 | +<hr /> |
| 168 | + |
| 169 | +<h3 id="delete-security-group">Delete Security Group</h3> |
| 170 | + |
| 171 | +<p>Operation: <code>DELETE</code></p> |
| 172 | + |
| 173 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}</code></p> |
| 174 | + |
| 175 | +<p>Example CURL:</p> |
| 176 | + |
| 177 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -k -X DELETE 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/123456' |
| 178 | +</code></pre> |
| 179 | + |
| 180 | +<p>Example Response:</p> |
| 181 | + |
| 182 | +<pre><code>true |
| 183 | +</code></pre> |
| 184 | +</description> |
| 185 | + </item> |
| 186 | + |
| 187 | + <item> |
| 188 | + <title>Get network components, attach and detach network components</title> |
| 189 | + <link>https://softlayer.github.io/rest/getattachdetachnetworkcomponent/</link> |
| 190 | + <pubDate>Mon, 02 Oct 2017 00:00:00 UTC</pubDate> |
| 191 | + <author>Enthusiastic Hugo User</author> |
| 192 | + <guid>https://softlayer.github.io/rest/getattachdetachnetworkcomponent/</guid> |
| 193 | + <description> |
| 194 | + |
| 195 | +<h3 id="get-the-network-component-ids-for-a-vsi">Get the network component IDs for a VSI</h3> |
| 196 | + |
| 197 | +<p>Operation: <code>GET</code></p> |
| 198 | + |
| 199 | +<p>URL: <code>SoftLayer_Virtual_Guest/{guest_id}/getObject.json?objectMask=mask[networkComponents.port,networkComponents.id]</code></p> |
| 200 | + |
| 201 | +<p>Example CURL:</p> |
| 202 | + |
| 203 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -g -X GET 'https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/30000007/getObject.json?objectMask=mask[networkComponents.port,networkComponents.id]' |
| 204 | +</code></pre> |
| 205 | + |
| 206 | +<p>Example Response:</p> |
| 207 | + |
| 208 | +<pre><code>{ |
| 209 | + &lt;output omitted&gt; |
| 210 | + &quot;networkComponents&quot;: [ |
| 211 | + { |
| 212 | + &quot;id&quot;: 20000003, |
| 213 | + &quot;port&quot;: 0 |
| 214 | + }, |
| 215 | + { |
| 216 | + &quot;id&quot;: 20000001, |
| 217 | + &quot;port&quot;: 1 |
| 218 | + } |
| 219 | + ], |
| 220 | + &lt;output omitted&gt; |
| 221 | +} |
| 222 | +</code></pre> |
| 223 | + |
| 224 | +<hr /> |
| 225 | + |
| 226 | +<h3 id="attach-network-component-to-security-group">Attach network component to Security Group</h3> |
| 227 | + |
| 228 | +<p>Operation: <code>POST</code></p> |
| 229 | + |
| 230 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}/attachNetworkComponents</code></p> |
| 231 | + |
| 232 | +<p>Example CURL:</p> |
| 233 | + |
| 234 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -X POST 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/123456/attachNetworkComponents' -d '{&quot;parameters&quot;: [[20000003]]}' |
| 235 | +</code></pre> |
| 236 | + |
| 237 | +<hr /> |
| 238 | + |
| 239 | +<h3 id="detach-network-component-from-security-group">Detach network component from Security Group</h3> |
| 240 | + |
| 241 | +<p>Operation: <code>POST</code></p> |
| 242 | + |
| 243 | +<p>URL: <code>SoftLayer_Network_SecurityGroup/{securitygroup_id}/detachNetworkComponents</code></p> |
| 244 | + |
| 245 | +<p>Example CURL:</p> |
| 246 | + |
| 247 | +<pre><code>$ curl --user &quot;$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY&quot; -X POST 'https://api.softlayer.com/rest/v3/SoftLayer_Network_SecurityGroup/123456/detachNetworkComponents' -d '{&quot;parameters&quot;: [[20000003]]}' |
| 248 | +</code></pre> |
| 249 | +</description> |
| 250 | + </item> |
10 | 251 |
|
11 | 252 | <item> |
12 | 253 | <title>Add and remove rules in a Security group</title> |
|
0 commit comments